{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hwsol1 - Theory of Algorithms Spring 2000 Homework 1...

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

Theory of Algorithms. Spring 2000. Homework 1 Solutions. Section 1.2 (4) All but the third string are in L * . (5) If L = { a n b n +1 : n 0 } then L 6 = L * . For example, λ L * but λ / L . If L = { w : n a ( w ) = n b ( w ) } then L = L * . (6) There are no languages L such that L * = ¯ L * . One way to see this is that for any language L , λ ¯ L * but λ / L * . (8) (a) S BaB B bB | λ (b) S AaA A aA | bA | λ (c) S B | BaB | BaBaB | BaBaBaB B bB | λ (9) L ( G ) = { ( ab ) n | n 0 } . (10) L ( G ) = because there is no way to derive a string that doesn’t contain one of the auxiliary symbols S , A , B . (11) (a) S aSb | B B bB | b (b) S aSbb | λ . (c) S aaaAb A aAb | λ (d) S aaaA A aAb | λ (e) S S 1 S 2 S 1 aS 1 b | B B bB | b S 2 aS 2 bb | λ (f) S S 1 | S 2 S 1 aS 1 b | B B bB | b S 2 aS 2 bb | λ (g) S S 1 S 1 S 1 S 1 aS 1 b | B B bB | b (h) S SS | λ | S 1 S 1 aS 1 b | B B bB | b (i) L 1 - ¯ L 4 = L 1 L 4 . But L 1 L 4 = . A grammar for the empty language is: S S .

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

hwsol1 - Theory of Algorithms Spring 2000 Homework 1...

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

View Full Document
Ask a homework question - tutors are online