The Wayback Machine - https://web.archive.org/web/20240607080328/https://www.geeksforgeeks.org/lmn-toc/
Open In App

Last Minute Notes – Theory of Computation

Last Updated : 25 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

See Last Minute Notes on all subjects here.

We will discuss the important key points useful for GATE exams in summarized form. For details you may refer this.

 

Finite Automata: It is used to recognize patterns of specific type input. It is the most restricted type of automata which can accept only regular languages (languages which can be expressed by regular expression using OR (+), Concatenation (.), Kleene Closure(*) like a*b*, (a+b) etc.)

 

Deterministic FA and Non-Deterministic FA: In deterministic FA, there is only one move from every state on every input symbol but in Non-Deterministic FA, there can be zero or more than one move from one state for an input symbol.

Note:

  • Language accepted by NDFA and DFA are same.
  • Power of NDFA and DFA is same.
  • No. of states in NDFA is less than or equal to no. of states in equivalent DFA.
  • For NFA with n-states, in worst case, the maximum states possible in DFA is 2n
  • Every NFA can be converted to corresponding DFA.

 
Identities of Regular Expression :

Φ + R = R + Φ = R
Φ * R = R * Φ = Φ
ε * R = R * ε = R
ε* = ε
Φ* = ε
ε + RR* = R*R + ε = R*

(a+b)* = (a* + b*)* = (a* b*)* = (a* + b)* = (a + b*)* = a*(ba*)* = b*(ab*)*

Moore Machine: Moore machines are finite state machines with output value and its output depends only on present state.
Mealy Machine: Mealy machines are also finite state machines with output value and its output depends on present state and current input symbol.
 
 
Push Down Automata: Pushdown Automata has extra memory called stack which gives more power than Finite automata. It is used to recognize context free languages.

 

Deterministic and Non-Deterministic PDA: In deterministic PDA, there is only one move from every state on every input symbol but in Non-Deterministic PDA, there can be more than one move from one state for an input symbol.

Note:

  • Power of NPDA is more than DPDA.
  • It is not possible to convert every NPDA to corresponding DPDA.
  • Language accepted by DPDA is subset of language accepted by NPDA.
  • The languages accepted by DPDA are called DCFL (Deterministic Context Free Languages) which are subset of NCFL (Non Deterministic CFL) accepted by NPDA.

 

