Bhanu Priya has Published 1581 Articles

What is an acceptance of language by NFA with Epsilon?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:41:39

5K+ Views

The language L accepted by Non-deterministic finite automata (NFA) with ε, denoted by M= (Q, Σ, 𝛿, q0, F) and can be defined as follows −Let M= (Q, Σ, 𝛿, q0, F) be a NFA with εWhere, Q is a set of statesΣ is input setδ is a transition function ... Read More

How to convert the finite automata into regular expressions?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:33:56

8K+ Views

ProblemConvert the given finite automata (FA) into regular expression (RE).SolutionThere are two popular methods for converting a DFA to its regular expression −Arden’s MethodState elimination methodLet’s consider the state elimination method to convert FA to RE.RulesThe rules for state elimination method are as follows −Rule 1The initial state of DFA ... Read More

Construct the derivation tree for the string aabbabba.

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:31:05

10K+ Views

ProblemDerive a derivation tree for the string aabbabba for the given context free grammar (CFG) −S->aB|bA A->a|aS|bAA B->b|bS|aBBSolutionDerivation is a sequence of production rules, which is used to get input strings.Derivation treeIt is a graphical representation for derivation of given production rules for a given CFG. It is also called ... Read More

Design finite automata from a given regular expression.

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:27:47

2K+ Views

Finite automata (FA) is an abstract computing device. It can be represented in the following −Graphical (Transition diagrams)Tabular (Transition table)Mathematical (Transition function)The formal definition of FA is that it is a five tuples.M=(Q, Σ, δ, q0, F)Where, Q: Finite set called statesΣ: Finite set called alphabetsδ: Q × Σ → ... Read More

Derive the string “abb” for leftmost and rightmost derivation

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:24:35

2K+ Views

ProblemLet’s consider a grammar to derive “abb” string using LMD and RMD   S->AB/ ε   A-> aB   B-> SbSolutionWe have to use context free grammar.Derivation is a sequence of production rules, which is used to get input strings.During parsing, we have to take two decisions, which are as follows −We have ... Read More

How to generate the language for context free grammar?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:22:44

3K+ Views

ProblemGenerate the language for the given context free grammar.S->0S, S-> λS-> A0, A->1A, A-> λS->000S, S-> λSolutionContext free grammar (CFG) is a formal grammar that is used to generate all the possible patterns of strings in a given formal language.CFG is defined by four tuplesG=(V, T, P, S)Where, T: Set ... Read More

Explain NFA with epsilon transition.

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:20:10

20K+ Views

We extend the class of NFAs by allowing instantaneous ε transitions −The automaton may be allowed to change its state without reading the input symbol 2.In diagrams, such transitions are depicted by labeling the appropriate arcs with ε.Note that this does not mean that E has become an input symbol. ... Read More

Explain with an example how to convert NFA to DFA.

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:17:08

2K+ Views

ProblemConvert the following Non-Deterministic Finite Automata (NFA) to Deterministic Finite Automata (DFA).SolutionThe transition diagram is as follows −The transition table of NFA is as follows −Stateab->q0q0q0, q1q1-*q2*q2--The DFA table cannot have multiple states. So, make q0q1 as a single state.Let’s convert the given NFA to DFA by considering two states ... Read More

How to convert from NFA to DFA in TOC?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:14:20

2K+ Views

In Non-Deterministic Finite Automata, for any current state and input symbol, there exists more than one next output state.Any string is accepted if and only if there exists at least one transition path which is starting at initial state and ending at final state.The following steps are followed to convert ... Read More

Design a Moore machine for some binary input sequence.

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 09:12:34

10K+ Views

ProblemDesign a Moore machine for a binary input sequence such that if it has a substring 101, the machine outputs A, if the input has substring 110, it outputs B otherwise it outputs C.SolutionFor designing such a machine, we will check two conditions, and those are 101 and 110. If ... Read More

Advertisements