Minimization of Finite Automata with Output

Minimization of Finite Automata with Output

The method to minimize the Moore and Mealy machine is very much similar to the method that we have used to minimize the DFA.

Methods to Minimize the Finite Automata with Output

Step1: Detect the unreachable states.

Step2: Eliminate the unreachable states (if find).

Step3: Identify equivalent states and merge them.

Equivalent states can also be found the same way as in the case of minimizing the DFA. But there is only one difference. Initially, we have group A and group B contains the following:

  • Group A: All states with a similar type of outputs for all possible inputs.
  • Group B: All states with other similar types of outputs for all possible inputs.

Example

Minimize the following Moore machine.

Minimization of Finite Automata with Output

Solution

Step1: Detect the unreachable states

Start form initial state. Add q0 to temporary state (T)

Initially T = {q0}

?(q0, a) = q7

?(q0, b) = q1

Now, T = {q0, q1, q7}

Again we check all possible states with input a and b.

? (q1, a) = q0

? (q1, b) = q3

? (q3, a) = q7

? (q3, b) = q6

? (q7, a) = q4

? (q7, b) = q0

T = {q0, q1, q3, q4, q6, q7}

Again we check all possible states for input a and b.

? (q4, a) = q5

? (q4, b) = q6

? (q6, a) = q3

? (q6, b) = q0

T = {q0, q1, q3, q4, q5, q6, q7}

Now, again we check all possible states for input a  and b.

? (q5, a) = q2

? (q5, b) = q3

? (q2, a) = q5

? (q2, b) = q1

Finally, T = {q0, q2, q1, q3, q4, q5, q6, q7}

U= Q – T

   = ? (There is no unreachable state)

Step2: There is no unreachable states to remove.

Step3: Identify equivalent states and merge them.

Initially, we have,

Group A: qo, q1, q3, q6 (contains all states with output b)

Group B: q2, q4, q5, q7 (contains all states with output a)

Now, we check both the groups for both the input symbols. For input symbol a, we have

? (q0, a) = q7

? (q1, b) = q0

? (q3, a) = q7

? (q6, b) = q3

q7 belongs too group B and q0, q3 belongs to group A for input a. since q7 belongs to group B so we partition group A as:

Group A: qo, q3

Group A2: q1, q6

Group B: q2, q4, q5, q7

Now, we check Group B for input a

? (q2, a) = q5

? (q4, a) = q5

? (q5, a) = q2

? (q7, b) = q4

Since q2, q4 and q5 belong to the same Group B. Now for input b, we have

? (q2, b) = q1

? (q4, b) = q6

? (q5, b) = q3

? (q7, b) = q0

q1, q6 belongs to Group A2

q3, q0 belongs to Group A1

 After portioning group B, we have

Group A1: qo, q3

Group A2: q1, q6

Group B1: q2, q4

Group B2: q5, q7

Now let us check Group A1 for input a

? (q0, a) = q7

? (q3, a) = q7

q7 belongs to Group B2; for input b, we have

 ? (q0, b) = q1

 ? (q3, b) = q6

q1 and q6 belong to Group A2; thus, the further partition of Group A1  is not possible.

Similarly for Group A2

? (q1, b) = q0

? (q6, b) = q3

q0, q3 belongs to Group A1

? (q1, b) = q3

? (q6, b) = q0

q0, q3 belongs to Group A1; thus, the further partition of Group A2 is not possible

Similarly for Group B1

? (q2, a) = q5

? (q4, a) = q5

? (q2, b) = q1

? (q4, b) = q6

q5 belongs to Group B2, and q1 and q6 belongs to Group A2; further partition of Group B1 is not possible

Similarly for Group B2

? (q5, a) = q2

? (q7, a) = q4

? (q5, b) = q3

? (q7, b) = q0

q2, q4 belongs to Group B1 and q0, q3 belongs to Group A1. Thus further portioning of Group B2 is not possible.

Finally, we have the following partitions:

Group A1: qo, q3

Group A2: q1, q6

Group B1: q2, q4

Group B2: q5, q7

After merging these states, the minimized Moore machine is shown in the following figure:

Minimization of Finite Automata with Output

Related Topics

Minimization of Finite Automata with Output

Minimization of Finite Automata with Output The method to minimize the Moore and Mealy machine is very much similar to the method that we have used to minimize the DFA. Methods to...

