0% found this document useful (0 votes)
22 views

Finite state system (1)

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)
22 views

Finite state system (1)

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/ 5

Finite state system:

The finite Automaton is a mathematical model of a system with discrete inputs and outputs.
The system with discrete inputs and outputs. The system can be in any one of the finite
number of internal states and input symbols.
 The finite Automaton is a mathematical model of a system with discute inputs and
outputs.
 The system can be in a any one of a finite number of internal configuration or states.
 The primary example of finite automaton is a switching circuit such as control unit of a
computer.
What is a finite automaton?
A finite automaton (FA) is a simple idealized machine used to recognize patterns within
input taken from some character set (or alphabet) C. The job of an FA is to accept or reject
an input depending on whether the pattern defined by the FA occurs in the input. Finite
Automata is a 5 tuples denoted by A = (Q, ∑, δ, q0, F) where
• Q is a finite set of states
• ∑ is the finite set of input symbols
• δ is a transition function (Q X ∑ → Q )
• q0 is the start state or initial state
• F is a set of final or accepting states.
Define Regular Expression
The language accepted by finite automata can be easily described by simple expressions
called Regular Expressions. It is the most effective way to represent any language.
The languages accepted by some regular expression are referred to as Regular languages.
A regular expression can also be described as a sequence of pattern that defines a string.
Regular expressions are used to match character combinations in strings. String searching
algorithm used this pattern to find the operations on a string.
I ) <l> is a regular expression denoting the language { }
2) E is a regular expression denoting the language {E}
3) For each a in Li , a is a regular expression denoting the language{ a}
4) Ifr and s are regular expression then r+s , rs and r* are regular expression denoting the
language.
What is an ambiguous grammar?
A context free grammar is said to be ambiguous if any word has more than one parse tree
or more than one left most derivation or more than one right most derivation is said to be an
ambiguous grammar.
Universal Turing Machine.
The Turing Machine (TM) is the machine level equivalent to a digital computer.It was
suggested by the mathematician Turing in the year 1930 and has become the most widely
used model of computation in computability and complexity theory.The model consists of an
input and output. The input is given in binary format form on to the machine’s tape and the
output consists of the contents of the tape when the machine halts.The problem with the
Turing machine is that a different machine must be constructed for every new computation
to be performed for every input output relation.This is the reason the Universal Turing
machine was introduced which along with input on the tape takes the description of a
machine M.The Universal Turing machine can go on then to simulate M on the rest of the
content of the input tape.A Universal Turing machine can thus simulate any other machine.
What is relation?
A binary relation is a set of pairs. The first component of each pair is chosen from a set
called the domain and the second component of each pair is chosen from
a set called a range
Define NP-hard and NP-complete problems?
NP-Hard Problem: A Problem X is NP-Hard if there is an NP-Complete problem Y, such
that Y is reducible to X in polynomial time. NP-Hard problems are as hard as NP-Complete
problems. NP-Hard Problem need not be in NP class.If every problem of NP can be
polynomial time reduced to it called as NP Hard. A lot of times takes the particular problem
solve and reducing different problems.example : Hamiltonian cycle . optimization
problem,Shortest path .
NP-Complete Problem: A problem X is NP-Complete if there is an NP problem Y, such
that Y is reducible to X in polynomial time. NP-Complete problems are as hard as NP
problems. A problem is NP-Complete if it is a part of both NP and NP-Hard Problem. A non-
deterministic Turing machine can solve NP-Complete problem in polynomial time. A
problem is np-complete when it is both np and np hard combines together.this means np
complete problems can be verified in polynomial time.Example: Decision problems. Regular
graphs.
Show that the collection of all Turing machines is countable.
• If for a set there is an enumerator, then the set is countable.
• Any Turing Machine can be encoded with a binary string of 0’s and 1’s.
• An enumeration procedure for the set of Turing Machine strings:Repeat
• Generate the next binary string of 0’s and1’s in proper order
State Rice’s theorem:- Every non-trivial property of the RE language is undecidable. A
property is trivial if it is either empty such that it is satisfied by no language.
State Arden’s theorem:Let P and Q be two regular expressions over ∑. If Pdoes not
contain null string ε over ∑ then R=Q+RP, it has the solution R=QP*
Mention the difference between P and NP problems.
P problems: These are easier problems to solve. In scientific terms, the problems that can
be solved in a polynomial time are called P problems. The polynomial here means that the
time complexity can be any polynomial function instead of an exponential one.
NP Problem: The NP problems set of problems whose solutions are hard to find but easy
to verify and are solved by Non-Deterministic Machine in polynomial time.
What is Turing Machine? Define a Turing Machine.
Turing machines are a fundamental concept in the theory of computation and play an
important role in the field of computer science. They were first described by the
mathematician and computer scientist Alan Turing in 1936 and provide a mathematical
model of a simple abstract computer.
In the context of automata theory and the theory of computation, Turing machines are used
to study the properties of algorithms and to determine what problems can and cannot be
solved by computers. They provide a way to model the behavior of algorithms and to
analyze their computational complexity, which is the amount of time and memory they
require to solve a problem. A Turing machine is a finite automaton that can read, write, and
erase symbols on an infinitely long tape. The tape is divided into squares, and each square
contains a symbol. The Turing machine can only read one symbol at a time, and it uses a
set of rules (the transition function) to determine its next action based on the current state
and the symbol it is reading TM is denoted by
M=(Q, ∑, Г, δ, q0, B,F) where
Q – A finite non empty set of states ∑ - A finite set of input symbols
Г – A finite non empty set of tape symbols δ - The transition function is given by
δ:Q X Г → Q X Г X {L,R,S} q0 – Initial state
B ε Г – Blank Symbols F - Final state
DFA: DFA refers to Deterministic Finite Automaton. A Finite Automata(FA) is said to be
deterministic if corresponding to an input symbol, there is a single resultant state i.e. there is
only one transition. .
Steps for the Minimization of DFA :
1.Create the pairs of all the states involved in the given DFA.
2.Mark all the pairs (Qa,Qb) such a that Qa is Final state and Qb is Non-Final State.
3. If there is any unmarked pair (Qa,Qb) such a that δ(Qa,x) and δ(Qb,x) is marked, then
mark. (Qa,Qb).
4.Here x is a input symbol. Repeat this step until no more marking can be made.
5.Combine all the unmarked pairs and make them a single state in the minimized DFA.
NFA: NFA refers to Nondeterministic Finite Automaton. A Finite Automata(FA) is said to be
non-deterministic if there is more than one possible transition from one state on the same
input symbol.
Chomsky Hierarchy
Chomsky Hierarchy represents the class of languages that are accepted by the different
machine. The category of language in Chomsky's Hierarchy is as given below:
Type 0 known as Unrestricted Grammar.
Type 1 known as Context Sensitive Grammar.
Type 2 known as Context Free Grammar.
Type 3 Regular Grammar.
What is meant by Greibach Normal Form ?
A context-free grammar is in Greibach normal form (GNF) if the right-hand sides of all
production rules start with a terminal symbol, optionally followed by some variables. A
nonstrict form allows one exception to this format restriction for allowing the empty word
(epsilon, ε) to be a member of the described language.
Explain the different models of Turing machines.
1. Multiple track Turing Machine:
A k-track Turing machine(for some k>0) has k-tracks and one R/W head that reads and
writes all of them one by one.
2. Two-way infinite Tape Turing Machine:
Infinite tape of two-way infinite tape Turing machine is unbounded in both directions left and
right. Two-way infinite tape Turing machine can be simulated by one-way infinite Turing
machine(standard Turing machine).
3. Multi-tape Turing Machine:
It has multiple tapes and is controlled by a single head. The Multi-tape Turing machine is
different from k-track Turing machine but expressive power is the same. Multi-tape Turing
machine can be simulated by single-tape Turing machine.
4. Multi-tape Multi-head Turing Machine:
The multi-tape Turing machine has multiple tapes and multiple heads Each tape is
controlled by a separate head Multi-Tape Multi-head Turing machine can be simulated by a
standard Turing machine.
5. Multi-dimensional Tape Turing Machine:
It has multi-dimensional tape where the head can move in any direction that is left, right, up
or down.
Multi dimensional tape Turing machine can be simulated by one-dimensional Turing
machine
6. Multi-head Turing Machine:
A multi-head Turing machine contains two or more heads to read the symbols on the same
tape. In one step all the heads sense the scanned symbols and move or write
independently.
What is chomsky normal form?
CNF stands for Chomsky normal form. A CFG(context free grammar) is in CNF(Chomsky
normal form) if all production rules satisfy one of the following conditions:
Start symbol generating ε. For example, A → ε
A non-terminal generating two non-terminals. For example, S → AB A non-terminal
generating a terminal. For example, S → a.
State pumping lemma for CFL.
What is a CFG ?
A context-free grammar (CFG) is a formal grammar in which every production rule is of the
form V → w where V is a single nonterminal symbol, and w is a string of terminals and/or
nonterminals . A formal grammar is considered "context free" when its production rules can
be applied regardless of the context of a nonterminal. No matter which symbols surround it,
the single nonterminal on the left hand side can always be replaced by the right hand side.
Define pushdown Automaton
A pushdown Automaton is a - NFA with stack data structure where it can push strings into
and pop strings out of stack. It consists of 7-tuples P = ( Q, , , ,q0, z0 , F),Where Q is a finite
set of states, is a finite set of input symbols, is a finite set of nonempty stack alphabets, is a
transition function,q0 is an initial state, Z 0 is the initial start symbol of the stack , F is the set
of accepting states. is defined as :Q ( ) → Q *
* The PDA will have an input tape a finite control and a stack.
* The stack holds a string of symbols from some alphabet
* The device will be non-deterministic having some finite number of choices of
moves in each situations.
Mealy Machine
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.
Moore Machine
Moore’s machine is defined as a machine in the theory of computation whose output values
are determined only by its current state.
The Myhill Nerode theorem is a fundamental result coming down to the theory of
languages. This theory was proven by John Myhill and Anil Nerode in 1958. It is used to
prove whether or not a language L is regular and it is also used for minimization of states in
DFA( Deterministic Finite Automata).
≡L is an equivalence relation as it is :R eflexive : According to this property, if (p, p) ∈ R, for
every p ∈ N Symmetric : According to this property if (p, q) ∈ R, then (q, p) ∈ R should also
hold true.Let's consider the same relation R. Again this relation is symmetric as if (P, Q) ∈ R
⇒ (Q, P) ∈ R Transitive: According to this property, if (p, q), (q, r) ∈ R, then (p, r) ∈ R.
Myhill Nerode Theorem :
A language is regular if and only if ≡L partitions ∑* into finitely many equivalence classes. If
≡L partitions ∑* into n equivalence classes, then a minimal DFA recognizing L has exactly n
states.
Applications of the Pumping Lemma
The pumping lemma is extremely useful in proving that certain sets are non-regular. The
general methodology followed during its applications is :
1.Select a string z in the language L.
2.Break the string z into x, y and z in accordance with the above conditions imposed by the
pumping lemma.
3.Now check if there is any contradiction to the pumping lemma for any value of i.

You might also like