The Maximum Clique Problem for Permutation Hamming Graphs

This paper explores a new approach to reduce the maximum clique problem associated with permutation Hamming graphs to smaller clique problems. The vertices of a permutation Hamming graph are permutations of n integers and the edges connect pairs of vertices at a Hamming distance greater than or equal to a threshold d. The maximum clique problem for permutation Hamming graphs is a challenging task due to the size, density and regularity of the graphs. However, symmetry properties, which are still partly unexplored, can help to reduce the problems’ size and hardness. A property of edge transitivity with respect to automorphisms is proven and leads to a classification for cycle-equivalent edges. This property enables to reduce the full-size clique problem to a set of significantly smaller (and easier to solve) clique problems. The number of reduced problems can be expressed by means of the partition function of integer numbers. Computational experiments confirm that additional knowledge on the automorphism group leads to a more targeted and efficient solving method for the maximum clique problem associated with permutation Hamming graphs.


Introduction
How many permutations of the n-tuple [0, 1, . . . , n − 1] can be chosen in such a way that they are at least at a Hamming distance d from each other? This optimization problem, usually referred to as the Maximum Permutation Code Problem (MPCP), has been extensively studied with several approaches, such as mixed-integer linear programming [6,18], algebraic methods [5,7,9,11], branch and bound algorithms [4], heuristic algorithms [14,16] and also with graph theoretical methods [2,3,10]. The MPCP is a well-known problem in coding theory with relevant applications in engineering (see for instance [7,8,12,15]). As detailed in Sect. 3, the MPCP can always be reformulated in graph theoretical terms as a maximum clique problem on a permutation Hamming graph (see also [2,17]). We recall that the maximum clique problem is the optimization problem of finding a largest complete subgraph, a socalled maximum clique, in a given graph. The clique number ω(G) of a graph G is the order of its maximum clique. Despite the high symmetry degree of permutation Hamming graphs, no general formula for their clique number is known so far. On the other hand, from a computational point of view symmetries represent a difficulty for optimizations algorithms, because of the presence of a high number of equivalent suboptimal solutions, which tend to hide the optimum. Therefore, in order to tackle the maximum clique problem, it is crucial to gain more knowledge about the structure and the symmetries of permutation Hamming graphs. In the papers Barta and Montemanni [2,3], several relevant properties of permutation Hamming graphs were investigated. In Barta and Montemanni [2], exact formulae for the degree of the vertices and for the number of edges were derived. Furthermore, vertex transitivity and r -partiteness of permutation Hamming graphs were proven. In Barta and Montemanni [3], it was shown that permutation Hamming graphs can be generated as the intersection of a set of Turán graphs. This property led to a hitting set formulation of the maximum clique problem.
In this paper, the focus is on automorphism groups of permutation Hamming graphs. The article starts with a definition, in Sect. 2, of position and value permutations of codewords. In Sects. 3 and 4, it is shown that position and value permutations are automorphisms of permutation Hamming graphs. In Sect. 5, we prove that it is always possible to define an automorphism which maps an edge of a permutation Hamming graph into another edge with an equivalent cycle structure (see Theorem 5.1). This theorem turns out to be useful, since it enables to reduce the size of the maximum clique problem by fixing two vertices of the graph. More precisely, the full-size maximum clique problem can be replaced by a set of smaller instances with a potential gain in computational time (see Sect. 6). The computational tests reported in Sect. 7 confirm that the reduction approach proposed can improve running times.

