Home » Theory of Computation » Theory of computation miscellaneous » Question

Theory of computation miscellaneous

Theory of Computation

  1. Which of the following languages is/are regular?
    L1 : {wxwR | w, x 7isin; {a, b}* and |w|, |x| > 0}, wR is the reverse of string w
    L2 : {an bm | m ≠ n and m, n ≥ 0}
    L3 : {ap bq cr | p, q, r ≥ 0}
    1. L1 and L3 only
    2. L2 only
    3. L2 and L3 only
    4. L3 only
Correct Option: A

L1 = {wxwR| w, x ∈ {a, b}* and |w|, |x| > 0}
wR is reverse of string w.
It is regular
Regular expression
a (a + b)* a + b (a + b)* b
L2 = { an bm | m ≠ n , m, n ≥ 0 }
Hence m ≠ n, that mean n is greater than m, or m is greater than n.
So we need memory, so we can't draw DfA for it.
L3 = { ap bq cr | p, q, r ≥ 0 }
a, b, c



Your comments will be displayed only after manual approval.