Bhanu Priya has Published 1581 Articles

Explain the construction of finite and infinite language?

Bhanu Priya

Bhanu Priya

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

1K+ Views

Firstly, let us learn about the infinite language and then understand how to construct the finite and infinite language in the theory of computation (TOC).Infinite languageThere is no bound on the length of any strings in an infinite language.There is no bound on any number of derivation steps used to ... Read More

Design a TM which recognizes palindromes over = {a, b}

Bhanu Priya

Bhanu Priya

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

17K+ Views

AlgorithmStep 1 - If there is no input, reach the final state and halt.Step 2 - If the input = “a‟, then traverse forward to process the last symbol = “a‟. Convert both a‟s to B‟.Step 3 - Move left to read the next symbol.Step 4 - If the input ... Read More

Explain type 2 grammar with properties

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 11:57:28

978 Views

Type 2 grammars are context free grammars (CFG).All productions are of the form −A → x — where A is nonterminal, x is a string of nonterminal and terminals, A context-free grammar is equivalent to a pushdown automaton (PDA) and to context free languages.Example − Pushdown Automaton (PDA)PropertiesA grammars, G = ... Read More

Construct a TM recognizing strings of the form an bn cn| n≥1 over = {a, b, c}

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 11:55:29

467 Views

AlgorithmStep 1: Process the leftmost „a‟ and replace it by „x‟.Step 2: Move right until the leftmost „b‟ is reached. Replace it by „y‟.Step 3: Move right until the leftmost „c‟ is reached. Replace it by „z‟.Step 4: Move left to reach the leftmost „a‟ and perform steps 1, 2 ... Read More

Explain formal definition of language with examples in TOC?

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 11:54:25

3K+ Views

The set of all strings (over terminal symbols) which can be derived from the start symbol is the language generated by the grammar G.Example 1Let grammar G be defined by the set of terminals T = {a, b}, the only non-terminal start symbol S and the set of production rules. ... Read More

What do you mean by grammar and production in TOC?

Bhanu Priya

Bhanu Priya

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

3K+ Views

Let us understand the concept of grammar in the theory of computation (TOC).Introduction to GrammarA language over an alphabet ∑ is a set of strings from ∑.Grammar is a set of rules used to define a language. In short, it is the structure of the strings in the language.To describe ... Read More

What is type 3 grammar? Explain its properties

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 11:50:16

916 Views

Type 3 grammars are regular grammars that describe regular / formal languages.These grammars contain production rules consisting of the following −Only one non-terminal at the left hand side, The right hand side has a single terminal and may or may not be followed by non terminals.ExampleA → ε , A ... Read More

What are the basic properties of products in TOC?

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 11:47:26

172 Views

It is easy to see that for any language L the following simple properties hold −L · {∧} = {∧} · L = LL · ∅ = ∅ · L = ∅Now let’s see the commutativity and associativity of the operation of concatenation.Properties of products – commutativityThe operation of concatenation ... Read More

Explain the technique for combining two languages in TOC?

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 11:43:48

727 Views

There are three common ways of creating a new language from two languages −UnionIntersectionProductLanguages are sets of strings, so they can be combined by the usual set operations of union and intersection.IntersectionIf L1 and L2 are languages over ∑, then L1 ∩ L2 is the language of strings in both ... Read More

Design NPDA for accepting the language L = {am b(2m) | m>=1}

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 11:43:25

508 Views

Basically a push down automata (PDA) is as follows −“Finite state machine+ a stack”PDA has three components, which are as follows −An Input tape.A control unit.A Stack with infinite size.A PDA can be formally described as seven tuples(Q, Σ, S, δ, q0, I, F)Where, Q is finite number of statesΣ ... Read More

Advertisements