Passenger Name Record Validator

Deterministic Finite Automata (DFA) Engine for structural PNR validation.

PNR Validation Engine

Validation History

  • No history available yet.

Execution Trace

Current State: q0

Input a PNR to view step-by-step state transitions.

Transition Table (δ)

Current State (Q) Input: Letter (A-Z) Input: Digit (0-9)
→ q0 (Start) q1 qReject
q1 q2 qReject
q2 qReject q3
q3 qReject q4
q4 q5 qReject
q5 *q6 (Accept) qReject
*q6 qReject qReject
qReject qReject qReject

State Diagram

Interactive DFA diagram will be rendered here.

Automata Theory & Documentation

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.