Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture 11 Studying structure of REC –Complexity theory overview –Automata theory preview Motivating Problem –string searching.

Similar presentations


Presentation on theme: "1 Lecture 11 Studying structure of REC –Complexity theory overview –Automata theory preview Motivating Problem –string searching."— Presentation transcript:

1 1 Lecture 11 Studying structure of REC –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 recursive problems are solvable How do we measure the hardness of a problem? –measure resources required to solve a problem –typical resources are running time memory REC RE - REC All languages - RE

5 5 Picture of REC 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. P: the set of problems which can be solved in polynomial time Major goal: Identify whether or not a problem belongs to P P Rest of REC REC RE - REC All languages - RE

6 6 Working with P PRest of REC How do you prove a problem L is in P? –Show there exists a program P which solves L in polynomial time How do you prove a problem L is not in P? –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 (reductions) which show a problem L probably is not in P, but few which prove it.

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

8 8 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 what subset of 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

9 9 Recap Complexity Theory –Studies structure of REC –Method: analyze resources (processing time) used to solve a problem Automata Theory –Studies structure of REC –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

10 10 Motivating Problem String Searching

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

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

13 13 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 11 Studying structure of REC –Complexity theory overview –Automata theory preview Motivating Problem –string searching."

Similar presentations


Ads by Google