Similar Vertices and Isomorphism Detection for Planar Kinematic Chains Based on Ameliorated Multi-Order Adjacent Vertex Assignment Sequence

Isomorphism detection is fundamental to the synthesis and innovative design of kinematic chains (KCs). The detection can be performed accurately by using the similarity of KCs. However, there are very few works on isomorphism detection based on the properties of similar vertices. In this paper, an ameliorated multi-order adjacent vertex assignment sequence (AMAVS) method is proposed to seek out similar vertices and identify the isomorphism of the planar KCs. First, the specific definition of AMAVS is described. Through the calculation of the AMAVS, the adjacent vertex value sequence reflecting the uniqueness of the topology features is established. Based on the value sequence, all possible similar vertices, corresponding relations, and isomorphism discrimination can be realized. By checking the topological graph of KCs with a different number of links, the effectiveness and efficiency of the proposed method are verified. Finally, the method is employed to implement the similar vertices and isomorphism detection of all the 9-link 2-DOF(degree of freedom) planar KCs.


Introduction
The multi-component and multi-DOF mechanism is widely used in various mechanical equipment, involving engineering machinery, medical machinery, agricultural machinery. The innovative design of mechanism structure is still the critical step of product upgrading [1]. The correct solution of the similar vertices [2] can not only reduce the number of isomorphism detection but also provide a theoretical basis for the selection of rack, input, and output components. In 1992, Yan [3] proposed a new mechanism design technology, called regenerative KCs method, which essentially represents the logical reasoning of the regeneration process of KCs. In logic reasoning, the similar vertices should be analyzed to improve the efficiency of innovative design and reduce redundant design scheme. In the same year, Hwang [4] divided the similarity into symmetry similarity, transfer similarity, row similarity, and irregular similarity, and proposed the relationship code method of the weighted line graph to distinguish the similar vertices of functional components. Although Hwang's method is simple, it has a situation of misjudgment.
In mechanism synthesis, isomorphism detection is fundamental. Many works have been done, and a large number of methods and theories have been developed. Kong et al. [5] first applied the artificial neural network technology for isomorphism detection and established the neural network model of topological graphs. Chang et al. [6] proposed an eigenvalue and eigenvector-based method to identify KCs isomorphism for the first time. Cubillo and Wan [7] proposed the necessary and sufficient conditions for eigenvalues and eigenvectors of isomorphic KCs; Later, Sunkari and Schmidt [8] found that this method has certain limitations, i.e., counterexamples will appear when the number of components in the KCs is greater than 14. Xiao et al. [9] creatively combined ant colony algorithms and artificial immune algorithms to identify the isomorphism of KCs. Galán-Marín et al. [10] first used the multi-value neural network method to identify the isomorphism of KCs. In the same year, Dargar et al. [11] identified isomorphism by comparing the first-order and second-order adjacent component values of the KCs, but it cannot describe the uniqueness of each vertex in the topological graph. Yang et al. [12] proposed a method to detect isomorphism based on the correlation matrix of KCs. By using this method, the sufficiency of isomorphism detection was obtained based on vertex correspondence. Other isomorphism detection methods, such as partition matching algorithm [13], hybrid immune algorithm [14], optimized circuit simulation [15][16][17], connectivity number and entropy [18], binary code [19], information theory [20], joint matrix [21,22], loop theory [23][24][25][26], high-order adjacency link values [27], are noticeable too.
Although all the abovementioned synthesis methods can identify the isomorphism, they cannot accurately find the similar vertices that are beneficial for mechanism selection and isomorphism detection. Hence, in this paper, an ameliorated multi-order adjacent vertex assignment sequence is proposed. The new method attempts to achieve similar vertices detecting and to ease the identification of isomorphism.
The rest of the paper is organized as follows: Section 2 describes the basic concepts of graph theory. In Section 3, the initial value rule and the definition of AMAVS of topological graphs are presented, and several examples are delivered to illustrate the detection of similar vertices. In Section 4, based on the correct solution of the similar vertices, the concrete steps of isomorphism detection of the KCs are given. Section 5 concludes this work.

Topological Model of KCs
KCs can be described by an undirected topological graph in which the vertices and edges represent the components and joints, respectively; The link relationship between vertices can be expressed by an adjacency matrix A = [a ij ] n×n , where n is the total number of vertices in the topological graph, and the adjacency matrix is a real symmetric matrix. The value rules of each element are as follows: The degree of vertex i in a topological graph is defined as the number of edges connected with vertex i; it can also be determined by the sum of the ith column (row) of the adjacency matrix A. As shown in Figure 1, the topological graph of the 9-link 2-DOF KC is expressed as (b), and the corresponding adjacency matrix is A. Vertices 2,4,6,7, and 9 are two-degree vertices, while vertices 1, 3, 5 and 8 are three-degree vertices.

