0% found this document useful (0 votes)
406 views21 pages

TOC Chapter-1

Theory of Computation comprises the fundamental mathematical properties of computer hardware, software, and certain applications. It seeks to determine what can and cannot be computed, how quickly problems can be solved, and with what type of computational model. Theory of Computation has applications in areas like programming language design, string searching, cryptography, and many branches of computer science. Automata theory deals with mathematical models of computation like finite automata and their properties.

Uploaded by

SAI KUSHAL24
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

Topics covered

  • Regular Languages,
  • Mathematical Models,
  • Complexity Theory,
  • Input Processing,
  • DNA Computing,
  • Programming Languages,
  • Databases,
  • Decision Making,
  • DFA,
  • Subset Construction
0% found this document useful (0 votes)
406 views21 pages

TOC Chapter-1

Theory of Computation comprises the fundamental mathematical properties of computer hardware, software, and certain applications. It seeks to determine what can and cannot be computed, how quickly problems can be solved, and with what type of computational model. Theory of Computation has applications in areas like programming language design, string searching, cryptography, and many branches of computer science. Automata theory deals with mathematical models of computation like finite automata and their properties.

Uploaded by

SAI KUSHAL24
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

Topics covered

  • Regular Languages,
  • Mathematical Models,
  • Complexity Theory,
  • Input Processing,
  • DNA Computing,
  • Programming Languages,
  • Databases,
  • Decision Making,
  • DFA,
  • Subset Construction

Theory of Computation

➢ Theory behind the computation!!!

➢ Computation is a process following a well-defined model understood and expressed as,


for example, an algorithm or a protocol. Mechanical or electronic devices (or,
historically, people) that perform computations are known as computers.

Theory of Computation: comprises the fundamental mathematical properties of computer hardware, software and certain
applications thereof.
In studying this subject, we seek to determine:
→ what can and cannot be computed. (Computability Theory: Decidable, Undecidable)
→ how quickly, (Complexity Theory: Time complexity to get the solution)
→ with how much memory and on which type of computational model. (Mathematical model for solving it)

----------------------------------------------------------------------------------------------------------------------------------------
-----------

Automate theory deals with the definitions and properties of mathematical models of computation.

Applications of TOC:
❖ Designing a new programming Language for a specialized application.
❖ Dealing with string searching and pattern matching
❖ Modern cryptographic protocols.
❖ Many braches of computer science including:
➢ Compilers,
➢ Computer Networks,
➢ Databases,
➢ Image Processing,
➢ DNA computing,
➢ Neural Networks.

Automata: is a construct that possesses all the indispensable (=essential) features of a digital computer.
It accepts input, produces output, may have some temporary storage and can make decisions in
transforming the input into the output.

Before formally defining finite state system let us consider an example:


Man, Wolf, Goat and Cabbage (from One end of a river to other end with the rules…)
The inputs to the system are the actions the man takes. He may cross
➢ alone(input m),
➢ with the wolf (input w)
➢ with the goat (input g)
➢ with the cabbage (input c)

Before formally defining finite state system let us consider an example:


Finite Automata: It is mathematical model of a system with discrete inputs and outputs.
The system can be in any one of the finite number of states.
OR
An automata is define as a system where energy, material and
information are transferred, transmitted and used for performing some
functions without direct participation of man.
Example: Automatic packing machine,
Automatic photo printing machine, etc.





➢ Compound DFA Construction


❖ DFA Construction
➢ Complement DFA Construction

❖ NFA or NDFA

Note-1: A language can be accepted by more than one form of DFA i.e. DFA is not unique.

Note-2: Every regular language is accepted by only one minimal DFA i.e. minimal DFA is unique.

Note-3: Different states of FA

Productive
States
States of FA Dead / Trap States
Non-Productive
Unreachable States
States
Equal states

➢ The states involved in the process of valid input strings of the language are called productive states.
➢ Which are not involved in the process of valid input strings are called non-productive states.

❖ Compound DFA Construction: A FA which is obtained from the composition of M1, M2,…
Mn is called ‘Compound Automata’ that accepted language L.

Question-1:

(i) DFA to accept string of as and bs where number of as is even or number of bs is even.(compound FA)

(ii) DFA to accept string of as and bs where number of as is even and number of bs is even.(compound FA)

Procedure:

Step-1:DFA to accept string of as and bs where number of as is even.(M1)

Step-2: DFA to accept string of as and bs where number of bs is even. (M2)

Step-3: Now the final M can be obtained by using M1 and M2.


DFA to accept string of as and bs where number of as is even.(M1)

DFA to accept string of as and bs where number of bs is even. (M2)

Final States of resultant compound FA:


➢OR: The final states of the resultant DFA are the states which contain any of the final states of the individual
machines M1 and M2.
➢AND: The final states of the resultant DFA are the states which contain all the final states of M1 and M2.

❖NFA to DFA Conversion

Subset Construction
Method
NFA to DFA
Conversion
Lazy Subset Construction
Method
Subset Construction Method:

Step-1: Get the transition table of the given NFA.


Step-2: Write all the subsets of Q.
Step-3: Start filling the Transition Table.
Step-4: Identify the initial state and final states.
Step-5:Keep only those state which productive and remove all the non-productive states.
-------------------------------------------------------------------------------------------------------------------------------------------
Note-1: The initial state of the resultant DFA is same as the one which is given for NFA.
Note-2: The final states of the resultant DFA are the states which contain any of the final states of the given NFA.

LAZY Subset Construction Method:

Step-1: Get the transition table of the given NFA.


Step-2: Identify the start state from Q.
Step-3: Start filling the Transition Table by considering only the new entries in the process of getting DFA Table.
Step-4: Identify the Final State(s).
Step-5: Draw the resultant DFA.
-------------------------------------------------------------------------------------------------------------------------------------------
Note-1: The initial state of the resultant DFA is same as the one which is given for NFA.
Note-2: The final states of the resultant DFA are the states which contain any of the final states of the given NFA.

❖ ε-NFA
❖ Differences among DFA, NFA and ε-NFA
❖ Conversion of Є-NFA to NFA
❖ Conversion of Є-NFA to DFA directly.

❖ε-NFA

➢ A NFA that includes transitions on EMPTY (ε) input is called a ε-NFA.


➢ Formally, we define ε-NFA as 5-tuple or quin-tuple: M=(Q, Σ,δ,q0,F)

ε-closure(q):
The set of all states which are reachable from q on ε-transitions alone is called ε-closure(q).

We define ε-closure (q) recursively as follows:

➢ State q is in ε-closure (q) of q.

➢ If there is a transition from q to p on ‘ε’ the p is in ε-closure (q).

➢ If p is in ε-closure (q) and if there is transition from p to r with ‘ε’ then r is in ε-closure (q).

❖Differences among DFA, NFA and ε-NFA

DFA NFA Є-NFA


❖Differences among DFA, NFA and ε-NFA

DFA NFA Є-NFA


❖Differences among DFA, NFA and ε-NFA

DFA NFA Є-NFA


Conversion of Є-NFA to NFA

Step-1: Obtain the transition table for the given Є-NFA.


Step-2: Find the Є-closure of all the states.
Step-3: Start getting the transition table for the resultant NFA.
Step-4: Identify the state and final states of resultant NFA.
Step-5: Draw the transition diagram for the resultant NFA.
-------------------------------------------------------------------------------------------------------------------------
Note-1: The initial state of the resultant NFA is same as the one which is given for Є-NFA.
Note-2: The final states of the resultant NFA are the states whose Є-closure contains any of the final
states of given Є-NFA.

Thank You

You might also like