Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Nondeterministic finite automaton?

Definition 21.10 University Computer Science — Year 2 · Bab 21 — Finite Automata

A nondeterministic finite automaton (NFA) is A=(Q,Σ,Δ,I,F)A = (Q, \Sigma, \Delta, I, F) where Δ⊆Q×Σ×Q\Delta \subseteq Q \times \Sigma \times Q is a set of transitions, so that a state may have several transitions, or none, on the same letter, and I⊆QI \subseteq Q is a set of start states. A run on w=a1⋯anw = a_1 \cdots a_n is a sequence q0q1⋯qnq_0 q_1 \cdots q_n with q0∈Iq_0 \in I and (qi−1,ai,qi)∈Δ(q_{i-1}, a_i, q_i) \in \Delta; AA accepts ww if some run on ww ends in FF.

Left: an NFA for “the third letter from the end is a”; state 0 has two transitions on a. Right: an NFA for a*b*c* with spontaneous transitions (dashed).
Left: an NFA for “the third letter from the end is aa”; state 0 has two transitions on aa. Right: an NFA for a∗b∗c∗a^*b^*c^* with spontaneous transitions (dashed).
Baca dalam konteks →