Definition of Similar Vertices
We consider a graph as a labeled graph when its vertices are labeled by the integers 1, 2, …, n. Due to different labeling, the vertices in the labeled graph have some interference characteristics. Thus, a characteristic constant not affected by the label is adopted to describe vertices for finding similar vertices. Additionally, in a topological graph, similar vertices have geometric symmetry so that two similar vertices must be symmetrical about a vertex or an edge, which means that the similar vertices must have the same characteristic constant. In this paper, an AMAVS is employed as a criterion for similarity detection. The vertices with the same AMAVS are similar and vice versa.

Isomorphism of KCs
If one-to-one mapping f exists for the two graphs G 1 = (V 1 , E 1 ) and G 2 = (V 2 , E 2 ) , and the following expression is satisfied: Then graphs G 1 and G 2 are isomorphic. As shown in Figure 2, G(a) and G(b) are isomorphic.

Degree of a Vertex
The degree of a vertex is defined as the number of edges incident with that vertex. For the graph G(a) shown in Figure 2, the degree of vertex 2, 4, 7, and 9 is three, whereas vertex 1, 3, 5, 6, and 8 is two [28].
Note that the rth order adjacent vertex value (AVV) of vertex i in topological graph G is S r i : where n is the total number of vertices in a graph. a i,j is the element corresponding to row i and column j of adjacency matrix A. S r−1 i is the (r−1)th order AVV of vertex i. It can be seen from the analysis that the larger r is, the more fully r-order AVV characterizes the vertex of the topological graph. Moreover, the larger r is, the more complex its calculation is. So it is of great significance to choosing the right r. In this paper, r is taken as the integral part of √ n + d , where d changes dynamically according to the specific situation.
The rules for changing the value of d are as follows: Step 1: Let d = d 0 , r 0 be the integer part of √ n + d 0 , r 1 be the integer part of √ n + d 0 + 1 , and d 0 be the increasing integer value from 1.
Step 2: Using r 0 and r 1 to find similar vertices. If the results of the two groups of similar vertices are the same, set r as an integral part of √ n + d 0 + 1 , that is, the value of r 1 . If the results of two groups of similar vertices are different, d = d 0 + 1 , and then repeat the above steps until the solving results of r 0 and r 1 are the same.
The comparing process can ensure the accuracy of the final results. The dynamic change of r verifies the final result to a certain extent, but it cannot guarantee the complete accuracy of the final result. There may be a mutation of the result after value r is determined. For example, when r is equal to 1, the result of similar vertices is the same as when r is 2, but when r is 3, the result is different. The determination of value r cannot achieve the complete accuracy of logic in theory, but no counterexample is found in the actual calculating process.
Herein, the value of the weighting part is set as 1/10 rather than 1/n. The significant advantage of this setting is that the decimal vertex of the AVV of order r is precisely equal to r, which can avoid rounding error.
The sequence of the r-order AVV of all vertices is S r = {s r 1 , s r 2 , s r 3 , . . . , s r n } . The rth order AVV of vertex i is determined by the initial value of vertex i, the degree of vertex i, the degree of the vertex adjacent to vertex i and the (r−1)th order AVV of the vertex adjacent to vertex i. Hence, the rth order AVV can uniquely describe the characteristics of each vertex in the topological graph. That is, in the rth order AVV sequence S r , if the rth order AVV of two vertices is the same, these two vertices are similar; otherwise, they are not similar. The solution of similar vertices is of great significance to selecting the rack, input, and output components. The correct solution of similar vertices can reduce the number of isomorphism detection and improve the overall efficiency of mechanism synthesis. Figure 3, the corresponding topological graph of the 11-link 2-DOF KCs (a) is shown in Figure 3(b). The process and results of finding similar vertices by using the AMAVS and the method in Ref. [23] are as follows.

