For each of the following languages L state whether L is reg

For each of the following languages L, state whether L is regular, context-free but not regular, or not context-free. Please explain or give valid reason. Thanks for your help!

L4= { aibn : i,n > 0 and (i = n or i = 2xn) }

L5 = { wx: |w| = 2x|x| and w a+b+and x a+b+ }

L6 = { anbmck : n, m, k 0 and m min(n,k) }

Solution

1) L4 is not Regular because PDA can not hold(remember) two symbols at a time but in given i = n is mean to anbn .But It is clearly Context Free Language because it can store two symbols at a time(remember)

2) L5 and L6 both are not regular grammars but L5 is context free grammar.because L5 has the two variables and one is double of another .

and L6 has three variables but Middle symbol is same length of either a or c and it becomes double in size so it is not context free language.

For each of the following languages L, state whether L is regular, context-free but not regular, or not context-free. Please explain or give valid reason. Thank

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site