Linear Bound Automata: Linear Bound Automata has finite amount of memory called tape which can be used to recognize Context Sensitive Languages.

  • LBA is more powerful than Push down automata.
  •  FA < PDA < LBA < TM 

     

    Turing Machine: Turing machine has infinite size tape and it is used to accept Recursive Enumerable Languages.

  • Turing Machine can move in both directions. Also, it doesn’t accept ε .
  • If the string inserted is not in language, machine will halt in non-final state.
  •  

    Deterministic and Non-Deterministic Turing Machines: In deterministic turing machine, there is only one move from every state on every input symbol but in Non-Deterministic turing machine, there can be more than one move from one state for an input symbol.

    Note:

    • Language accepted by NTM, multi-tape TM and DTM are same.
    • Power of NTM, Multi-Tape TM and DTM is same.
    • Every NTM can be converted to corresponding DTM.

     

     

    Chomsky Classification of Languages:

    Grammar Type Production Rules Language Accepted Automata Closed Under
    Type-3 (Regular Grammar) A→a or A→aB where A,B ∈ N(non terminal) and a∈T(Terminal) Regular Finite Automata Union, Intersection, Complementation, Concatenation, Kleene Closure
    Type-2 (Context Free Grammar)

    A→ρ where A ∈ N

    and ρ ∈ (T∪N)*

    Context Free Push Down Automata Union, Concatenation, Kleene Closure
    Type-1 (Context Sensitive Grammar) α→β where α, β∈ (T∪N)* and len(α) <= len(β) and α should contain atleast 1 non terminal. Context Sensitive Linear Bound Automata Union, Intersection, Complementation, Concatenation, Kleene Closure
    Type-0 (Recursive Enumerable)

    α →β where α, β ∈ (T∪N)* and α contains atleast 1 non-terminal

    Recursive Enumerable Turing Machine Union, Intersection, Concatenation, Kleene Closure

    Relationship between these can be represented as:

     

    Decidable and Undecidable Problems:

    A language is Decidable or Recursive if a Turing machine can be constructed which accepts the strings which are part of language and rejects others. e.g.; A number is prime or not is a decidable problem.

    A language is Semi–Decidable or Recursive Enumerable if a turing machine can be constructed which accepts the strings which are part of language and it may loop forever for strings which are not part of language.

    A problem is undecidable if we can’t construct an algorithms and Turing machine which can give yes or no answer. e.g.; Whether a CFG is ambiguous or not is undecidable.

     
    Countability :

  • Set of all strings over any finite alphabet are countable.
  • Every subset of countable set is either finite or countable.
  • Set of all Turing Machines are countable.
  • The set of all languages that are not recursive enumerable is Uncountable.





  • Previous Article
    Next Article

    Similar Reads

    Introduction of Theory of Computation
    Automata theory (also known as Theory Of Computation) is a theoretical branch of Computer Science and Mathematics, which mainly deals with the logic of computation with respect to simple machines, referred to as automata. Automata* enables scientists to understand how machines compute the functions and solve problems. The main motivation behind dev
    3 min read
    Decidable and Undecidable problems in Theory of Computation
    Prerequisite - Turing Machine A problem is said to be Decidable if we can always construct a corresponding algorithm that can answer the problem correctly. We can intuitively understand Decidable problems by considering a simple example. Suppose we are asked to compute all the prime numbers in the range of 1000 to 2000. To find the solution of this
    4 min read
    Relationship between grammar and language in Theory of Computation
    A grammar is a set of production rules which are used to generate strings of a language. In this article, we have discussed how to find the language generated by a grammar and vice versa as well. Language generated by a grammar - Given a grammar G, its corresponding language L(G) represents the set of all strings generated from G. Consider the foll
    4 min read
    Theory of Computation | Regular languages and finite automata | Question 2
    What is the complement of the language accepted by the NFA shown below? (A) A (B) B (C) C (D) D Answer: (B) Explanation: Quiz of this QuestionPlease comment below if you find anything wrong in the above post
    1 min read
    Arden's Theorem in Theory of Computation
    Arden's theorem state that: "If P and Q are two regular expressions over "∑", and if P does not contain "∈" , then the following equation in R given by R = Q + RP has a unique solution i.e., R = QP*." That means, whenever we get any equation in the form of R = Q + RP, then we can directly replace it with R = QP*. So, here we will first prove that R
    4 min read
    Halting Problem in Theory of Computation
    To understand better the halting problem, we must know Decidability, Undecidability and Turing machine, decision problems and also a theory named as Computability theory and Computational complexity theory. Some important terms: Computability theory - The branch of theory of computation that studies which problems are computationally solvable using
    4 min read
    Decidability Table in Theory of Computation
    Prerequisite - Undecidability, Decidable and undecidable problems Identifying languages (or problems*) as decidable, undecidable or partially decidable is a very common question in GATE. With correct knowledge and ample experience, this question becomes very easy to solve. A language is undecidable if it is not decidable. An undecidable language ma
    2 min read
    Introduction to Computation Complex Theory
    Broad Overview : Complexity theory, in a nutshell, a complexity word is a quite fancy word, literally, it sounds complex, but it is not an intimidating topic. What it really means is analyzing the program or we can say analyzing the efficiency of the program, figuring out whether the program is correct, figuring out whether one program is better th
    4 min read
    Introduction To Grammar in Theory of Computation
    Prerequisite - Theory of ComputationGrammar :It is a finite set of formal rules for generating syntactically correct sentences or meaningful correct sentences.Constitute Of Grammar :Grammar is basically composed of two basic elements - Terminal Symbols -Terminal symbols are those which are the components of the sentences generated using a grammar a
    3 min read
    Chomsky Hierarchy in Theory of Computation
    According to Chomsky hierarchy, grammar is divided into 4 types as follows: Type 0 is known as unrestricted grammar.Type 1 is known as context-sensitive grammar.Type 2 is known as a context-free grammar.Type 3 Regular Grammar.Type 0: Unrestricted Grammar: Type-0 grammars include all formal grammar. Type 0 grammar languages are recognized by turing
    2 min read