381hw7solns - CS 381 Homework#7 Problem 1 S S1 | S2 S1 AC A...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 381 Homework #7 Problem 1 S S 1 | S 2 S1 AC case where i = j A aAb A ε C cC C ε S 2 aS 2 c case where i = k S 2 B B bB B ε
Image of page 1

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

View Full Document Right Arrow Icon
Write a cfg for the complement of {ww R | w (a + b)*} S barb2right a S a | b S b | a E b | b E a | a | b E barb2right a E | b E | ε Course 381 Homework 7 Problem 2
Image of page 2
CS 381 Homework #7 Problem 3 Twice as many b’s as a’s S SaSbSbS | SbSaSbS | SbSbSaS | ε
Image of page 3

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

View Full Document Right Arrow Icon
CS 381 Homework #7 Problem 4 Convert regular set to its corresponding DFA, M and have all its states be variables in the CFL, G. The alphabet of G is that of M. For every δ (q n , a) = p, there’s a corresponding Q n aP For every q f F in the DFA, there’s a corresponding Q f ε Let S Q 0
Image of page 4