All strings of the form a^mb^n where m is even and n is odd. Question is: List the first 10 strings of the language in question above in canonical order
From the question:
Language L = {am bn} where m is even and n is odd.
First 10 strings of the language canonical order:
1) m=0 and n=1 => a0 b1 = b
2) m=2 and n=1 => a2 b1 = aab
3) m=0 and n=3 => a0 b3 = bbb
4) m=4 and n=1 => a4 b1 = aaaab
5) m=2 and n=3 => a2 b3 = aabbb
6) m=0 and n=5 => a0 b5 = bbbbb
7) m=6 and n=1 => a6 b1 = aaaaaab
8) m=4 and n=3 => a4 b3 = aaaabbb
9) m=2 and n=5 => a2 b5 = aabbbbb
10) m=0 and n=7 => a0 b7 = bbbbbbb
Therefore the first 10 strings of the language L in canonical order = {b, aab, bbb, aaaab, aabbb, bbbbb, aaaaaab, aaaabbb, aabbbbb, bbbbbbb}
Get Answers For Free
Most questions answered within 1 hours.