PNR Simulation
In the aviation industry, a Passenger Name Record (PNR) acts as a unique reservation identifier. For this academic project, the PNR format is strictly simulated as a 6-character alphanumeric sequence following the pattern: Letter-Letter-Digit-Digit-Letter-Letter (LLDDLL). This deterministic structure allows for unambiguous validation by finite automata.
Language Definition
The formal language recognized by the validation engine is defined as:
- Alphabet (Σ): {A-Z, 0-9}
- Target Format: LLDDLL
- Accept Language:
[A-Z]{2}[0-9]{2}[A-Z]{2}
- Length Constraint: Exactly 6 characters
DFA Components (5-Tuple)
The Deterministic Finite Automaton is formally defined as M = (Q, Σ, δ, q0, F):
- Q (Finite set of states): {q0, q1, q2, q3, q4, q5, q6, qReject}
- Σ (Alphabet): {A-Z, 0-9}
- δ (Transition Function): Defined in the Transition Table above.
- q0 (Start State): q0
- F (Set of Accept States): {q6}
DFA Theory
A Deterministic Finite Automaton (DFA) is a theoretical computation model that processes a string of symbols from left to right, changing states according to a fixed set of rules. It is deterministic because every state has exactly one valid transition for each input symbol. Any deviation from the accepted language format routes the execution to a non-escaping qReject sink state.