0% found this document useful (0 votes)
7 views2 pages

toc

The document provides an overview of formal language theory, including definitions of alphabets, languages, and grammars, along with the Chomsky hierarchy of languages. It details regular languages and finite automata, including deterministic and nondeterministic types, their equivalence, and properties such as closure under various operations. Additionally, it discusses the Pumping Lemma, Myhill-Nerode Theorem, and methods for minimizing finite automata.

Uploaded by

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

toc

The document provides an overview of formal language theory, including definitions of alphabets, languages, and grammars, along with the Chomsky hierarchy of languages. It details regular languages and finite automata, including deterministic and nondeterministic types, their equivalence, and properties such as closure under various operations. Additionally, it discusses the Pumping Lemma, Myhill-Nerode Theorem, and methods for minimizing finite automata.

Uploaded by

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

INTRODUCTION

 Alphabet: A finite set of symbols used to construct strings. Examples include:


o Binary alphabet: {0,1}
o Alphabet for English: {a-z, A-Z}
o Custom alphabets: {a,b,c}, {x,y,z,0,1}
 Languages: A set of strings formed using an alphabet. Examples:
o L = {w | w contains an even number of 0s}
o L = {w | w starts with ‘a’ and ends with ‘b’}
 Grammars: A set of rules used to generate strings in a language. Defined as G = (V, T,
P, S), where:
o V: Variables (Non-terminals), e.g., S, A, B
o T: Terminals (Alphabet symbols), e.g., {a, b}
o P: Production rules, e.g., S → aSb | ε
o S: Start symbol
 Productions and Derivation: Transformations of strings using production rules.
Example:
o Given P: S → aS | bA, A → b
o Derivation of ‘abb’: S → aS → abA → abb
 Chomsky Hierarchy of Languages:

1. Type 0 (Recursively Enumerable Languages): Recognized by Turing


Machines. Most general language type.
2. Type 1 (Context-Sensitive Languages): Recognized by Linear Bounded
Automata. Productions of the form α → β where |α| ≤ |β|.
3. Type 2 (Context-Free Languages): Recognized by Pushdown Automata.
Productions of the form A → γ.
4. Type 3 (Regular Languages): Recognized by Finite Automata. Productions of
the form A → aB or A → a.

REGULAR LANGUAGES AND FINITE AUTOMATA

 Regular Expressions & Languages: Represent regular languages using symbols and
operators (*, +, |). Examples:
o (0|1)*: Represents all binary strings.
o a(b|c)*: Represents strings starting with ‘a’ followed by any number of ‘b’ or ‘c’.
 Deterministic Finite Automata (DFA):
o Defined as (Q, Σ, δ, q0, F), where:
 Q: Finite set of states
 Σ: Input alphabet
 δ: Transition function (mapping states and inputs to new states)
 q0: Initial state
 F: Set of final states (accept states)
o Equivalence with regular expressions: Every regular language can be represented
by a DFA.
 Nondeterministic Finite Automata (NFA):
o Similar to DFA but allows multiple transitions for a single input.
o Example: An NFA for (a|b)* accepts any string of a’s and b’s.
o Equivalence with DFA: Every NFA can be converted to an equivalent DFA
using the subset construction method.
 Regular Grammars & Equivalence with Finite Automata:
o Right-linear and left-linear grammars correspond to regular languages.
o Example:
 Right-linear: A → aB | b
 Left-linear: A → Ba | b
 Properties of Regular Languages:
o Closure under:
 Union: If L1 and L2 are regular, then L1 ∪ L2 is regular.
 Concatenation: If L1 and L2 are regular, then L1L2 is regular.
 Kleene star: If L is regular, then L* is regular.
 Intersection and Complement: Regular languages are closed under these
operations.
 Kleene’s Theorem: States that regular languages are equivalent to finite automata and
regular expressions.
 Pumping Lemma for Regular Languages:
o Used to prove that a language is not regular by contradiction.
o If a language L is regular, then there exists a pumping length p such that any
string w in L with |w| ≥ p can be decomposed as w = xyz, satisfying:

1. |xy| ≤ p
2. |y| > 0
3. xyⁿz ∈ L for all n ≥ 0
o Example: Proving L = {aⁿbⁿ | n ≥ 0} is not regular using the pumping lemma.
 Myhill-Nerode Theorem & Its Uses:
o Characterizes regular languages using distinguishable string equivalence classes.
o Application: Minimization of finite automata by merging equivalent states.
 Minimization of Finite Automata:
o Reducing the number of states in a DFA while preserving language acceptance.
o Steps:

1. Remove unreachable states.


2. Merge equivalent states using state equivalence partitioning.
o Example: Minimizing a DFA for L = (0|1)* by merging redundant states.

You might also like