Bhanu Priya has Published 1449 Articles

Construct ∈-NFA of Regular Language L = 0(0+1)*1

Bhanu Priya

Bhanu Priya

Updated on 14-Jun-2021 15:12:58

9K+ Views

The ∈ transitions in Non-deterministic finite automata (NFA) are used to move from one state to another without having any symbol from input set Σ∈-NFA is defined in five tuple representation{Q, q0, Σ, δ, F}Where, δ − Q × (Σ∪∈)->2QQ − Finite set of statesΣ − Finite set of the ... Read More

C Program to construct DFA for Regular Expression (a+aa*b)*

Bhanu Priya

Bhanu Priya

Updated on 14-Jun-2021 14:58:10

15K+ Views

Design a Deterministic Finite Automata (DFA) for accepting the language L = (a+aa*b)* If the given string is accepted by DFA, then print “string is accepted”. Otherwise, print “string is rejected”.Example 1Input: Enter Input String       aaaba Output: String Accepted.Explanation − The given string is of the form ... Read More

How to convert left linear grammar to right linear grammar?

Bhanu Priya

Bhanu Priya

Updated on 14-Jun-2021 14:55:02

12K+ 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 → ... Read More

How to convert right linear grammar to left linear grammar?

Bhanu Priya

Bhanu Priya

Updated on 14-Jun-2021 14:51:40

7K+ Views

For every finite automata (FA) there exists a regular grammar and for every regular grammar there is a left linear and right linear regular grammar.Example 1Consider a regular grammar −   a(a+b)* A → aB B → aB|bB|eFor the given regular expression, the above grammar is right linear grammar.Now, convert the ... Read More

Explain about left linear regular grammar in TOC

Bhanu Priya

Bhanu Priya

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

5K+ 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 ... Read More

Explain about right linear regular grammars in TOC

Bhanu Priya

Bhanu Priya

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

4K+ 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 ... Read More

Prove that the vertex cover is NP complete in TOC

Bhanu Priya

Bhanu Priya

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

9K+ 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 ... Read More

Prove that the Hamiltonian Path is NP-Complete in TOC

Bhanu Priya

Bhanu Priya

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

6K+ 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 ... Read More

What is NP-completeness in TOC?

Bhanu Priya

Bhanu Priya

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

15K+ 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 ... Read More

Why the NP-complete problems are significant?

Bhanu Priya

Bhanu Priya

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

1K+ 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 ... Read More

Advertisements