Ok, so let’s look at the RD-algorithm for graphs. Take the minimized graph we obtained in previous post. The first step is to make an assumption, i.e. that two states belong to the same block. We assume that is one block:
We see that we leave the area (or block) marked by a dashed line on input 1 and stay inside the block on input 0. What does this tell us? Well, simply that this block is fine as it is – we have divided the graph into two blocks – areas if you will (the dashed area and the complement, i.e. everything outside it) and we change block one the same input – regardless of where in area we are.
Again, we could make the assumption that , which gives an identical result:
Everything does not all the time fall into our hands that easily. We cannot distinguish between all states yet. Since the areas each contain two elements we need some more information. Assume that we wish to specify a certain state, say . Looking at the first graph, we could say: it’s in the area marked by a dashed line. What then? We need another block that does not contain
and
(in order to specify all states,
and
cannot be in the same block either).
Let’s try :
Since we per definition must stay in or change the block for all elements in the dashed area, we must include . Why? If we are in
and get input 1, we stay. If we are in
and get input 1, we leave the block to
. But if we include
, we stay in the block.
Now looking at input 0: if we are in we leave the block, if we are in
or
, we stay. Since the assumption was
, we must stay. So we need to include
in order to stay on input 0. We get the graph:
If we try all possible assumptions (excluding and
, we will notice that they will end up with a block covering the whole graph. There is nothing to do about this. Crap… what to do now? Well, we can still use the case that works.
Lets define the states in binary as and
AND
and
. Then the first bit of the next state
will be a very simple function of the first bit of the current state
:
It does not change the fact that the second state bit equation remains complex – but still – we have at least reduced the complexity of first equation. One small step towards a simpler, less costly circuit!
NOTE: There is also a state assignment method called 1-hot. This method maps ,
, and so on… the obvious disadvantage is that the number of required state variables grows linearly with the number of states. The main advantage is that it is really easy to construct such a map and that it always is possible to construct a mapping such that exactly two state variables change each time we jump no another state, no matter what the graph looks like. What implication does it have on the state variable update equations? Hint: the equations have the form
.