In: Advanced Math
Let L1 be the language of the binary representations of all positive integers divisible by 4. Let L2 be the language of the binary representations of all positive integers not divisible by 4. None of the elements of these languages have leading zeroes.
a) Write a regular expression denoting L1.
b) Write a regular expression denoting L2.
c) a) Draw a state diagram (= deterministic finite state automaton) with as few states as possible which recognizes L1. This state diagram should be complete: it should handle all strings of 0’s and 1’s.
d) Draw a state diagram (= deterministic finite state automaton) with as few states as possible which recognizes L2. This state diagram should be complete: it should handle all strings of 0’s and 1’s.