Questions: Regular Expressions and Languages

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A student applies the pumping lemma to the language L = {a^n b^n c^n : n ≥ 0} and successfully shows that every sufficiently long string in L can be pumped (split into xyz where xy^i z ∈ L for all i ≥ 0). The student concludes L is regular. What error did they make?

AThe pumping lemma cannot be applied to languages with three distinct alphabet symbols
BThe student is correct — successfully pumping a long string proves the language is regular
CThe pumping lemma is a necessary condition for regularity, not a sufficient one — satisfying it does not prove a language is regular
DThe student should have converted the language to an NFA first before applying the pumping lemma
Question 2 Multiple Choice

What is the significance of Kleene's theorem in formal language theory?

AIt shows that regular expressions are strictly more expressive than DFAs, since regex can describe infinite languages
BIt shows that the Kleene star operation adds computational power beyond what finite automata have
CIt establishes that regular expressions and finite automata (DFA/NFA) describe exactly the same class of languages — any regex converts to an NFA and any DFA converts to a regex
DIt proves that every context-free language can be expressed as a regular expression
Question 3 True / False

The regular expressions used in programming languages like Python and Perl (with features like backreferences and lookaheads) are strictly equivalent in power to the formal regular expressions in Kleene's theorem.

TTrue
FFalse
Question 4 True / False

The pumping lemma for regular languages can be used to prove that a language is NOT regular, but cannot be used to prove that a language IS regular.

TTrue
FFalse
Question 5 Short Answer

Why can the language {a^n b^n : n ≥ 0} not be recognized by any finite automaton? Connect your answer to what the pumping lemma reveals about finite memory.

Think about your answer, then reveal below.