0% found this document useful (0 votes)
6 views1 page

Toc Unit 1 Micro Layout

The document discusses various types of finite state automata, including Deterministic Finite Automata (DFA) and Non-Deterministic Finite Automata (NFA), along with their definitions and examples. It also explains Moore and Mealy machines, highlighting their differences in output generation based on state and input. Additionally, the document covers regular grammar and regular expressions, detailing their structure and applications in designing lexical analyzers, text editors, and spell checkers.

Uploaded by

yashlanjewar370
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)
6 views1 page

Toc Unit 1 Micro Layout

The document discusses various types of finite state automata, including Deterministic Finite Automata (DFA) and Non-Deterministic Finite Automata (NFA), along with their definitions and examples. It also explains Moore and Mealy machines, highlighting their differences in output generation based on state and input. Additionally, the document covers regular grammar and regular expressions, detailing their structure and applications in designing lexical analyzers, text editors, and spell checkers.

Uploaded by

yashlanjewar370
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/ 1

Ques 1) Discuss various types of finite state automata, Que 2) Design DFA which accepts odd number of Que

Que 2) Design DFA which accepts odd number of Que 4) What is moore and mealy machine? Give an Example.
1’s And any number of 0’s. Or Explain
Ans: Types of Finite State Automata There are two types of finite automata as shown in figure below: Ans: Moore Machine
deterministic finite automata with example.
1) Deterministic Finite State Automata (DFA): The finite automaton is called deterministic finite Moore machine is a finite state machine in
Ans: In the problem statement, it is indicated that
automata if there is only one path for a specific input from current state to next state. A which the next state is decided by current state
there will be a state which is meant for odd
deterministic finite Automaton is a collection of following things and Notation denoted as A = (Q, and current input symbol. The output symbol at
number of 1’s and that will be the final state.
Σ, 8, qo, F): a given time depends only on the present state
There is no condition on number of O’s.
1) The finite set of states which can be denoted by Q, of the machine. The formal definition of Moore
2) The finite set of input symbols Σ At the start, if we read input 1 then we will go to machine is,
3) The start state qo such that qo € Q, state q which is a final state as we have read odd
This machine has output on the states itself. So
4) A set of final states F such that F E Q, and number of 1’s. There can be any number of zeros
if input & then also we will get one output. The
5) The mapping function or transition function denoted by 8. Two parameters are passed to at any state and therefore the self-loop is applied
moore machine is a six-tuple (Q, E, A, 8, 2, qo),
this transition function – one is current state and other is input symbol. The transition to state q; as well as to state q.
function returns a state which can be called as next state. For example, q₁ = 8(qo.a) means Where,
from current with input a the next state transition is qi.
2) Non-Deterministic Finite Automaton (NFA): Non determinism is the ability to change states in a 1) Qis a finite set of states.
Ques 3) Prove that for any NFA M = (Q, E, qo, A, 6) accepting a language LΣ, there is an DFA M₁ = (Q1. E,
way that is only partially determined by current state and input symbol. That is, several possible 2) E is the input alphabet.
q1, A1, 81) that also accepts L
“next states” are possible for a given combination of current symbol and input symbol. 3) A is the output alphabet.
The automaton, as it reads input string may choose at each step to go into any one of legal next Ans: M, is defined as follows: 4) 8 is the transition function Ex Q into Q.
states; the choice is not determined by anything and is therefore called nondeterministic. Hence, 5) Λ is the output function mapping Q into
Q = 20 q1=
if some moves of the machine cannot be determined uniquely by the input symbol and the A; and
present state. Such machines are called non-deterministic finite automata. (q0) for qe Q, and aeΣ, 8, (q,a)= ∪ 8(r, a) 6) Qo is the initial state.

A Non-Deterministic Finite Automaton (NFA) is a 5- tuple (Q, Σ, 8, qo, F), where, r€q Mealy Machine

i) Q is a finite non-empty set of states; A₁ =(qe Q|q ∩ A#0} Mealy Machine is a machine in which output symbol depends upon the present input symbol and
ii) Σ is a finite non-empty set of inputs; present state of the machine.
A string x should be accepted by M, if, starting in
iii) 8 is the transition function mapping from QxΣ into 20 which is the power set of Q, the set of states in which M might end-up as a Moore machine shows output on transition. A Mealy machine is represented as a six-tuple M = (Q, E, A,
the set of all Subsets of Q: result of processing x contains atleast one element 8, 2,9%)
iv) qo e Q is the initial state, and of A.
v) FCQ is the set of final states. Where,
The fact that M, accepts the same language as M
Q= set of finite states
follows from the fact that for any x € Σ*,
Σ= set of finite input symbols
81 (91,x)=8* (90,x)
∆ = set of finite output symbols
Which we now prove using structural induction on
x. δ = a mapping function from QxΣ to Q, i.e., QxΣ →Q

If x = ε, /\ = a mapping function which maps QxΣ to ∆, i.e., ΟΧΣ -> Δ

Qo= the initial state

The transition is associated with output. Whenever it enters


to any state on a particular input it generates output.

Ques 5) Define the regular grammar and regular Expression. OR What is regular expression? Ques 6) List the application of finite automata.

Ans: Regular Grammar Formally a grammar consists of a set of non-terminals (or Variables) V, a set of Ans: Application of Finite Automata (FA)
terminals Σ (the alphabet of the language), a start symbol S, which is a nonterminal, and a set of rewrite
There are several application based on finite automata and finite state machine. Some are given below;
rules (productions) P. A production has in general the form y-> α, where y is a string of terminals and
non-terminals with at least one nonterminal in it and a is a string of terminals and non-terminals. A 1) A finite automata is highly useful to design LexicalAnalyzers.
grammar is regular if and only if y is a single nonterminal and a is a single terminal or a single terminal 2) A finite automata is useful to design text editors.
followed by a single nonterminal, that is a production is of the form X -> a or X ->aY, where X and Y are 3) A finite automata is highly useful to design spell checkers.
non-terminals and a is terminal.
A finite automata is useful to design sequential circuit Design (Transducer).
For example, Σ= (a, b), V = {S} and P = {S-> aS, S-> bS, S-> A) is a regular grammar and it generates all the
strings consisting of a’s and b’s including the empty string. A regular grammar is defined as: G = (V, T, P, S)

Where,

V = set of symbols called non-terminals which Are used to define the rules.

T= a set of symbols called terminals.

P = a set of production rules.

S = a start symbol which Є v.

Regular Expressions

Regular expressions are useful for representing certain sets of stings in an algebraic fashion. Actually
these describe the language accepted by finite state automata.

A regular expression is said to denote a formal language L over the alphabet and is defined by the
following rules:

1) e is a regular expression denoting the language which consists of null string.


2) If ‘a’ is a symbol in the alphabet then ‘a’ is also a regular expression consists of (a), i.e., any
terminal symbol is also a regular expression.
3) If R and S are regular expressions over the alphabet then ®/(S) is also a regular expression, which
is the Union of the languages represented by R. and S, i.e., L® L(S).
4) If R and S are regular expressions over the alphabet then ®(S) is also a regular expression,
denoting L®L(S)
5) R* is a regular expression representing the language L® with zero or more occurrences of the
string. 6) If R is regular expression then ® is also a regular Expression.

The figure 1.48 shows that it is convenient to convert the regular expression to NFA with ɛ moves. Let us
see the theorem based on this conversion

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy