ChatDiagram
automata theory · compiler design · lexical analysis

Subset Construction: NFA to DFA for Identifier Pattern

유형 상태 다이어그램표준 OMG UML 2.5.1 §14 + Harel (1987) statechart엔진 schematex-state업데이트됨 2026. 9. 28.
Subset Construction: NFA to DFA for Identifier Pattern
Drawing preview
상황

Given an NFA for a lexer identifier pattern `[a-zA-Z][a-zA-Z0-9_]*`, subset construction generates a DFA whose states are sets of NFA states: {q0}, {q1}, and ∅.

이 도면에 담긴 내용

그 이면의 의사결정을 읽어 보세요.

01

Start state is epsilon-closure of q0, yielding {q0}.

02

On letter from {q0}, move to {q1} which contains accepting NFA state q1.

03

Unlisted inputs lead to dead state ∅, a non-accepting sink with a self-loop for any symbol.

04

Mark {q1} as accepting because it contains the NFA's accept state.

Use when converting any nondeterministic finite automaton to a deterministic one, especially for lexical analyzer generation.

모든 상태 다이어그램 템플릿 보기 →