Bhanu Priya has Published 1449 Articles

Give the examples of a context free language that are not regular?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:40:50

2K+ Views

A context-free grammar (CFG) consisting of a finite set of grammar rules is a quadruple (V, T, P, S)Where, V is a variable (non terminals).T is a set of terminals.P is a set of rules, P: V→ (V ∪ T)*, i.e., the left-hand sides of the production rule. P does ... Read More

Differentiate between recognizable and decidable in the Turing machine?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:34:12

14K+ Views

When we talk about Turing machines (TM) it could accept the input, reject it or keep computing which is called loop.Now a language is recognizable if and only if a Turing machine accepts the string, when the provided input lies in the language.Also, a language can be recognizable if the ... Read More

Prove the equalities of regular expressions by applying properties?

Bhanu Priya

Bhanu Priya

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

1K+ Views

ProblemProve each of the following equalities of regular expressions.a. ab*a(a + bb*a)*b = a(b + aa*b)*aa*b.b. b + ab* + aa*b + aa*ab* = a*(b + ab*).SolutionProblem 1Prove that ab*a(a + bb*a)*b = a(b + aa*b)*aa*b.Let’s take LHS ,    = ab*a(a + bb*a)*b Use property of (a+b)* = a*(ba*)* ... Read More

Show that the set of recursive languages is closed under reversal?

Bhanu Priya

Bhanu Priya

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

750 Views

Consider a Language L, over an alphabet T is known as recursive enumerable if there exists a turing machine (TM) which generates a sequence of numbers T* which have precisely the members of L.Whereas L is said to be recursive if there exists a Turing Machine enlisting all members of ... Read More

Explain the Closure Under Kleene Star of CFL in TOC?

Bhanu Priya

Bhanu Priya

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

677 Views

If L is a CFL, then L*is a CFL. Here CFL refers to Context Free Language.StepsLet CFG for L has nonterminal S, A, B, C, . . ..Change the nonterminal from S to S1.We create a new CFG for L* as follows −Include all the nonterminal S1, A, B, C, ... Read More

Explain the context free language closure under concatenation?

Bhanu Priya

Bhanu Priya

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

962 Views

Here CFL refers to Context Free Language. Now, let us understand closure under concatenation.Closure under ConcatenationsIf L1 and L2 are CFLs, then L1L2 is a CFL.Follow the steps given below −L1 CFL implies that L1 has CFG1 that generates it.Assume that the nonterminals in CFG1 are S, A, B, C, ... Read More

Explain the context free language closure under union operation?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 13:27:48

809 Views

If L1 and L2 are CFLs, then their union L1 + L2 is a CFL.Here CFL refers to Context Free Language.L1 CFL implies that L1 has a CFG, let it is CFG1, that generates it.Assume that the nonterminals in CFG1 are S, A, B, C, . . ..Change the nonterminal ... 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

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

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

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

Advertisements