Q. If s is a string over (0 + 1)* then let n0 (s) denote the number of 0’s in s and n1 (s)the number of l’s in s. Which one of the following languages is not regular?

  • (A) L = {s € (0 + 1)*n0 (s) is a 3-digit prime
  • (B) L = {s € (0 + 1)* | for every prefix s’ of s, l 0 (s’) — n1 (s’) | <= 2 }
  • (C) L={s € (0+1)* | n0(s) - n1(s) | <= 4}
  • (D) L = {s € (0 + 1) | n0 (s) mod 7 = n1 (s) mod 5 = 0 }
πŸ’¬ Discuss
βœ… Correct Answer: (C) L={s € (0+1)* | n0(s) - n1(s) | <= 4}

You must be Logged in to update hint/solution

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
316
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
99%
Success Rate