# hwsol4 - Theory of Algorithms Spring 2000 Homework 4...

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

Theory of Algorithms. Spring 2000. Homework 4 Solutions. Section 3.1 (1) b, ab, bb, ba, aab, abb, bab, bbb, aba, bba, baa . (All strings that contain at least one b .) (5) (a) aaaaa * ( λ + b + bb + bbb ). (b) ( λ + a + aa + aaa )( λ + b ( a + b ) * )+ aaaaa * b ( bbb + b * a )( a + b ) * . (6) 0 = { λ } so * = { λ } so ( * ) * = { λ } * = { λ } . a = { aw | w ∈∅} = . (8) ( a + ba ) * b ( a + b ) * . (12) aa ( a + b ) * aa + ab ( a + b ) * ab + ba ( a + b ) * ba + bb ( a + b ) * bb . (14) (a) ( b + c ) * a ( b + c ) * . (b) ( b + c ) * ( a + λ )( b + c ) * ( a + λ )( b + c ) * ( a + λ )( b + c ) * . (c) ( a + b + c ) * a ( a + b + c ) * b ( a + b + c ) * c ( a + b + c ) * +( a + b + c ) * a ( a + b + c ) * c ( a + b + c ) * b ( a + b + c ) * + ( a + b + c ) * b ( a + b + c ) * a ( a + b + c ) * c ( a + b + c ) * a + b + c ) * b ( a + b + c ) * c ( a + b + c ) * a ( a + b + c ) * + ( a + b + c ) * c ( a + b + c ) * b ( a + b + c ) * a ( a + b + c ) * a + b + c ) * c ( a + b + c ) * a ( a + b + c ) * b ( a + b + c ) * . (d) (( λ + a + aa )( b + c )) * ( λ + a + aa ). (e) ( aaa + b + c ) * . Section 3.2 (1) As I mentioned in class, I want you to ﬁnd nfa’s for the small sub-expressions by hand, and then use the techniques of the proof to combine the smaller nfa’s into a larger nfa. Thus there will not be a unique solution. One possible solution is the following: - - - - - - - ? 6 1 R z 3 - λ λ λ λ a a a a a b b b b (3) - 1 s s * - 3 s - ± z 7 / ² / λ λ λ λ λ λ λ λ a b b b b a 1

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

View Full Document
(7) L ( r )where r = a * ( a + b ) ab ( ( bb + ab )+ aa * ( a + b ) ab ) * . - 1 ) ± 6 a bb + ab ( a + b ) ab a (8) L ( r r = a * ( a * b + c )( a + b * ) * . q 0 - q 1 - ² 1 ? ? ? a a a + b a + b a + b * a * b + c q 0 - 1 ? ? a a + b * a * b + c (9) (a) b * aa * ab * a . - q 0 - q 2 - ? W aa * a a b b - q 0 ? q 0 - q 1 - q 2 - - ? ? W aa a a b b b - aa * ab * a (b) ( ab +(
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/17/2011 for the course MAD 3512 taught by Professor Staff during the Spring '07 term at University of Florida.

### Page1 / 3

hwsol4 - Theory of Algorithms Spring 2000 Homework 4...

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

View Full Document
Ask a homework question - tutors are online