In: Advanced Math
2. (CFGs) Give CFGs that generate the following languages. Use as few variables as you can (and no more than requested). Unless specified otherwise, the alphabet is Σ = {0, 1}.
(c) L3 = {w | w represents a binary number that starts with 1 and is divisible by 3}. Use at most 4 variables.
(d) L4 = {x1#x2# · · · #xk | k ≥ 1, each xi ∈ {0, 1}* , and xi = xjR for some i != j}. Recall that wR represents string w written backwards. Use at most 4 variables.