Gray Code in the Solution of the Nine Rings Chinese Game

.


Research Motives
Nine rings is an ancient Chinese game (Wu, 2003;Zhang, W. & Rasmussen, P. 2010).Although the game has been introduced for a long time, unfamiliar beginners have difficulties in the operations of the game.To unlock it, one must follow rigorous steps.In this study, we found a nature of the binary function (Press, et al, 1992) in the game as we explored solutions steps, which we combined with a computer software to create a new and easy operation model (Hsu, 1969(Hsu, , 2010;;Rosiene, J.A. & Rosiene, C.P., 2014 ).We will use the binary to explore the nine rings operation, the connection between nine rings and Gray code (Gardner, 1986;Kuao, 2014;Weisstein, 2011), to create a new method for nine rings operation model (Matrixlab-examples.com, 2009), and to extend it into a three-state game.

Purpose of the Study
First, we construct a mathematical model to help exploring the nine-ring solution, using 2xn order array graphs (Schwartz & Mathematics, 2011), to explore the isomorphic relationship between the array operation mathematical model and the nine-ring solution.
Second, through the 2xn order array graph mathematical model, we investigate the perfect solution of the nine rings, and further explore the general solutions for n rings.Thirdly, we discuss the characteristics of the transformation function between the state matrices in the 2xn order array graph and the n-bit binary numbers, and explore the relationship between the n rings operation mode and its state change.

Nine Rings Solution State
Nine chain game is to separate the nine rings from the main sword.Through physical manipulation, it is not difficult to find that each buckle has fundamental two states: when the buckle hanging on the main sword and when the buckle is relieved from the main sword.We refer it as the P state, a "pass" state and the F state, a "free" state, respectively, as shown in Figure 1 and 2: The so-called "one operation step" of the nine rings refers to a buckle from the P state to F state, or from the F state to P state in one manipulation.
After the experience analysis of experimental operations, we found the following phenomena listed as follows: (1) No matter whether the buckle is in the P state or F state, not every buckle can change its state.
(2) The state of the outermost first buckle can be changed regardless of the buckle in the P state or the F state.Therefore, as long as the state change of the outermost first buckle is completed, we refer it as" T" operation (Take operation).
(3) If the outermost first buckle is in the P state, the next buckle inside can be changed no matter it is in the P state or the F state.Once the state change of the buckle is completed, we refer it as "L" operation (Lay operation).
(4) Complete the removal of nine rings from the main sword requires a serial operation process of the "T" operations and "L" operations.

Establish a Mathematical Model for Easy Operation and in-depth Discussion
Since the operation of the nine-ring props is not conducive to problem exploration, we try to convert the props operation into the following array graph in Figure 3 to simplify each buckle operation and define a mathematical model formation as follows: Fig. 3 Conversion of state diagrams between nine-ring and 2x 9-order array graphs (1) Black circle in the first row on the array graph represents the buckle on the nine ring main sword, in the P state.Black circle in the second row refers to the buckle off from the main sword, in the F state.
(2) The binary system indicates the buckle state on the nine rings props in which "1" indicates a buckle on the main sword and "0" refers to buckles off from the main sword.The positions of nine buckles can be continuously represented in a 9-bit binary number.Therefore, it can be deduced that there is a one-to-one correspondence between the symbolic representations of these two states. (Description) Through the corresponding figure transformation, all the buckles on the nine-ring main sword in the 2×9 order array graph correspond to black circle in the first row one by one, a P state.On contrarily, the buckles from the nine-ring main sword are mapped to the black circle in the second row one by one in the 2×9 order array graph, a F state.Therefore, the state of the nine-ring buckle is consistent with the black circle state of the 2×9 order array graph.The correspondence between these two states is one-to-one.
(3) For buckle state changes in the nine-ring props, there are two operating functions, "T" and "L" operations.
For example, the state in Figure 3 is characterized by a 2-bit binary representation a 2 (010110100) .Then Because the state of the buckle on the nine-ring props is isomorphic to the state on the 2×9 order array graph, the following correspondence is also satisfied: Thus, there is a one-to-one correspondence between the operations in the black circle state change on the 2×9 order array graph and the state change solution of the buckles on the nine-ring props.
(4) "T" operation can be performed on the first and second buckles to the right in Figure 3, where "L" operation can be done on the fourth buckle.The states of the 2nd, 5th, 6th, 7th, 8th and 9th buckles can't be changed.
In conclusion, we find that if the nine-ring solution is transformed into the state change model on the 2×9 order array graph, it is equivalent to discuss whether there is a series of "T" and "L" operations that changes the initial state matrix

Explorations on the Operational Properties of Matrix State Change
Next, we will discuss the following new properties in the "T" and "L" operations of the black circle state change in the new mathematical model of 2×9 order matrix graph.

Property
1.Besides these two state matrices , all other state matrices can use T operation and L operation.
There are 512 2 9  black circle states on the 2 × 9 order array graph shown in the figure 3. Since the definition of L operation is to change the black circle state next to the right outermost black circle in the first row, regardless whether this black circle is located on the first or second row.It is clear that of the 512 matrix symbols, the first extreme state matrix is unable to conduct L operations because there is no black circle on the first row.Since there is no black circle inside the first black circle on the first row of the second extreme state matrix , it can't be operated with L operation.The rest of the state matrices are consistent with the T and L operations in the state change definition, so they can perform T operation and L operation.
Property 2. T and L operations are reversible in the state change of the 2×9 array graph. (Prove) (1) Let X be a black circle state on the 2×9 array graph, (2) Let X be a black circle state on the 2 × 9 array graph, without loss of generality, Property 3. The state change operation in the perfect solution of the nine rings on the 2x9 array is composed of T and L operations alternately.
In order to facilitate the subsequent discussion, we make the following definitions: (Definition 1) (1) In the 29 array graph the X state is changed to the Y state after the T operation, or L operation, T(X)=Y or L(X)=Y.It is defined as an "segment" for the X state to the Y state.
(2) In the state transition on the 29 array graph, the X state is changed to Y state via a series of T or L operations, T (L (T (L ... T (X) = Y, or T (L (L ... L (X) = Y.We call it a "path" for the X state to the Y state.A " segment" is also a single "path".
(3) The number of T or L operations that can be made to a state on one path in the 29 array state change process is called the "degree" of this state.For example, the degree of the two extreme states is 1 and other state's dimensions are 2.
Property 4.There is a single path for any change between any two states from all states of the 29 array graph.

(Analysis)
There are 512 black circle states in the 2×9 array graph, where the degree of the two extreme states is 1, the degree of the remaining states is 2, and from property 3, the state is changed by both T and L alternating operation.According to the principle of one stroke, from the first extreme state as a starting point, the first operation is T operation, and after a series of L and T alternating operations we can reach to the end point, the second extreme state . The first and last operations are T operations.The total number of operations is an odd number, 511, and the total number of all states is an even number, 512.In theory this path should exist, and is unique.
So we make the following definition: If there is a path from the first extreme state, after a series of alternating T and L operations to the second extreme state, . This path connects all the 2 n states on the 2n order array graph.We call this path the "whole path" of the 2n order array graph.
In the preceding proof process, some of the used symbols are defined as followings: (Definition 3) (1) In all state matrices of 2n order array graphs, if the state matrix of each column vector is the same as   (2) In all state matrices of 2n order array graphs, if the state matrix of each column vector is the same as   respectively.Through two T operations and one L operation, it forms a unique path, which is . So n=2 holds.
(2) Assume that k n  it holds.In the state change operation process of 2k order array graph, there is only a full path, operations, it forms the only full path.
In the state change operation of the 2(k+1) order array graph, let . In conclusion, the unique full path in the state change operation on the 2 × (k + 1) order array graph is, , it also holds.
Through the mathematical induction, for all positive integers n, there is a single full path in the state change operation process of 2n order array graph.This property 4 plays an important role in the following inquiry process, and there is also a rigorous argument process.We sort it into Theorem 1 as follows: Theorem 1.For all positive integers n and all the n 2 state matrices of the 2n order array graph, if the two extreme state matrices are used as starting and end points, after a series of alternating T and L operations, we can have following two results: (a) In the state change operation process of 2n order array graph, there must be a single full path.
(b) The number of operations required to complete this full path is 1 2  n , starting with T operation and ending with T operation.
2.1.4Explore the General Relationship between the State Changes of the Full Path on 2n Array Graph.
(1).The state matrix relationship between the 2n array graph and the 2x(n + 1) order array graph: in the first column on the left.Besides, after one L operation, the state matrix in the middle part of the whole path Therefore, the operation process of the full path 1  n P in the 2×(n + 1) order array graph is as follows: the state matrix (3).Summary: From the discussion above, we summarize the following results: (c) In the state change operation process of 2 n order array graph, there must be a shortest path between any two state matrix, We summarize it into Theorem 2.
Theorem 2 For all positive integers, if there is a unique full path n P in all the n 2 state matrices of the 2n order array graph, there must be the following two results: (1) Given two state matrices, (2) The state matrices between the first half and the second half of the full path n P are symmetrical.The state matrices of the first half are changed into those of the second half via one L operation.

Explore the Perfect Solution of the Nine Rings Chinese Game, and Generalize the Perfect Solution of the n Rings Game
As we know that the nine rings perfect solution is to relief the nine buckles from the main sword with the least number of operations.Using our previous discussion, combined with the state matrix presentation in the mathematical model of 2n order array graph, we can see that the process of solving the perfect solution of nine rings is equivalent to changing the whole upper state matrix through a series of T or L operations.This operation perfectly matches the reverse state change operation in the partial part of the full path 9 P on the 2n order array graph.So The number of steps for the perfect solution of the nine rings game will be less than 511 1 -2 9 

Nine Rings Perfect Solution and its Number of Steps
Using Theorem 1, Theorem 2 and inverse deduction method, we explore the number of steps to solve the nine rings: First, let n a be the total number of T and L operations needed to change the whole upper state matrix into the first extreme state matrix in the full path state change operation n P of the 2n order array graph.
Obviously, 1 1  a .Based on Theorem 1, the perfect solution of the nine rings is to change the all upper state matrix a times of serial T and L operations in the reverse state change operations of the full path 9 P .According to Theorem 2, there must be a shortest path in any two state matrices of the full path 9 P .After a series of T and L operations, the state matrix 9 2 Z is connected to the state matrix 9 2 X .
Similarly, according to Theorem 2, while the state matrix 9 2 Z is transformed into the state matrix 9 2 X , the latter half process is exactly the full path 8 P .The total number of times in alternating T and L operations equals to 256 2 8  .In addition, analyzing the state matrix representations of the first half path with the first and second vectors ignored, we found that the first half of the path is exactly the process for the state matrix 7 2 Z transformed into the state matrix 7 2 X in which the total number of T and L operations is 7 a .
From the above ccomprehensive discussion, we have In addition, we can be inferred that Using the above recursive relation and the geometric series formula, we can deduce 341 1 4 So it takes 341 steps to completely solve the nine rings.The geometric series presentation expresses the perfect solution process of the nine chain as follows : We first do the L operation, then the reverse operation of the whole path 2 X .The nine rings are completely unlocked from the main sword.

N Rings Perfect Solution and the Number of Steps.
Applying the previous investigation methods and results in nine rings game, we then explore the number of n rings operations steps: First, the number of steps in the perfect solution of the n rings satisfies the recursive relationship: The followings are the general formulas for n a with n in odd and even numbers respectively: (1) n is odd: , and From the above recursive relationship and the geometric series formula, we can deduce that the n rings perfect solution process with odd number n as followings: (2) Similarly when n is even: From the above recursive relationship and the geometric series formula, we can deduce the n chain perfect solution process with even number n as followings: From the results of (1) and (2), we have the general formula, ] 2 For all positive integers n, the n rings perfect solution and the number of solution steps follow three properties.
(1) n a , the number of steps to complete the perfect solution, meets the recursive relationship: (3) When n is odd the perfect solution process is: When n is even the perfect solutions process is :

Investigate the properties in the Transformation Function between the 2n Order Array Graph State Matrix and the n-bit Binary Number.
We will explore the shortest path between any two states of the nine rings game and which buckle is operated in the mth step from one state to another.Further we will generalize the operation process for example, in n chains whether we can unlock all the buckles in any state, or in what state it will become after moving m steps from state n A  2 ?2.3.1 Find the Transformation Function between the 2n Order Array Matrices and the n-bit Binary Numbers.
According to Theorem 1, there must be a single unique full path in the state change operation of the 2×9 order array graph, and this Eulerian path just connects the 9 2 state matrices through a series of T and L operations alternately.We want to use this as a basis, combined with the n-bit binary representation, to explore whether there is a transformation function mapping the state matrix to a corresponding n-bit binary number.

Analysis:
First, we have two default targets for this transformation function.One is that it is a one-to-one mapping function.The other is that it can reflect all state matrices positions in the 2n order array graph to that on the full path in the same order and the order of the positions is exactly the same as the order of the corresponding n bits numbers.
Next, the relationship between the state matrices and the binary number transition on the full path of the 2n order array graph is discussed with n = 1, 2, 3.
(1) When n = 1, the state matrices of the 2 × 1 order array graphs are concatenated.If we focus on the numbers in the first row, the state matrices correspond to 0 and 1( i.e. 0, 1) in one digit of binary representation.
(2) When n = 2, the state matrices in the full path of the 2 × 2 order array graph are If we focus on the numbers in the first row of matrices, the state matrices correspond to 00,01,11,10 (i.e.0, 1, 3, 2) in 2-bit binary representation.The position order of the matrices and the corresponding number order in binary presentation are not consistent.To make them consistent, we must treat as 2 and 3 respectively.Therefore, we can not only focus on the numbers of the first row.It is necessary to refer to the entries in the second row.
We first treat the number in the first row and the first column as the one in the first column and the second row position, and then do the "XOR" operation using this new value and the entry in the second column and the second row.Thus At this time, the state matrices corresponding to 00,01,10,11 (i.e.0,1,2,3) of the 2-bit binary numbers, and the order of their positions and the order of their corresponding binary numbers are consistent.
(3) When n = 3, the state matrices of the 2 × 3 order array graphs is concatenated as Modify the corresponding relationship for the transformation, we take the value in the first row of the first column for the upmost digits, and then use entries of the previous row in the first column and the ones of the two consecutive rows behind in the first column for the "XOR operation.
Based on the above discussion, a transformation function is obtained, ) (x f which associates the state matrix Based on the result of the above analysis and discussion we describe and prove the Theorem 4. Theorem 4.
If there is a transformation function between all state matrices and n-bit binary values on the full path of the 2 x n order array graph, . The state matrix transformation function is a one-to-one mapping function, and a strictly increasing function.

(test)
From the above results, it is known that there is a transformation function between the set M formed by the state matrices connected in the full path of the 2×9 order array graph and the set N formed by the 9-bit binary values.This function is a one to one and surjection function.The state matrix of the 2×9 order array graph is isomorphic to the 9-bit binary value.We can use this function to check the number of steps required for the perfect solution of the nine chain game: The fully upper state matrix for beginning the nine chain game is and the final state matrix for solving the nine chain game is , the number of steps to perfectly solve the nine chain is 341 steps Based on the previous study results, we know that the function between the 9-bit binary values and the corresponding state matrices on the full path of the 2×9 order array graph is strictly increasing.Therefore, studying the order in the 9-bit binary values of two state matrices, we can determine the series of T and L operations between these two matrices.The following is a discussion of the process: Since there are 512 state matrices on the full path of the 2×9 order array graphs, it is necessary to use a series of 511time T and L alternate operations in which the beginning is the T operation and the ending is also T operation.Thus, these odd number operations are T operations, and the even number operations are L operations.In the full path of 2×9 order array graph, besides the first and 512th state matrix, the odd-number state matrix has T operation forwards and L operation backwards.In the other hand the even-number state matrix has L operation forwards and T operation backwards.
In addition, the state matrix transformation function with a one-to-one property has 9-bit binary values.Therefore 512 state matrices on the full path of the 2 x 9 order array graph are represented by the transformation function ) (x f , as1, 2, 3, ..., 511.Thus, the odd-numbered state matrix function value is even, which does T operation forwards and L operation backwards.The even-number state matrix function value is odd which does L operation forwards and T operation backwards.
We will discuss the results as Theorem 5 and prove it.
" alternating operations.It also can reach the first extreme state matrix " alternating operations. (Test) Given the nine chain state matrix, . From the Theorem 4, It takes a total of 217 times of serial T and L alternating operations starting with T operation for the state matrix 1 A to reach the first extreme state matrix.
Similarly, given the other state matrix of nine chain rings, . By the Theorem 4, from the state matrix 2 A to achieve the first extreme state matrix, it takes a total of 132 times through a series of L and T alternating operations starting with L operation.
(2).Inverse function Because f is a one-to-one and onto function, its inverse function exits.What is its inverse function?The followings are our discussion: One-to-one function ) (x f satisfies the following correspondence: First, as determined by the first row, the second row follows.

So we can just find out the first row
bit operation on both sides of the equation at the same time, we have Using the graph below, we can illustrate their correspondence: We will discuss the results above, generalize them as Theorem 6. Theorem 6.

If any state matrix
, and it takes the L-operation followed by a series of L and T operations in 75 times to reach the state matrix 2

To Explore the Sequence in the Perfect Solution Operation Order of the n Buckles on n-chain Main Sword
From the Theorem 3 conclusion, we know that the perfect solution of the n-chain is from the fully upper state matrix n Z  2 in the 2n order array graph to the first extreme state matrix ) times of T and L alternating operations.Next, we number the n buckles from outside to inside on n-ring main sword as1,2,3, ..., n.We will study the order change of buckle numbers and its related properties while the n buckles go through ] 2 ) times of serial T and L alternating operations.
(1) 1  n , the buckle number sequence in the perfect solution of one-ring is 1.
(2) 2  n , the buckle number sequence in the perfect solution of two-ring is 2,1.
From the above sequences, we found several properties: (a).The sequence   n a is formed by the operations order of n numbered buckles on the n-ring main sword in the perfect solution.This sequence can be separated into several sub-series combinations, which are we can unlock the 1  n buckles, and complete the perfect solution of the n chains.The recursive relationship of the n-numbered-buckles sequence is as following: The first ring is in the By mathematical induction, 1  n , the number 1 buckle is in the odd position, which is in the 1 2  m position.It holds.

 n
, the number buckle is in the 1 2  m position, and the second and third buckles are in the fourth and second positions, respectively.
, where the number , the recursive relationship of the n-numbered-buckles sequence in the perfect solution of the n chains on the n-chain main sword is as follow: . So, it also holds.
Therefore, by the mathematical induction we can deduce that for all positive odd number n, in the sequence formed by the perfect solution of the n buckles on the n-chain main sword, the numbered  , the numbered p 2 buckle is in the 3 , where the numbered , the recursive relationship of the n-numbered-buckles sequence in the perfect solution of the n chains on the n-chain main sword is as follow: We have Thus the numbered Therefore, by the mathematical induction we can deduce that for all positive even number n, in the sequence formed by the perfect solution of the n buckles on the n-chain main sword, the numbered The n rings on the n-chain main sword are numbered from the outside to inside as 1,2,3, ..., n.If the sequence

 
(2) When n is odd: (3) When n is even: and after a series of T, L operations alternately, which buckle it is at the 126 th step of operation?Because 126 is divided by 16 more than 14, the 126th step operated the number 4 buckle.In addition, if starting from the state matrix , it begins with L operation, and after a series of T, L alternating operations, which buckle it is at the 66th steps?By Theorem 4, the 9-bit binary value of operations beginning from the all upper state matrix.Since 275 is divided by 2 more than 1, the 66th step operates the first buckle.

Graphical Discriminant Method for State-changing Operation of State Matrices in 2xn Order Array Graph
According to the Theorem 4 results, through the parity of ) (x f value, we can determine the series of T, and L operations needed for any state matrix i A on the full path of the 2x n order array graph to reach the first or second extreme state matrix.We can even determine the minimum number of operating steps required to complete the task.At the same time the result of Theorem 7 can be used to determine which buckle is involved for any given state matrix i A moving toward any given state matrix j A at the mth step in the perfect solution process of the n chains.
Next, we want to explore the graphical discriminant method of the state change operation in the 2x n order array graph via the mathematical model of the 2xn order array graph, and the results of the Theorem 4 and Theorem 7. Through this graphical diagram we can easily and quickly decides what is the first step needed for the current nine-ring state to be solved in the perfect solution, what is the nine-ring state after moving m steps, and also which buckle is involved at the mth step?Construct a graphical Discriminant method.First, we try to find the figurative interpretation pattern between the state matrix of the 2x9 order array graph and the 9-bit binary value via their transformation function ) (x f .For example, as shown below the graph in the 2x 9 order array of Figure 4, is its corresponding state matrix in the perfect solution of the nine rings.
The function value is odd, . From Theorem 4, if T operation is the next step, we can complete the perfect solution of the nine rings.In addition, the state matrix Z .Next step is the 121th step, and 121 is divided by 2 more than 1.Therefore, the next operation is T operation.By Theorem 7 it is on the first buckle moving into another state matrix . Similarly, if L operation is next, we can complete the nine chain perfect solution.The state matrix Z .Next step is the 122th step, and 122 is divided by 8 more than 2. From Theorem 7, L operation is the next operation.It is on the third buckle, then moving into another state matrix 6 below.
(Fig. 4) (Fig. 5) (Fig. 6) On the other hand, in the perfect solution of the nine rings, the purpose of its main operation is to unlock the innermost ring on the main sword.So in the array diagram of figure 4, the purpose of a series of T, L operations is to unlock the innermost 8th black circle into F state.To achieve this goal we must first move the 7th buckle into P state, provided that the 1st to 6th buckles must be in the F state.Every two buckles is named as a section, so the first step in the perfect solution for figure 4 is to move the first buckle.That is the T operation.
In addition, observing the black circle state in the first row of the graph in figure 5, we aim to move the 8th black circle to F state.To achieve this, the 7th buckle has to be changed to P state, provided that the first to sixth buckles are in the F state.From the inside to the outside every two buckles are treated as a section.In order to make the second buckle into F state, the first step in the perfect solution for figure 5 is to move the third buckle.That is the L operation.
Similarly, observing the black circle state in the first row of the graph in figure 6, we are to move the 8th black circle to F state.To achieve this, the 7th buckle has to be changed to P state, provided that the first to sixth buckles are in the F state.From the inside to the outside every two buckles are treated as a section.So the first step in the perfect solution for figure 6 is to move the first buckle.That is the T operation.
Based on the above discussion, we summarize the following two principles as the main principles of the graphic discriminant method: Main principle.The main operation in the perfect solution is to unlock the innermost buckle on the main sword.So the target in each stage of the operation is to move the innermost two buckles into adjacent state on the main sword.
Complementary principle.To follow the main principle, one must change the remaining outside buckle into F state.
Thus from the inside out every two buckles are treated as a section.If there is no buckle left, we do the L operation.If there is only one buckle left in a section, we can then do the T operation.
We summarize these investigation results in the following graphic discriminant method for the state change operation of the 2x n order array graph.
Graphic Discriminant Method.
The graphical rule for the state matrix changing operation in the 2xn order array graph.The following figure is a state in the perfect solution of nine rings.By graphic discriminant method, we can see that starting with L operation, moving the fourth buckle into P state, gives us the opportunity to unlock the nine rings.

Investigation on the Generating Function of n Rings
We have used the recursive relationship of the n rings to find the expression of the general term.We want to use the general term of the sequence to find the correspondent generating function.Given the sequence    The general formula for n a is ] 2 , the sequence equals to Let the generate function as We add them all together, Since there is a recursive relationship between n a and 1 is the generating function for n a , the number of times in the perfect solution operations for n rings.
The general formula for So we want to merge some special generating functions as follows to the final form, We summarize the results of the above discussions in Theorem 8. (1)

Mathematical model of 2xn order array graph
(1) Black circle in the first row of the array graph represents the buckle on the nine ring main sword, which is defined as the P state.Black circle in the second row is the buckle unlocked from the main sword, which is defined as the F state.
(2) We use 2-bit binary system to represent the buckle's state on the nine ring main sword."1" means the buckle is on the main sword, where "0" means the buckle is off the main sword.So the state of nine buckles can be continuously written in a 9-bit binary number, .So the states of the black circle on the array graph in the operation process can be described as a 2x9 state matrix.It can be deduced that there is a one-to-one and surjection correspondence between the symbolic representations of these two states.
Theorem 1 For all positive integers n and all n 2 state matrices of the 2xn order array graph, if the two extreme state matrices are the end points, they can be reached either way through a series of T and L operations alternately.The followings are the two results: (1) There must be a single full path in the state change operation process of the 2xn order array graph.
(2) The number of operations required to complete this full path is 1 2  n , starting and ending with T operation.Theorem 2 For all positive integers n and all n 2 state matrices of the 2xn order array graph, if there is a unique full path n P , there will be the following two results: (1) Given two state matrices, (2) There is a symmetry between the state matrices on the first half and those on the second half of the whole path n P , in which the transformations between these state matrices are completed by one L operation.
Theorem 3 For all positive integers n, n rings perfect solution and the number of steps to complete the solution all meet the following three results: (1) The number of steps to complete the perfect solution meets the following recursive relationship, If there is a transformation function ) (x f between all state matrices i A and n-bit binary values i a on the full path of the 2xn order array graph, then  Graphic Judgment: In the 2n order array graph, the graphic determination rule for the state matrix operation change is follows: (1) If the number of black circle in the first row of the 2n order array graph is odd, T operation first can make it to the first extreme state matrix in a shortest path.L operation first can make it to the second extreme state matrix in a shortest path.
(2) If the number of black circle in the first row of the 2n order array graph is even, L operation first can make it to the first extreme state matrix in a shortest path.T operation first can make it to the second extreme state matrix in a shortest path.(1)

Discussion
We simplify the images of the nine rings on the main sword into 2x 9 array graphs.Combined with state matrix representation and binary representation of each array graphs, we study the corresponding state matrix and its binary representation to explore the operation mode of each state matrix change, whether there is an optimal operation path between any two state matrices and whether such an operation path is helpful to understand the number of steps and decide the paths in the perfect solution of the nine rings.In doing so, we try to expand and generalize the cases in n rings.
In this study, the most difficult problem is the use of nine rings equipment to practice hands-on experiments and research.The process encounters difficulties in experimental operation and expression.So we first construct a set of image-based mathematical model and mathematical language of matrix symbols.Via the image-based mathematical models, we can specify an abstractive description and operable abstractive problems.In doing so we converted the nine rings game into a rigorous mathematical problem, which is one of the most important contributions of our study.There was also a difficulty in exploring and solving the extension of this problem: to decide the next operation mode when the buckle is on a different position of the main sword and which buckle status should be changed.After observing, experimenting and summarizing, we derived a result in Theorem 7. In the process of the perfect solution for the n rings, through corresponding function values to the matrix expression and its binary representation of the current buckles states we can decide which buckles one should operate in the next step.Most importantly the sequence formed by the buckle numbers in the process of perfect solution operation has a non-repetitive property.
On the other hand, in Theorem 4, the most intriguing part, the one-onto-one mapping characteristic, reversibility, and increment in the transformation function between the state matrix and the binary representation of the 2xn array graph were found.There is an isomorphic relationship between the state matrix and the binary representation of the 2xn array graph in which there is also a reversible function between the state matrix and the binary representation of the full path of the 2xn array graph.This reversible function has a strictly increasing property.Therefore, by the result of Theorem 4, one can determine the number of perfect solution steps needed for the change between any two state matrices in the whole path.Through Theorem four's conclusions, rather than the recursive relationship of the sequence, we calculate the number of perfect solution steps to solve the nine rings to be 341 steps, and then deduce the number of perfect solution steps for the n rings to be ] 2

Future Outlook
Restructure and study the nine-ring into a double-decked 18-rings is an important future direction for exploration.In this context, we assume that the first thing to be explored is if the two main modes of operations in the perfect solution for the original nine ring is still viable for the 18 rings, or there will be a third or fourth mode of operations.We also try to think about the possible developments of the problems and list them below: (1) In the operation of the double-decked 18 rings, can we find a certain law of operations which can meet our conditions?We can't help but wonder that in the state matrices of the 3×n array graph, whether we can find a similar three-bit representation for the matrices to meet our the conditions ?Is there a perfect solution for the double-decked 18 rings?Whether there are similar laws of operations to meet our proposed conditions?
(2) Is there an isomorphic relationship for any state matrix in the 3xn array graph, so that the correspondence between these state matrices and the 3-bit representations is one-to-one.
(3) Exploring the buckle numbers in the perfect solution for the double-decked 18 rings, can we find a sequence of non-repetitive property?
These are worthy of continuous study.Break through on the operation modes in the perfect solution for the double-decked 18 rings will aid us in towards the ultimate study the number of times in the perfect solution operations for the double-decked n rings.

Figure 1 .
Figure 1.All buckles are in the P state buckle positions on the nine-ring props in a solution process.Similarly, the 2x9 matrix indicates the position of black circle on the 2×9 order array graph, in which a vector circle in the second row.Thus the state of the black circle on the 2×9 order array graph can be described as a 2x9 matrix in which of nine black circles on a 2×9 order array graph in the operation process.
If in the state matrices of the 2n order array graph, except for the first column vector If in the state matrices of the 2n order array graph, except the second column vector In all state matrices of the 2 × n order array graph, except the first and second column vectors analysis, proof of property 4 is equivalent to proving that there is a single and unique full path in the state change operation of the 2×n order array graph.a T operation, forming a unique path, n=1 holds.n=2, there are four states, (a) The whole path state change operation can arrange n 2 state matrices of the 2n order array graph into a single path transformation map, n G .For example, the whole path state change operation 3 P can be arranged into a single path transformation map 3 , the perfect solution of the nine rings Chinese game is the shortest path in the whole path 9 P .(d)The process of reverse state operation in the perfect solution of the nine rings game is equivalent to the one stroke map of the whole path 9 P shown as follows: alternating T and L operations.
binary 11.These two values are 2 and 3 respectively.
2.3.2Properties of the Transformation Function between 2xn Order Array Graph State Matrices and n-bit BinaryNumbersWe further explore some properties of the transformation function ) (x f , such as the meaning of the function value parity, and the inverse function ) Parity of the function values.
and second extreme state matrices on the full path of the 2n order array graph.Then: can be connected to the first extreme State matrix

