Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Module 13 Studying the internal structure of REC, the set of solvable problems –Complexity theory overview –Automata theory preview Motivating Problem.

Similar presentations


Presentation on theme: "1 Module 13 Studying the internal structure of REC, the set of solvable problems –Complexity theory overview –Automata theory preview Motivating Problem."— Presentation transcript:

1 1 Module 13 Studying the internal structure of REC, the set of solvable problems –Complexity theory overview –Automata theory preview Motivating Problem –string searching

2 2 Studying REC Complexity Theory Automata Theory

3 3 Current picture of all languages *  ll Languages RE-REC  ll languages - RE Half Solvable Not even half solvable Which language class should be studied further? REC Solvable

4 4 Complexity Theory * In complexity theory, we differentiate problems by how hard a problem is to solve –Remember, all problems in REC are solvable Which problem is harder and why? –Max: Input: list of n numbers Task: return largest of the n numbers –Element Input: list of n numbers Task: return any of the n numbers REC RE - REC All languages - RE

5 5 Resource Usage * How do we formally measure the hardness of a problem? –We measure the resources required to solve input instances of the problem Typical resources are? Need a notion of size of an input instance –Obviously larger input instances require more resources to solve

6 6 Poly Language Class * Informal Definition: A problem L 1 is easier than problem L 2 if problem L 1 can be solved in less time than problem L 2. Poly: the set of problems which can be solved in polynomial time (typically referred to as P, not Poly) Major goal: Identify whether or not a problem belongs to Poly Poly Rest of REC REC RE - REC All languages - RE

7 7 Working with Poly * PolyRest of REC How do you prove a problem L is in Poly? How do you prove a problem L is not in Poly? –We are not very good at this. –For a large class of interesting problems, we have techniques (polynomial-time answer- preserving input transformations) that show a problem L probably is not in Poly, but few which prove it.

8 8 Examples * Shortest Path Problem Input –Graph G –nodes s and t Task –Find length of shortest path from s to t in G Longest Path Problem Input –Graph G –nodes s and t Task –Find length of longest path from s to t in G PolyRest of REC Which problem is provably solvable in polynomial time?

9 9 Automata Theory In automata theory, we will define new models of computation which we call automata –Finite State Automata (FSA) –Pushdown Automata (PDA) Key concept –FSA’s and PDA’s are restricted models of computation FSA’s and PDA’s cannot solve all the problems that C++ programs can –We then identify which problems can be solved using FSA’s and PDA’s REC RE - REC All languages - RE

10 10 New language classes * REC is the set of solvable languages when we start with a general model of computation like C++ programs We want to identify which problems in REC can be solved when using these restricted automata Rest of REC Solvable by FSA’s and PDA’s Solvable by PDA’s REC RE - REC All languages - RE

11 11 Recap * Complexity Theory –Studies structure of the set of solvable problems –Method: analyze resources (processing time) used to solve a problem Automata Theory –Studies structure of the set of solvable problems –Method: define automata with restricted capabilities and resources and see what they can solve (and what they cannot solve) –This theory also has important implications in the development of programming languages and compilers

12 12 Motivating Problem String Searching

13 13 String Searching Input –String x –String y Tasks –Return location of y in string x –Does string y occur in string x? Can you identify applications of this type of problem in real life? Try and develop a solution to this problem.

14 14 String Searching II Input –String x –pattern y Tasks –Return location of y in string x –Does pattern y occur in string x? Pattern –[anything].html –$EN4$$ Do you see applications for this in real life? Try and develop a solution to this problem.

15 15 String Searching We will show an easy way to solve these string searching problems In particular, we will show that we can solve these problems in the following manner –write down the pattern –the computer automatically turns this into a program which performs the actual string search


Download ppt "1 Module 13 Studying the internal structure of REC, the set of solvable problems –Complexity theory overview –Automata theory preview Motivating Problem."

Similar presentations


Ads by Google