Bhanu Priya has Published 1581 Articles

Explain the concept of set in TOC?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:25:26

2K+ Views

A set is an unordered collection of objects or an unordered collection of elements. Sets are always written with curly braces {}, and the elements in the set are written within the curly braces.ExamplesThe set {a, b, c} has elements a, b, and c.The sets {a, b, c} and {b, ... Read More

Explain the Greibach Normal Form (GNF)

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:24:31

1K+ Views

Let G = (V, T, P, S) be a CFL. If every production in P is of the form as given belowA -> aaWhere A is in V, a is in T, and a is in V*, then G is said to be in Greibach Normal Form (GNF).ExampleS -> aAB ... Read More

Generate a Context-free grammar for the language L = {anbm| m≠n}?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:21:38

6K+ Views

A context-free grammar is a quadruple G = (N, T, P, S), Where, N is a finite set of nonterminal symbols, T is a finite set of terminal symbols, N ∩ T = ∅, P is a finite set of productions of the form A → α, Where A ∈ ... Read More

Explain Type-2 and Type-3 Grammar in TOC?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:20:38

6K+ Views

The Chomsky hierarchy is given below −Type 2 − Context Free Grammar (CFG)Type 2 grammars are generated by context free languages.The language that is generated by the grammar is recognized by Push Down Automata.Type 2 must be in Type 1.Left-hand side of production can have only one variable.|alpha| =1There is ... Read More

Give implementation-level descriptions of a Turing machine?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:19:57

3K+ Views

A Turing machine (TM) can be formally described as seven tuples −(Q, X, ∑, δ, q0, B, F)Where, Q is a finite set of states.X is the tape alphabet.∑ is the input alphabet.δ is a transition function:δ𝛿:QxX->QxXx{left shift, right shift}.q0 is the initial state.B is the blank symbol.F is the ... Read More

Explain Type-1 grammar in TOC

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:19:14

4K+ Views

Chomsky Hierarchy represents the class of languages that are accepted by the different machines.Chomsky hierarchyHierarchy of grammars according to Chomsky is explained below as per the grammar types −Type 0. Unrestricted grammars   Turing Machine (TM)Type 1. Context-sensitive grammars   Linear Bounded Automaton (LBA)Type 2. Context-free grammars   Pushdown Automaton (PDA)Type 3. Regular ... Read More

Explain Type-0 grammar in TOC

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:18:29

9K+ Views

Chomsky Hierarchy represents the class of languages that are accepted by the different machines.Chomsky hierarchyHierarchy of grammars according to Chomsky is explained below as per the grammar types −Type 0. Unrestricted grammars   Turing Machine (TM)Type 1. Context-sensitive grammars   Linear Bounded Automaton (LBA)Type 2. Context-free grammars   Pushdown Automaton (PDA)Type 3. Regular ... Read More

Explain Chomsky hierarchy in TOC

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:17:35

10K+ Views

Chomsky Hierarchy represents the class of languages that are accepted by the different machines.Chomsky hierarchyHierarchy of grammars according to Chomsky is explained below as per the grammar types −Type 0 − It is an Unrestricted grammarsUnrestricted grammar − an unrestricted grammar is a 4-tuple (T, N, P, S), which consisting ... Read More

What are the closure properties for context free language?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:16:00

4K+ Views

The closure properties for context free language (CFG) are as follows −Closed under Union Operationn order to show that context-free language is closed under union operation, consider two starting variables S1 and S2 for the two different languages L1 and L2.Grammar for union operation is as shown below −S ->S1|S2If ... Read More

Explain the balancing parenthesis of PDA

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:04:29

4K+ Views

Pushdown Automata (PDA) are the finite automata (FAs), but with the ability to push and pop symbols to/from a stack.PDA accepts strings if there is a legal path from start state to acceptance state for input. Otherwise, the string is rejected.A PDA can be represented by a 7-tuple(Q, ∑, ℾ, ... Read More

Advertisements