2. Name: Mushahid Hussain
Roll no : 2k20/lcs/40
Assignment by: Sir Abdullah Niaz Shaikh
Dept: Computer Science
Batch: 2k20
3. 1. Introduction
2. Summary
3. Language
4. Examples
5. Finite Automata
6. Deterministic Finite Automata (DFA)
7. Solve The Following
8. Mealy machine and Moore machine
9. Pushdown Automata (PDA)
4. Automata theory is the study of abstract machines and automata, as
well as the computational problems that can be solved using them.
Automata allows us to think systemetically About what in machine
to do without going into hardware details.
It deals with the study of abstract Machines.
5. Letter : Symbol of language for machines
Alphabet: Set of letters denoted by sigma.
String: Sequence of letters.
Language: Set of strings with grammar rules.
7. Examples of strings in Automata
If Σ = {x,y} then
x, xyxy, xxxyy, xyxyxyxyx, xyxyxyxyxyxyxyxyxy etc.
8. Examples of strings in Automata
If Σ = {x,y} then
x, xyxy, xxxyy, xyxyxyxyx, xyxyxyxyxyxyxyxyxy etc.
9. There are two types of languages
Formal Languages (also known as Syntactic languages)
Informal Languages (also known as Semantic languages)
10. The formal language is strict with their rules. In formal language letters join with
each other to make the words and this process is properly well-formed and
following the international standards of the given language and it must be
according to a specific set of rules provided by the language.
The informal language is not strict with their rules.
12. It is the method of defining language in the form of design.
A Finite Automata consists of the following:
Q is finite set of states {q1,q2,q3}
Σ is finite set of Alphabet eg; Σ={a,b,c}
q is start state
F is final state
δ Transation
Q : Finite set of states. Σ : set of Input Symbols. q : Initial state. F : set of Final States. δ : Transition Function.
13. In a DFA, for a particular .input character, the machine goes to one state only.
DFA consists of 5 tuples {Q, Σ, q, F, δ}
Q : set of all states.
Σ : set of input symbols. ( Symbols which machine takes as input )
q : Initial state. ( Starting state of a machine )
F : set of final state.
δ : Transition Function, defined as δ : Q X Σ --> Q.
Q : Finite set of states. Σ : set of Input Symbols. q : Initial state. F : set of Final States. δ : Transition Function.
14. Q : Finite set of states. Σ : set of Input Symbols. q : Initial state. F : set of Final States. δ : Transition Function.
q1
q0
1
1 0
15. 1: Design a DFA that does not contain the string aabb in it.
Q : Finite set of states. Σ : set of Input Symbols. q : Initial state. F : set of Final States. δ : Transition Function.
q1
q0
b
q2 q3 q4
a
b
a a/b
16. 2: Design a DFA that does not start with and ends with b.
Q : Finite set of states. Σ : set of Input Symbols. q : Initial state. F : set of Final States. δ : Transition Function.
q1
a,b
q2
q3
a
b
b
q0
a
b
a
17. Mealy Machine is defined as a machine in the theory of
computation whose output values are determined by both
its current state and current inputs. In this machine at
most one transition is possible.
It has 6 tuples: (Q, q0, ∑, ▲, δ, λ’)
18. Q is a finite set of states
q0 is the initial state
∑ is the input alphabet
▲ is the output alphabet
δ is the transition function that maps Q×∑ → Q
‘λ’ is the output function that maps Q×∑→
19. Q is a finite set of states
q0 is the initial state
∑ is the input alphabet
▲ is the output alphabet
δ is the transition function that maps Q×∑ → Q
‘λ’ is the output function that maps Q×∑→
20. Moore’s machine is defined as a machine in the
theory of computation whose output values are
determined only by its current state. It has also 6
tuples.
(Q, q0, ∑, ▲, δ, λ)
21. Q is a finite set of states
q0 is the initial state
∑ is the input alphabet
▲ is the output alphabet
δ is the transition function that maps Q×∑ → Q
λ is the output function that maps Q → ▲
22. Q is a finite set of states
q0 is the initial state
∑ is the input alphabet
▲ is the output alphabet
δ is the transition function that maps Q×∑ → Q
λ is the output function that maps Q → ▲
24. MEALY
MACHINE
MOORE
MACHINE
OUTPUT DEPENDS ONLY UPON THE PRESENT STATE. OUTPUT DEPENDS ON THE PRESENT STATE AS WELL
AS PRESENT INPUT.
MOORE MACHINE ALSO PLACES ITS OUTPUT ON THE
TRANSITION.
MORE STATES ARE REQUIRED.
There is less hardware requirement for circuit
THEY REACT SLOWER TO INPUTS(ONE CLOCK
CYCLE LATER).
Synchronous output and state generation.
Output is placed on states.
Easy to design.
MEALY MACHINE PLACES ITS OUTPUT ON THE
TRANSITION.
Less number of states are required.
There is more hardware requirement for circuit
implementation.
They react faster to inputs.
Asynchronous output generation.
Output is placed on transitions.
It is difficult to design
25. A pushdown automaton is a way to implement a context-
free grammar in a similar way we design DFA for a
regular grammar. A DFA can remember a finite amount of
information, but a PDA can remember an infinite amount
of information. Basically a pushdown automaton is −
"Finite state machine" + "a stack"
26. A Pushdown Automata (PDA) can be defined as :
Q is the set of states
∑is the set of input symbols
Γ is the set of pushdown symbols (which can be pushed and popped from stack)
q0 is the initial state
Z is the initial pushdown symbol (which is initially present in stack)
F is the set of final states
δ is a transition function which maps Q x {Σ ∪ ∈} x Γ into Q x Γ*. In a given state,
PDA will read input symbol and stack symbol (top of the stack) and move to a new
state and change the symbol of stack.
27. Instantaneous Description (ID) is an informal notation of
how a PDA “computes” a input string and make a decision
that string is accepted or rejected.
A ID is a triple (q, w, α), where:
1. q is the current state.
2. w is the remaining input.
3.α is the stack contents, top at the left.
28. ⊢ sign is called a “turnstile notation” and represents
one move.
⊢* sign represents a sequence of moves.
Eg- (p, b, T) ⊢ (q, w, α)
This implies that while taking a transition from state p to
state q, the input symbol ‘b’ is consumed, and the top of
the stack ‘T’ is replaced by a new string ‘α’