Position and Value Permutations
Let Ω n be the set of all permutations of the n-tuple x 0 = [0, 1, . . . , n − 1]. Each element x ∈ Ω n is a codeword and the Hamming distance d H (x, y) between two codewords x and y is the number of differing components in x and y. Each codeword can be interpreted as an assignment between a set of positions P = {0, . . . , n − 1} and a set of values V = {0, . . . , n − 1}. The expression v = x( p) indicates that the value at position p in the codeword x is v. On the other hand, we denote by p = x pos (v) the position of the value v in the codeword x.
There are many possible ways to map a codeword into another. With the following definitions, we focus on two types of permutations which will play an important role in this work: Definition 2.1 Let x ∈ Ω n and let π ∈ S n be a permutation of the symmetric group S n . We refer to x as the position permutation of x based on π , if x is obtained by permuting the positions of x according to π , that is, x (π( p)) = x( p), ∀ p ∈ P.
As an example, let x = [2013] and π ∈ S 4 , such that π(0) = 2, π(1) = 1, π(2) = 3 and π(3) = 0. Then the position permutation of x induced by π is the codeword x = [3021]. Definition 2.2 Let x ∈ Ω n and π ∈ S n . We refer to x as the value permutation of x based on π , if x is obtained by permuting the values of x according to π , that is, Consider again the codeword x = [2013] and the permutation π defined above. The value permutation of x induced by π is the codeword x = [3210]. Note that the same permutation π generates two different images x and x . In the first case, π permutes the positions of x, in the second case the values. Now we can define position and value permutations as bijections from Ω n to itself.

Definition 2.3
Let π ∈ S n . We call the map σ π : Ω n → Ω n a position permutation based on π , if for any x ∈ Ω n and x = σ π x holds x (π( p)) = x( p) , ∀ p ∈ P.

Definition 2.4
Let π ∈ S n . We call the map τ π : Ω n → Ω n a value permutation based on π , if for any x ∈ Ω n and x = τ π x holds x pos (π(v)) = x pos (v) , ∀v ∈ V .
A permutation π ∈ S n can be represented in different ways. For the purpose of our work, the standard cycle notation turns out to be helpful. A permutation π ∈ S n contains a cycle (i 1 i 2 · · · i k ) if π(i 1 ) = i 2 , . . . , π(i k−1 ) = i k and π(i k ) = i 1 , that is, each value in the cycle is mapped into the next one. A permutation can be formed by more than one cycle. In this case the cycles are listed by a non-decreasing cycle length. The cycles of length 1 correspond to the fixpoints of the permutation, and they may be omitted unless this leads to misunderstanding. As an example π = (02)(145) ∈ S 6 is a compact way to write π(3) = 3, π(0) = 2, π(2) = 0, π(1) = 4, π(4) = 5 and π(5) = 1.

Permutation Hamming Graphs
A well-known problem in coding theory is determining the maximum number of codewords in Ω n , such that the Hamming distance of each pair of codewords is greater than or equal to a given threshold d. This problem is referred to as the Maximum Permutation Code Problem (MPCP). The MPCP can be easily reformulated as a maximum clique problem on a permutation Hamming graph. Since a clique is a complete subgraph, a maximum clique of H (n, d) corresponds to the largest permutation code C that satisfies the distance constraint d H (x, y) ≥ d, ∀x, y ∈ C. As |V H | = n!, a direct calculation of the clique number ω(H (n, d)) becomes generally a hard task for n ≥ 7. However, peculiar regularity properties of Hamming graphs investigated in Barta and Montemanni [2,3] suggest that the calculation of the clique number might be facilitated by an exploitation of the symmetry properties of the graph. Basically, looking for symmetries in a graph means gaining more insight into the structure of its automorphism group.
In Barta and Montemanni [2], it was shown that the vertex degree of permutation Hamming graphs is constant, that is, H (n, d) is a regular graph. Moreover, in Barta and Montemanni [2] it was also proved that H (n, d) is vertex transitive. Vertex transitivity means that for any pair of vertices x, y ∈ V H there exists an automorphism which maps x into y. We recall the definition of a graph automorphism: Definition 3.2 An automorphism of a graph G(V , E) is a bijection ϕ : V → V , which preserves the connectivity between nodes, i.e. for any pair of nodes x, y ∈ V it holds x ∼ y ⇔ ϕ(x) ∼ ϕ(y). The set of all automorphisms of the graph G is a group denoted by Aut(G). In the case of a weighted graph, an automorphism must be also weight preserving, that is, w(ϕ(x), ϕ(y)) = w(x, y), ∀x, y ∈ V .

