1 / 40

COSC 3340: Introduction to Theory of Computation

COSC 3340: Introduction to Theory of Computation. University of Houston Dr. Verma Lecture 17. Definitions . A configuration is a snapshot of the machine written u q v .

keiki
Download Presentation

COSC 3340: Introduction to Theory of Computation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 17 UofH - COSC 3340 - Dr. Verma

  2. Definitions • A configuration is a snapshot of the machine written uqv. • Configuration C1yields configuration C2if the Turing machine can legally go from C1 to C2 in a single step. • Suppose: a, b, and c in , u and v in * and states qi and qj. Then, uaqibv and uqjacv are two configurations. • uaqibvyieldsuqjacv if (qi, b) = (qj, c, L). • handles the case where the TM moves leftward. • For a rightward move, uaqibvyieldsuacqjv if (qi, b) = (qj,c,R). UofH - COSC 3340 - Dr. Verma

  3. Special Cases • Special Cases occur when the head is at one of the ends of the configurations. • For the left-hand end, the configurations qibv yieldsqjcv if the transition is left moving, and it yields cqjv for the right moving transition. • For the right-hand end, the configuration uaqi is equivalent to uaqi□ because we assume that blanks follow the part of the tape represented in the configuration. Thus we can handle this case as before, with the head no longer at the right handend. UofH - COSC 3340 - Dr. Verma

  4. More Definitions • The start configuration of M on input w is the configuration q0w, which indicates that the machine is in the start state q0 with its head at the leftmost position on the tape • In an accepting configuration the state of the configuration is qaccept • In a rejecting configuration the state of the configurations is qreject • Accepting and rejecting configurations are halting configurations and accordingly do not yield further configurations UofH - COSC 3340 - Dr. Verma

  5. More Definitions • A TMMaccepts input w if a sequence of configurations C1,C2,…,Ck exists where • C1 is the start configuration of M on input w, • Each Ci yields Ci+1, and • Ck is an accepting configuration. • The collection of strings that M accepts is the language of M, denoted L(M). UofH - COSC 3340 - Dr. Verma

  6. More Definitions • - Turing-recognizable/acceptable TMMaccepts/recognizes language L if L = {w | M accepts w}. Note: 3 outcomes possible, either TMaccepts, rejects, or loops. • Turing-decidable: TM M decides L if (i) w L, M writes a Yes on tape and halts (ii) w L, M writes a No on tape and halts. Every decidable language is Turing-recognizable but certain Turing-recognizable language are not decidable. UofH - COSC 3340 - Dr. Verma

  7. Example of TM for {0n1n2n | n> 0} • English description of how the machine works: • Look for 0’s • If 0 found, change it to x and move right, else reject • Scan past 0’s and y’s until you reach 1 • If 1 found, change it to y and move right, else reject. • Scan past 1’s and z’s until you reach 2 • If 2 found, change it to z and move left, else reject. • Move left scanning past 0’s, y’s, z’s and 1’s • If x found move right • If 0 found, loop back to step 2. • If 0 not found, scan past y’sand z’s and accept. Head is on the left or start of the string. x, y and zare just variables to keep track of equality UofH - COSC 3340 - Dr. Verma

  8. Example of TM for {0n1n2n | n > 0} contd. In this case we are starting from the right or at the end of a given string on the tape. Table will be very similar if we start from the left. UofH - COSC 3340 - Dr. Verma

  9. Example of TM for {0n1n2n | n > 0} contd. Head is on the left or start of the string. UofH - COSC 3340 - Dr. Verma

  10. Example of TM for {0n1n2n | n > 0} contd. Head is on the left or start of the string. UofH - COSC 3340 - Dr. Verma

  11. Example of TM for {0n1n2n | n > 0} contd. Head is on the left or start of the string. UofH - COSC 3340 - Dr. Verma

  12. Example of TM for {0n1n2n | n > 0} contd. Head is on the left or start of the string. UofH - COSC 3340 - Dr. Verma

  13. Example of TM for {0n1n2n | n > 0} contd. UofH - COSC 3340 - Dr. Verma

  14. Example of TM for {0n1n2n | n > 0} contd. UofH - COSC 3340 - Dr. Verma

  15. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  16. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  17. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  18. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  19. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  20. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  21. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  22. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  23. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  24. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  25. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  26. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  27. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  28. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  29. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  30. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  31. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  32. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  33. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  34. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  35. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  36. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  37. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  38. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  39. JFLAP SIMULATION UofH - COSC 3340 - Dr. Verma

  40. Different way of making {0n1n2n | n 0} UofH - COSC 3340 - Dr. Verma

More Related