Bhanu Priya has Published 1581 Articles

What is unambiguous grammar in TOC?

Bhanu Priya

Bhanu Priya

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

4K+ 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

5K+ 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

What do you mean by ambiguity in grammar in TOC?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:51:32

18K+ Views

A grammar is said to be ambiguous if there exists more than one left most derivation or more than one right most derivation or more than one parse tree for a given input string.If the grammar is not ambiguous then we call it unambiguous grammar.If the grammar has ambiguity then ... Read More

How to identify if a language is regular or not in TOC?

Bhanu Priya

Bhanu Priya

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

4K+ Views

To identify whether a language is regular or not, is based on Pigeon Hole Principle. This is generally called as the Pumping Lemma.Pumping lemma for Regular languagesIt gives a method for pumping (generating) many substrings from a given string.In other words, we say it provides means to break a given ... Read More

What is The Church-Turing Thesis in TOC?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:49:05

24K+ Views

The Church-Turing thesis says that every solvable decision problem can be transformed into an equivalent Turing machine problem.It can be explained in two ways, as given below −The Church-Turing thesis for decision problems.The extended Church-Turing thesis for decision problems.Let us understand these two ways.The Church-Turing thesis for decision problemsThere is ... Read More

What is the decision problem in TOC?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:47:52

2K+ Views

A decision problem Q is a set of questions, each having either yes or no answer. Let us consider the question is “is 10 a perfect square?” which is an example for a decision problem. A decision problem generally consists of an infinite number of related questions.ExampleThe problem PSQ which ... Read More

Explain Pumping lemma for context free language

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:46:19

26K+ Views

Pumping lemma for context free language (CFL) is used to prove that a language is not a Context free languageAssume L is context free languageThen there is a pumping length n such that any string w εL of length>=n can be written as follows −|w|>=nWe can break w into 5 ... Read More

What is the Instantaneous description of PDA?

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:45:25

11K+ Views

The Instantaneous description is called as an informal notation, and explains how a Push down automata (PDA) computes the given input string and makes a decision that the given string is accepted or rejected.The PDA involves both state and content of the stack.Stack is often one of the important parts ... Read More

Construct a pair of languages by using CFG

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:41:32

181 Views

ProblemConsider the following context-free grammars (CFG) and find the pairs of languages which can be generated by Gl and G2 respectively.SolutionConsider the following CFG −G1 : S->aS|B , B->b l bBG2: S->aA | bB , A->aA| B | ε , B->bB | εNow, we can generate the language as follows. ... Read More

Explain the relationship between grammar and language in TOC

Bhanu Priya

Bhanu Priya

Updated on 12-Jun-2021 11:40:08

1K+ Views

In order to understand the relationship between the grammar and language in the theory of computation (TOC), let us understand what is language generated by grammar in TOC.Language generated by grammarThe grammar is S-> aSb| E.In this grammar, by using S-> E, we can generate E.Therefore, E is part of ... Read More

Advertisements