Reflexive transitive closure problem

discrete mathematicsrelations

I'm solving some problems of discrete mathematics, and I'm stuck with the problem below.

Let $\Bbb N$ be the set of all nonnegative integers. Let $Q$ be a set of states defined by $Q =\Bbb N \times \Bbb N \times \Bbb N$, and let a transition relation $\to$ on $Q$ be defined as follows.

\begin{align}
(a, b, c) \to (a-1, b-1, c+2)&& (a > 0 \text{ and } b > 0)\\
(a, b, c) \to (a+2, b-1, c-1)&& (b > 0 \text{ and } c > 0)\\
(a, b, c) \to (a-1, b+2, c-1)&& (c > 0 \text{ and } a > 0)
\end{align}

Let $\to^\ast$ denote the reflexive transitive closure of $\to$

Enumerate all states $q \in Q$ such that $(1,2,3) \to^\ast q$, and draw a state transition graph.

Best Answer

We can go through the transitions step by step. First we look at which states $q$ there are such that $(1,2,3)\to q$, going through the clauses of the definition:

\begin{align} (1,2,3)\to (0,1,5)&&&\text{by the first clause}\\ (1,2,3)\to (3,1,2)&&&\text{by the second clause}\\ (1,2,3)\to (0,4,2)&&&\text{by the third clause} \end{align}

Now for each of these states we go through the states that are reachable from them. First $(0,1,5)$ has $0$ as its first coordinate, so the only clause that is applicable is the second one:

\begin{align} (0,1,5)\to(2,0,4)&&&\text{by the second clause} \end{align}

Similarly for $(0,4,2)$ we see this only reaches the state

\begin{align} (0,4,2)\to(2,3,1)&&&\text{by the second clause} \end{align}

We see that $(2,0,4)$ in its turn has a $0$ as its second coordinate, thus \begin{align} (2,0,4)\to(1,2,3)&&&\text{by the third clause} \end{align}

Now you could keep going on like this, or you could use some symmetry argument to see that the total range of $(1,2,3)$ under $\to^*$ is equal to \begin{align} \big\{\ \ &(1,2,3),\ (2,3,1),\ (3,1,2),\\ &(0,1,5),\ (1,5,0),\ (5,0,1)\\ &(0,4,2),\ (2,0,4),\ (4,2,0)\ \ \big\} \end{align}

The state diagram will look like this:

enter image description here