Consider two PCP instances over {0, 1}, each with lists A and B of three strings. X: A = (1, 10111, 10), B = (111, 10, 0). Y: A = (10, 011, 101), B = (101, 11, 011). Which is true?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. Only PCP in X has a solution
Explanation
X has the solution 2, 1, 1, 3: A gives 10111·1·1·10 = 1011111110 and B gives 10·111·111·0 = 1011111110. In Y every match must start with pair 1 (10/101), after which B stays one symbol ahead with no pair that closes the gap, so Y has no solution.
More Theory of Computation and Compilers questions
- Match List I with List II. List I: (A) Activation record, (B) Location counter, (C) Reference count, (D) Address relocation. List II: (I) L…
- Consider the grammar S → SbS | a. The string abababa has (A) two parse trees (B) two leftmost derivations (C) two rightmost derivations. Wh…
- Match List I with List II. List I: (A) Type 0, (B) Type 1, (C) Type 2, (D) Type 3. List II: (I) Finite automata, (II) Turing machine, (III)…
- Statement I: The LALR parser is more powerful than the canonical LR parser. Statement II: The SLR parser is more powerful than LALR. Which…
- Statement I: CFLs are closed under homomorphism. Statement II: CFLs are closed under complement. Which is correct?
- Assertion (A): A load-and-go assembler avoids the overhead of writing the object program out and reading it back in. Reason (R): This can b…