3 minutes read.

Conversion from NFA to DFA

Conversion from NFA to DFA A Non-deterministic Finite Automata (NFA) is a finite state machine, in which, the move from one state to another is not fully deterministic, i.e., for a...

4 minutes read.

Pumping Lemma for Context Free Languages

Pumping Lemma for Context Free Languages The Pumping Lemma is made up of two words, in which, the word pumping is used to generate many input strings by pushing the symbol...

3 minutes read.

Non-deterministic Turing Machine - Automata

A non-deterministic Turing machine (NTM) is a theoretical machine used in computability theory to study the extent to which a machine can "guess" at a solution and yet still be...

4 minutes read.

Derivation Tree of Context Free Grammar - Automata

Derivation Tree of Context Free Grammar Derivation tree gives a way to show how a string can be derived from context free grammar. It is also called as parse tree, production...

3 minutes read.

Equivalence of Regular Grammar and Finite Automata

Equivalence of Regular Grammar and Finite Automata Regular Grammar / type -3 grammar A regular grammar or type-3 defines the language called regular language that is accepted by finite Automata.A Regular Grammar...

3 minutes read.

Pumping Lemma for Regular Languages - Automata

Pumping Lemma for Regular Languages The language accepted by the finite automata is called Regular Language. If we are given a language L and asked whether it is regular or not?...

4 minutes read.

Chomsky's Normal Form - Automata

Chomsky's Normal Form (CNF) In context free grammar, the left-hand side of production rules contains only one variable, and right side may contain any number of variables or terminals in production...

4 minutes read.

What is Automata Theory?

What is Automata Theory? Automata theory is used to study the abstract machine and automata (the self-acting machine).  Abstract machine is a theoretical model of a computer used in Automata theory. Automata...

4 minutes read.

Converting Finite Automata to Regular Expression using Arden’s Theorem

Converting Finite Automata to Regular Expression using Arden’s Theorem The Arden’s Theorem can be applied to find the regular expression recognized by the given transition diagram. This theorem can be applied...

4 minutes read.

Finite Automata

Finite Automata Finite state Automata or Finite State Machine is the simplest model used in Automata. Finite state automata accepts regular language. In this, the term finite means it has a...

4 minutes read.

Minimization of Finite Automata

Minimization of Finite Automata The term minimization refers to the construction of finite automata with a minimum number of states, which is equivalent to the given finite automata. The number of...

4 minutes read.

Recursive Language and Recursive Enumerable Language

Recursive Language and Recursive Enumerable Language Before discussing Recursive language and Recursive Enumerable language, let us see what Turing machine responds for some input string. If we have the Turing machine T...

4 minutes read.

Automata Greibach Normal Form

Greibach Normal Form In Greibach Normal Form, there is restriction on the position, in which, terminals and variables can appear on right-hand side of production rules. In Greibach Normal Form, every...

4 minutes read.

Context Free Grammar - Automata

Context Free Grammar Grammar defines a set of rules, and with the help of these rules valid sentences in a language are constructed. A grammar consists of collection of substitution rules,...

3 minutes read.

Automata Regular Expressions

Regular Expressions Regular expressions are also referred as rational expressions, which are used to describe the algebraic description of regular languages. It is generally a sequence of characters that is used...

3 minutes read.

Conversion of DFA to Regular expression

Conversion of DFA to Regular expression To convert the DFA to Regular Expression (RE), we are going to use a method called converting DFA to regular expression by eliminating states. This...

3 minutes read.

Undecidable Problem of Turing Machine

Automata Undecidable Problem of Turing Machine Undecidable problems areproblems which cannot be solved by any Turing machine. Example: Post Correspondence Problem is the type of undecidable Problem. Post Correspondence Problem Post Correspondence problem is...

7 minutes read.

Push down Automata Acceptance

Acceptance of Language by Push down Automata Push down Automata accepts the language, which is called context free language. Push down Automata = Finite Automata + Auxiliary Memory (Stack) Auxiliary Memory helps Push...

3 minutes read.

Finite Automata with Output

Finite Automata with Output The Finite State machine is similar to Finite Automata, except that it has the additional capacity of producing output. Finite State machine = Finite Automata + Output Capabilities Types...

3 minutes read.