Presentation Topic is:
To Our Theory of Computing Presentation
Group Member List:
Name ID
Md. Touhidur Rahman 152-15-6232
Computational Models
Computational Model are four type:
 Finite Automata - DFA & NFA
 Context Free Grammar
 Push Down Automata
 Turing Machine
Finite Automata - DFA & NFA
Definition: A deterministic finite automaton (DFA) consists of
• 1. a finite set of states (often denoted Q)
• 2. a finite set of symbols (alphabet)
• 3. a transition function that takes as argument a state and a
• symbol and returns a state (often denoted )
• 4. a start state often denoted q0
• 5. a set of final or accepting states (often denoted F)
Finite Automata - DFA & NFA
How to present a DFA? With a transition table
• The ! indicates the start state: here q0
• The indicates the final state(s) (here only one final state q1)
• This defines the following transition diagram
Finite Automata - DFA & NFA
Formal Definition:
Finite Automata - DFA & NFA
How to present a NFA? With a transition table
Context Free Grammar
What is a grammar?:
A grammar consists of one or more variables that represent
classes of strings (i.e., languages)
There are rules that say how the strings in each class are
constructed. The construction can use :
1. symbols of the alphabet
2. strings that are already known to be in one of the
classes
3. or both
Context Free Grammar
Definition of Context-Free Grammar:
A CFG (or just a grammar) G is a tuple G = (V, T, P, S) where
1. V is the (finite) set of variables (or nonterminal or syntactic
categories). Each variable represents a language, i.e., a set of
strings .
2. T is a finite set of terminals, i.e., the symbols that form the
strings of the language being defined.
3. P is a set of production rules that represent the recursive
definition of the language.
4. S is the start symbol that represents the language being
defined. Other variables represent auxiliary classes of
strings that are used to help define the language of the start
symbol.
Context Free Grammar
Examples 1(CFG): The grammar:
1. E → I
2. E → E + E
3. E → E ∗ E
4. E → (E)
5. I → a
6. I → b
7. I → Ia
8. I → Ib
9. I → I 0
10. I → I 1
The Grammar for expression is started formally as,
Grammar G 1 = ( {E, I }, T, P, E)
where: T = { +, ∗, (, ), a, b, 0, 1 } is the set of symbol and P is
the set of productions
Context Free Grammar
Derivation:
The sequence of substitutions to generate a string is called a
derivation.
Derivation both are two types:
1.Left-Most Derivation.
2.Right-Most Derivation.
Left-Most Derivation:
A derivation which always replace the leftmost variable in each step is
called a leftmost derivation.
Examples of Left-Most derivation to Previous Examples1:
Derivation of a ∗ (a + b00) by G 1
E ⇒ E ∗ E ⇒ I ∗ E ⇒ a ∗ E ⇒ a ∗ (E) ⇒ a ∗ (E + E) ⇒ a ∗ (I + E) ⇒ a ∗
(a + E) ⇒ a ∗ (a + I) ⇒ a ∗ (a + I0) ⇒ a ∗ (a + I00) ⇒ a ∗ (a + b00)
We can conclude that E ∗ ⇒lm a ∗ (a + b00).
Context Free Grammar
Right-Most Derivation:
Rightmost derivation Always replace the rightmost variable by
one of its rule-bodies.
Examples of Right-Most derivation to Previous Examples 1:
E ⇒E ∗ E ⇒ E ∗ (E) ⇒ E ∗ (E + E) ⇒ E ∗ (E + I) ⇒rm E
∗ (E + I0) ⇒ E ∗ (E + I00) ⇒ E ∗ (E + b00) ⇒ E ∗ (I + b00) ⇒ E ∗
(a + b00) ⇒ I ∗ (a + b00) ⇒ a ∗ (a + b00)
We can conclude that E ∗ ⇒rm a ∗ (a + b00).
Push Down Automata
Definition:
A pushdown automata (PDA) is essentially an -NFA with a
stack.
• On a transition, the PDA:
1. Consumes an input symbol.
2. Goes to a new state (or stays in the old).
3. Replaces the top of the stack by any string (does nothing,
pops the
stack, or pushes a string onto
the stack)
Push Down Automata
Formal Definition:
Push Down Automata
Turing Machine
Definition:
 We can give a formal description to a particular TM by
specifying each of its seven components.
 This way a TM can become cumbersome.
Note: To avoid this we use higher level descriptions which are
precise enough for the purpose of understanding
 However, every higher level description is actually just a
short hand for its formal counterpart.
Turing Machine
Analysis:
Turing Machine
Example:
Theory of computing presentation

