Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Slide 36Slide 37FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY15-453www.cs.cmu.edu/~emc/flac09INSTRUCTORSWill KlieberYi WuEdmund ClarkeGradingExams: 50% - Final Exam: 25% - Midterm Exam: 25%Homework: 45%Class Participation: 5%Attendance is required.HOMEWORKHomework will be assigned every Thursday and will be due one week later at the beginning of class You must list your collaborators and all references in every homework assignment.Readings will be posted on the course website.For next class: Read Chapters 0 and 1.1www.cs.cmu.edu/~emc/flac09This class is about mathematical models of computationWHY SHOULD I CARE?WAYS OF THINKINGTHEORY CAN DRIVE PRACTICEMathematical models of computation predated computers as we know themTHIS STUFF IS USEFULCourse OutlinePART 1Automata and Languages:finite automata, regular languages, pushdown automata, context-free languages, pumping lemmas.PART 2Computability Theory: Turing Machines, decidability, reducibility, the arithmetic hierarchy, the recursion theorem, the Post correspondence problem.PART 3Complexity Theory and Applications:time complexity, classes P and NP, NP-completeness, space complexity PSPACE, PSPACE-completeness, the polynomial hierarchy, randomized complexity, classes RP and BPP.PART 1Automata and Languages: (1940’s)finite automata, regular languages, pushdown automata, context-free languages, pumping lemmas.PART 2Computability Theory: (1930’s-40’s)Turing Machines, decidability, reducibility, the arithmetic hierarchy, the recursion theorem, the Post correspondence problem.PART 3Mathematical Models of Computation(predated computers as we know them)Complexity Theory and Applications: (1960’s-70’s)time complexity, classes P and NP, NP-completeness, space complexity PPACE, PSPACE-completeness, the polynomial hierarchy, randomized complexity, classes RP and BPP.This class will emphasize PROOFSA good proof should be:Easy to understandCorrectSuppose A  {1, 2, …, 2n}TRUE or FALSE: There are always two numbers in A such that one divides the otherwith |A| = n+1TRUETHE PIGEONHOLE PRINCIPLEIf you put 6 pigeons in 5 holes then at least one hole will have more than one pigeonHINT 1:LEVEL 1THE PIGEONHOLE PRINCIPLEIf you put 6 pigeons in 5 holes then at least one hole will have more than one pigeonHINT 1:LEVEL 1THE PIGEONHOLE PRINCIPLEIf you put 6 pigeons in 5 holes then at least one hole will have more than one pigeonHINT 1:HINT 2:Every integer a can be written as a = 2km, where m is an odd numberLEVEL 1LEVEL 2PROOF IDEA:Given: A  {1, 2, …, 2n} and |A| = n+1Show: There is an integer m and elements a1  a2 in Asuch that a1 = 2im and a2 = 2jmSuppose A  {1, 2, …, 2n}Write every number in A as a = 2km, where m is an odd numberbetween 1 and 2n-1How many odd numbers in {1, …, 2n-1}?nSince |A| = n+1, there must be two numbers in A with the same odd partwith |A| = n+1Say a1 and a2 have the same odd part m.Then a1 = 2im and a2 = 2jm, so one must divide the other LEVEL 3PROOF:We expect your proofs to have three levels:The first level should be a one-word or one-phrase “HINT” of the proof(e.g. “Proof by contradiction,” “Proof by induction,”“Follows from the pigeonhole principle”)The second level should be a short one-paragraph description or “KEY IDEA”The third level should be the FULL PROOFDOUBLE STANDARDS?During the lectures, my proofs will usually only contain the first two levels and maybe part of the thirdDETERMINISTIC FINITE AUTOMATA00,1001110111 111111 The machine accepts a string if the process ends in a double circleRead string left to rightThe machine accepts a string if the process ends in a double circleA Deterministic Finite Automaton (DFA)00,100111 statesstatesq0q1q2q3The machine accepts a string if the process ends in a double circleA Deterministic Finite Automaton (DFA)00,100111 q0q1q2q3start state (q0)accept states (F)statesstatesAn alphabet Σ is a finite set (e.g., Σ = {0,1})A string over Σ is a finite-length sequence of elements of ΣFor x a string, |x| is the length of xThe unique string of length 0 will be denoted by ε and will be called the empty or null stringNOTATIONA language over Σ is a set of strings over Σ, ie, a subset of Σ* Σ* denotes the set of finite length sequences of elements of ΣQ is the set of states (finite)Σ is the alphabet (finite) : Q  Σ → Q is the transition functionq0  Q is the start stateF  Q is the set of accept statesA deterministic finite automaton (DFA) is represented by a 5-tuple M = (Q, Σ, , q0, F) :Let w1, ... , wn  Σ and w = w1... wn  Σ* Then M accepts w if there are r0, r1, ..., rn  Q, s.t.•r0=q0 • (ri, wi+1 ) = ri+1, for i = 0, ..., n-1, and •rn  FQ is the set of states (finite)Σ is the alphabet (finite) : Q  Σ → Q is the transition functionq0  Q is the start stateF  Q is the set of accept statesL(M) = the language of machine M= set of all strings machine M acceptsA deterministic finite automaton (DFA) is represented by a 5-tuple M = (Q, Σ, , q0, F) :0,1q0L(M) ={0,1}*q0q10011L(M) ={ w | w has an even number of 1s}q q00101q0q0010010,1Build an automaton that accepts all and only those strings that contain 001A language L is regular if it is recognized by a deterministic finite automaton (DFA), i.e. if there is a DFA M such that L = L (M).L = { w | w contains 001} is regularL = { w | w has an even number of 1’s} is regularUNION THEOREMGiven two languages, L1 and L2, define the union of L1 and L2 as L1  L2 = { w | w  L1 or w  L2 } Theorem: The union of two regular languages is also a regular languageTheorem: The union of two regular languages is also a regular languageProof: Let M1 = (Q1, Σ, 1, q0, F1) be finite automaton for L1 and M2 = (Q2, Σ, 2, q0, F2) be finite automaton for L2We want to construct a finite automaton M = (Q, Σ, , q0, F) that recognizes L = L1  L2 12Idea: Run both M1 and M2 at the same time!Q= pairs of states, one from M1 and one from M2= { (q1, q2) | q1  Q1 and q2  Q2 }= Q1  Q2q0 = (q0, q0)12F = { (q1, q2) | q1  F1 or q2  F2 }( (q1,q2), ) = (1(q1, ), 2(q2, ))Theorem: The union of two regular languages is also a regular


View Full Document

CMU CS 15453 - Lecture

Documents in this Course
Lecture

Lecture

52 pages

Lecture

Lecture

38 pages

lecture

lecture

37 pages

lecture

lecture

37 pages

Lecture

Lecture

12 pages

Lecture4x

Lecture4x

39 pages

lecture

lecture

28 pages

Load more
Download Lecture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?