Prove that each of the following languages are not regular: a. {a(2^i)} b. {an!}
Added by Michaela R.
Step 1
{a(2^i)}: Assume that this language is regular. Then, by the pumping lemma for regular languages, there exists a pumping length p such that any string in the language with length at least p can be pumped. Let's choose the string a(2^p). Since this string is in the Show more…
Show all steps
Your feedback will help us improve your experience
Frank Deng and 86 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Show that the language L = {a^n b^k c^n d^k : n ≥ 0,k >n} is not regular
Madhur L.
Give context-free grammars for these languages: a. The set A of odd-length strings in {a, b}* whose first, middle and last symbols are all the same. For example, b and ababa are in A, but ̵, aaaa, and abbbb are not. b. The set B = {a^i b a^j | i ≠ j}. For example, ab and abaaa are in B, but ̵, a, b, and aabaa are not.
Shaiju T.
For each of the following languages state whether it is regular or not. If Li is regular, prove it by drawing a DFA or NFA (your choice) that recognizes it. If the language is not regular, give an argument (in plain language) why there is no DFA or NFA that can recognize it: (a) [4 marks] Lb = {w ∈ {0, 1}* : w represented as a binary integer is a power of 4} (b) [4 marks] La = {wwa^n : w ∈ {a, b}, n > 0} (c) [4 marks] Lc = {wxa : w, x ∈ {a, b}*} (d) [4 marks] Ld = {wwa : w, x ∈ {a, b}*}
Krishna S.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD