- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1259 Articles for Computers
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
30K+ Views
A Turing machine is a computational model, like Finite Automata (FA), Pushdown automata (PDA), which works on unrestricted grammar. The Turing machine is the most powerful computation model when compared with FA and PDA.Formally, a Turing machine M can be defined as follows −M = (Q, X, ∑, δ, q0, B, F)Q represents the finite, non-empty set of states.X represents the set of tape alphabets.∑ represents the non-empty set of input alphabets.δ is the transition function, whose mapping is given as, δ : Q x X → Q x X x {Left_shift, Right_shift}.q0 is the initial state of the machineB ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
1K+ Views
DPDA is the short form for the deterministic push down automata (DPDA).ProblemConstruct DPDA for anbncm where m, n>=1SolutionSo, the strings which are generated by the given language are −L={abc, aabbc, aaabbbcc, ….}That is we have to count equal number of a’s, b’s and different number of c’sLet’s count the number of a's which is equal to the number of b's.This can be achieved by pushing a's in STACK and then we will pop a's whenever "b" comes.Then for c nothing will happen.Finally, at the end of the strings if nothing is left in the STACK then we can say that ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
25K+ Views
ProblemConstruct deterministic push down automata (DPDA) for anbn where n>=1.SolutionSo, the strings which are generated by the given language are as follows −L={ab, aabb, aaabbb, ….}That is we have to count equal number of a’s and b’sThis can be achieved by pushing a's in STACK and then we will pop a's whenever "b" comes.Finally at the end of the strings if nothing is left in the STACK then we can declare that language is accepted in the PDA.The transition diagram is as follows −Transition FunctionsThe transition functions are as follows −δ(q0, a, Z) = (q0, aZ)δ(q0, a, a) = (q0, ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
2K+ Views
Let us understand the push down automata (PDA) and the linear bounded automata (LBA) in the theory of computation (TOC).Push-Down AutomataA PDA can be formally described as seven tuples (Q, Σ, S, δ, q0, I, F)Where, Q is finite no of statesΣ is input alphabetS is stack symbolΔ is the transition function: QX(ΣU{e})XSXQq0 is the initial state (q0 belongs to Q)I is the initial state top symbolF is a set of accepting states (F belongs to Q)A Push-Down Automaton is a finite-state machine that is equipped with a memory device that functions as a push-down store.Push-down automata are equivalent to ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
8K+ Views
The Context sensitive grammar (CSG) is defined as G=(V, Σ, P, S)Where, V: Non terminals or variables.Σ: Input symbols.P: Production rule.P:{αAβ → αγβ, A ϵ V, α ϵ (V∪Σ)*, β ϵ (V∪Σ)*S: Starting symbol.ExampleaS→SAa|aAaA→abcIn context sensitive grammar, there is either left context or right context (αAβ i.e. α is left context and β is right) with variables.But in context free grammar (CFG) there will be no context.For example in production ruleS →0 B S 2 ,B 0 → 0 BWe cannot replace B until we get B0.Therefore, CSG is harder to understand than the CFG.The CFG, CSG and the unrestricted ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
2K+ Views
If the grammar satisfies the following two conditions, then we can say that type of grammar is called as operator precedence grammar.If ε is on its RHS then there exists no production rule.If two non-terminals are adjacent to each other on its RHS then there exists no production rule.Operator Grammars have the property that no production right side is empty or has two adjacent non-terminals.ExampleE-> E A E | idA-> + | *The above grammar is not an operator grammar but we can convert that grammar into operator grammar like −E-> E + E | E * E | idThere ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
14K+ Views
A Context Free Grammar (CFG) is said to be in Greibach Normal Form(GNF), if production rules satisfy one of the following criteria −Only a start symbol can generate ε. For example, if S is the start symbol then S → ε is in GNF.A non-terminal can generate a terminal. For example, if A is Non terminal and a is terminal then, A → a is in GNF.A non-terminal can generate a terminal followed by any number of non-terminals. For Example, S → aAS is in GNF.Case 1G1 = {S → aAB | aB, A → aA| a, B → bB ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
2K+ Views
We know that the languages accepted by finite automata (FA) are called regular languages and the languages accepted by push down automata (PDA) are called context free languages (CFG).Closure of CFLs under UnionCFL is the short form for Context Free Language. Here the CFL is as follows −G = (V, Σ, R, S) such that L(G) = L(G1) ∪ L(G2)Thus, V = V1 ∪ V2 ∪ {S} (the three sets are disjoint)Σ = Σ1 ∪ Σ2R = R1 ∪ R2 ∪ {S → S1|S2}Union of Regular language with CFGIf all regular languages are context-free then union of both results is ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
13K+ Views
Mealy MachineIn a Mealy machine the output symbol depends upon the present input symbol and present state of the machine.In the Mealy machine, the output is represented with each input symbol and each state is separated by /.The Mealy machine can be described by six tuples (Q, q0, Σ, O, δ, λ')Where, Q: Finite set of states.q0: Initial state of machine.Σ: Finite set of input alphabet.O: Output alphabet.δ: Transition function where Q × Σ → Q.λ': Output function where Q × Σ → O.In the Mealy machine, the output is represented with each input symbol and each state is separated ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
15K+ Views
Kleene's Theorem states the equivalence of the following three statements −A language accepted by Finite Automata can also be accepted by a Transition graph.A language accepted by a Transition graph can also be accepted by Regular Expression.A language accepted by Regular Expression can also be accepted by finite Automata.Kleene’s theorem proof part-1A language accepted by Finite Automata can also be accepted by a Transition graph.Consider an example Let L=aba over an alphabet {a, b}Third part of Kleene’s theoremA language accepted by Regular Expression can also be accepted by finite Automata.TheoremAny language that can be defined with RE can be accepted ... Read More