1 / 9

CS 461 – Nov. 14

CS 461 – Nov. 14. Section 5.2 – Undecidable problems starting from A TM :  Matching sets of strings  Ambiguity of CFGs. String matching. Formal name is the Post Correspondence Problem , (by mathematician Emil Post) Given a set of dominoes Each contains a string on the top and bottom

xenos
Download Presentation

CS 461 – Nov. 14

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. CS 461 – Nov. 14 • Section 5.2 – Undecidable problems starting from ATM:  Matching sets of strings  Ambiguity of CFGs

  2. String matching • Formal name is the Post Correspondence Problem, (by mathematician Emil Post) • Given a set of dominoes • Each contains a string on the top and bottom • Use the dominoes so that the strings on the top and bottom match. • You may use each domino as many times as you like. But there must be one domino.  • The solution is the sequence of dominoes (e.g. 1,2,3) 11 111 100 001 111 11

  3. Another PCP • Can you find a solution to this one? 1 111 10111 10 10 0 Or this one? 10 101 011 11 101 011

  4. Undecidability • To show the problem is undecidable in general, we draw a parallel with ATM, which we know is undecidable. • Take any TM with an input word. If we follow the TM’s steps, there is a parallel sequence of dominoes! Accept  there is a match, and reject  there is no match. • For each possible TM action, we specify what the dominoes look like.

  5. Example • This is best seen via an example. Let’s say we have a TM that accepts the language 1*00*1(0+1)*, and we feed it the word 01. [s1] 0 1 0 [s2] 1 0 1 [acc]

  6. There are 7 kinds of dominoes we need. The first domino represents the initial configuration of the TM, which is [s1] 0 1 0 [s2] 1 0 1 [acc] Create dominoes! # #[s1] 0 1 #

  7. Second type of domino represents moves to the right. In our case we see [s1] 0 1 0 [s2] 1 0 1 [acc] Dominoes (2,3) [s1] 0 0 [s2] [s2] 1 1 [acc] The third type of domino would represent moves going left, but we don’t have any of these. In general, right moves are qa/br and left moves are cqa/rcb.

  8. Allow ourselves to do nothing to a tape symbol away from the read-write head. [s1] 0 1 0 [s2] 1 0 1 [acc] Dominoes (4, 5) 0 0 1 1 _ _ Also, allow use to put a delimiter (#) between steps, and put blanks on either side of the input as needed. # # # # _ # _ #

  9. Allow ourselves to eat the tape once we accept! There will be 6 dominoes like this: [s1] 0 1 0 [s2] 1 0 1 [acc] Dominoes (6, 7) 0 [acc] [acc] [acc] 0 [acc] And finally, we need a special case domino to “eat” the accept state notation on the tape.  [acc] # # #

More Related