Example 1 As shown in
The method in Ref. [23]: the value of r before correction is 4, the initial value of the prime number sequence according to the vertex degree of the topological graph is recorded as S 0 , and the fourth-order AVV sequence is recorded as S 4 , the solution results by the method in Ref. [23] are shown in Table 1.
According to the fourth-order AVV sequence S 4 , s 4 6 = s 4 9 = 2.7740 , vertices 6 and 9 are similar. However, there are no similar vertices in this topological graph. Considering whether the value of r is too small to obtain the correctness results, we also performed the similarity detecting of the fifth-, eighth-, and even eleventh-order AVV series. Not surprising results still illustrate that 6 and 9 are similar, which means that there are problems in the formula in Ref. [23].
Actually, in Ref. [23], the value of r is constant to 4, which leads to a relatively large amount of calculation for the KCs with a small number of components and could not guarantee the accuracy for the KCs with more components. The dynamic alteration of r in this paper can effectively ensure efficiency and accuracy. The formula for solving the high-order AVV is modified to eliminate the errors in Table 1. The new formula is more accurate to reflect the characteristic constants of each vertex, which can confirm whether the KCs are isomorphic when discriminating against similar vertices. The process of AMAVS is as follows.
The method of AMAVS: total vertices of topological graph n = 11, r 0 = √ n + 1 ≈ 4 , r 1 = √ n + 2 ≈ 5 . The initial value of the vertex degree in a topological graph is S 0 . By using the initial value, the fourth-and fifth-order AVV sequence obtained from Eq. (3) is recorded as S 4 and S 5 . The specific solution results by the AMAVS method are shown in Table 2.
Since the adjacency values of each vertex in both fourth-and fifth-order AVV sequences S 4 and S 5 are entirely different, there are no similar vertices in the topological graph, which means that we can obtain eleven different mechanisms by choosing each vertex as a rack. Figure 4 shows a topological graph with 12 vertices and 15 edges. Hence, the order value r 0 and r 1 are equal to 4 and 5, respectively.

Example 2
The initial value of the vertex degree in the topological graph is S 0 ; By using the initial value, the fourth and fifth-order AVV sequence obtained from Eq. (3) is recorded as S 4 and S 5 . The specific solution results by the AMAVS method are shown in Table 3.  Table 1 The initial value and fourth-order AVV sequence of Figure 3

Sequence name Result
Fibonacci initial value  According to the fourth-order AVV sequence S 4 , According to the fifth-order AVV sequence S 5 , Upon these AVV sequences, the vertex in four vertex pairs, 1 and 6, 4 and 11, 5 and 10, 7 and 9, can be regarded as similar to each other, whereas other four vertices 2, 3, 8, and 12, with different adjacency values, are not similar. Therefore, we can obtain eight different mechanisms by choosing the corresponding vertex as a rack. Figure 5 shows a topology graph with 21 vertices and 29 edges. Hence, the order value r 0 and r 1 are equal to 5 and 6, respectively.

Example 3
The initial value of the vertex degree in the topological graph constructs a sequence, S 0 . The fifth-and sixth-order AVV sequences calculated from Eq. (3) are denoted as S 5 and S 6 , respectively. The specific solution results by the AMAVS method are shown in Table 4.
According to the fifth-order AVV sequence S 5 ,    To further verifying the effectiveness, we also employ the proposed AMAVS method to detect the similar vertices of all the 9-link 2-DOF topological graphs, as shown in the Appendix. Meanwhile, the solution time given in Table 5 illustrates that the current study has a remarkable efficiency for detecting the similar vertices of the abovementioned graphs.