The Automorphism Group
The following propositions establish a link between permutations and the automorphism group of H (n, d). Proof Clearly, a position permutation on Ω n is a bijection. It remains to prove that σ π is distance preserving. Let x, y be two codewords and let x = σ π x, y = σ π y be their images. Definition 2.3 implies that x( p) = y( p) ⇔ x (π( p)) = y (π( p)), ∀ p ∈ P. In other terms, x and y share component p, if and only if x and y share component π( p). Since π is bijective, the number of differing components remains unchanged, that is, d H (x, y) = d H (x , y ).

Proposition 4.2 Any value permutation τ π : Ω n → Ω n is an automorphism of the Hamming graph H (n, d).
Proof Analogously to Proposition 4.1, value permutations are bijections and it holds x pos (v) = y pos (v) ⇔ x pos (π(v)) = y pos (π(v)). That is, the value v is at the same position in x and y, if and only if π(v) is at the same position in x and y . It follows that the number of shared components remains unchanged and therefore the mapping τ π is distance preserving.
Since Aut(H (n, d)) has a group structure, the next proposition follows immediately.
On the other hand, let z = τ π 2 x. From the definition of value permutations, it follows that z pos (v) = z pos (π 2 (u)) = x pos (u) = i, or equivalently Since this equivalence holds for any position i and any codeword x, it follows that τ π 2 σ π 1 = σ π 1 τ π 2 .

Proposition 4.5 For any sequence of compositions of position and value permutations
Proof Let ψ be an arbitrary concatenation of position and value permutations. By combining the associativity property of automorphisms and the commutation property stated in Proposition 4.4, permutations can be rearranged in such a way that all position permutations precede the value permutations. More formally, there exist π a , π b ∈ S n such that ψ = (σ π 1 . . . σ π r )(τ π r +1 . . . τ π s ) = σ π a τ π b . Proposition 4.5 suggests that there exists a subgroup of Aut(H (n, d)) formed by the compositions of position and value permutations. In fact, according to Proposition 4.5, the composition of two position-value permutations is again a position-value permutation.
Summarizing, PV n is a well-defined subgroup of the automorphisms group Aut (H (n, d)). But what is the order of Aut (H (n, d)) itself? This interesting question is still an open issue. However, an upper bound can be provided by means of the so-called Rencontres numbers.
It is interesting to remark that in the simplest case n = 3 the upper bound U B(3, 2) = 3!(2! 3! 0! 1!) = 72 coincides with the exact number of automorphisms of H (3,2). For larger values of n, the upper bound grows rapidly and it is likely that it overestimates the order of Aut (H (n, d)).

Automorphisms and Cycle-Equivalence of Edges
A crucial property of coupled position-value permutations ψ ∈ PV n appears when focusing on the edges of the Hamming graph H (n, d), rather than on single vertices. In fact, under a coupled position-value permutation the image of an edge is another edge with the same cyclic structure.
Definition 5. 1 We call the permutations π 1 , π 2 ∈ S n cycle-equivalent, if π 1 and π 2 have the same number of cycles and the same cycle lengths.

