On the minimum weight problem of permutation
codes under Chebyshev distance
Min-Zheng Shieh
Department of Computer ScienceNational Chiao Tung University 1001 University Road, Hsinchu, Taiwan
Email: mzhsieh@csie.nctu.edu.tw
Shi-Chun Tsai
Department of Computer Science National Chiao Tung University 1001 University Road, Hsinchu, Taiwan
Email: sctsai@cs.nctu.edu.tw
Abstract—Permutation codes of length n and distance d is a set of permutations on n symbols, where the distance between any two elements in the set is at least d. Subgroup permutation codes are permutation codes with the property that the elements are closed under the operation of composition. In this paper, under the distance metric ∞-norm, we prove that finding
the minimum weight codeword for subgroup permutation code is NP-complete. Moreover, we show that it is NP-hard to approximate the minimum weight within the factor 7
6 − for
any > 0.
I. INTRODUCTION
Permutation codes of length n are subsets of all permu-tations over {1, . . . , n}. We say a permutation code C has minimum distance d under some metric δ(·, ·) if for any pair of distinct permutations π and ρ in C, δ(π, ρ) ≥ d. Recently, permutation codes have been found to be useful in several applications in various areas such as power line communication (see [12], [17], [18], and [16]), multi-level flash memories (e.g. [6], [7], and [14]), and cryptography (see [11]). For these applications, researchers mainly focus on creating permutation codes within certain distance d under Hamming distance, Kendall’s tau distance, Chebyshev dis-tance and other metrics which are meaningful for particular applications.
We use Sn to represent all of the permutations over
{1, . . . , n}. Snis also called the symmetric group in Algebra.
In this paper, we focus on permutation codes, which also form a subgroup of Sn. We call them subgroup codes.
A subgroup code C is often defined by a generator set {π1, . . . , πk} and all permutations in C can be written in
a sequence of compositions of elements in the generator set. This is similar to linear codes which are subspaces of Fn
for some finite field F and positive integer n, and lattices which are subgroups of Rn under the vector addition for
some positive integer n.
It is natural to ask how to determine the minimum distance of a code and to compute the closest codeword for a certain received string. Both problems have analogous versions for linear codes and lattices. For a linear code, it is to determine the minimum distance while given the generator matrix of the code. This problem under Hamming distance has been
proved to be NP-complete by Vardy [15]. The analogous problem of the latter for linear codes under Hamming dis-tance is also NP-hard by Arora et al [1]. The analogous problems for lattices are the shortest lattice vector problem (SVP) and closest vector problem (CVP). SVP under p
-norm is NP-hard, even for approximating within p1− for
any > 0 [8]. SVP under Chebyshev distance is also NP-hard, even for approximating within n1/ log log n factor for
any > 0 [5]. For the subgroup permutation code version, both problems are proved to be NP-complete under many metrics, such as Hamming distance, p-norm, Kendall’s tau,
etc [4], [3]. However, for Chebyshev distance (∞-norm), the
NP-completeness proof by Cameron and Wu [4] fell apart on some instances.
For right-invariant metrics, the minimum distance of sub-group permutation codes is equivalent to finding the mini-mum weight permutation π, where the weight of π is defined as the distance between π and the identity. In this paper, we focus on the complexity of the minimum weight problem for the subgroup permutation codes. We give a correct reduction to prove the NP-hardness of this problem. Moreover, we show that it is NP-hard to approximate within 7
6− for any > 0.
Our result suggests that there does not exist an efficient method which can decide the minimum distance of an arbitrary subgroup permutation code. For example, in Tamo and Schwartz’s work [14], they constructed some subgroup permutation codes having a minimum distance larger than they proved, but they could not give the minimum distance explicitly with an efficient method. However, there are still some permutation codes coming with predetermined mini-mum distance, efficient encoding and decoding algorithms, such as in [10], [9] and [11]. The situation of subgroup permutation codes is just similar to linear codes. The rest of the paper is organized as follows. We define some notations in Section II. The reduction is given in Section III. Finally Section IV concludes the paper.
II. PRELIMINARY
We use[n] to indicate the set {1, . . . , n}. A permutation π over[n] is a bijective function from [n] to [n]. There are sev-eral representations for a permutation. In this paper, we use
a truth table to denote a permutation π = [π(1), . . . , π(n)], which can be written as the product of cycles. A cycle (p0, . . . , pk−1) represents a permutation putting the pi-th
entry of the input to the pi+1-th entry of the output for i∈ Zk.
Any permutation can be written in the form of product of disjoint cycles. For example, π = [2, 3, 1, 4, 6, 5] = (1, 3, 2)(4)(5, 6). Usually, we ignore the cycles with only one element, therefore[2, 3, 1, 4, 6, 5] = (1, 3, 2)(5, 6).
Let Sndenote the set of all permutations over[n]. It is well
known that Sn is a group with the composition operation.
We define the product of permutations f and g ∈ Sn as
f g = [f (g(1)), . . . , f (g(n))]. The identity permutation in Sn
is e = [1, . . . , n]. We say that {π1, . . . , πk} is a generator
set for a subgroup H ⊆ Sn, if every permutation π ∈ H
can be written as a product of a sequence of compositions from elements in the generator set. For two permutations π and ρ over [n], their Chebyshev distance is defined as ∞(π, ρ) = maxi∈[n]|π(i) − ρ(i)|. Note ∞ is a
right-invariant metric, i.e., for permutations π, ρ, and τ, we have ∞(π, ρ) = ∞(πτ, ρτ).
We say that a permutation π has weight w under right-invariant metric δ if δ(e, π) = w. Now we define the minimum weight problem of subgroup permutation code under Chebyshev metric, and we call it MINWSPA for short.
Definition 1. (MINWSPA) Given a generator set
{g1, . . . , gk} for a subgroup H of Sn and an integer
B, determine if there exists a permutation π ∈ H that has
a non-zero weight w≤ B.
Klein four-group is the building block of our proofs. It is defined as K4 = {e, κ1, κ2, κ3}, where κ1 = (1, 2)(3, 4),
κ2 = (1, 3)(2, 4), and κ3 = (1, 4)(2, 3). Its operation is
TABLE I: Operation of Klein four-group.
◦ e κ1 κ2 κ3
e e κ1 κ2 κ3
κ1 κ1 e κ3 κ2 κ2 κ2 κ3 e κ1 κ3 κ3 κ2 κ1 e
shown in Table I. It is clear that K4 is commutative and
∞(e, κi) = i for i ∈ {1, 2, 3}. We also use shift and
stretch operations for constructing permutations. They may
involve some elements of large indices. We assume that these operations are only applied on permutations over a sufficiently large symbol set. Shifting a cycle(p1, . . . , pk) is
to add the same number to each entry of it. For example, if we shift(1, 2, 3) with 5, then we get (6, 7, 8). We denote the shift operation as sr(π), which shifts all cycles in π with the
number r. For example s4(κ1) = (1+4, 2+4)(3+4, 4+4) =
(5, 6)(7, 8). This operation does not change the weight since the distance is preserved.
Stretching a cycle (p1, . . . , pk) is to multiply each entry
by the same number. For example, if we stretch(1, 2, 3) by 2 then we have (2, 4, 6). We denote the stretch operation
as at(π) which stretches all cycles in π by the number
t and then shifts the cycles such that the smallest sym-bol is down to 1. The distance is amplified t times, and so is the weight of the cycles. For example a2(κ1) =
s−1((1 · 2, 2 · 2)(3 · 2, 4 · 2)) = (1, 3)(5, 7), and similarly
a2(κ2) = (1, 5)(3, 7), a2(κ3) = (1, 7)(3, 5). This operation
amplifies the weight 2 times. Observe that if {i, j, k} = {1, 2, 3}, then sr(at(κi))sr(at(κj)) = sr(at(κk)) and
sr(at(κi))sr(at(κi)) = sr(at(e)). I.e, the shift and stretch
operations preserve the property of Klein four-group. III. REDUCTION
In this section we give a reduction from Not-All-Equal-SAT (NAENot-All-Equal-SAT) to MINWSPA. Cameron and Wu[4] gave a proof by a reduction from NAESAT to MINWSPA, but their construction fell apart on ∞-norm for some instance, which
is shown in Appendix A. We give the formal definition of Not-All-Equal-SAT problem as follows.
Definition 2. (NAESAT) Given a boolean formula φ in
conjunctive normal form, which consists of m exact-3-literal clauses c1, . . . , cm of over n variables x1, . . . , xn, decide
whether there exists an assignment σ such that for every clause c, not all literals in c are assigned to the same truth value.
To construct the corresponding generator set from an NAESAT instance φ, we define three kinds of permutation gadgets for the clauses, variables and the truth assignment over [48m + 18n]. Our goal is mapping truth assignments for φ to permutation codewords in the corresponding sub-group permutation code. Moreover, the codewords converted from satisfying assignments have less weight than the other codewords, except the identity. Hence, we can determine whether φ is satisfiable from the minimum weight of the corresponding subgroup permutation code.
The clause gadgets permute1, . . . , 48m, which are derived from the work by Cameron and Wu[4]. The main idea of the clause gadget is to assure that all literals are not assigned to the same value. For convenience, we also express the following permutations with the shift and stretch operations. Let h1=(1, 3)(5, 7)(2, 4)(6, 8)(9, 13)(11, 15)(10, 14)(12, 16) (17, 23)(19, 21)(18, 24)(20, 22) =a2(κ1)s1(a2(κ1))s8(a2(κ2))s9(a2(κ2)) s16(a2(κ3))s17(a2(κ3)), h2=(1, 5)(3, 7)(2, 6)(4, 8)(9, 15)(11, 13)(10, 16)(12, 14) (17, 19)(21, 23)(18, 20)(22, 24) =a2(κ2)s1(a2(κ2))s8(a2(κ3))s9(a2(κ3)) s16(a2(κ1))s17(a2(κ1)), h3=(1, 7)(3, 5)(2, 8)(4, 6)(9, 11)(13, 15)(10, 12)(14, 16) (17, 21)(19, 23)(18, 22)(20, 24) =a2(κ3)s1(a2(κ3))s8(a2(κ1))s9(a2(κ1)) s16(a2(κ2))s17(a2(κ2)), g =(1, 8)(2, 7)(3, 6)(4, 5)(9, 16)(10, 15)(11, 14)(12, 13) (17, 24)(18, 23)(19, 22)(20, 21)
=12i=1(2i − 1, 2i)a2(κ3)s1(a2(κ3))
s8(a2(κ3))s9(a2(κ3))s16(a2(κ3))s17(a2(κ3)).
Note that, for each of the above permutations, the first 4 pairs permute 1-8, the next 4 pairs permute 9-16, and the last 4 pairs permute 17-24. The operations among these 4 permutations are commutative. It is clear that h1, h2 and h3
each has weight 6, and the weight of g is 7. The weights of gh1, gh2 and gh3 are all 5.
The clause gadgets corresponding to the k-th literal of the j-th clause assigned true and false are defined as hj,k,T =
s48(j−1)(ghk) and hj,k,F = s48(j−1)+24(ghk), respectively.
For every j∈ [m] and t ∈ {T, F }, we have:
• For every k∈ [3], hj,k,t has weight5.
• For distinct k, k∈ [3], hj,k,thj,k,thas weight6.
• hj,1,thj,2,thj,3,thas weight7.
The second kind is the variable gadget which assures that no variable is assigned both true and false. They permute elements48m + 1, . . . , 48m + 10n. Let
vT = (1, 4)(7, 10) = a3(κ1), vF = (1, 7)(4, 10) = a3(κ2).
Note that vTvF = a3(κ3). The weights of vT, vF, and
vTvF are 3, 6, and 9, respectively. The variable gadgets
corresponding to xi are defined as vi,T = sb1+10i(vT) and vi,F = sb1+10i(vF) where b1= 48m − 10.
The third kind is the assignment gadget which assures if xi is assigned, then xi+1 and xi−1 are assigned, too, where
i±1 ∈ Znand x0≡ xn. They permute elements48m+10n+
1, . . . , 48m + 18n. We use the following permutation to give a chain reaction, i.e., if there is any missing gadget, then the distance will deviate significantly. The assignment gadget for xi is defined as ui= sb2+8(i−1)((1, 8))sb2+8i((1, 8)) for i < n and un= sb2+8n((1, 8))sb2((1, 8)) where b2= 48m+10n. For convenience, we also use u0 as the alias of the gadget
un.
Now we give the polynomial-time mapping function from NAESAT to MINWSPA. Let
P ={(i, j, k) : xi is the k-th literal in cj},
Q ={(i, j, k) : ¯xi is the k-th literal in cj}.
For the i-th variable xi, we define
gi= vi,Tui ⎛ ⎝ (i,j,k)∈P hj,k,T ⎞ ⎠ ⎛ ⎝ (i,j,k)∈Q hj,k,F ⎞ ⎠ , gi= vi,Fui ⎛ ⎝ (i,j,k)∈P hj,k,F ⎞ ⎠ ⎛ ⎝ (i,j,k)∈Q hj,k,T ⎞ ⎠ . The generator set is{gi, gi: i ∈ [n]}. The scheme above can
be done in polynomial time, since|P | + |Q| = 3m and the size of each gadget is at most O((48m + 18n) log(48m + 18n)).
Let H be the subgroup generated by{gi, gi: i ∈ [n]}, i.e.,
H =gi, gi: i ∈ [n]. We can obtain a permutation
π = ⎛ ⎝ σ(xi)=T gi ⎞ ⎠ ⎛ ⎝ σ(xi)=F gi ⎞ ⎠ ∈ H
from an assignment σ for φ. By the following two lemmas, we show that there must exist a non-identity permutation of minimum weight which is constructed from an assignment.
Lemma 1. The permutations mapped from satisfying
as-signments have weight 6 and the permutations mapped from unsatisfying assignments have weight7.
Proof: Let π be the permutation obtained from an
assignment σ of φ. Note that the elements permuted by the clause gadgets, variable gadgets, and assignment gadgets are disjoint. Therefore we can discuss the weight of them separately in three categories. First, we look at the elements permuted by variable gadgets vi,T and vi,F for i∈ [n]. Only
gi and gi can alter these elements, and π has exactly one
of them. Thus, the difference between π and e on these elements is at most 6. Next we turn to assignment gadget ui for some i∈ [n]. Without loss of generality, we assume
ui = (n1, n1+ 7)(n2, n2+ 7), ui−1 contains(n1, n1+ 7)
and ui+1contains(n2, n2+7). Since π has exactly one of gi
and g
ifor every i∈ [n], both (n1, n1+ 7) and (n2, n2+ 7)
appear twice in the construction of π. Moreover, they are the only cycles covers n1, n1+ 7, n2, and n2+ 7. Thus, π does
not affect these elements and there is no difference between π and e on them.
At last, we observe clause gadgets hj,k,T and hj,k,F. We
claim that for j∈ [m] and k ∈ [3], exactly one of hj,k,T and
hj,k,F appears in π. Assume xi is the k-th literal of the j-th
clause. If σ(xi) = T , then hj,k,T is picked by the definition
of gi, otherwise π picks hj,k,F. It is similar for the case
that ¯xi is the k-th literal in the j-th clause. Thus, for every
j ∈ [m], π picks exactly three out of hj,1,T, hj,2,T, hj,3,T,
hj,1,F, hj,2,F, and hj,3,F. Let Aj = {hj,k,T : k ∈ [3]} and
Bj = {hj,k,F : k ∈ [3]}. In the following, we discuss how
these gadgets affect the distance between π and e.
1) If the gadgets in Aj are not picked at all, then the
elements permuted by Aj remain the same as e. But
this implies all gadget in Bj are picked, then the
elements permuted by Bj are permuted with a shift
of g. The distance is max{0, 7} = 7.
2) If one of Aj and two of Bj are picked, then the
elements permuted by Aj and Bj are in the form of
ghk and hk for some k, k ∈ [3], respectively. The distance ismax{5, 6} = 6.
3) If two of Aj and one of Bj are picked, then, similar
to 2), the distance is 6.
4) If all of Aj are picked, then, similar to 1), the distance
is7.
Note that the first or last cases above happen if and only if σ is not a satisfying assignment. Since distances of the clause
gadgets dominate the distance over the other gadgets, we conclude that π has weight 6 if σ is satisfying; 7 otherwise.
Lemma 2. The other non-identity permutations in H have
weight at least7.
Proof: Since all gadgets are commutative, we can
ex-press any permutation π ∈ H into a product of powers of generators, i.e., π = gz1
1 (g1)z1· · · gnzn(gn)zn. Since every
gadget is the inverse of itself, we assume z1, z1, . . . , zn, zn ∈
{0, 1} without loss of generality. A permutation converted from an assignment must choose either gi or gi, for every
i ∈ [n], i.e., zi+ zi = 1 for i ∈ [n]. So we discuss the
following two cases.
• If there exists some i such that zi+zi= 2, then π picks
both giand gi. In this case, the elements corresponding
to vi,T and vi,F are permuted into the form of vTvF,
which has weight9.
• For every i∈ [n], zi+ zi = 2. Because π = e and π is
not converted from an assignment, there are i0 and i1
such that zi0+ zi0 = 0 and zi1+ zi1 = 1. Now recall that for i < n, ui = sb2+8(i−1)((1, 8))sb2+8i((1, 8)) and un = sb2+8n((1, 8))sb2((1, 8)). Without loss of generality, we can assume that i0 = i1 − 1. As a
consequence, ui0 and ui1 are the only two gadgets permuting b2 + 8i1 − 7 and b2 + 8i1 + 7. Since
zi0 + zi0 + zi1 + zi1 = 0 + 1 = 1, π picks exactly one of gi0, gi0, gi1 and gi1. b2+ 8i1− 7 and b2+ 8i1 must be swapped by π, hence π has distance at least 7 in this case.
The non-identity permutations, which are not in the two cases, have exactly one of gi and gi for every i ∈ [n], and
these can be obtained from assignments. We conclude the lemma is true.
With the two lemmas above, we prove the following theorem.
Theorem 1. Let H be the group generated by
{g1, g1. . . , gn, gn} which is mapped from a NAESAT
instance φ. If φ is satisfiable then H has minimum weight
6, otherwise H has minimum weight 7.
Proof: For satisfiable φ, there exists a satisfying
assign-ment σ. We can convert σ into π, and π has weight 6 by lemma 1. For unsatisfiable φ, all assignments are not satis-fying. So every permutation converted from an assignment has weight 7, and the other non-identity permutations have weight at least7. Thus, we conclude H has minimum weight 7.
From the above theorem we have an immediate inapprox-imable result. We say that an algorithm A is an r-approximate algorithm for a minimization problem if A always outputs a feasible solution whose cost is no more than r times of the minimum cost on any input. Note that A cannot output an answer whose cost is less than the minimum cost, since it is not a feasible solution. Since NAESAT is an NP-complete
problem, we have the following corollary as an immediate result of theorem 1.
Corollary 1. MINWSPA is complete. Moreover, it is
NP-hard to approximate within 7
6− for any > 0.
Proof: MINWSPA is in NP, since we can finish
com-puting the weight of any permutation π and verifying if π is in the subgroup by Schreier-Sims algorithm [13] in polynomial time. By theorem 1, φ is satisfiable if and only if the corresponding subgroup H has minimum weight at most 6. Hence, we can conclude MINWSPA is NP-complete. Now, assume we have a polynomial time(7
6−)-approximate
algorithm A. We can construct a polynomial time algorithm to solve NAESAT.
1) Construct the subgroup H from φ and run A(H). 2) If A(H) outputs a number no more than 7− 6, then
accept φ, otherwise reject.
Any satisfiable φ will be accepted, and all unsatisfiable φ’s will be rejected, since an approximate algorithm cannot give an answer less than the minimum solution which is7.
IV. CONCLUSION
We show that MINWSPA is NP-complete. It implies that the minimum weight problem of permutation codes under the well known metrics are all NP-complete. For the case of ∞
-metric, we also prove that there is no7 6−
-approximate algorithm for any > 0 unless P=NP. We believe that the minimum weight problems under other metrics also have inapproximable results, however, they still remain open. Our inapproximable result still has room for improvement. It is interesting to find better approximation algorithm with some constant c >76.
REFERENCES
[1] S. Arora, L. Babai, J. Stern, Z. Sweedyk, “The Hardness of Approximate Optima in Lattices, Codes, and Systems of Linear Equations,” Journal of Computer and System Science, vol. 54, 1997, pp. 317-331. [2] E. R. Berlekamp, R. J. McEliece, H. C.A. van Tilborg, “On the inherent
intractibility of certain coding problems,” IEEE Trans. Inform. Theory IT-24, 1978, pp. 384-386.
[3] C. Buchheim, P. J. Cameron, T. Wu, “On the subgroup distance problem,” Discrete Mathematics, vol. 309, pp. 962–968, 2009. [4] P. J. Cameron, T. Wu, “The complexity of the weight problem for
permutation and matrixgroups,” Discrete Mathematics, vol. 310, pp. 408–416, 2010.
[5] I. Dinur, “Approximating SVP∞to within almost polynomial factors is NP-hard,” Combinatorica, vol. 23, 2003, pp. 205-243.
[6] A. Jiang, R. Mateescu, M. Schwartz, J. Bruck, “Rank Modulation for Flash Memories,” in Proc. IEEE Internat. Symp. on Inform. Th., 2008, pp. 1731-1735.
[7] A. Jiang, M. Schwartz, J. Bruck, “Error-Correcting Codes for Rank Modulation,” in Proc. IEEE Internat. Symp. on Inform. Th., 2008, pp. 1736-1740.
[8] S. Khot, “Hardness of Approximating the Shortest Vector Problem in Lattices,” J. ACM, Vol. 52, No. 5, 2005, pp. 789–808.
[9] T. Klove, T.-T. Lin, S.-C. Tsai, W.-G. Tzeng, “Permutation arrays under the Chebyshev distance,” in Proc. IEEE Trans. on Inform. Th., accepted and to appear, 2010.
[10] T.-T. Lin, S.-C. Tsai, W.-G. Tzeng, “Efficient Encoding and Decoding with Permutation Arrays,” in Proc. IEEE Internat. Symp. on Inform. Th., 2008, pp. 211-214.
[11] M.-Z. Shieh, S.-C. Tsai, “Decoding Frequency Permutation Arrays under Infinite norm,” in Proc. IEEE Internat. Symp. on Inform. Th., 2009, pp. 2713–2717.
[12] K. W. Shum, ”Permutation coding and MFSK modulation for fre-quency selective channel,” IEEE Personal, Indoor and Mobile Radio Communications, vol. 13, pp. 2063–2066, Sept. 2002.
[13] C. Sims, “Computational methods in the study of permutation groups”, Computational Problems in Abstract Algebra, pp. 169-183, Pergamon, Oxford, 1970.
[14] I. Tamo, M. Schwartz, “Correcting Limited-Magnitude Errors in the Rank-Modulation Scheme,” arXiv:0907.3387v2.
[15] A. Vardy, “The intractability of computing the minimum distance of a code,” IEEE Trans. Inform. Theory 43, 1997, pp. 1757-1766. [16] A. J. H. Vinck, “Coded modulation for powerline communications,”
Proc. Int. J. Electron. Commun, vol. 54, pp. 45-49, 2000.
[17] A. J. H. Vinck, J. H¨aring, “Coding and modulation for power-line communications,” in Proc. Internat. Symp. on Power Line Commun., Limerick, Ireland, April 2000.
[18] A. J. H. Vinck, J. H¨aring, T. Wadayama, “Coded M-FSK for power line communications,” in Proc. IEEE Internat. Symp. on Inform. Th., 2000, p.137.
APPENDIX
A. Cameron-Wu’s reduction
The reduction in Cameron and Wu’s work [4] uses only two kinds of gadgets. The variable gadget vi for the i-th
variable is(2i − 1, 2i). The clause gadget hj,k for the k-th
literal in the j-th clause is defined as s2n+24(j−1)(hk) where
h1, h2, h3and g are the same as in this paper. The generators
are defined as gi= vi ⎛ ⎝ (i,j,k)∈P s2n+24(j−1)(hk) ⎞ ⎠ , gi= vi ⎛ ⎝ (i,j,k)∈Q s2n+24(j−1)(hk) ⎞ ⎠ ,
where P, Q are the same sets as in our reduction. They also construct a generator gc=j∈[m]s2n+24(j−1)(g) acting as
g on every clause gadget. Their construction does not work in the following instance. Let φ = (x1∨x2∨x2)∧(¯x1∨x2∨x2).
By their construction, subgroup G is generated by g1= v1h1,1 = (1, 2)s4(h1), g1 = v1h2,1 = (1, 2)s28(h1), g2 = v2h1,2h1,3h2,2h2,3 = (3, 4)s4(h2)s4(h3)s28(h2)s28(h3) = (3, 4)s4(h1)s28(h1), g2 = v2= (3, 4), gc= s4(g)s28(g).
Note that φ is an unsatisfiable formula for NAESAT. Ac-cording to their proof of Theorem 18[4], elements of G should not have weight 5, since φ is unsatisfiable. But gcg1g1 = s4(gh1)s28(gh1) has weight 5. Therefore, we need
to design the gadgets more carefully to prove that MINWSPA is NP-complete.