On Tractability of Ulams Metric in Highier Dimensions and Dually Related Hierarchies
OOn Tractability of Ulam’s Metric in HigherDimensions and Dually Related Hierarchies ofProblems
Sebastian Bala, Andrzej Kozik
Institute of Computer ScienceUniversity of OpoleKopernika 11a, Opole, Poland
Abstract.
The Ulams’s metric is the minimal number of moves con-sisting in removal of one element from a permutation and its subsequentreinsertion in different place, to go between two given permutations.The elements that are not moved create longest common subsequence ofpermutations. Aldous and Diaconis, in their paper, pointed that Ulam’smetric had been introduced in the context of questions concerning sortingand tossing cards. In this paper we define and study Ulam’s metric inhigher dimensions: for dimension one the considered object is a pair ofpermutations, for dimension k it is a pair of k-tuples of permutations.Over encodings by k-tuples of permutations we define two dually relatedhierarchies. Our very first motivation come from Murata at al. paper, inwhich pairs of permutations were used as representation of topologicalrelation between rectangles packed into minimal area with applicationto VLSI physical design. Our results concern hardness, approximability,and parametrized complexity inside the hierarchies.
Let permutation σ ∈ S n is a sequence ( σ (1) , σ (2) , . . . , σ ( n )) representing anarrangement of elements of the set [ n ]. Such way of expressing a linear ordering ofsome set elements makes permutations foundational objects of combinatorics [5].At the same time, permutations are of great practical importance, as they modelsolutions to many real-life problems, e.g., in the fields of scheduling [21] androuting [23]. Taking into account significance and applications of permutations,a vast body of research tackled them from different angles, sides and points ofview.One special research direction has been raised by Stanis(cid:32)law Ulam ques-tions [24]: what is the minimum number of moves to go from some permutation σ s ∈ S n to some other permutation σ t ∈ S n , where a move consist of changinga position of some element in a permutation, and more importantly, what isasymptotic distribution of this number?The answer for the first question is named the Ulam’s metric U ( σ s , σ t ).Computationally, it is equivalent to LCS ( σ s , σ t ) - the Longest Common Sub-sequence of σ s and σ t , and Fredman [10] showed that it can be computed using a r X i v : . [ c s . CC ] S e p Sebastian Bala, Andrzej Kozik n log n − n log log n + O ( n ) comparisons in the worst case, and no algorithm hasbetter worst-case performance. Later, Hunt and Szymanski [13] improved thisbound to O ( n log log n ) by exploiting RAM model of computations and a fixeduniverse of sequence elements.The latter Ulam’s question drew researcher’s attention over the past 50 years,providing many amazing results and connections between various areas of math-ematics, physics and statistics, exhibited and reviewed in [1][22][7], and fore-most the final answer of Baik, Deift and Johansson [2]: the expected valueof l (cid:0) LCS ( σ s , σ t ) (cid:1) for σ s and σ t drawn uniformly at random from S n equals2 √ n − . n / + o ( n / ).As permutations often express solutions to many combinatorial optimizationproblems, the Ulam’s metric is often interpreted as the length of the shortestpath connecting (any) two given solutions in a space spanned by S n . Motivatedby surprising discoveries that followed original Ulam’s questions [7][22], in thispaper we rephrase and state the same question, but in higher dimensions: whatis the length of the shortest path between two solutions in S kn , S kn = S n × . . . × S n (cid:124) (cid:123)(cid:122) (cid:125) k times , the k -dimensional space of permutations?The question is not of theoretical interest only, as 2-tuples of permutationsdescribe non-overlapping packings of rectangles on a plane in Sequence Pair (SP)representation [19]. The SP has many successful industrial applications in thecontext of physical layout synthesis of VLSI circuits, where it models a placementof transistors, leaf-cells and macro-blocks on a silicon die [15]. On the other hand,SP can be a solution space for multiprocessor scheduling problems with variousdefinitions of cost functions and constraints [14][17][18].On the other hand, existence and properties of paths between solutions ina solution space are especially important for metaheuristic algorithms [4], per-forming effective exploration of the solution space based on elimination andexplorative properties - incremental moves and neighborhood structures are es-sential in the context of guiding the search process. Examples of such methods arehybrid-metaheuristics [3], combining complementary strengths of various tech-niques to collaboratively tackle hard optimization problems, and hyper-heuristicapproaches [6], providing a robust upper-level framework to tune and drive un-derlying heuristics to adapt to features of solved problems. The efficiency ofsuch methods is based on the connectivity and diameter properties of the solu-tion space - the assumption that one can provide a sequence of moves to every(starting) solution such that every other solution can be reached (especially anoptimal one), and the maximal length of such a sequence, respectively. On theother hand, algorithms behind the Ulam’s metric can be immediately applied ascrossover operators in evolutionary and path-relinking metaheuristics [4]., i.e.,given a shortest path between two solutions, a result of their crossover could beeither a midpoint, the best, or even all solutions on that path as an offspring. n Tractability of Ulam’s Metric in Higher Dimensions 3
Let a subsequence s of σ ∈ S n be a sequence ( σ ( i ) , σ ( i ) , . . . , σ ( i m )) where1 ≤ i < . . . < i m ≤ n ; denote by { s } a set of elements of s , i.e., { s } = { σ ( i ) , σ ( i ) , . . . , σ ( i m ) } ⊆ [ n ] and by l ( s ) = m its length. A common subse-quence of two permutations σ s , σ t ∈ S n , CS ( σ s , σ t ), is a sequence ( σ s ( i ) = σ t ( j ) , σ s ( i ) = σ t ( j ) , . . . , σ s ( i m ) = σ t ( j m )), where 1 ≤ i < . . . < i m ≤ n and1 ≤ j < . . . < j m ≤ n . Then, for σ s , σ t ∈ S n U ( σ s , σ t ) = n − l (cid:0) LCS ( σ s , σ t ) (cid:1) . (1)Let Γ ∈ S kn be a k -tuple of permutations of [ n ], i.e., Γ = ( σ , . . . , σ k ), σ i ∈ S n , i ∈ [ k ]. Say an insert move of some v ∈ [ n ] in Γ consist of moving theelement v to some other position in each of Γ permutations. Define an insertneighborhood of Γ , N ( Γ ), as a set of permutation tuples obtained by performingall insert moves of [ n ] elements in Γ .Define a path between Γ s and Γ t in S kn as a sequence Γ = Γ s , Γ , . . . , Γ m − ,Γ m = Γ t s.t. Γ i +1 ∈ N ( Γ i ), i = 0 , . . . , m −
1; let m be the length of that path.Define U k ( Γ s , Γ t ), the Ulam’s metric in S kn , as the length of the shortest pathbetween Γ s and Γ t , i.e., the minimal number of insert moves transforming Γ s into Γ t , where Γ s , Γ t ∈ S kn .Following [1] it is not hard to show that U k ( Γ s , Γ t ) = n − (cid:12)(cid:12) LF S ( Γ s , Γ t ) (cid:12)(cid:12) , (2)where LF S ( Γ s , Γ t ) = argmax C ⊆ [ n ] (cid:26) | C | : ∀ i ∈ [ k ] ∃ CS ( σ is ,σ it ) { CS ( σ is , σ it ) } = C (cid:27) . The
LF S ( Γ s , Γ t ), the Largest Fixed Subsets of two tuples of permutations, is aclass of maximal subsets of [ n ] whose elements form common subsequences ofcorresponding permutations of Γ s and Γ t .In the literature, according to Ulam’s original motivation, U is often inter-preted as sorting of a hand of bridge cards, by sequentially taking some card(not in LF S ) and putting it back in desired position. As shown in Figure 1,using SP representation, the U can be analogously interpreted geometricallyas a sequence of rectangle packings, in which in each step a single rectangle istaken from a packing and re-inserted in desired place. To more precise explana-tion how SP corresponds to rectangle placement see [19]. Observe, for the case U where Γ s , Γ t ∈ S n , (2) is equivalent to (1) for permutations σ s and σ t , andcan be computed in polynomial time. Subsequently, we show that for any k ≥ U k is strongly NP-hard.A literal is a variable or negated variable. A boolean formula is 3 CN F (in3-Conjuctive Normal Form) if it is conjunction of clauses which are alternativeof at most three literals. For a given finite sequences a and b, the join of thesequences we denote by a · b. By ( i ) , we denote a sequence that consists of singleelement i. Sebastian Bala, Andrzej Kozik
Fig. 1: (cid:104) (43162 ) , (63 (cid:105) → (cid:104) (5 , (635 (cid:105) → (cid:104) (531642) , (635124) (cid:105) A sequence pair ( σ , σ ) ∈ S n is a pair of permutations over [ n ]. A k - sequencetuple is a k -tuple of permutations ( σ , σ , . . . , σ k ) ∈ S kn . For given pair ( σ is , σ it ) , a subset B ⊆ [ n ] induces common sequence if thereis sequence ( b , . . . , b l ) = CS ( σ is , σ it ) and set { b , . . . , b l } equals B. We also say,for any permutation σ , a sequence ( b , . . . , b l ) is B -induced subsequence of σ if( b , . . . , b l ) is subsequence of σ and { b , . . . , b l } = B. The k - dimensional Longest Fixed Subset Problem (k LFS ) is defined as fol-lows: Given pair of k -sequence tuples Γ = (cid:104) Γ s , Γ t (cid:105) , where Γ s = ( σ s , . . . σ ks ) and Γ t = ( σ t , . . . σ kt ) determine maximal l and B ⊆ [ n ] such that | B | = l and B induces the common sequence for every ( σ is , σ it ), where i = 1 , . . . , k. A decisionversion of k - dimensional Longest Fixed Subset Problem (k LFSD ) is the questionif for given nonnegative integer l and (cid:104) Γ s , Γ t (cid:105) = (cid:104) ( σ s , . . . σ ks ) , ( σ t , . . . σ kt ) (cid:105) thereexists B ⊆ [ n ] , such that | B | = l and B induces the common sequence for every( σ is , σ it ) . By k U we denote a problem dually related to k LFS . The k U is definedover the same inputs as k LFS and if for a given input, set B and number l isa solution of the k LFS then set V \ B and n − | B | is the solution of the k U problem. The decision version k UD is defined analogously to the k LFSD .Given an undirected graph G = ( V, E ) , the MaxClique problem is a taskof finding find a clique of maximum size in V . The question if there exists aclique of size m in G is a Clique problem (decision version of
MaxClique ).The
MinVertexCover problem is a task of finding a subset B ⊆ V of min-imal cardinality such that u ∈ B or v ∈ B for every ( u, v ) ∈ E. Solutions ofthe
MaxClique and the
MinVertexCover are dually related – subset B of V is a minimal vertex cover if and only if V \ B is maximal clique in G. By VertexCover we denote decision version of the
MinVertexCover problem.Let A be an optimization problem for which we try maximize the objectivefunction. Let Opt A ( x ) be optimal value of objective function for instance x of problem A. Let A be an algorithm solving Π. Let A ( I ) denote the value ofobjective function returned by A for input I. Define F ( A , x ) = Opt A ( x ) A ( x ) . Function r : Z + (cid:55)→ R + is an approximation factor of A if for any n, F ( A , x ) ≤ r ( n ) for allinstances of the size n. W say that algorithm A is r ( n ) − approximation algorithm.If A is an minimization problem then F ( A , x ) = A ( x ) Opt A ( x ) . Reduction of an optimization problem A to an optimization problem B is an approximation preserving reduction if there are polynomially computable func-tions f and g such that for each x which is an instance of A, x (cid:48) = f ( x ) is an n Tractability of Ulam’s Metric in Higher Dimensions 5 instance of B and for each y (cid:48) that is feasible solution of B, y = g ( x, y (cid:48) ) is feasiblesolution of x. An approximation preserving reduction ( f, g ) is an
S-reduction if Opt A ( x ) = Opt B ( x (cid:48) ) and for any x which is instance of A, y (cid:48) which is feasiblesolution of x (cid:48) = f ( x ) , cost A ( x, g ( x, y (cid:48) )) = cost B ( x (cid:48) , y (cid:48) ) [8]. For abbreviation, wewrite A ≤ S B to denote that there exists S -reduction from A to B. A desision problem A is parametrized problem if it is extended by function κ A that assigns nonnegative integer to each instance x of A. An algorithm whichdecides if x ∈ A in time f ( κ A ( x )) p ( | x | ) is called fpt-algorithm , where f is acomputable function and p is a polynomial. An R is an fpt-reduction of A to B if for any x which is an instance of A, R ( x ) is an instance of B, moreover (1) x ∈ A iff R ( x ) ∈ B ; (2) R is computable by an fpt-algorithm with respect to κ A ; (3) There is computable function h such that κ B ( R ( x )) ≤ h ( κ ( x )) for anyinstance x of A. Lemma 1.
For any k ∈ [ n ] there are S-reductions from k LFS to MaxClique nad from k U to MinVertexCover .Proof.
For a given (cid:104) Γ s , Γ t (cid:105) = (cid:104) ( σ s , . . . , σ ks ) , ( σ t , . . . , σ kt ) (cid:105) we define graph G =( V = [ n ] , E ) , where ( i, j ) ∈ E if and only if for all r ∈ [ k ] there are α s , β s , α t , β t ∈ [ k ] : α s < β s , α t < β t and either σ rs ( α s ) = i, σ rs ( β s ) = j, σ rt ( α t ) = i, σ rt ( β t ) = j or σ rs ( α s ) = j, σ rs ( β s ) = i, σ rt ( α t ) = j, σ rt ( β t ) = i. This is how is defined function f which trasforms single instance of k LFS to single instance of
MaxClique .First, note that any clique of G forms common sequences for all pairs (cid:104) σ is , σ it (cid:105) .Suppose on the contrary, that elements of some clique C do not form a longestfix set for some ( σ is , σ it ). The clique C has at lest two elements. Let α s , α t berespectively the C -induced subsequences of σ is and σ it . If α s , α t are sequencesover the same set of elements and differs then there is the least index d suchthat α s ( d ) (cid:54) = α t ( d ) . Therefore element α t ( d ) occurs after element α s ( d ) in α s and vice versa for α t . The reduction has been defined in such way that thereis an edge between α s ( d ) and α t ( d ) . This is contradiction - C cannot form theclique in G. At last, note that maximal clique of the graph G , represented as set of vertexnumbers, forms maximal solution of the k LFS instance. On the contrary assumethat there exists D ⊆ V such that there are D -induced subsequences for allpairs ( σ is , σ it ) and | C | < | D | for all cliques C ⊆ V. Therefore there are different i, j ∈ D such that ( i, j ) (cid:54)∈ E. By definition of reduction there exists r, thateither σ rs ( α s ) = i, σ rs ( β s ) = j, σ rt ( α t ) = j, σ rt ( β t ) = i or σ rs ( α s ) = j, σ rs ( β s ) = i, σ rt ( α t ) = i, σ rt ( β t ) = j, for some α s < β s , α t < β t . This contradicts that i, j are elements of D-induced common sequence. Now the function g can be definedin obvious way as g : S kn × S kn × V (cid:55)→ V satisfying g (( Γ s , Γ t ) , C ) = C. The ( f, g )is an S-reduction from k
LFS to MaxClique because costs of both problems areequal to the number of nodes in clique and the size of the length fixed set, whichhave the same value.
Sebastian Bala, Andrzej Kozik
A set B ⊆ [ n ] is a feasible solution of k U problem for instance ( Γ s , Γ t ) ifand only if [ n ] \ B is a feasible solution of k LFS problem for the same instance( Γ s , Γ t ) . Similarly if B ⊆ V = [ n ] is a vertex cover of G then V \ B is a clique for G. Moreover minimal vertex cover B for G corresponds to V \ B which is maximalclique of G. Similarly maximal longest fixed subset B of ( Γ s , Γ t ) correspond to[ n ] \ B which is minimal solution of k U problem. The S-reduction ( f (cid:48) , g (cid:48) ) from U to MinVertexCover is defined by equations f (cid:48) = f and g (cid:48) (( Γ s , Γ t ) , B ) =[ n ] \ g (( Γ s , Γ t ) , V \ B ) . The equality of the costs can be proven by the samereasoning as before. (cid:117)(cid:116) An S -reduction is stronger than L -reduction, AP -reduction and P T AS -reduction [8], that are often used for proving membership in
AP X class. Fur-thermore, if A ≤ S B and B is approximable with some factor, then A is approx-imable with the same factor. Therefore, by the Lemma 1 and fact that Min-VertexCover there is 2-approximation algorithm [25], we obtain that there is2-approximation algorithm for the k U problem. By S -reducibility of k LFS to MaxClique as well as existence of polynomial algorithms recognizing feasiblesolutions and computing cost of feasible solutions the k
LFS is in
N P O.
As aconclusion we obtain:
Theorem 1.
The k
LFS is in
N P O for any k ∈ [ n ] . For any k ∈ [ n ] there exists2-approximation algorithm for k U . An S -reduction ( f, g ) retains the costs values between reduced instance x ofan A problem and outcome instances x (cid:48) of a B problem. In the case of opti-mization problem with minimization as the objective, the decision version of theproblem B is formulated as the question if cost B ( x (cid:48) , y (cid:48) ) ≤ l for given l ∈ [ n ], x (cid:48) instance of B, y (cid:48) which is the feasible solution of instance x (cid:48) . Analogously thedecision version of the problem A is the question if cost A ( x, g ( x, y (cid:48) )) ≤ l, for x which is instance of A. Assuming that the l is parameter, by the equality of costs,the f function is also the reduction R. It is easy to note that x ∈ A iff x (cid:48) ∈ B. The R is an fpt-algorithm because the f is polynomially computable. The func-tion h can be assumed to be identity and κ A ( x ) = cost A ( x, g ( x, y (cid:48) )) , κ B ( x ) = cost B ( f ( x ) , y (cid:48) ) , where y (cid:48) is feasible solution of the problem B for an instance f ( x ). The above considerations show that if the ( f, g ) is S -reductions, then f isan fpt-reduction. Similar considerations work for maximization problems.Now we see that k LFSD ≤ F P T
MaxClique and k UD ≤ F P T
VertexCover . Since
MaxClique is in W [1] , VertexCover is in
F P T and both parametrizedclasses ( W [1], F P T ) are closed under fpt-reductions [9] we obtain:
Theorem 2.
The k
LFSD is in W [1] class for any k ∈ [ n ] . The k UD problembelongs to F P T class for any k ∈ [ n ] . Theorem 3.
The 2
LFSD and 2 UD are NP -complete.Proof. By existence of S -reduction (Lemma 1) from k LFS to MaxClique andfrom k U to MinVertexCover , for any k ∈ [ n ] , the k LFSD and the k UD are reducible respectively to the Clique problem and the k UD problem by n Tractability of Ulam’s Metric in Higher Dimensions 7 polynomial time reduction. Hence k LFS and k UD are in N P – in particular2
LFS and k UD are in N P.
What is left is to show that 2
LFSD is in NP -hard. Let ϕ = c ∧ . . . ∧ c m be3 CN F boolean formula. Without loss of generality one can assume that eachclause has exactly three literals. Let x , . . . , x n be all variables that occur in ϕ. Assume that variable x i occurrs α times in ϕ as positive literal and β times asnegative literal. We construct polynomial time reduction by encoding satisfiabil-ity of ϕ as 2 LFSD . Introduce new set of symbols x (1) i , . . . , x ( α ) i , ¬ x (1) i , . . . , ¬ x ( β ) i , where x ( j ) i stands for j -th positive literal of x i and symbol ¬ x ( j ) i stands for j -thnegative literal of x i . Let C i = { x (1) i , . . . , x ( α ) i , ¬ x (1) i , . . . , ¬ x ( β ) i } and C = (cid:83) ni =1 C i . Let κ be the bijection from C onto [3 m ] . Create (cid:104) Γ s , Γ t (cid:105) = (cid:104) ( σ s , σ s ) , ( σ t , σ t ) (cid:105) which is instance of 2 LFSD with solution m if and only if ϕ is satisfiable.Definition of (cid:104) Γ s , Γ t (cid:105) in the presented reduction should preclude case that if Z induces common subsequences for ( σ s , σ t ) and ( σ s , σ t ) then both κ ( x i ) and κ ( ¬ x i ) appear in Z for any i ∈ [ n ] . It can be realized in the following way:Permutation σ s σ t consist of blocks of substrings A i = (cid:16) κ ( x (1) i ) , . . . , κ ( x ( α ) i (cid:17) and B i = (cid:16) κ ( ¬ x (1) i ) , . . . , κ ( ¬ x ( β ) i (cid:17) . We define σ s = A B A B · · · A n B n and σ t = B A B A · · · B n A n . Remark 1.
If a set Z induces common subsequence of σ s and σ t then at mostone of κ ( x ( r ) i ) and κ ( ¬ x ( s ) i ) is in Z because (1) κ ( x ( r ) i ) appears before κ ( ¬ x ( s ) i )in σ s , (2) κ ( x ( r ) i ) appears after κ ( ¬ x ( s ) i ) in , σ t for any i, r, s. Let c j be the j -th clasue in ϕ and let it be of the form c j = ¬ x ( a ) j ∨ x ( b ) j ∨¬ x ( c ) j . Positions of negations inside the above clause can be different but theydo not influence generality of presented reduction. Define permutation σ s asconcatenation of blocks E E · · · E m where E j = ( κ ( ¬ x ( a ) j ) , κ ( x ( b ) j ) , κ ( ¬ x ( c ) j ))and σ t = E R E R · · · E Rm , where E Rj = ( κ ( ¬ x ( c ) j ) , κ ( x ( b ) j ) , κ ( ¬ x ( a ) j )) . Remark 2.
If a set Z induces common subsequence of σ s and σ t then | Z | ≤ m. If it would not, | Z | ≥ m + 1, there are literals x, y such that κ ( x ) , κ ( y ) ∈ Z andliterals x, y come from the same clause. Literals x, y appears in reverted orderby definition of Γ t . Hence Z does not induces common subsequence for both σ s and σ t . Any choice of literals, one from every clause forms the sequence, which is witnessof satisfiability of ϕ if the set of chosen literals is consistent. Remark 3.
Assume that ϕ is satisfiable and y , . . . , y m is witness of satisfiability.Sequence κ ( y ) κ ( y ) · · · κ ( y m ) is common subsequence of σ s and σ t . Note that if y , . . . , y m is witness of satisfiability then { κ ( y ) , κ ( y ) , . . . κ ( y m ) } indicates common sequence for σ s and σ t . Indeed, by inconsistency of { y , . . . ,y m } there is no i, j, k such that both κ ( y i ) , κ ( y j ) are elements of A k B k . Hence,
Sebastian Bala, Andrzej Kozik κ ( y i ) and κ ( y j ) occur in the same order in both σ s and σ t . Therefore, by Remark3, κ image of a satisfiability witness induces common subsequences for pairs( σ s , σ t ) and ( σ s , σ t ) of length m. By Remarks 1 and 2 the lengths of inducedsubsequences are not greater than m. Thus, the induced subsequences are of themaximal length.By the above reduction ϕ is satisfiable iff the solution of (cid:104) Γ s , Γ t (cid:105) , as theinstance of the the 2 UD problem is of the size not grater than 2 m. Hence 2 UD is N P -hard. (cid:117)(cid:116)
For a given boolean formula ϕ in the 3 CN F form, the
MAX-3SAT is theproblem to find k that is maximal possible number that can be satisfied in ϕ. Note that the reduction that has been presented in the previous proof is an S -reduction from the MAX-3SAT problem to the 2
LFS problem. In the reductionwe use the 3
CN F form with exactly three literals in every clause. It has beenproved in [12] that such a form of the
MAX-3SAT cannot be approximatedby polynomial algorithm with approximation factor better than . Since ourreduction is an S -reduction also 2 LFS cannot have better approximation bypolynomial time algorithm. Inapproximability easily generalized to the k LFS for k ≤ , it is enough to repeat construction with σ js = σ js for j > . Analysing the same reduction and using the same inapproximability result[12], it can be easily proved that there is no polynomial time algorithm whichapproximate the 2 U problem with the factor better than unless P = N P.
Theorem 4.
There is no polynomial time algorithm which approximate the U problem with the factor better than unless P = N P.
Theorem 5.
There is an S -reduction from Clique to n LFS and from
Ver-texCover to n LFS .Proof.
Let G = ( V, E ) be undirected graph, where V = [ n ] . W define (cid:104) Γ s , Γ t (cid:105) , where Γ s = ( σ s , . . . , σ ns ) and Γ t = ( σ t , . . . , σ nt ) . Firstly define permutation σ is . Let V − i = V \ { i } . Split V − i into two disjoin sets U i , W i which satisfies: (1) V − i = U i ∪ W i , (2) ∀ j ∈ U i ¬ jEi and (3) ∀ j ∈ W i jEi. A sequence a is non repeating if there is no element in a occuring twice. Let a i and b i be a increasing non repeating sequences of all elements respectivelyfrom U i and W i . Define σ is as ( i ) · a i · b i . The second permutation σ it is definedas a i · ( i ) · b i . Remark 4.
If in G there is a clique K of the size m, then (cid:104) Γ s , Γ t (cid:105) has feasiblesolution of of the size m. Remark 5.
If the size of maximal clique in graph G equals m, then (cid:104) Γ s , Γ t (cid:105) hasno solution of length greater than m. Reduction presented above is an S -reduction because the reduction estab-lishes correspondence between solutions of MaxClique and n LFS , moreoverthe size of corresponding solutions is the same as well as the size of the optimalsolutions. n Tractability of Ulam’s Metric in Higher Dimensions 9
Like in the proof of Lemma 1 presented S -reduction is also a reduction from MinVertexCover to n U . This is because the graph G which is an instance ofthe MinVertexCover problem is also an instance of the
MaxClique problemand solution B of Γ which is an instance of the n LFS problem corresponds to[ n ] \ B which is the solution of the same Γ which is an instance of the n U thistime. (cid:117)(cid:116) By H˚astad and Zuckerman results [11], [26] we obtain the following nonap-proximability theorem:
Theorem 6.
The approximation of n LFS problem within n − (cid:15) is NP -hard, forany (cid:15) > . Since there is S -reduction from MinVertexCover to n U , lower bound forapproximation factor of MinVertexCover is also the lower bound for ap-proximation factor of n U . As a conclusion from Khot and Regev result [16] weobtain: Theorem 7.
The approximation of n U problem by polynomial time algorithmwithin the factor − (cid:15) is not possible unless The Unique Game Conjecture is nottrue. Let G = ( V, E ) be an undirected graph. Product of graph G, denoted by G , is a graph with set of vertices V = V × V and set of edges defined as E == { (( u, u (cid:48) ) , ( v, v (cid:48) )) | either u = v ∧ ( u (cid:48) , v (cid:48) ) ∈ E or ( u, v ) ∈ E } . The proof ofthe next theorem we precede by recalling simple lemma. The proof of the lemmacan be found in [20], chapter 13.
Lemma 2.
Graph G has a clique of size k if and only if graph G has a cliqueof size k . Theorem 8.
Approximation of √ n LFS within n − (cid:15) , for any (cid:15) > , is NP -hard.Proof. In this proof we exploit the idea of construction presented in the proofof Lemma 2). Assume that n = ν . Let Γ = (cid:104) ( σ s , . . . , σ νs ) , ( σ t , . . . , σ νt ) (cid:105) , where σ is , σ it ∈ S ν . Let us define auxiliary function f i . Let f i : [ ν ] (cid:55)→ [ iν ] \ [( i − ν ]satisfy equation f i ( k ) = ( i − ν + k. Let λ = ( a , . . . , a ν ) ∈ [ ν ] ν . If [ ν ] is domainof f and the function is total over this domain, we write f ( λ ) to denote tuple( f ( a ) , f ( a ) , . . . , f ( a ν )) . We will denote by (cid:74) the generalized concatenationof sequences. If a = ( i , i , . . . , i ν ) is a sequence of indexes, λ , λ , . . . , λ ν is asequence of finite sequences, then (cid:74) k → a λ k denotes concatenation λ i · λ i · · · λ i ν . We will define sequence pair Λ = (cid:104) ( λ s , . . . , λ νs ) , ( λ t , . . . , λ νt ) (cid:105) . Define λ is , λ it ∈ S n by the following equations λ is = (cid:75) k → σ is f k ( σ is ) λ it = (cid:75) k → σ it f k ( σ it ) . Remark 6. If Γ = (cid:104) ( σ s , . . . , σ νs ) , ( σ t , . . . , σ νt ) (cid:105) has feasible solution of size m then Λ = (cid:104) ( λ s , . . . , λ νs ) , ( λ t , . . . , λ νt ) (cid:105) has solution of size m . Remark 7. If Λ = (cid:104) ( λ s , . . . , λ νs ) , ( λ t , . . . , λ νt ) (cid:105) has solution of size m then Γ = (cid:104) ( σ s , . . . , σ νs ) , ( σ t , . . . , σ νt ) (cid:105) has solution of size m. Now we will show, that if there exists polynomial algorithm solving the √ n LFS problem, with approximation factor within O ( n − (cid:15) ) for some 0 < (cid:15) < , then there exists polynomial time algorithm that approximates ν LFS with fac-tor ν − γ for some 0 < γ < . Instances of the ν LFS consist of permutationsfrom S ν . Asssume existence of polynomial time algorithm C that approximates √ n LFS with factor n − (cid:15) and let the polynomial be denoted by p. Approximation algo-rithm B for ν LFS works as follows:1. Create Λ = (cid:104) ( λ s , . . . , λ √ ns ) , ( λ t , . . . , λ √ nt ) (cid:105) like it was defined previously.2. Run algorithm C . Assume that it has returned set J ⊆ [ n ] .
3. Let W = { l | ∃ r ∈ J l = block ( r ) } and H ( l ) = { inblock ( r ) | r ∈ J and l = block ( r ) } . Establish α = max {| H ( l ) | | l ∈ [ ν ] } and β = max { l | | H ( l ) | = α } . If α > | W | return H ( β ) else return W. We conclude that, only one inequality, either | W | < (cid:112) | J | or | H ( β ) | < (cid:112) | J | canbe true. Thus solution returned by B is not smaller than (cid:112) | J | . Time complexityof the B first step can be estimated at O ( ν ) . The complexity of the second stepis O ( p ( ν )) = O ( p ( n )) . The third step can be implemented in time complexity O ( nν ) = O ( n ) . Now estimate approximation factor. By assumption aboutapproximation factor of C , we have | Opt √ n LFS ( Λ ) ||C ( Λ ) | ≤ n − (cid:15) = ν − (cid:15) ) for any instance Λ. The outcome of algorithm B satisfies |B ( Γ ) | ≥ (cid:112) |C ( Λ ) | = (cid:112) | J | But also by Remarks 6 and 7 the following equation holds | Opt ν LFS ( Γ ) | = (cid:113) | Opt √ n LFS ( Λ ) | . Therefore | Opt ν LFS ( Γ ) ||B ( Γ ) | ≤ (cid:115) | Opt √ n LFS ( Λ ) ||C ( Λ ) | ≤ (cid:112) ν − (cid:15) ) = ν − (cid:15) It means that the ν LFS problem has polynomial time approximation algorithmwith factor ν − (cid:15) . Contradiction with Theorem 7. (cid:117)(cid:116)
Our reduction that transforms an instance Γ of the n LFS problem to an in-stance Λ of the √ n LFS problem can be repeated to Λ again. Therefore repeatingthis construction c times, where c is nonnegative integer we obtain N P -hardnessof approximation for n / c LFS problem within n − (cid:15) . Hence we have: n Tractability of Ulam’s Metric in Higher Dimensions 11 Theorem 9.
For any constant c ∈ N , approximation of the n / c LFS problemwithin n − (cid:15) is NP -hard, for any (cid:15) > . Theorem 10.
For any constance c < n, the approximation of n /c U problemby polynomial time algorithm within the factor − (cid:15) is not possible unless TheUnique Game Conjecture is not true.Proof. (Sketch). Let n = ν c . Consider the following reduction from ν U to n /c U .For a given instance Γ = (cid:104) ( σ s , . . . , σ νs ) , ( σ t , . . . , σ νt ) (cid:105) of ν U , let λ is = (cid:75) k → (1 ,...,ν c − ) f k ( σ is ) λ it = (cid:75) k → (1 ,...,ν c − ) f k ( σ it ) . The Λ = (cid:104) ( λ s , . . . , λ νs ) , ( λ t , . . . , λ νt ) (cid:105) is an instance of n /c U . If there exists algo-rithm C, that returns feasible solution J which is smaller than (2 − (cid:15) ) | Opt n /c U ( Λ ) | , then for M = argmin k ∈ J | H ( k ) | and l ∈ M, the H ( l ) is feasible solution of Γ and | H ( l ) | ≤ (2 − (cid:15) ) | Opt ν U ( Γ ) | . (cid:117)(cid:116) Theorem 11.
For any constant c, the n / c LFSD problem is W [1] -hard.Proof. (Sketch). Previously we have noticed that if a ( f, g ) is an S -reduction then f is an f pt − reduction. In the proof of Theorem 5 we show the S -reduction from Clique to n LFSD . Hence there is f pt -reduction from
Clique parametrized bythe size of required clique to n LFSD parametrized by the required size of setwhich induces common sequences for all pairs of permutations. Since the
Clique is W [1] − hard the parametrized n LFSD is W [1]-hard under f pt -reductions.In the proof of Theorem 8 we defined polynomial time reduction which for agiven instance Γ of n LFSD returns an instance Λ of √ n LFSD . Moreover the Λ has solution of the size m iff the Γ has solution of the size m. This reductionobviously satisfies conditions (1) and (2) of the f pt -reduction definition. Thecondition (3) is satisfied by function h ( y ) = y . It can be shown by induction over the c that the same reduction works asreduction of n / c LFSD to n / c +1 LFSD . Hence we obtain W [1]-hardness of the n / c LFSD problem, for any positive integer constant c. (cid:117)(cid:116) References
1. Aldous, D., Diaconis, P.: Longest increasing subsequences: From patience sortingto the baik-deift-johansson theorem. Bull. Amer. Math. Soc 36, 413–432 (1999)2. Baik, J., Deift, P., Johansson, K.: On the distribution of the length of the longestincreasing subsequence of random permutations. J. Amer. Math. Soc. 4, 1119—-1178 (1999)3. Blum, C., Aguilera, M., Roli, A., Sampels, M.: Hybrid metaheuristics. an emergingapproach to optimization. Studies in Computational Intelligence 114 (2008)4. Blum, C., Roli, A.: Metaheuristics in combinatorial optimization: Overview andconceptual comparison. ACM Computing Surveys 35(3), 268–308 (2003)5. Bona, M.: Combinatorics of Permutations. CRC Press, Inc. (2004)2 Sebastian Bala, Andrzej Kozik6. Burke, E., Gendreau, M., Hyde, M., Kendall, G., Ochoa, G., Ozcan, E., Qu, R.:Hyper-heuristics: a survey of the state of the art. Journal of Operations ResearchSociety 64, 1695–1724 (2013)7. Corwin, I.: Commentary on “longest increasing subsequences: from patience sortingto the baik-deift-johansson theorem” by david aldous and persi diaconis. Bull.Amer. Math. Soc. 55, 363–374 (2018)8. Crescenzi, P.: A short guide to approximation preserving reductions. In: Proceed-ings of the Twelfth Annual IEEE Conference on Computational Complexity, Ulm,Germany, June 24-27, 1997. pp. 262–273. IEEE Computer Society (1997)9. Flum, J., Grohe, M.: Parameterized Complexity Theory. Texts in Theoretical Com-puter Science. An EATCS Series, Springer (2006)10. Fredman, M.: On computing the length of longest increasing subsequences. DiscreteMathematics 11, 29–35 (1975)11. H˚astad, J.: Clique is hard to approximate within n1-epsilon. In: 37th Annual Sym-posium on Foundations of Computer Science, FOCS ’96, Burlington, Vermont,USA, 14-16 October, 1996. pp. 627–636. IEEE Computer Society (1996)12. H˚astad, J.: Some optimal inapproximability results. J. ACM 48(4), 798–859 (2001)13. Hunt, J., Szymanski, T.: A fast algorithm for computing longest common subse-quences. Commun. ACM 20(5), 350–353 (1977)14. Imahori, S., Yagiura, M., Ibaraki, T.: Improved local search algorithms for the rect-angle packing problem with general spatial costs. European Journal of OperationalResearch 167, 48–67 (2005)15. Kahng, A.B., L.J.M.I.H.J.: VLSI Physical Design: From Graph Partitioning toTiming Closure. Springer, New York (2011)16. Khot, S., Regev, O.: Vertex cover might be hard to approximate to within 2-epsilon.J. Comput. Syst. Sci. 74(3), 335–349 (2008)17. Kozik, A.: Handling precedence constraints in scheduling problems by the sequencepair representation. J. Comb. Optim. 33(2), 445–472 (2017)18. Kozik, A.: Scheduling under the network of temporo-spatial proximity relation-ships. Computers and Operations Research 84, 106–115 (2017)19. Murata, H., Fujiyoshi, K., Nakatake, S., Kajitani, Y.: VLSI module placementbased on rectangle-packing by the sequence pair. IEEE Trans. on CAD of ICs. 15,1518–1524 (1996)20. Papadimitriou, C.M.: Computational complexity. Addison-Wesley, Reading, Mas-sachusetts (1994)21. Pinedo, M.L.: Scheduling. Theory, Algorithms, and Systems. Springer-Verlag, NewYork (2012)22. Romik, D.: The Surprising Mathematics of Longest Increasing Subsequences. Cam-bridge University Press, New York (2015)23. Toth, P., V.D.: The vehicle routing problem. Society for Industrial and AppliedMathematics, Philadelfia (2002)24. Ulam, S.: Some ideas and prospects in biomathematics. Ann. Rev. Biophys. Bioeng.1, 277–292 (1972)25. Vazirani, V.V.: Approximation algorithms. Springer (2001)26. Zuckerman, D.: Linear degree extractors and the inapproximability of max cliqueand chromatic number. Theory of Computing 3(1), 103–128 (2007)n Tractability of Ulam’s Metric in Higher Dimensions 13
Proof.
We consider two cases (1) if i ∈ K and (2) if i (cid:54)∈ K. A conditional split of K is defined to be a pair of disjoin sets K + i and K − i that satisfy the followingconditions:1. K + i ∪ K − i = (cid:26) K if i (cid:54)∈ KK \ { i } if i ∈ K ∀ j ∈ K − i ¬ jEi ∀ j ∈ K + i jEi. We will denote by α i the non repeating sequence of all elements from K − i in theincreasing order, by β i the non repeating sequence of all elements from K + i inthe increasing order. It is easily seen that depending on if i ∈ K or i (cid:54)∈ K thejoin sequence α i · β i has either | K | − | K | elements.Notice that in case i ∈ K the sequence α i is empty and β i consists of elementsfrom K \ { i } . In this case σ is contains subsequence ( i ) · β i . In permutation σ is element i appears as the first element of the sequence. Since β i contains elementsfrom K + i and K + i , by definition, is a subset of W i and both b i and β i have thesame order, then β i is subsequence of b i . Permutation σ it contains subsequence( i ) · b i in this case. Thus σ it also contains subsequence ( i ) · β i . Hence both per-mutations σ is and σ it contain subsequence ( i ) · β i . The sequence ( i ) · β i consistsof m elements.Consider the case i (cid:54)∈ K. In this case α i may not be empty sequence, unlikeit was previously. Since K − i ⊆ U i and K + i ⊆ W i , the sequence α i is subsequenceof a i and β i is subsequence of b i . In permutation σ is , element i precede a i · b i ,α i · β i is subsequence of a i · b i . Hence α i · β i is subsequence of ( i ) · a i · b i = σ is . By definition σ it = a i · ( i ) · b i . Hence α i · β i is subsequence of σ it . The length of α i · β i , which is common subsequence of σ is and σ it , is m. (cid:117)(cid:116) Proof.
Suppose that some B ⊆ V, which satisfies | B | > m, induces subsequencesfor all ( σ is , σ it ) . Subgraph of G induced by B cannot be a clique. Therefore, thereare α, β ∈ B, such that ¬ αEβ. In permutation σ αs element α precedes β because,by definition of σ αs , α precedes all other members of V − α . In permutation σ αt elements from a α precedes α. By definitions of U α and a α we have β occurs in a α . Thus α and β appear in σ αt and σ αs in reverse order. Therefore, there is nosequence indicated by B which is common subsequence of σ αt and σ αs . This iscontradiction. (cid:117)(cid:116)
Proof.
Let B ⊆ [ ν ] , which induces subsequence for all ( σ xs , σ xt ) . Any pair ofdifferent elements i, j ∈ B appears in the same order in σ xs and σ xt for all x ∈ [ ν ] . This means that i occurs in the earlier position than j in σ xt if and only if i occurs in the earlier position than j in σ xs . The definition of ( λ xs , λ xt ) impliesthat for any l ∈ [ ν ] elements ( l − ν + i and ( l − ν + j appears in the sameorder in sequences f l ( σ xs ) and f l ( σ xt ) . Notice that for any i, j, k, l ∈ B elements α = ( i − ν + k and β = ( j − ν + l appear in the same order in all pairs ofpermutations λ xs , λ xt . For i (cid:54) = j, this is because α stands before β in λ xs if and onlyif all elements f i ([ ν ]) appear before elements f j ([ ν ]) . Similarly, α stands before β in λ xt if and only if all elements f i ([ ν ]) appear before elements f j ([ ν ]) . Weclaim that B = { ( j − ν + k | j, k ∈ B } induces solution of Λ. On the contrary,suppose that B do not induces common subsequence of all pairs ( λ xs , λ xt ) . Thewe could find y such that B -induced sequences ρ and γ, respectively of λ ys and λ yt , are difference. Then there are elements ( i − ν + l and ( j − ν + k thatcause first difference in ρ and γ. Thus either i (cid:54) = j and y equals to one of i, j or i = j and y equals to one of k, l. For both cases B can not induce commonsubsequence of σ ys and σ yt . This is contradiction. (cid:117)(cid:116)
Proof.
Assume that there is J ⊆ [ n ] of the size m that induces solution of Λ. Define auxiliary functions block and inblock both of type [ n ] (cid:55)→ [ ν ] : block ( s ) = (( s − ÷ ν ) + 1 , inblock ( s ) = (( s −
1) mod ν ) + 1Let W = { l | ∃ r ∈ J l = block ( r ) } and H ( l ) = { inblock ( r ) | r ∈ J and l = block ( r ) } . First, notice that J = (cid:83) l ∈ W { s ∈ J | inblock ( s ) ∈ H ( l ) } . Now it is easyto see if | W | < m, then there exists l such that | H ( l ) | ≥ m. Hence either W isa set that indicates Γ solution or H ( l ) indicates solution of Γ. (cid:117)(cid:116) Proof.
Assume that there is polynomial time algorithm A which approximatesthe 2 U problem with the factor 1 + − (cid:15) for some > (cid:15) > . Let A ( Γ ( ϕ )) bea solution for the instance (cid:104) Γ s , Γ t (cid:105) of the 2 U problem which was created in theproof of the Theorem 3. Denote by |A ( Γ ( ϕ )) | the size of set returned by A onthe input Γ ( ϕ ) . Let 2 m + k be the optimal solution of the 2 U for an instance Γ ( ϕ ) , where m is the number of clauses in a ϕ which was encoded in Γ ( ϕ ) withinthe proof the Theorem 3. The 2 m + k is the size of the smallest feasible solutionfor a Γ ( ϕ ) if and only if m − k is the maximal number of clauses that can besatisfied in ϕ. Let opt ϕ = m − k We have that |A ( Γ ( ϕ )) | ≤ (2 m + k ) (cid:18) − (cid:15) (cid:19) (3) n Tractability of Ulam’s Metric in Higher Dimensions 15 Let A (cid:48) ( Γ ( ϕ )) be an algorithm that executes A on the input Γ ( ϕ ) and returns[3 m ] \ Z, where A returns Z on the input Γ ( ϕ ) . The [3 m ] \ Z is the feasible solutionfor instance Γ ( ϕ ) of the problem 2 LFS as well as the κ − ( Z ) is the satifiablitywitness for at least | [3 m ] \ Z | clauses of ϕ. Since A ( Γ ( ϕ )) = Z and by inequality(3) we have: |A (cid:48) ( Γ ( ϕ )) | = | [3 m ] \ Z | ≥ ( m − k ) − (cid:18) − (cid:15) (cid:19) (2 m + k ) (4)18 − (cid:18) − (cid:19) ( m − k ) ≥ (cid:18) − (cid:19) (cid:18) m (cid:19) = 3 140 (cid:18) m (cid:19) ≥ k (5)If ϕ is a formula in the 3 CN F form, then there exists assignment that satisfies atleast half of the ϕ clauses. This fact we used to btained inequalities (5) . Indeed, m − k is the maximal number of ϕ clauses which can be assigned to true, then m − k ≥ / m and the k denotes the number of clauses which are not assignedto true in the optimal assignment, then 1 / m ≥ k . Therefore (cid:18) − (cid:19) ( m − k ) ≥ k
18 ( m − k ) ≥ m − k ) + 3 140 k ( m − k ) −
78 ( m − k ) ≥
140 (2 m + k )( m − k ) −
140 (2 m + k ) ≥
78 ( m − k ) (6)It is easy to note that (cid:15) (2 m + k ) ≥ (cid:15) ( m − k ) (7)Adding sides of inequalities (6) and (7) we obtain:( m − k ) −
140 (2 m + k ) + (cid:15) (2 m + k ) ≥
78 ( m − k ) + (cid:15) ( m − k )( m − k ) − (cid:18) − (cid:15) (cid:19) (2 m + k ) ≥ (cid:18)
78 + (cid:15) (cid:19) ( m − k ) = (cid:18)
78 + (cid:15) (cid:19) opt ϕ (8)The left side of inequality (8) is equal to the left side of inequality (4). Thus |A (cid:48) ( Γ ( ϕ )) | = | [3 m ] \ Z | ≥ (cid:18)
78 + (cid:15) (cid:19) opt ϕ We have shown that A (cid:48) is an approximation algorithm solving Max-3SAT with approximation factor + (cid:15) for some > (cid:15) > . By result from [12] itis possible only under assumption that P = N P.