Definition 5.2
We refer to τ π 1 as the value permutation of the edge e = x y, if τ π 1 x = y. Similarly, σ π 2 is the position permutation of the edge e, if σ π 2 x = y. Proof Let e 1 = x y, e 2 = uv and let τ π 1 , τ π 2 be their value permutations, that is, τ π 1 x = y and τ π 2 u = v. Because of the cycle-equivalence of e 1 and e 2 , π 1 and π 2 have the same cycle structure. Let π 1 = (a 11 . . . a 1l 1 )(a 21 . . . a 2l 2 ) . . . (a m1 . . . a ml m ) and π 2 = (b 11 where l 1 ≤ l 2 ≤ · · · ≤ l m are the cycle lengths of the m cycles. The required automorphism ψ can be constructed in two steps, as a composition of a value permutation τ γ and a position permutation σ δ . Step 1: let the permutation γ be defined as γ (a 11 ) = b 11 ,…,γ (a ml m ) = b ml m . We generate an intermediate edge e = x y , such that x = τ γ x and y = τ γ y. From the definition of γ it follows immediately that the value permutation of the new edge e = x y is τ π 2 , because if the value a i j in x maps to a i, j+1 in y, then similarly the value b i j in x maps to b i, j+1 in y .
Step 2: since the intermediate edge e = x y has the same value permutation as the target edge e 2 = uv, it suffices to apply a suitable position permutation σ δ in order to rearrange the positions of x and y . Let σ δ be the position permutation, which maps x into u, i.e. σ δ x = u. It remains to show that σ δ y = v. Let's denote the inverse of the value permutation τ π 2 by τ −1 π 2 . Relying on the commutation property 4.4, we obtain σ δ y = σ δ τ π 2 τ −1 π 2 y = σ δ τ π 2 x = τ π 2 σ δ x = τ π 2 u = v.
As an example, consider the edges e 1 = x y, e 2 = uv defined by the vertices x = reduce the problem's size is to look for the largest clique of H (n, d), which includes a specific fixed clique. Let K 0 be a k-clique of the graph H (n, d), that is, a clique of order k ≤ ω (H (n, d)).

Definition 6.1 Let R(K 0 ) be the induced subgraph of H (n, d) having the vertex set
We denote by R(K 0 ), or shorter by R, the residual graph of the clique K 0 .
Each vertex of the residual graph R(K 0 ) is connected to all vertices of the clique K 0 . Let K R be a maximum clique of the residual graph R, that is, ω(R(K 0 )) = |V K R |. K 0 be a k-clique of H (n, d). The largest clique K of H (n, d) which includes the fixed clique K 0 , has the order |V K | = k + ω(R(K 0 )).

Proposition 6.1 Let
Proof K contains all vertices of K 0 . Further vertices of K must be connected to each vertex of K 0 ; therefore, they belong to the residual graph R(K 0 ). But since these vertices chosen in the residual graph have to form a clique again, their maximum number is equal to the clique number ω(R(K 0 )) of the residual graph .
In other words, the largest clique K is constructed by taking the union of the fixed clique K 0 and the maximum clique K R of the residual graph. The advantage of this approach lies in the reduction in size of the clique problem to be solved. In fact, the vertex set |V R | might be significantly smaller than |V H |. However, an additional constraint, forcing the k-clique K 0 into the solution, has been added to the problem. Therefore, in order solve the original maximum clique problem, all possible choices of the k-clique K 0 have to be considered. H (n, d), for a fixed k ≤ ω (H (n, d)). Then it holds

Proposition 6.2 Let C k be the set of all k-cliques in
(2) Proof Let K H be a maximum clique of H (n, d). Since K H certainly contains a kclique K 0 ∈ C k , the order of K H can be calculated by maximizing ω(R(K 0 )) over the set C k and by adding k.
Due to the large number of k-cliques, maximizing over the whole set C k is impractical. However, because of the large automorphism group of H (n, d), it can be expected that many k-cliques are mutually isomorphic. In the remainder, we denote the isomorphic graphs G 1 and G 2 by G 1 G 2 . (H (n, d)), K 1 ∈ C k and K 2 = ψ(K 1 ). Then it holds K 2 K 1 and R(K 2 ) R(K 1 ).

Lemma 6.1 Let ψ ∈ Aut
Proof As ψ is an adjacency and distance-preserving bijection, it maps any subgraph of H (n, d) into an isomorphic subgraph and therefore K 2 K 1 . It is to show that ψ maps R(K 1 ) into R(K 2 ). First we prove the inclusion ψ(V R(K 1 ) ) ⊆ V R(K 2 ) . Let u be a vertex of R(K 1 ), i.e u / ∈ V K 1 , but it is connected to all vertices of K 1 . Since ψ ∈ Aut (H (n, d)) and ψ(K 1 ) = K 2 , the vertex v = ψ(u) / ∈ V K 2 , but it is connected to all vertices of K 2 , that is, ψ(u) ∈ V R(K 2 ) . The opposite inclusion can be proved in an analogous way by means of the inverse automophism ψ −1 . This implies that ψ(V R(K 1 ) ) = V R(K 2 ) , i.e. the automorphism ψ maps the vertex set of R(K 1 ) into the vertex set of R(K 2 ). Since ψ is adjacency and distance-preserving, it can be concluded that ψ(R(K 1 )) = R(K 2 ).
An obvious implication of Lemma 6.1 is that also the clique number of the residual graphs coincide, i.e. ω(R(K 1 )) = ω(R(K 2 )). Therefore, instead of maximizing over all k-cliques, according to Eq. (2), it suffices to consider one representative of each class of isomorphic k-cliques. Definition 6.2 Let K ∈ C k . We refer to O K = {K ∈ C k |K = ψ(K ), ψ ∈ Aut(H )} as the orbit of K generated by the automorphism group Aut(H ).
According to Lemma 6.1, each orbit O K is a set of isomorphic k-cliques. The collection of orbits partitions C k in equivalence classes. Definition 6. 3 We denote by Q k the collection of orbits of k-cliques generated by Aut(H ). Furthermore, we denote by T k a transversal of Q k , that is, a subset of kcliques, containing one representative for each orbit of Q k .
Equation (2) can now be reformulated by taking the maximum over the transversal T k , instead of considering all k-cliques:

Computational Experiments
The aim of the computational experiments described in this section is to highlight the advantage of handling a clique problem of the Hamming graph H (n, d) by solving a set of reduced clique problems. In particular, in these preliminary tests we focus on Hamming graphs H (n, d) with n = 6, 7 and we apply a reduction by means of 1-cliques, respectively 2-cliques. As a first step, the properties of the automorphism group Aut(H ) are used to construct a transversal T k . Then, according to Eq. (3), the clique number of the residual graph R(K 0 ) is computed for each K 0 ∈ T k .

The 1-Clique Case
As shown in Barta and Montemanni [2], a basic property of the permutation Hamming graph H (n, d) is vertex transitivity. We recall that a graph G(V , E) is vertex transitive iff for any pair of nodes x, y ∈ V there exists an automorphism ψ ∈ Aut(G) such that ψ(x) = y. The vertex transitivity of H (n, d) implies that all 1-cliques belong to the same orbit of Aut (H (n, d)) and therefore the transversal T 1 is formed by a single 1-clique. In other terms, any vertex x ∈ Ω n can be chosen as the fixed clique K 0 and it suffices to calculate the clique number of the residual graph R(K 0 ):

The 2-Clique Case
In the 2-clique case, the fixed clique K 0 is formed by a pair of nodes x, y ∈ V H connected by an edge e = x y. According to Theorem 5.1, any cycle-equivalent edge e can be mapped by an automorphism into the edge e. In other terms, 2-cliques formed by cycle-equivalent edges belong to the same orbit of Aut (H (n, d)). Therefore, in order to obtain the transversal T 2 , it suffices to generate the largest possible collection of pairwise not cycle-equivalent edges of H (n, d). How many pairwise not cycleequivalent edges are there in H (n, d)?
In the answer to this question appears an interesting link between permutation Hamming graphs and the well-known partition function of integer numbers (for details see [1]). The link between permutations and partitions is given by the fact that the cycle lengths of a permutation of n elements form a partition of the integer n. As an example, the cycle lengths of the permutation of 6 elements π = (051)(24)(3) form the partition (3,2,1) of n = 6. Therefore, the number of not cycle-equivalent permutations of n elements corresponds to the value of the partition function p(n). This value takes into account all possible Hamming distances from 0 (n fixpoints) to n (no fixpoints). Now it is not difficult to deduce a formula for the total number of pairwise not cycle-equivalent edges of H (n, d). In the case of H (6,5), for instance, the number of pairwise not cycle-equivalent edges is c(6, 5) = p(6) − p(4) = 11 − 5 = 6. The 6 possible partitions are (6),  (4,2), (3,3), (2,2,2), (5,1) and (3,2,1). Note that the last two partitions contain a cycle length 1, which corresponds to a fixpoint, that is, to edges with Hamming length 5. It is clear that by removing the cycle length 1, we obtain the partitions (5) and (3,2), which correspond to the two possible types of derangements, i.e. fixpoint-free permutations, with 5 elements. Table 1 shows all possible derangements of n elements, which are mutually not cycle-equivalent for n = 1, . . . , 7. According to Proposition 7.1, their number is equal to c(n, n) = p(n) − p(n − 1), i.e. the difference between two consecutive terms of the partition function p(n). The third column of Table 1 reports the possible partitions of n without 1-cycles and the last column shows a representative of the corresponding class of derangements.
From Theorem 5.1 and Lemma 6.1, we know that cycle-equivalent edges of H (n, d) generate isomorphic residual graphs. However, this property can not be generalized to pairs of not cycle-equivalent edges, even if they have the same Hamming length. Table 2 shows a list of counterexamples for n = 4, 5 and 6, which could be extended also to larger values of n. For each Hamming graph H (n, d) a representative of each equivalence class of edges has been fixed and the corresponding residual graph R has been computed. The columns of Table 2 report the graph H (n, d), the cycle lengths of the fixed edge and the order |V R |, the number of edges |E R | and the clique number ω(R) of the residual graph R.
The smallest counterexample can be found in H (4,4). This graph with 24 vertices has only 2 classes of cycle-equivalent edges: the edges with the cycle lengths (4) C and the maximum clique problems have been solved by means of the clique solver MoMC (Mixed ordering MaxClique Solver) (see [13] for details). All tests reported in this section have been obtained on a computer equipped with an Intel Core i5 1.6 GHz processor and 8 GB of memory. Detailed results of the computational tests are available from the corresponding author upon request. Table 3 shows the results of the computational experiments performed on 5 Hamming graphs H (n, d) with n = 6, 7. The clique number of each graph is reported in square brackets under the name of the graph. The number of fixed vertices k assumes the values 0, 1 or 2. The case k = 0 corresponds to the full-size problem. For k = 0, 1 there is a unique clique problem to be solved, while for k = 2 the number of reduced problems is given by the value c(n, d), according to Proposition 7.1. The following columns of the table report the minimum, respectively maximum order of the residual graphs R(K 0 ), the minimum, respectively maximum CPU time (in sec) for the solution of a single reduced clique problem and the cumulative time for the solution of the entire set of reduced instances. The entry tmax indicates that the maximum allowed CPU time tmax = 10800 sec has been reached before closing the instance.
The collected data provide useful information about the reduction approach. First of all, the order of the residual graph shows that the reduction is more effective when the difference between n and d is small. For instance, 2 fixed nodes in H (7, 7) lead to a 89% reduction of order, whereas in H (6, 4) the gain is only 15%. The reason for this difference is the lower density of graphs, which allow only few Hamming distances. Usually, the graphs with the best reduction rates show also the best improvements in terms of CPU time. It is the case of H (6, 5), which can not be solved within tmax as a full-sized problem, but with 1 fixed node it becomes solvable in 479.26 sec and with 2 fixed nodes in only 48.71 sec. Similarly, H (7, 7) requires 2 h 36 min as a full problem, but only 9.98 sec with k = 1 and 0.20 sec with k = 2.
On the other hand, in the case of H (6, 4) it turns out that fixing one vertex is more effective than fixing two. However, both options provide a drastic save in CPU time. In the 2-clique case it is interesting to remark that the 2 instances with suboptimal clique numbers were considerably more time consuming than the others. For H (7, 6) the best option is k = 1 solved in 310.68 sec. The tmax entry for k = 2 is due to 4 instances, which could not be solved within the allowed time. The solutions of these instances are likely to be suboptimal because the lower bounds obtained are far from the optimum.

Conclusions
This paper proposes an approach to reduce the complexity of maximum clique problems associated with permutation Hamming graphs. The main contributions of the article are a classification of the edges based on their cycle representation and a better understanding of the automorphism group of permutation Hamming graphs. These results enable to infer the solution of the maximum clique problem associated with a permutation Hamming graph by solving a set of maximum clique problems smaller than the original one. Computational tests confirm that in most cases a speed up is obtained by applying the reduction approach. Table 3 Running times of the reduction algorithm and of the full-size clique problem