Initial Value and AMAVS
If the values of two sequences and the numbers of the same values are both the same, then the two sequences correspond to each other, and the corresponding relation is denoted as b a M . For example, two sequences S a = {1, 3, 2, 4, 5} and S b = 3, 4, 1, 5, 2}, can correspond to each other, and their corresponding relations from S a to S b is b a M = {3, 1, 5, 2, 4}. The first element 3 of the corresponding relation indicates that the first element of the sequence S a corresponds to the third element of the sequence S b , the second element 1 of the corresponding relation indicates that the second element of the sequence S a corresponds to the first element of the sequence S b , and so on.
For any two isomorphic graphs, their corresponding vertex degrees must be the same, and the vertex degrees at the same distance from the two corresponding vertices must be the same [1]. As observed from Eq. (3), the rth order AVV of vertex i is determined by the initial value of vertex i, the degree of vertex i, the degree of the vertex adjacent to vertex i, and the (r−1)th order AVV of the vertex adjacent to vertex i. Thus, the corresponding relation b a M can be established by the r-order AVV sequences S r a and S r b . In order to identify the isomorphism graphs, a new adjacency matrix applied to compare with the reference graph G(b) can be obtained by interchanging the row and column of the initial adjacency matrix of topological graph G(a) following the corresponding relation b a M . If two adjacency matrices are the same, the two graphs are isomorphic, and vice versa. The isomorphism detection procedure is shown in Figure 6. The specific steps of isomorphism detection are described as follows.
Step 1: For any two given topological graphs G(a) and G(b), the initial values of each vertex degree are presented as S 0 a and S 0 b . The r-order AVV sequences S r a and S r b are calculated by Eq. (3) to distinguish the similar vertices between G(a) and G(b). If the number of similar vertices of correspondence groups is different, the two topological graphs are non-isomorphic. Otherwise, go to step 2. If there are no similar vertices between the two topological graphs and the sequence S r a and S r b has no corresponding relation, the two graphs are non-isomorphic. Otherwise, there is a set of the corresponding relation b a M , and the program goes to step 5.
Step 2: The indefinite value of the sequence S r a is assigned according to the following rules: Select the vertex with the fewest similar vertices and the smallest label. Set the vertex label to i, change its initial value to the sum of the original initial value and the (p+1) Fibonacci number, where p is the number of indefinite assignment. For example, a vertex selected for the first initial value is j, its corresponding adjacent vertex value is recorded as t 1 , the new initial value of vertex j is recorded as g 1 , and its new r-order AVV sequence calculated by Eq.
(3) is S r a,1 . If there are still duplicate values in S r a,1 , continue to assign indefinite values to the duplicate values until the sequence S r a,p without duplicate values. And two sets of substitution set T=(t 1 , t 2 ,…, t p ) and G=(g 1 , g 2 , …, g p ) are obtained.
Step 3: The sequence S r b is assigned a fixed value according to T=(t 1 , t 2 ,…, t p ) and G=(g 1 , g 2 , …, g p ).
The specific rules are as follows: Obtain the same vertex as the first element t 1 in the replacement set T Table 4 The initial value and the r 0 th, r 1 th order AVV sequence of Figure 5

Sequence name Result
Initial value S 0 = {1, 5, 5, 5, 5, 5, 1, 5, 5, 5, 1, 5, 5, 5, 1, 5, 5, 5, 5, 5, 1} Revised r 0 th order AVV sequence  of sequence S r b , and assign a new initial value to this vertex as the first element g 1 in the replacement set G, the new r-order AVV sequence S r b,1 calculated by Eq. (3) according to the new initial value; Likewise, if the r-order AVV in the new sequence S r b,1 is equal to t 2 , the new initial value given to the vertex is g 2 , and the new r-order AVV sequence calculated from Eq.
(3) according to the new initial value is S r b,2 . If there are multiple values in S r b,1 which are the same as t 2 , multiple new r-order AVV sequences S r b,2 can be obtained. If no value in the sequence S r b,k−1 is equal to t k (k≤p) in the kth fixed value assignment process, the fixed value assignment fails, those two topological graphs are non-isomorphic, and the program terminates. Otherwise, one or more sets of final sequences S r b,p,q can be obtained, where q is the number of sets of final sequences.
Step 4: Compare the sequence S r a,p and S r b,p,q . If the sequence S r b,p,q does not correspond to the sequence S r a,p , the two topological graphs are non-isomorphic, and the program terminates. Otherwise, there are one or more sets of sequences S r b,p,q corresponding to sequence S r a,p , and one or more sets of correspondence b a M can be obtained.
Step 5: According to the corresponding relation, the adjacency matrix A corresponding to the topological graph G(a) is transformed first by row and then by column. One or more transformed adjacency matrix A 2 can be obtained. Compared A 2 with the adjacency matrix B corresponding to the topological graph G(b), if there is no corresponding, the two topological graphs are non-isomorphic, and the program terminates; otherwise, the two topological graphs are isomorphic.

Input matrices A and B Input matrices A and B
Obtain the initial values and

