0% found this document useful (0 votes)
3 views9 pages

TOC DFA Regex NFA Explained

The document provides an overview of Deterministic Finite Automata (DFA) and Nondeterministic Finite Automata (NFA), including their definitions, components, and examples. It explains the structure of a DFA as a 5-tuple and illustrates an example DFA that accepts strings ending with '01'. Additionally, it discusses regular expressions and their symbols, highlighting their role in representing patterns in strings.

Uploaded by

swarjha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views9 pages

TOC DFA Regex NFA Explained

The document provides an overview of Deterministic Finite Automata (DFA) and Nondeterministic Finite Automata (NFA), including their definitions, components, and examples. It explains the structure of a DFA as a 5-tuple and illustrates an example DFA that accepts strings ending with '01'. Additionally, it discusses regular expressions and their symbols, highlighting their role in representing patterns in strings.

Uploaded by

swarjha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

 • DFA stands for Deterministic Finite

Automaton.
 • It is a theoretical model of
computation used to recognize
Introduction regular languages.
to DFA  • Consists of a finite set of states
and transitions.
 • For each input symbol, there is
exactly one transition from each
state.
 • A DFA is a 5-tuple (Q, Σ, δ, q0, F):
 • Q: Finite set of states
Components  • Σ: Finite input alphabet
of a DFA  • δ: Transition function (Q × Σ → Q)
 • q0: Start state (q0 ∈ Q)
 • F: Set of accept states (F ⊆ Q)
 • Example: DFA that accepts strings
ending with '01' over Σ = {0, 1}
 • States: q0 (start), q1, q2 (final)
 • Transitions:
 • - q0 --0--> q0
DFA Example  • - q0 --1--> q1
 • - q1 --0--> q2
 • - q2 --1--> q1
 • Accepts strings like: 1101, 01,
1001
 • Regular expressions describe
Introduction regular languages.
 • They are symbolic notations used
to Regular to represent patterns in strings.
Expressions  • Useful in lexical analysis and
string matching.
 • Basic Symbols:
 • - a, b: literal characters
 • - ε: empty string
Regular  • - + : union (e.g., a+b matches 'a'
Expression or 'b')
Symbols  • - * : Kleene star (e.g., a* matches
'', 'a', 'aa', etc.)
 • - . : concatenation (e.g., ab
matches 'ab')
 • Example: (a + b)* abb
Regular  • Matches all strings ending with
Expression 'abb' after any combination of 'a'

Example and 'b'


 • Examples: abb, aabb, babb, ababb
 • NFA stands for Nondeterministic
Finite Automaton.
 • It is a theoretical model of
Introduction computation similar to DFA but
allows multiple transitions for a
to NFA single input.
 • NFAs can have ε (epsilon)
transitions, meaning transitions
without consuming input.
 • In an NFA:
 • - A state can have zero, one, or

Key Features more transitions for a given symbol.


 • - Multiple possible paths can be
of NFA followed for the same input.
 • - Accepts a string if at least one
path ends in an accept state.
 • Every NFA has an equivalent DFA.
 • Subset construction method is

NFA vs DFA used to convert an NFA into DFA.


 • Though NFAs can be simpler to
design, DFAs are used for
implementation.

You might also like