iA
on the full path of the 2xn order array graph is transformed into a n-bit binary value

.
Theorem six, the perfect solution of the n-chain main sword relies on unlocking the first 2 Thus the main sword has only the 1  n and n numbered buckles closely connected in which the L operation will unlock the n numbered buckle.Via the anti-arrangement of the sequence are operated reversely with alternating T and L operations leaving the main sword with 1 the operations order of n numbered buckles on the n-ring main sword in the perfect solution, and the sequence The sequence satisfies the recursive relationship, The buckle numbering sequence has a non-repetitive property.operations order of n numbered buckles on the n-ring main sword in the perfect solution , in the (mold 32 more than 6) position, in the (mold of 64 more than 54) In the perfect solution of the nine chains, starting from the all upper state matrix

.
After the L operations it moves toward the first extreme state matrix.It will reach the (a) If the number of black circle in the first row is odd, T operation first can reach to the first extreme state matrix in the shortest path, where L operation first can reach to the second extreme state matrix in the shortest path.(b) If the number of black circle in the first row is even, L operation first can reach to the first extreme state matrix in a shortest path, where T operation first can reach to the second extreme state matrix in a shortest path.(test) number of times in the n rings perfect solution operations meets the following recursive relationship: number of times in the perfect solution operations for n rings.Because the recursive relationship for n of times in operations for the perfect solution of the n rings be a sequence states of each nine buckles on the main sword in the solution process.Similarly, using the matrix, we can indicate the state of the black circle on the 2x9 order array graph.The vector, black circle is on the second row.Thus the states of the nine black circles on the 2x9 order array graph can be represented by a 2x9 matrix,

iA
on the full path of the 2n order array graph is transformed into an n-bit binary value n chains on the main sword from outside to inside, as 1,2,3, ..., n.If the numbers of n chains in the perfect solution operation process form a sequence The buckle numbers sequence is non-repetitive.
Theorem 8.Let the number of operations in the perfect solution for the n rings form a sequence On the one stroke map n Given two 9-bit binary numbers,