Found 700 Articles for Computer Science

What is a Moore Machine in TOC?

Bhanu Priya
Updated on 11-Jun-2021 14:31:25

3K+ Views

Moore machine is a finite state machine in which the next state is decided by the current state and the current input symbol.The output symbol at a given time depends only on the present state of the machine.The Moore machine has 6 tuples(Q, q0, Σ, O, δ, λ)Where, Q: Finite set of statesq0: Initial state of machineΣ: Finite set of input symbolsO: Output alphabetδ: Transition function where Q × Σ → Qλ: Output function where Q → OThe state diagram is as follows −Example 1Input − 010Transition − δ (q0, 0) => δ(q1, 1) => δ(q1, 0) => q2Output − ... Read More

What is a mealy machine in TOC?

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

2K+ Views

In a mealy machine, the output symbol depends upon the present input symbol and on the present state of the machine.The output is represented with each input symbol and each state is separated by /.The mealy machine can be described by 6 tuples(Q, q0, Σ, O, δ, λ')Where, Q: Finite set of statesq0: Initial state of machineΣ: Finite set of input alphabetO: Output alphabetδ: Transition function, where Q × Σ → Qλ': Output function, where Q × Σ →OThe length of output for a mealy machine is equal to the length of input.Example 1Input − 11Transition −  δ (q0, 11)=> δ(q2, 1)=>q2Output − 00 (q0 to q2 transition has Output 0 and q2 to ... Read More

Design NFA with Σ = {0, 1} and accept all string of length at least 2.

Bhanu Priya
Updated on 11-Jun-2021 14:03:26

14K+ Views

Non-deterministic finite automata also have five states which are same as DFA, but with different transition function, as shown follows −δ: Q X Σ -> 2QNon-deterministic finite automata is defined as a 5 tuple, M=(Q, Σ, δ, q0, F)Where, Q: Finite set of statesΣ: Finite set of the input symbolq0: Initial stateF: Final stateδ: Transition function: Q X Σ -> 2QProblemDesign a transition diagram and table for the given language that accepts all strings of length at least 2.SolutionBefore proceeding to the solution, let’s understand what do you mean by length of string and how to find the length of ... Read More

Explain Non-Deterministic Finite Automata in TOC.

Bhanu Priya
Updated on 11-Jun-2021 13:51:00

15K+ Views

NFA stands for non-deterministic finite automata. It is easy to construct an NFA when compared to DFA for a given regular language.The finite automata are called NFA when there exist many paths for specific input from the current state to the next state.Each NFA can be translated into DFA but every NFA is Non DFA.NFA is defined in the same way as DFA but with the following two exceptions, which are as follows −It contains multiple next states.It contains ε transitions.ExampleThe transition diagram is as follows −In the above NFA, it is clear that there exist many paths for specific ... Read More

Construct DFA with Σ= {0,1} accepts all strings with 0.

Bhanu Priya
Updated on 11-Jun-2021 13:47:32

25K+ Views

A Deterministic Finite automata (DFA) is a collection of defined as a 5-tuples and is as follows −M=(Q, Σ, δ, q0, F)Where, Q: Finite set called states.Σ: Finite set called alphabets.δ: Q × Σ → Q is the transition function.q0 ∈ Q is the start or initial state.F: Final or accept state.Example 1The DFA accepts all strings starting with 0The language L= {0, 01, 001, 010, 0010, 000101, …}In this language, all strings start with zero.Transition diagramThe transition diagram is as follows −ExplanationStep 1 − q0 is the initial state on input ‘0’ it goes to q1, which is the ... Read More

Explain Deterministic Finite Automata in TOC.

Bhanu Priya
Updated on 11-Jun-2021 13:44:58

15K+ Views

DFA refers to deterministic finite automata. Deterministic refers to the uniqueness of the computation. The finite automata are deterministic FA, if the machine reads an input string one symbol at a time.In DFA, there is only one path input from the current state to the next state. It does not accept the null move, i.e. it cannot change state without any input. It can contain multiple final states. It is used in Lexical Analysis in compilers.Formal definition of different automata (DFA)A Deterministic Finite automata (DFA) is a collection of defined as a 5-tuples and is as follows −M=(Q, Σ, δ, ... Read More

What are different types of finite automata?

Bhanu Priya
Updated on 11-Jun-2021 13:41:23

10K+ Views

Finite automata is an abstract computing device. It is a mathematical model of a system with discrete inputs, outputs, states and a set of transitions from state to state that occurs on input symbols from the alphabet Σ.Formal definition of Finite AutomataFinite automata is defined as a 5-tuplesM=(Q, Σ, δ, q0, F)Where, Q: Finite set called states.Σ: Finite set called alphabets.δ: Q × Σ → Q is the transition function.q0 ∈ Q is the start or initial state.F: Final or accept state.TypesThe different types of Finite Automata are as follows −Finite Automata without outputDeterministic Finite Automata (DFA).Non-Deterministic Finite Automata (NFA ... Read More

What is finite automata?

Bhanu Priya
Updated on 11-Jun-2021 13:38:53

12K+ Views

Finite automata is an abstract computing device. It is a mathematical model of a system with discrete inputs, outputs, states and a set of transitions from state to state that occurs on input symbols from the alphabet Σ.Finite Automata RepresentationThe finite automata can be represented in three ways, as given below −Graphical (Transition diagram)Tabular (Transition table)Mathematical (Transition function)Formal definition of Finite AutomataFinite automata is defined as a 5-tuplesM=(Q, Σ, δ, q0, F)Where, Q: Finite set called states.Σ: Finite set called alphabets.δ: Q × Σ → Q is the transition function.q0 ∈ Q is the start or initial state.F: Final or ... Read More

Explain the different operations on Regular language in TOC.

Bhanu Priya
Updated on 11-Jun-2021 13:30:35

11K+ Views

A language is a set of strings from some alphabet (finite or infinite). In other words, any subset L of E* is a language in TOC.Some special languages are as follows −{} The empty set/language, containing no string.{s} A language containing one string, the empty string.ExamplesE = {0, 1}L = {x | x is in E* and x contains an even number of 0’s}E = {0, 1, 2, ., 9, .}L = {x | x is in E* and x forms a finite length real number}= {0, 1.5, 9.326, .}E = {a, b, c, ., z, A, B, ., Z}L ... Read More

What are the different operations performed on strings in TOC?

Bhanu Priya
Updated on 11-Jun-2021 13:28:26

4K+ Views

A string is a finite set sequence of symbols choosen from some alphabets.For example, 00011001 is a string from binary alphabet Σ={0, 1}aabbcabcd is a string from alphabet Σ={a, b, c, d}The different operations performed on strings are explained below −Concatenation.Substring.Kleen star operation.Reversal.ConcatenationConcatenation is nothing but combining the two strings one after another.ExampleLet’s consider two strings −X= TutorialsY= PointThe concatenation (X, Y) of two strings is −X.Y = TutorialsPointNote − Concatenation of empty string with other string gives string itself.For example, X. ε = ε.X = XSubstringIf ‘w’ is a string then ‘v’ is substring of ‘w’ if there exists ... Read More

Advertisements