Assignment_6_Answer_Key

Assignment_6_Answer_ - Assignment 6 Answer Key 2.4b A-> 0B0 | 1B1 | B-> 0B | 1B | 2.4c A-> 0B | 1B B-> 00B | 01B | 10B | 11B | 2.4e A-> 0A0 | 1A1 |

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment 6 Answer Key 2.4b A -> 0B0 | 1B1 | є B -> 0B | 1B | є 2.4c A -> 0B | 1B B -> 00B | 01B | 10B | 11B | є 2.4e A -> 0A0 | 1A1 | B B -> 0 | 1 | є 2.9 S -> TU | VW T -> aTb | є U -> Uc | є V -> Va | є W -> bWc | є It is ambiguous because there are multiple ways to generate certain grammars, such as those where i=j=k. Consider aabbcc: S->TU-> aTbU -> aaTbbU -> aabbU -> aabbUc -> aabbUcc -> aabbcc S->VW-> VbWc -> VbbWcc -> Vbbcc -> Vabbcc -> Vaabbcc -> aabbcc Diagram Problem 2.13 a It is a string with either a string with a single # which has n 0s on the left and 2n 0s on the right or a string with two #s and any number of 0s before, between and after the two #s.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2.13 b Suppose L were regular. Let p be the pumping length given by the pumping lemma. Consider the string w p = 0 p #0 2p Clearly, |w p | >= p and w p is in L. So, by the pumping lemma, there must be some choice of
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/07/2011 for the course CS 501 taught by Professor Sm during the Spring '11 term at Indiana.

Page1 / 2

Assignment_6_Answer_ - Assignment 6 Answer Key 2.4b A-> 0B0 | 1B1 | B-> 0B | 1B | 2.4c A-> 0B | 1B B-> 00B | 01B | 10B | 11B | 2.4e A-> 0A0 | 1A1 |

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online