Question #38647

The language {a^i b^j c^k|i<j<k} is
A. regular but not finite
B. context-free but not regular
C. context-sensitive but not context-free
D.recursive or type-0 but not context-sensitive

Expert's answer

Answer on Question#38647 – Math - Other

The language L={aibjcki<j<k}L = \{a^i b^j c^k \mid i < j < k\} is not a context-free.

If LL were context free, then the pumping lemma should hold.

Let z=anbn+1cn+2z = a^{n}b^{n + 1}c^{n + 2}. Given this string and knowing that zn|z| \geq n, we want to define zz as uvwxyuvwxy such that vwxn|vwx| \leq n, vx1|vx| \geq 1. Because vwxn|vwx| \leq n, there are five possible descriptions of uvwxyuvwxy:

1. vwxvwx is apa^p for some pn,p1p \leq n, p \geq 1

2. vwxvwx is apbqa^p b^q for some p+qn,p+q1p + q \leq n, p + q \geq 1

3. vwxvwx is bpb^p for some pn,p1p \leq n, p \geq 1

4. vwxvwx is bpcqb^{p}c^{q} for some p+qn,p+q1p + q \leq n, p + q \geq 1

5. vwxvwx is cqc^q for some in,i1i \leq n, i \geq 1

Note that because vwxn|vwx| \leq n, vwxvwx cannot contain both "aa"s and "cc". For all of these cases, uviwxjyuv^iwx^j y, i0i \geq 0, should be in the language.

In case 1, if i=2i = 2 we will be adding an aa to the string, making the number of "aa"s n+1n + 1 and thus the string is not in the language. The same argument holds for case 3 in which the number of "bb"s will be equal to the number of "cc"s. A similar argument holds in case 5.

In case 5 if i=0i = 0 then the number of "cc"s will be less than or equal to the number of "bb"s.

In case 2, when i=2i = 2 either the number of "aa"s will be greater than the number of "bb"s or the number of "bb"s will be greater than the number of "cc"s (depending on the distribution of vv and xx).

In case 4, when i=0i = 0 either the number of "bb"s will be less than or equal to number of "aa"s or the number of "cc"s will be less than or equal to the number of "bb"s (depending on the distribution of vv and xx).

Answer: C.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS