Found 691 Articles for Computer Science

Explain about left linear regular grammar in TOC

Bhanu Priya
Updated on 14-Jun-2021 14:49:30

3K+ Views

Regular grammar describes a regular language. It consists of four components, which are as follows −G = (N, E, P, S)Where, N − finite set of non-terminal symbols, E − a finite set of terminal symbols, P − a set of production rules, each of one is in the formsS → aBS → aS → ∈, S ∈ N is the start symbol.The above grammar can be of two forms −Right Linear Regular GrammarLeft Linear Regular GrammarLinear GrammarWhen the right side of the Grammar part has only one terminal then it's linear else nonv linear.Left linear grammarIn a left-regular grammar ... Read More

Explain about right linear regular grammars in TOC

Bhanu Priya
Updated on 14-Jun-2021 14:46:58

2K+ Views

Regular grammar describes a regular language. It consists of four components, which are as follows −G = (N, E, P, S)Where, N − finite set of non-terminal symbols, E − a finite set of terminal symbols, P − a set of production rules, each of one is in the formsS → aBS → aS → ∈, S ∈ N is the start symbol.The above grammar can be of two forms −Right Linear Regular GrammarLeft Linear Regular GrammarLinear GrammarWhen the right side of the Grammar part has only one terminal then it's linear else non linear.Let’s discuss about right linear grammar ... Read More

What is Linear bounded automata in TOC?

Bhanu Priya
Updated on 14-Jun-2021 12:01:22

7K+ Views

A deterministic linear bounded automaton (LBA) is 9-tuple automataG = ( Q, Σ, E, δ, ε, q0, GL, GR, F)Where, Q is set of all statesΣ is set of all terminalsE input alphabet.δ is set of transitionsq0 initial stateGL left bound of tapeGR right bound of tape.F set of final stateA linear bounded automaton is called a multi-track non-deterministic Turing machine which has a tape of some bounded finite length.Length = function (Length of the initial input string, constant c)The computation in linear bounded automata is restricted to the constant bounded area. The input alphabet here contains two special symbols ... Read More

Explain the Post Correspondence Problem in TOC

Bhanu Priya
Updated on 14-Jun-2021 11:59:07

2K+ Views

The Post Correspondence Problem (PCP) was introduced by Emil Post in 1946 and is an undecidable decision problem.The PCP problem over an alphabet Σ is state. Given the following two lists, M and N of non-empty strings over Σ−M = (x1, x2, x3, ………, xn) N = (y1, y2, y3, ………, yn)We can say that there is a Post Correspondence Solution, if for some i1, i2, ………… ik, Where 1≤ ij ≤ n, the condition xi1 …….xik = yi1 …….yik satisfies.Example 1Find whether the lists M = (abb, aa, aaa) and N = (bba, aaa, aa) have a Post Correspondence ... Read More

Prove that the vertex cover is NP complete in TOC

Bhanu Priya
Updated on 14-Jun-2021 11:57:20

6K+ Views

It is the subset(minimum size) of vertices of a graph G such that every edge in G incident to at least one vertex in G.Vertex Cover (VC) ProblemTo prove VC is NP-complete we have to prove the following −VC is Non-deterministic Polynomial (NP).A NPC problem can be reduced into VC.To prove VC is NP, find a verifier which is a subset of vertices which is VC and that can be verified in polynomial time. For a graph of n vertices it can be proved in O(n2). Thus, VC is NP.Now consider the “clique” problem which is NPC and reduce it ... Read More

Prove that the Hamiltonian Path is NP-Complete in TOC

Bhanu Priya
Updated on 14-Jun-2021 11:55:07

4K+ Views

A Hamilton cycle is a round trip path along n edges of graph G which visits every vertex once and returns to its starting vertexExampleGiven below is an example of the Hamilton cycle path −Hamilton cycle path: 1, 2, 8, 7, 6, 5, 4, 3, 1TSP is NP-CompleteThe travelling salesman problem (TSP) is having a salesman and a set of cities. The salesman needs to visit each one of the cities starting from a certain one and returning to the same city i.e. back to starting position. The challenge of this problem is that the travelling salesman wants to minimise ... Read More

What is NP-completeness in TOC?

Bhanu Priya
Updated on 14-Jun-2021 11:52:48

11K+ Views

The Non-deterministic Polynomial (NP) problems were a little harder to understand. In terms of solving a NP problem, the run-time is not polynomial. It would be something like O(n!) or something larger.However, this class of problems are given a specific solution, and checking the solution would have a polynomial run-time.For example, the Sudoku game.NP-Hard ProblemsA problem is said to be NP-Hard when an algorithm for solving NP Hard can be translated to solve any NP problem. Then we can say, this problem is at least as hard as any NP problem, but it could be much harder or more complex.NP-Complete ... Read More

Why the NP-complete problems are significant?

Bhanu Priya
Updated on 14-Jun-2021 11:51:02

893 Views

The Non-deterministic Polynomial (NP) problems were a little harder to understand. In terms of solving a NP problem, the run-time cannot be polynomial. It would be something like O(n!) or something larger.However, this class of problems are given a specific solution, and checking the solution would have a polynomial run-time.For example, the Sudoku game.NP-Hard ProblemsA problem is said to be NP-Hard, when an algorithm for solving the NP Hard can be translated to solve any NP problem. Then we can say, this problem is at least as hard as any NP problem, but it could be much harder or more ... Read More

What is Decidability in TOC?

Bhanu Priya
Updated on 14-Jun-2021 11:49:44

8K+ Views

There are two types of languages in the theory of computation (TOC), which are as follows −DecidableUndecidableA problem is called decidable, when there is a solution to that problem and also can construct algorithms corresponding to that.Example of Decidable ProblemFind all the odd numbers in the range from 1 to 50.For this problem, we can easily find a solution by constructing an algorithm. In terms of Turing Machine (TM), if a problem is decidable, then the Turing machine halts whether or not it accepts its input.In terms of finite automata (FA), decidable refers to the problem of testing whether a ... Read More

Explain the Decidable and undecidable problems

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

9K+ 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 L( M) = L.Given a decider M, you can learn whether or not a string w ∈ L(M).Run M on w.Although it might take a long time, M will accept or reject w.The set R is the set of all decidable languages.L ∈ R if L is decidable.Undecidable LanguageA decision ... Read More

Advertisements