Regular Expressions & Languages

Answer & solution
Official answer: A, C
A is described by the regular expression a*b*, so it is regular. The two block lengths are independent; there is no equality constraint to remember.
For B, membership in {a,b}* excludes every c. Hence m−n=0 and the intersection is exactly {an bn:n≥0}. This is nonregular: for a pumping length p, any allowed pumping segment in the initial a-block of ap bp changes the a-count without changing the b-count.
C needs only finite modular information. A DFA state (r,s) stores #a modulo 7 and #b modulo 9. On a update r to r+1 modulo 7; on b update s to s+1 modulo 9. Start at (0,0), accept (2,3). The 7·9=63-state construction proves regularity, without claiming a state-minimality result.
For D, intersect with the regular language a*b*. If D were regular, this intersection K={ak bk:k≡2 mod 7} would also be regular. Choose an allowed k greater than a proposed pumping length. Any pumping segment within the first p positions consists only of a's; pumping it changes one count and breaks equality. Thus K, and therefore D, is nonregular. A modular restriction alone is finite-state, but it does not eliminate an unbounded equality requirement. Select A,C.