TOC Assignment-1 Solutions
TOC Assignment-1 Solutions
ASSIGNMENT-1
Questions:
1. Give Formal definition of DFA and also design a DFA to read a string made up of letters
“computer” and recognize the strings that contain “come” as substring.
2. Design finite automata for following languages
i)Set of all strings that end with ab or ba over Σ={a,b}
ii)L={w/w∈ (a+b)* such that na(w)mod 3 =0 and nb(w)mod 2=0}
4. Construct DFSM , String of a’s and b’s such that every block of five consecutive symbols
have at least two b’s on Σ={a,b}
5. Design a Deterministic Finite Automata over language Σ={a,b} , L={w| |w| mod 3> |w| mod 2}
6. Design a DFA that recognizes, L={W|W is non-empty and has 1 on every odd position}
i) L={w∈ {0,1}*: w corresponds to the binary encoding, without leading 0’s of natural numbers that
are evenly divisible by 4}
8. Define NFA and design an NFA for the language L2, where L={awa|w∈ {a,b}n,n≥0}
ii) To accept strings that either begin, ends or both with string ‘ab’.