Theory of computing presentation

  • 1.
    Presentation Topic is: ToOur Theory of Computing Presentation
  • 2.
    Group Member List: NameID Md. Touhidur Rahman 152-15-6232
  • 3.
    Computational Models Computational Modelare four type:  Finite Automata - DFA & NFA  Context Free Grammar  Push Down Automata  Turing Machine
  • 4.
    Finite Automata -DFA & NFA Definition: A deterministic finite automaton (DFA) consists of • 1. a finite set of states (often denoted Q) • 2. a finite set of symbols (alphabet) • 3. a transition function that takes as argument a state and a • symbol and returns a state (often denoted ) • 4. a start state often denoted q0 • 5. a set of final or accepting states (often denoted F)
  • 5.
    Finite Automata -DFA & NFA How to present a DFA? With a transition table • The ! indicates the start state: here q0 • The indicates the final state(s) (here only one final state q1) • This defines the following transition diagram
  • 6.
    Finite Automata -DFA & NFA Formal Definition:
  • 7.
    Finite Automata -DFA & NFA How to present a NFA? With a transition table
  • 8.
    Context Free Grammar Whatis a grammar?: A grammar consists of one or more variables that represent classes of strings (i.e., languages) There are rules that say how the strings in each class are constructed. The construction can use : 1. symbols of the alphabet 2. strings that are already known to be in one of the classes 3. or both
  • 9.
    Context Free Grammar Definitionof Context-Free Grammar: A CFG (or just a grammar) G is a tuple G = (V, T, P, S) where 1. V is the (finite) set of variables (or nonterminal or syntactic categories). Each variable represents a language, i.e., a set of strings . 2. T is a finite set of terminals, i.e., the symbols that form the strings of the language being defined. 3. P is a set of production rules that represent the recursive definition of the language. 4. S is the start symbol that represents the language being defined. Other variables represent auxiliary classes of strings that are used to help define the language of the start symbol.
  • 10.
    Context Free Grammar Examples1(CFG): The grammar: 1. E → I 2. E → E + E 3. E → E ∗ E 4. E → (E) 5. I → a 6. I → b 7. I → Ia 8. I → Ib 9. I → I 0 10. I → I 1 The Grammar for expression is started formally as, Grammar G 1 = ( {E, I }, T, P, E) where: T = { +, ∗, (, ), a, b, 0, 1 } is the set of symbol and P is the set of productions
  • 11.
    Context Free Grammar Derivation: Thesequence of substitutions to generate a string is called a derivation. Derivation both are two types: 1.Left-Most Derivation. 2.Right-Most Derivation. Left-Most Derivation: A derivation which always replace the leftmost variable in each step is called a leftmost derivation. Examples of Left-Most derivation to Previous Examples1: Derivation of a ∗ (a + b00) by G 1 E ⇒ E ∗ E ⇒ I ∗ E ⇒ a ∗ E ⇒ a ∗ (E) ⇒ a ∗ (E + E) ⇒ a ∗ (I + E) ⇒ a ∗ (a + E) ⇒ a ∗ (a + I) ⇒ a ∗ (a + I0) ⇒ a ∗ (a + I00) ⇒ a ∗ (a + b00) We can conclude that E ∗ ⇒lm a ∗ (a + b00).
  • 12.
    Context Free Grammar Right-MostDerivation: Rightmost derivation Always replace the rightmost variable by one of its rule-bodies. Examples of Right-Most derivation to Previous Examples 1: E ⇒E ∗ E ⇒ E ∗ (E) ⇒ E ∗ (E + E) ⇒ E ∗ (E + I) ⇒rm E ∗ (E + I0) ⇒ E ∗ (E + I00) ⇒ E ∗ (E + b00) ⇒ E ∗ (I + b00) ⇒ E ∗ (a + b00) ⇒ I ∗ (a + b00) ⇒ a ∗ (a + b00) We can conclude that E ∗ ⇒rm a ∗ (a + b00).
  • 13.
    Push Down Automata Definition: Apushdown automata (PDA) is essentially an -NFA with a stack. • On a transition, the PDA: 1. Consumes an input symbol. 2. Goes to a new state (or stays in the old). 3. Replaces the top of the stack by any string (does nothing, pops the stack, or pushes a string onto the stack)
  • 14.
  • 15.
  • 16.
    Turing Machine Definition:  Wecan give a formal description to a particular TM by specifying each of its seven components.  This way a TM can become cumbersome. Note: To avoid this we use higher level descriptions which are precise enough for the purpose of understanding  However, every higher level description is actually just a short hand for its formal counterpart.
  • 17.
  • 18.