Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture 14 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 Lecture 14 Studying the internal structure of REC, the set of solvable problems –Complexity theory overview –Automata theory preview Motivating Problem."— Presentation transcript:

1 1 Lecture 14 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 Unsolvable Which language class should be studied further? REC Solvable 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 –Running time –Memory 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? –Show there exists a program P which solves L in polynomial time How do you prove a problem L is not in Poly? –You must prove that no program P solves L in polynomial time –We are not very good at this. –For a large class of interesting problems, we have techniques (polynomial-time answer-preserving input transformations) which show a problem L probably is not in Poly, but few which prove it.

8 8 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 We take away capabilities and resources –We then identify which problems can be solved using FSA’s and PDA’s REC RE - REC All languages - RE

9 9 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

10 10 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

11 11 Motivating Problem String Searching

12 12 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.

13 13 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.

14 14 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 Lecture 14 Studying the internal structure of REC, the set of solvable problems –Complexity theory overview –Automata theory preview Motivating Problem."

Similar presentations


Ads by Google