dragon-book-exercise-answers icon indicating copy to clipboard operation
dragon-book-exercise-answers copied to clipboard

Added Answers for 4.2.3 (5 & 6)

Open fmonge opened this issue 6 years ago • 1 comments

  1. ! The set of all strings of 0s and as in which 011 does not appear as a substring.

    S -> 1S | 0T T -> 0T | 01T | ε

  2. !! The set of all strings of 0s and 1s of the form xy, where x<>y and x and y are of the same length. M -> P | 0M1 | 1M0 | 1M1 | 0M0 P -> 0I0 | 1I0 I -> 0I0 | 1I1 | ε

fmonge avatar Oct 10 '18 01:10 fmonge

In 5. the empty string is not accepted by this grammar I think this grammar would be better S -> 1S | 0T| ε T -> 0T | 01T | ε

anantdevcs avatar Jan 21 '21 18:01 anantdevcs