(For regular languages, write down its regular expression or describe the automata accepting it; for languages that are not regular, prove it using pumping lemma)
Both of these are regular languages:
1. {w: w is the unary notation for number that is multiple of 7}
reg expression - (IIIIIII)* = (I7)*
PFA automata image: S is start state and F is the final state. Here both are represented by the same node. Since string of 0 length is also a multiple of 7.
2. {w: w is the unary notation for 10n,n ≥1}
reg expression - (IIIIIIIIII)+ = (I10)+
PFA automata image: S is start state and F is the final state
Get Answers For Free
Most questions answered within 1 hours.