5. Let Σ = {a,b}. Consider the following languages LAand LBover Σ:
LA= {w∈Σ∗ |wcontains an even number of occurrences of symbol a}
LB = {w ∈ Σ∗ | each pair of consecutive b’s in w is separated by a substring of a’s of length 2i, i≥ 0}
Clarification:LBissayingthatbetweenb’stheremustbe2ia’sforsomei≥0(e.g.baab∈LBandbaaab∉LB).Also,imustbeanintegervalue≥0.
Foreachofthefollowingstrings,decidewhetheritisamemberofLAorLB:
(i)b
(ii)aabbbbaa
(iii)abaaabaaa
(iv)bbaaaabbaab
(v)a