Kleene's Theorem
Kleene's Theorem
Automata
Group 8:
● Introduction
● Real-Life Examples
1)Email Validation
2)Password Validation
Kleene’s Theorem: “Any language accepted
by a Finite Automaton can also be expressed by a Regular
Expression, and vice versa.”
Rule 3: If a state has two (more than one) incoming transition edges,
then replace all these transition edges with a single transition edge
labeled by the sum (+) .
● ([a-zA-Z][a-zA-Z0-9]*) | ([0-9]*[a-zA-Z][a-
zA-Z0-9]*)
● This means:
Must contain at least one letter
Letters/digits only
No empty string allowed
State diagram:
🡪 q0
q0 🡪 q0: digit
q0 🡪 q1: letter
q1 🡪 q1: letter or digit
Explanation of States:
q0: Start state – has only digits so far (not valid yet)
q1: First letter encountered (now valid)
q1 is the accepting state (any further digits/letters
allowed)
This matches the condition:
At least one letter, any combination of letters and
Transitions: