Bhanu Priya has Published 1449 Articles

Explain the Decidable and undecidable problems

Bhanu Priya

Bhanu Priya

Updated on 14-Jun-2021 11:47:55

12K+ Views

Before we understand about the decidable and undecidable problems in the theory of computation (TOC), we must learn about the decidable and undecidable language. Hence, let us first see what do you mean by decidable language.Decidable LanguageA language L is called decidable if there is a decider M such that ... Read More

Explain how to convert CFG to CNF

Bhanu Priya

Bhanu Priya

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

4K+ Views

CFG stands for context free grammar and CNF stands for Chomsky’s Normal Form in the theory of computation.Context Free Grammar (CFG)A context free grammar (CFG) is a forma grammar which is used to generate all possible patterns of strings in a given formal language.It is defined as four tuples −G=(V, ... Read More

What are the regular expressions to finite automata?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 12:29:13

959 Views

For each of the following languages, draw the finite automata (FA) accepting it.{a, b}*{a}The language states that the automata accept the strings containing any number of a's and b's and finally ending in a.The finite state automaton for the language is as follows −{a, b}*{b, aa}{a, b*}The language states that ... Read More

Eliminate epsilon, unit and useless symbols and rewrite into CNF

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 12:15:02

1K+ Views

ProblemEliminate epsilon, unit and the useless symbols for the given grammar and rewrite it into CNF.S->0E0|1FF| εE->GF->S|EG->S| εSolutionIn the given grammar, we will first remove the null production. There are two null productions in the grammar, as given below −S ==> εG ==> εSo, remove null production and rewrite all ... Read More

Generate a CNF for a given context free grammar

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 12:12:15

1K+ Views

ProblemGenerate a Chomsky normal form (CNF) for the following context free grammar (CFG).S->aAa|bBb|eA->C|aB->C|bC->CDE|eD->A|B|abSolutionFollow the steps mentioned below to generate a CNF for the given CFGStep 1 − Eliminate ∧ -productionsWe can delete, erase or ∧ -productions double time repeated.S --> aAa | bBb | ∧A --> a | ∧B --> ... Read More

Convert the given Context free grammar to CNF

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 12:10:49

25K+ Views

ProblemConvert the given grammar into Chomsky's Normal Form (CNF)S->AAA|BA->aA|BB-> εSolutionFollow the steps given below to convert CFG to CNF −Step 1 − Eliminate epsilon productionsTo eliminate epsilon productions, the variable which is producing epsilon must be replaced on the RHS of all other productions for the epsilon production to be removed.Replacing ... Read More

Explain the Star Height of Regular Expression and Regular Language

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:58:55

590 Views

The star height of Regular expression (RE) is nothing but the depth of Kleene stars in the theory of computation (TOC).For example, a+b the star height is 0(a+b)* the star height is 1(a*+b*)* the star height is 2 …….Star height is used to indicate the structural complexity of regular languages ... Read More

How to convert FA to Left Linear Grammar in TOC?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:55:37

5K+ Views

A grammar with at most one variable at the right side of production is called linear grammar.Following is an example of the linear grammar −S→aSb/εHere, if you observe, we can write the same production by dividing …..S→AbA→aAbA→εLeft Linear GrammarA grammar is left linear grammar where all non-terminals in the right ... Read More

What is unambiguous grammar in TOC?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:53:55

6K+ Views

A grammar can be unambiguous, if the grammar does not contain ambiguity. This means if it does not contain more than one left most derivation (LMD) or more than one right most derivation (RMD) or more than one parse tree for the given input string, it is an unambiguous grammar.RulesTo ... Read More

How to convert FA to Right Linear Regular Grammar?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:53:24

7K+ Views

A grammar with at most one variable at the right side of production is called linear grammar.Example 1      S→aSb/εExample 2      S→Ab      A→aAb      A→εRight Linear GrammarA grammar is right linear grammar where all the non terminals in the right hand sides are at ... Read More

Advertisements