Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.

Similar presentations


Presentation on theme: "CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided."— Presentation transcript:

1 CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided by author Slides edited for use by MSU Department of Computer Science – R. Halverson 1

2 Computation Chapter 4 2

3 Our Goals 1.Define a problem as a language 2.Define program/machine which accepts a string as input & determines if the string is in the language 3

4 Three Computational Issues 1.Decision procedures 2.Nondeterminism 3.Functions on functions and programs 4

5 1. Decision Procedures  Decision Problem  Yes or No solution  Algorithm  Detailed process/procedure that accomplishes some task  Decision Procedure  An algorithm that provides a Yes or No solution to a decision problem 5

6 2. Nondeterminism  Deterministic Program  Given a single input, all executions of the program compute the same solution  I.E. We can DETERMINE with certainty what the solution will be.  Nondeterministic Program  Given a single input, different executions of the program may produce different solutions. 6

7 How is nondeterminism possible? You answer this question!! 7

8 This is author’s method of specifying. We will seldom, if ever, use this. 1. choose (action 1;; action 2;; … action n ) 2. choose(x from S: P(x)) Nondeterminism 8

9 Want plane ticket, rental car, train/public transportation for a trip. Is optimal (cheapest/fastest) absolutely necessary?? trip-plan(start, finish) = return (choose( fly-major-airline-and-rent-car(start, finish);; fly-regional-airline-and-rent-car(start, finish);; take-train-and-use-public-transportation (start, finish);; drive(start, finish) )) Nondeterminism Example 9

10 Nondeterminism 10 Convert first to second. Is a solution possible? How will you find it? How long will it take?

11 3. Functions on Languages Given a language, perform some function on the language to create a new language –Concatenation, Repetition, Union, Intersection –Can define many others E.G. Chop = all odd strings of a language with the middle character “chopped” out 11

12 Homework Chapter 4 None 12


Download ppt "CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided."

Similar presentations


Ads by Google