
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Bhanu Priya has Published 1449 Articles

Bhanu Priya
3K+ Views
ProblemConstruct a deterministic finite automata (DFA) that accepts a language L which has the number of zero’s is of multiple of 3 over an alphabet ∑=”{0, 1}.SolutionIf input is: 000 Output is: string is acceptedBecause here the number of zero’s is multiple of 3.Designing DFAIn order to construct the DFA, ... Read More

Bhanu Priya
1K+ Views
ProblemGiven language to construct the deterministic finite automata (DFA) is, the strings start with ‘a’ but not contain substring ‘aab’ over alphabet ∑={a, b}.SolutionIf the input is: “baabba”The output is: string is not acceptedBecause the string does not start with ‘a’, and generating a substring ‘abb’, DFA transition diagramThe DFA ... Read More

Bhanu Priya
2K+ Views
Vertex cover is a subset of vertices that covers all the edges in a graph. It is used to determine whether a given graph has a 3SAT to vertex cover.Clique is called a subset of vertices that are all directly connected. It determines whether a clique of size k exists ... Read More

Bhanu Priya
5K+ Views
ProblemThe given language L={ x | the number of 1's is divisible by 2, and 0's by 3} over an alphabet ∑={0, 1}.SolutionThe language is divided into two parts, first we need to find the number of 1’s divisible by 2 and second find out the number of 0’s divisible ... Read More

Bhanu Priya
8K+ Views
Before understanding the differences between ambiguous grammar and unambiguous grammar, let us learn about these concepts.Ambiguous GrammarA grammar is said to be ambiguous if there exists more than one left most derivation or more than one right most derivation or more than one parse tree for a given input string.If ... Read More

Bhanu Priya
4K+ Views
ProblemConstruct deterministic Finite automata (DFA) whose language consists of strings with alternate 0’s and 1’s over an alphabet ∑ ={0, 1}.SolutionIf Σ = {0, 1} (ε + 1)(01)* (ε + 0) is the set of strings that alternate 0’s and 1’s Another expression for the same language is (01)*+ 1(01)*+ ... Read More

Bhanu Priya
10K+ Views
AlgorithmStep 1 - Read the leftmost ‘0’ replace it by ‘x’ and move right to process the immediate symbol after ‘#’.Step 2 - Replace the symbol ‘0’ by x and move right reach the first ‘B’ after ‘#’Step 3 - Replace B by ‘0’ and move left until the nearest ... Read More

Bhanu Priya
11K+ Views
The unary input number n is represented with a symbol 0 n – times.Example4 → 00001 → 05 → 00000The separation symbol, „#‟ (any other special character) shall be used to distinguish between two or more inputs.For Example: 5, 2 are the inputs represented by 00000 # 00.AlgorithmStep 1 - ... Read More

Bhanu Priya
6K+ Views
Before understanding the differences between the finite automata (FA) and the turing machine (TM), let us learn about these concepts.Finite AutomataFinite automata is an abstract computing deviceIt is a mathematical model of a system with discrete inputs, outputs, states and set of transitions from state to state that occurs on ... Read More

Bhanu Priya
17K+ Views
ProblemDesign deterministic finite automata (DFA) with ∑ = {0, 1} that accepts the languages ending with “01” over the characters {0, 1}.SolutionThe strings that are generated for a given language are as follows −L={01, 001, 101, 110001, 1001, ……….}The minimum length of the string is 2, the number of states ... Read More