Regular languages formulas
Regular languages: closure properties and the pumping lemma. 5 formulas for GATE CS Theory of Computation, each with when to use it. Each is explained in the topic notes.
IAE Academy: Regular languages: closure properties and the pumping lemma formulas (GATE CS)
All 5 Regular languages formulas
COMPLEMENT OF A REGULAR LANGUAGE
Applies to a total DFA only. If some transitions are missing, first add a dead (trap) state and send every missing transition to it. The complement DFA has the same states, so the minimal total DFAs of and have the same number of states. Swapping accepting states in an NFA does not complement it: convert the NFA to a DFA first (the subset construction can need up to states for an -state NFA).
PRODUCT CONSTRUCTION
For total DFAs with and states, the product has states. A pair is accepting when both components accept for intersection, when either accepts for union, and when the first accepts and the second does not for difference.
INVERSE HOMOMORPHISM
Here is the extended transition function on strings, with . The new DFA has the same states, start state and accepting states as the DFA for , and it accepts .
PUMPING LEMMA FOR REGULAR LANGUAGES
The implication runs one way only. A language can satisfy the conditions and still be non-regular, so the lemma can prove non-regularity but never regularity. For example, satisfies the lemma with (pump the first symbol), yet it is not regular: its intersection with is . The pumping length can be taken as the number of states of any DFA for .
MYHILL-NERODE THEOREM
Unlike the pumping lemma, this is an iff. The number of classes equals the number of states of the minimal total DFA for , counting the dead state if the minimal total DFA has one.
Where this was asked: 2020 (1), 2024 (1), 2025 (2), 2026 (1). See the 5 previous-year questions on Regular languages. This shows what was asked, not what will be asked.