Obtain the initial values and
The r-order AVV sequences and are calculated by equation (3) The r-order AVV sequences and are calculated by equation ( Assign an indefinite value to to get a sequence without repeated values, two sets of substitution sets T=(t 1 ,t 2 t t ,…,t p t ) and G=( g 1 , g 2 g g ,…,g p g g ) are obtained Assign an indefinite value to to get a sequence without repeated values, two sets of substitution sets T=(t 1 ,t 2 ,…,t p ) and G=( g 1 , g 2 ,…,g p ) are obtained

Examples of Isomorphic Detection
Example 1 Figure 7 shows two 11-link 2-DOF topological graphs G(a) and G(b), and their adjacency matrices are A and B, respectively. The isomorphism detection process is as follows.
Step 1: In G(a), vertices 3, 6, 7, 8, 9, and 10 are twodegree vertices, vertices 2, 4, 5, and 11 are three-degree vertices, vertex 1 is a four-degree vertex, and the initial value sequence of each vertex is S 0 a . Likewise, for G(b), the initial value sequence of each vertex is recorded as S 0 b . Based on the initial value, the r-order adjacency sequences S r a and S r b can be obtained from Eq. (3). The process of determining order value r is the same as that of distinguishing similar vertices, i.e., r = √ n + 1 + 1 ≈ 5 . The initial value and the solution results of the fifth-order AVV sequence are shown in Table 6.
Step 5: Based on the correspondence b a M , the adjacency matrix A of the topological graph G(a) is transformed, first by row and then by column, into a new adjacency matrix A 2 . Since A 2 is entirely identical with the adjacency matrix B of the topological graph G(b), the two topological graphs are isomorphic. Figure 8 shows two topological graphs with 30 vertices and 40 edges, G(a) and G(b). The isomorphism detection process is as follows.

Example 2
Step 1: In G(a), vertices 1, 7, 11, 15, 16, 17, 20, 22, 29, and 30 are two-degree vertices, and the rest vertices are three-degree vertices. Moreover, the initial value sequences of G(a) and G(b) are recorded as S 0 a and S 0 b , respectively. Based on the initial value, the r-order adjacency sequences S r a and S r b are obtained from Eq. (3), The initial value and the solution results of the seventh-order AVV sequence are shown in Table 7.
As exhibited in Table 7, vertices 19 Table 6 The initial value and fifth-order adjacent vertex value sequence of G(a) and G(b)
Step 3: According to T = (142.6602420) and G = (6), the sequence S 7 b is assigned a fixed value. Since the 21st and 25th values in the sequence S 7 b are equal to 142.6602420, the seventh-order AVV sequence S 7 b,1,q can be obtained by assigning values to these two positions, respectively. When q = 1, the adjacency value sequence is obtained by altering the initial value of vertex 21; Likewise, when q = 2, the adjacency value sequence is obtained by changing vertex 25. The final sequence result is shown in Table 8.
Step 5: Based on the correspondence b a M , the adjacency matrix A of the topological graph G(a) is transformed, first by row and then by column, into a new adjacency matrix A 2 . Since A 2 is entirely identical with the adjacency matrix B of the topological graph G(b), the two topological graphs are isomorphic. Figure 9 shows two topological graphs with 15 vertices and 27 edges, G(a) and G(b). The isomorphism detection process is as follows:

Example 3
Step 1: In G(a), vertices 7, 8, 9, 13, 14, and 15 are twodegree vertices, vertices 1, 2, 3, 10, 11, and 12 are fourdegree vertices, vertices 4, 5, and 6 are six-degree vertices. Moreover, the initial value sequences of G(a) and G(b) are recorded as S 0 a and S 0 b , respectively. On the basis of the initial value, the r-order adjacency sequences S r a and S r b are obtained from Eq. (3), where r = √ n + 1 + 1 ≈ 5 . The initial value and the solution results of the fifth-order AVV sequence are shown in Table 9.
As exhibited in Table 9, vertices 4, 5 and 6, 1, 2, 3, 10, 11 and 12, 7, 8, 9, 13, 14 and 15 of G(a) and G(b) has the same 5th-order AVV, i.e., Since the number of similar vertices groups in G(a) is identical to that of G(b), and each group has the same amount of vertices, the detecting program goes to step 2.
Step 2: The sequence S 5 a is assigned an indefinite value. The similar vertices between the two topological graphs
Step 3: According to T=(3082.36832, 1954.70976) and G= (22,7), the sequence S 5 b is assigned a fixed value. Since the the 4th, 5th, and 6th values of sequence S 5 b are equal to 3082.36832, there are 6 groups of final data obtained as follows: Step 4: Because none of the six sequences can correspond to the sequence S 5 a,2 , the two topological graphs are non-isomorphic.

Conclusions
(1) The AMAVS method proposed in this paper can be employed not only to find similar vertices exactly in graphs but also to improve the efficiency of isomorphism detection of KCs significantly. (2) The AMAVS can be adopted to successfully describe the uniqueness of each vertex in a topological graph, which can provide a theoretical basis for selecting the functional parts during mechanism innovation. (3) The dynamic change of value r ensures the accuracy of similar vertices discrimination while improving efficiency. (4) Different values of each vertex with different characteristics can be obtained as early as possible by using the Fibonacci sequence, which enhances the discrimination efficiency.
(5) Similarity and isomorphism detection of topological graphs with 11, 21, 30 links, and all KCs with 9-links 2-DOF are implemented to prove the effectiveness of the method. Moreover, the similarity library of 9-link 2-DOF KCs is given for the first time.