{"paper_meta":{"paper_id":"arxiv:0709.0677","title":"0709.0677","authors":[],"year":null,"published":null,"updated":null,"venue_or_source":"arxiv-papers-shard","primary_category":"cs","secondary_categories":[],"doi":null,"license":"unknown","source_type":"pdf+shard","source_url":null,"pdf_url":null},"abstract":{"raw":"","cleaned":"","offsets":[]},"full_paper_text":{"raw_ordered_text":"arXiv:0709.0677v1 [cs.CC] 5 Sep 2007\nOn the Complexity of Protein Local Structure Alignment Under\nthe Discrete Fr ́echet Distance\nBinhai Zhu ∗\nAbstract\nProtein structure alignment is a fundamental problem in computational and structural bi-\nology. While there has been lots of experimental/heuristic methods and empirical results, very\nlittle is known regarding the algorithmic/complexity aspects of the problem, especially on pro-\ntein local structure alignment.\nA well-known measure to characterize the similarity of two\npolygonal chains is the famous Fr ́echet distance and with the application of protein-related\nresearch, a related discrete Fr ́echet distance has been used recently. In this paper, following\nthe recent work of Jiang, et al. we investigate the protein local structural alignment problem\nusing bounded discrete Fr ́echet distance. Given m proteins (or protein backbones, which are\n3D polygonal chains), each of length O(n), our main results are summarized as follows.\n• If the number of proteins, m, is not part of the input, then the problem is NP-complete;\nmoreover, under bounded discrete Fr ́echet distance it is NP-hard to approximate the max-\nimum size common local structure within a factor of n1−ǫ. These results hold both when\nall the proteins are static or when translation/rotation are allowed.\n• If the number of proteins, m, is a constant, then there is a polynomial time solution for\nthe problem.\nKeywords: Protein structure alignment, Fr ́echet distance, Discrete Fr ́echet distance, Approxima-\ntion, NP-hardness\n∗Department of Computer Science,\nMontana State University, Bozeman,\nMT 59717-3880,\nUSA. Email:\nbhz@cs.montana.edu.\nManuscript\nSeptember 5, 2007\n\n1\nIntroduction\nAs a famous distance measure in the field of abstract spaces, Fr ́echet distance was first defined\nby Maurice Fr ́echet a century ago [7]. Alt and Godau first used it in measuring the similarity of\npolygonal chains in 1992 [1]. It is well known that the Fr ́echet distance between two two-dimensional\n(2D) polygonal chains (polylines) can be computed in polynomial time [1, 2], and even under\ntranslation or rotation (though the running time is much higher) [3]. In three-dimensional space\n(3D), Wenk should that given two chains with sum of length N, the minimum Fr ́echet distance\nbetween them can be computed in O(N 3f+2 log N) time, where f is the degree of freedom for\nmoving the chains [22]. So with translation alone this minimum Fr ́echet distance can be computed\nin in O(N 11 log N) time, and when both translation and rotation are allowed the corresponding\nminimum Fr ́echet distance can be computed in O(N 20 log N) time. These results can be generalized\nto any fixed dimensions [22]. While computing (approximating) Fr ́echet distance for surfaces is in\ngeneral NP-hard [8, 12], it is polynomially solvable for restricted surfaces [4].\nIn 1994, Eiter and Mannila defined the discrete Fr ́echet distance between two polygonal chains\nA and B (in any fixed dimensions) and it turns out that this simplified distance is always realized\nby two vertices in A and B [6]. They also showed that with dynamic programming the discrete\nFr ́echet distance between them can be computed in O(|A||B|) time.\nRecently, Jiang, Xu and Zhu applied the discrete Fr ́echet distance in (globally) aligning the\nbackbones of proteins (which is called the protein structure-structure alignment or more generally,\nthe protein global alignment problem) [14]. In fact, in this application the discrete Fr ́echet distance\nmakes more sense as the backbone of a protein is simply a polygonal chain in 3D, with each vertex\nbeing the alpha-carbon atom of a residue. So if the (continuous) Fr ́echet distance is realized by an\nalpha-carbon atom and some other point which does not represent an atom, it is not meaningful\nbiologically. Jiang, et al. showed that given two 2D (or 3D) polygonal chains the minimum discrete\nFr ́echet distance between them, under both translation and rotation, can be computed in polynomial\ntime. They also applied some ideas therein to design an efficient heuristic for the original protein\nstructure-structure alignment problem in 3D and the empirical results showed that their alignment\nis more accurate compared with previously known solutions.\nIn essence, the result of Jiang, Xu and Zhu [14] implies that the protein global alignment\nproblem, which is to find all proteins in a given set P similar to a query protein or some protein\nin P (under translation and rotation), is polynomially solvable.\nHowever, very little algorith-\nmic/complexity results is known regarding the protein local structure alignment problem. The\nonly such recent result was due to Qian, et al. who showed that under the RMSD distance the\nproblem is NP-complete but admits a PTAS [19].\nOn the other hand, there have been lots of\nexperimental/heuristic methods with practical systems since 1989, e.g., SSAP [21], DALI [11, 10],\nCATH [17], CE [20], SCOP [5], MAMMOTH [18] and TALI [16]. In this paper, we show that if\n1\n\nmany proteins are given then the local structure alignment problem, under the discrete Fr ́echet\ndistance, is very hard; on the other hand, if only a small number of proteins are given then there\nis a polynomial time solution for the problem.\nThe paper is organized as follows. In Section 2, we introduce some basic definitions regarding\nFr ́echet distance and review some known results. In Section 3, we show the hardness result for the\nprotein local structure alignment problem. In Section 4, we show how to solve the problem when\nm is a constant. In Section 5, we conclude the paper with several open problems.\n2\nPreliminaries\nGiven two 3D polygonal chains A, B with |A| = k and |B| = l vertices respectively, we aim at\nmeasuring the similarity of A and B (possibly under translation and rotation) such that their\ndistance is minimized under certain measure. Among the various distance measures, the Hausdorff\ndistance is known to be better suited for matching two point sets than for matching two polygonal\nchains; the (continuous) Fr ́echet distance is a superior measure for matching two polygonal chains,\nbut it is not quite easy to compute [1].\nLet X be the Euclidean space R3; let d(a, b) denote the Euclidean distance between two points\na, b ∈X. The (continuous) Fr ́echet distance between two parametric curves f : [0, 1] →X and\ng : [0, 1] →X is\nδF(f, g) = inf\nα,β max\ns∈[0,1] d(f(α(s)), g(β(s))),\nwhere α and β range over all continuous non-decreasing real functions with α(0) = β(0) = 0 and\nα(1) = β(1) = 1 1.\nImagine that a person and a dog walk along two different paths while connected by a leash;\nmoreover, they always move forward, possibly at different paces. Intuitively, the minimum possible\nlength of the leash is the Fr ́echet distance between the two paths. To compute the Fr ́echet distance\nbetween two polygonal curves A and B (in the Euclidean plane) of |A| and |B| vertices, respectively,\nAlt and Godau [1] presented an O(|A||B| log2(|A||B|)) time algorithm.\nLater this bound was\nreduced to O(|A||B| log(|A||B|)) time [2].\nWe now define the discrete Fr ́echet distance following [6].\nDefinition 2.1 Given a polygonal chain (polyline) in 3D, P = ⟨p1, . . . , pk⟩of k vertices, a m-\nwalk along P partitions the path into m disjoint non-empty subchains {Pi}i=1..m such that Pi =\n⟨pki−1+1, . . . , pki⟩and 0 = k0 < k1 < · · · < km = k.\nGiven two 3D polylines A = ⟨a1, . . . , ak⟩and B = ⟨b1, . . . , bl⟩, a paired walk along A and\nB is a m-walk {Ai}i=1..m along A and a m-walk {Bi}i=1..m along B for some m, such that, for\n1This definition holds in any fixed dimensions.\n2\n\n1 ≤i ≤m, either |Ai| = 1 or |Bi| = 1 (that is, Ai or Bi contains exactly one vertex). The cost of\na paired walk W = {(Ai, Bi)} along two paths A and B is\ndW\nF (A, B) = max\ni\nmax\n(a,b)∈Ai×Bi\nd(a, b).\nThe discrete Fr ́echet distance between two polylines A and B is\ndF (A, B) = min\nW dW\nF (A, B).\nThe paired walk that achieves the discrete Fr ́echet distance between two paths A and B is also called\nthe Fr ́echet alignment of A and B.\nConsider the scenario in which the person walks (jumps) along A and the dog along B. Intu-\nitively, the definition of the paired walk is based on three cases:\n1. |Bi| > |Ai| = 1: the person stays and the dog moves (jumps) forward;\n2. |Ai| > |Bi| = 1: the person moves (jumps) forward and the dog stays;\n3. |Ai| = |Bi| = 1: both the person and the dog move (jump) forward.\nb\no\no\n(I)\n(II)\na\na\na\na\na\n1\n2\n3\n2\n3\nb1\n2\nb1\n2\nb\nb\n1\na\nFig. 1. The relationship between discrete and continuous Fr ́echet distances.\nEiter and Mannila presented a simple dynamic programming algorithm to compute dF (A, B)\nin O(|A||B|) = O(kl) time [6]. Recently, Jiang, et al. showed that the minimum discrete Fr ́echet\ndistance between two chains in 2D, A and B, under translation can be computed in O(k3l3 log(k+l))\ntime, and under both translation and rotation it can be computed in O(k4l4 log(k + l)) time [14].\nFor 3D chains these bounds are O(k4l4 log(k +l)) and O(k7l7 log(k +l)) respectively [14]. They are\nsignificantly faster than the corresponding bounds for the continuous Fr ́echet distance (certainly\ndue to a simpler distance structure), which are O((k + l)11 log(k + l)) and O((k + l)20 log(k + l))\nrespectively for 3D chains [22].\nWe comment that while the discrete Fr ́echet distance could be arbitrarily larger than the corre-\nsponding continuous Fr ́echet distance (e.g., in Fig. 1 (I), they are d(a2, b2) and d(a2, o) respectively),\nby adding sample points on the polylines, one can easily obtain a close approximation of the con-\ntinuous Fr ́echet distance using the discrete Fr ́echet distance (e.g., one can use d(a2, b) in Fig. 1 (II)\n3\n\nto approximate d(a2, o)). This fact was pointed before in [6, 13] and is supported by the fact that\nthe segments in protein backbones are mostly of similar lengths. Moreover, the discrete Fr ́echet\ndistance is a more natural measure for matching the geometric shapes of biological sequences such\nas proteins. As we mentioned in the introduction, in such an application, continuous Fr ́echet does\nnot make much sense to biologists.\nIn the remaining part of this paper, for the first time, we investigate the locally aligning a set\nof polygonal chains (proteins or protein backbones) in 3D, under the discrete Fr ́echet distance.\n3\nProtein Local Structure Alignment is Hard\nGiven a set of proteins modeled as simple 3D polygonal chains, the Protein Local Structure Align-\nment (PLSA) problem is defined as follows.\nInstance: Given a set m of proteins P1, P2, ..., Pm in 3D, each with length O(n), and a real\nnumber D.\nProblem: Does there exist a chain C of k vertices such that the vertices of C are from Pi’s, and\nC and a subsequence of Pi (1 ≤i ≤m) has discrete Fr ́echet distance at most D (under translation\nand rotation)?\nIf no translation and rotation is allowed, we call the corresponding problem static PLSA. For\nthe optimal version of the problem, we wish to maximize k when D is given. The (polynomial-time)\napproximation solution will also be referred to as approximating the optimal solution value k∗when\nit is hard to compute exactly. We will see that it is also hard to approximate k∗even for static\nPLSA. We first prove the following theorem.\nTheorem 3.1 Given D = δ, the static PLSA problem does not admit any approximation of factor\nn1−ǫ unless P=NP.\nProof.\nIt is easy to see that PLSA belongs to NP. We use a reduction from Independent Set to\nthe Protein Local Structure Alignment Problem. Independent Set is a well known NP-complete\nproblem which cannot be approximated within a factor of n1−ǫ [9]. The general idea is similar to\nthat of the longest common subsequence problem for multiple sequences [15], but our details are\nmuch more involved due to the geometric properties of the problem.\nGiven a graph G = (V, E), V = {v1, v2, · · · , vN}, E = {e1, e2, · · · , eM}, we construct M + 1 3D\nchains P0, P1, P2, ..., PM as follows. (We assume that the vertices and edges in G are sorted by their\ncorresponding indices.)\nThe overall reduction is as follows: P = {P0, P1, P2, ..., PM}, and\nP0 = ⟨v′\n1, v′\n2, · · · , v′\nn⟩,\n4\n\nwhere v′\ni = (i, i2, 0) is a 3D point for i = 1, ..., n.\nFor each er = (vi, vj) in G, we have a corresponding sequence (3D chain)\nPr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩,\nwhere v′\ni = (i, i2, 0) and v”i = (i, i2, δ) are 3D points for i = 1, ..., n and δ is an arbitrarily small\npositive real number less than 0.1.\nWe claim that G has an independent set of size k if and only if there is a chain C of k vertices\nsuch that the discrete Fr ́echet distance between C and a subsequence of Pr, Sr, is at most δ (i.e.,\ndF (C, Sr) ≤δ). The following claims are made with the detailed proofs left out.\nClaim A. Pr is a simple polygonal chain in 3D.\nClaim B. Sr is a simple polygonal chain in 3D with |Sr| = k.\nIf G has an independent set of size k, then the chain C can be constructed as follows. Let the\nindependent set of G be ordered as I = ⟨vi1, vi2, ..., vik⟩with i1 < i2 < ... < ik. For r = 0, 1, ..., M,\nwe scan Pr in a greedy fashion to obtain the first v′\nj or v”j such that the first component of its\ncoordinate is i1. Repeat this process to obtain Sr. Then let any Sr be C. Obviously, C has k\nvertices and |Sr| = k for r = 0, 1..., M.\nIf there is a chain C of k vertices such that the discrete Fr ́echet distance between C and a\nsubsequence of Pr, Sr, is at most δ (i.e., dF (C, Sr) ≤δ), then we can see the following.\nProperty (a) Let Pr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩, then\nd(v′\np, v”q) > 3 for all p ̸= q.\nProperty (b) Let Pr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩, then\nd(v′\np, v”p) ≤δ for all p ̸= i, p ̸= j.\nProperty (c) Let Pr = ⟨u1, u2, · · · , uO(n)⟩, then |d(up, uq) −d(up′, uq′)| >> δ as long as the first\ncomponents of the 4 coordinates of up, uq, up′, uq′ are all different.\nAs δ is very small, when dF (C, Sr) ≤δ, the vertices of C and Sr must be matched orderly in\na one-to-one fashion. (In other words, the man walking on C and the dog walking on Sr must\nmove/jump together at each vertex. Otherwise, dF (C, Sr) > 3 >> δ.) We now claim that the\n(ordered) vertices of C correspond to an independent set I of G; moreover, if C = ⟨C1, C2, · · · , Ck⟩\nand Cp = (xp, yp, zp), then vxp ∈I. Suppose that Cp = (xp, yp, zp), Cq = (xq, yq, zq) and vxp, vxq ∈I\nbut there is an edge et = (vxp, vxq) ∈E. By our construction of Pt (from et), v′\nxp and v”xq are not\nincluded in Pt and v′\nxq precedes v”xp in Pt. This is a contradiction.\nTo conclude the proof of this theorem, notice that the reduction take O(MN) time.\n⊓⊔\nIn the example shown in Figure 1, we have\nP1 = ⟨v′\n1, v′\n3, v′\n4, v′\n5, v”1, v”2, v”4, v”5⟩,\nP2 = ⟨v′\n1, v′\n3, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩,\nP3 = ⟨v′\n2, v′\n3, v′\n4, v′\n5, v”1, v”3, v”4, v”5⟩,\nP4 = ⟨v′\n2, v′\n3, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩,\n5\n\nv\nv\nv\n1\nv\ne\ne\ne\ne\n3\nv5\n2\n4\n1\n3\n2\ne\n4\n5\ne\n6\n2\n3\n4\n3D chain for e 3\n1\n5\nFigure 1. Illustration of a simple graph for the reduction.\nP5 = ⟨v′\n1, v′\n2, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩, and\nP6 = ⟨v′\n1, v′\n2, v′\n3, v′\n5, v”1, v”2, v”3, v”4⟩.\nAn example of P3 is shown in Figure 1 as well, in which case black nodes are on the Z = 0 plane\nand white nodes are on the Z = δ plane (apparently for the visualization reason, the XY-plane\nis slanted). The solid segments are on the Z = 0 plane, the dotted segments are on the Z = δ\nplane and the only dashed segment connects two points on different planes. Corresponding to the\noptimal independent set {v1, v3, v5} in G, the optimal local alignment C = ⟨v′\n1, v′\n3, v′\n5⟩matches P3\nat its subsequence S3 = ⟨v”1, v”3, v”5⟩.\nCorollary 3.1 Given D = δ and when both translation and rotation are allowed, the (maximization\nversion of) PLSA problem does not admit any approximation of factor n1−ǫ unless P=NP.\nProof. Due to Property (a), (b) and (c), translation/rotation will not be able to generate another\nC′ which is topologically different from C.\n⊓⊔\nNotice that in our proof all the adjacent vertices in C could be non-adjacent in Pi, for i =\n0, 1, ..., m. Biologically, this might be a problem as one residue alone sometimes cannot carry out\nany biological function. Define a c-substring or a c-subchain of Pi as a continuous subchain of Pi\nwith at least c vertices. Unfortunately, even if we introduce this condition by forcing that C is\ncomposed of k ordered c-substrings of each Pi, for some constant c, the above proof can be modified\nto maintain a valid reduction from Independent Set. Call this corresponding problem Protein c-\nLocal Structure Alignment (PcLSA), in which C must be composed of k ordered c-subchains of\neach Pi. We have the following corollary.\nCorollary 3.2 The maximization version of PcLSA does not admit any approximation of factor\nn1−ǫ unless P=NP.\n4\nPolynomial Time Solutions for PLSA When m is Small\nIn this section, we present a polynomial time solution for the PLSA problem when m is a constant.\nWe first show a dynamic programming solution for the static PLSA and then we show how to use\n6\n\nthat as a subroutine for the general PLSA problem, when m is small.\n4.1\nA Dynamic Programming Solution for the Static PLSA When m is Small\nIn this subsection, we present a dynamic programming solution for the static PLSA problem when\nm is small. Such a solution can be used as a subroutine for the general PLSA problem. We first\nconsider the case when m = 2. Besides C, we try to maximize the length of the aligned subsequences\nin P1 = A and P2 = B with |A| = n1, |B| = n2. For the ease of description, we only show how to\nobtain these lengths which are stored in D[−, −, −, −] and M[−, −, −, −] respectively. It is easy to\nreconstruct C from these arrays.\nLet A[i1, i2] be a subchain of A starting from the index i1 and ending at the index i2. Let\nB[j1, j2] be a subchain of B starting from the index j1 and ending at the index j2. D[i1, i2, j1, j2]\nstores the length of the aligned subsequences of A[i1, i2] as a consequence of the alignment of C\nand A[i1, i2], and C and B[j1, j2]. M[i1, i2, j1, j2] is defined symmetrically.\nIntuitively D[−, −, −, −] stores the length of aligned subsequences from chain A (dog’s route)\nand M[−, −, −, −] stores the length of aligned subsequences from chain B (man’s route). Define\nTF (i1, i2, j1, j2) as the sum of aligned subsequences in both A[i1, i2] and B[j1, j2]. Writing A[i] as\nai and B[j] as bj, we have the dynamic programming solution as follows.\nTF(i1, i2, j1, j2) = D(i1, i2, j1, j2) + M(i1, i2, j1, j2),\nwhere\nD(i1, i2, j1, j2) = max\n \n \n \n \n \n \n \n \n \nmaxi1≤k1 δ.\n(3)\nThe final solution value is stored in TF [1, n1, 1, n2]. We have the following theorem.\n7\n\nTheorem 4.1 When m = 2, the static PLSA problem can be solved in O(n4) time and space.\nIt is easy to generalize this algorithm to the more general case when m is some constant. We\nthus have the following corollary.\nCorollary 4.1 When m is a constant, the static PLSA problem can be solved in O(m3n2m) time\nand O(mn2m) space.\n4.2\nA Polynomial Time Solution for PLSA When m is Small\nApparently, for any solution for PLSA we should allow translation and rotation. When m = 2\nand when both translation and rotation are allowed, we can use a method similar to that in [14]\nto compute the optimal local alignment with fixed δ.\nThe idea is as follows.\nWithout loss of\ngenerality, we assume that A is static and we translate/rotate B and let τ(B) be the copy of B\nafter some translation/rotation. Let |A| = n1, |B| = n2 and let f be the degree of freedom for\nmoving B. As we are in 3D and both translation and rotation are allowed, we have f = 6. We\ncan enumerate all possible configurations for A and τ(B) to realize a discrete Fr ́echet distance of\nδ. There are O((n1n2)f) = O(n12) number of such configurations, following an argument similar\nto [22, 14]. Then for each configuration, we can use the above Theorem 4.1 to obtain the optimal\nlocal alignment for each configuration and finally we simply return the overall optimal solution.\nCorollary 4.2 When m = 2 and when both translation and rotation are allowed, the PLSA problem\ncan be solved in O(n16) time and O(n4) space.\nWe comment that when m is larger, but still a constant, the above idea can be carried over\nso that we will still be able to solve PLSA in polynomial time. It follows from [22, 14] that we\nhave O(nmf) = O(n6m) number of configurations between the m chains. Then we can again use\nCorollary 4.1 to obtain the optimal local alignment for each configuration. The overall complexity\nwould be O(n6m × m3n2m) = O(m3n8m) time and O(mn2m) space. Certainly, such an algorithm\nis only meaningful in theory.\nCorollary 4.3 When m is a constant and when both translation and rotation are allowed, the\nPLSA problem can be solved in O(m3n8m) time and O(mn2m) space.\n5\nConcluding Remarks\nIn this paper, for the first time, we study the complexity/algorithmic aspects of the famous protein\nlocal structure alignment problem under the discrete Fr ́echet distance. We show that the general\nproblem is NP-complete; in fact, it is even NP-hard to approximate within a factor of n1−ǫ. On\nthe other hand, when a constant number of proteins are given then the problem can be solved in\n8\n\npolynomial time. It would be interesting to see the empirical comparisons of protein local structure\nalignment under the discrete Fr ́echet distance with the existing methods. Another open problem,\nobviously, is whether it is possible to improve the running time of the dynamic programming\nalgorithms in Section 4.\nReferences\n[1] H. Alt and M. Godau. Measuring the resemblance of polygonal curves. In Proceedings of the\n8th Annual Symposium on Computational Geometry (SoCG’92), pages 102–109, 1992.\n[2] H. Alt and M. Godau. Computing the Fr ́echet distance between two polygonal curves. Intl. J.\nComputational Geometry and Applications, 5:75-91, 1995.\n[3] H. Alt, C. Knauer and C. Wenk. Matching polygonal curves with respect to the Fr ́echet\ndistance. In Proceedings of the 18th Annual Symposium on Theoretical Aspects of Computer\nScience (STACS’01), pages 63–74, 2001.\n[4] K. Buchin, M. Buchin and C. Wenk. Computing the Fr ́echet distance between simple polygons\nin polynomial time. In Proceedings of the 22nd Annual Symposium on Computational Geometry\n(SoCG’06), pages 80–87, 2006.\n[5] L. Conte, B. Ailey, T. Hubbard, S. Brenner, A. Murzin and C. Chothia. SCOP: a structural\nclassification of protein database. Nucleic Acids Res., 28:257-259, 2000.\n[6] T. Eiter and H. Mannila. Computing discrete Fr ́echet distance. Tech. Report CD-TR 94/64,\nInformation Systems Department, Technical University of Vienna, 1994.\n[7] M. Fr ́echet. Sur quelques points du calcul fonctionnel. Rendiconti del Circolo Mathematico di\nPalermo, 22:1-74, 1906.\n[8] M. Godau. On the complexity of measuring the similarity between geometric objects in higher\ndimensions. PhD thesis, Freie Universitaet Berlin, 1998.\n[9] J. H ̈astad. Clique is hard to approximate within n1−ǫ. Acta Mathematica, 182:105-142, 1999.\n[10] L. Holm and J. Park. DaliLite workbench for protein structure comparison. Bioinformatics,\n16:566-567, 2000.\n[11] L. Holm and C. Sander. Protein structure comparison by alignment of distance matrices. J.\nMol. Biol., 233:123-138, 1993.\n[12] P. Hui and M. Shaefer. Paired pointset traversal. In Proceedings of the 15th Annual Symposium\non Algorithms and Computation (ISAAC’04), pages 534-544, 2004.\n9\n\n[13] P. Indyk. Approximate nearest neighbor algorithms for Fr ́echet distance via product metrics.\nIn Proceedings of the 18th Annual Symposium on Computational Geometry (SoCG’02), pages\n102–106, 2002.\n[14] M. Jiang, Y. Xu and B. Zhu. Protein structure-structure alignment with discrete Fr ́echet\ndistance. In Proceedings of the 5th Asia-Pacific Bioinformatics Conf. (APBC’07), pages 131–\n141, 2007. (Revised version to appear in J. of Bioinformatics and Computational Biology.)\n[15] T. Jiang and M. Li. On the approximation of shortest common supersequences and longest\ncommon subsequences. SIAM J. Comput., 24(5):1122-1139, 1995.\n[16] X. Miao, P. Waddell and H. Valafar. TALI: Local alignment of protein structures using back-\nbone torsion angles. J. of Bioinformatics and Computational Biology., to appear, 2008.\n[17] C. Orengo, A. Michie, S. Jones, D. Jones, M. Swindles and J. Thornton. CATH—a hierarchic\nclassification of protein domain structures. Structure, 5:1093-1108, 1997.\n[18] A. Oritz, C. Strauss and O. Olmea. MMAMOTH (matching molecular models obtained from\ntheory): an automated method for model comparison. Protein Science, 11:2606-2621, 2002.\n[19] J. Qian, S. Li, D. Bu, M. Li and J. Xu. Finding compact structural motifs. In Proceedings of\nthe 18th Annual Symposium on Combinatorial Pattern Matching (CPM’07), pages 142–149,\n2007.\n[20] I. Shindyalov and P. Bourne. Protein structure alignment by incremental combinatorial ex-\ntension (CE) of the optimal path. Protein Engineering, 11:739-747, 1998.\n[21] W. Taylor and C. Orengo. Protein structure alignment. J. Mol. Biol., 208:1-22, 1989.\n[22] C. Wenk. Shape Matching in Higher Dimensions. PhD thesis, Freie Universitaet Berlin, 2002.\n10","paragraphs":[{"paragraph_id":"p1","order":1,"text":"arXiv:0709.0677v1 [cs.CC] 5 Sep 2007\nOn the Complexity of Protein Local Structure Alignment Under\nthe Discrete Fr ́echet Distance\nBinhai Zhu ∗\nAbstract\nProtein structure alignment is a fundamental problem in computational and structural bi-\nology. While there has been lots of experimental/heuristic methods and empirical results, very\nlittle is known regarding the algorithmic/complexity aspects of the problem, especially on pro-\ntein local structure alignment.\nA well-known measure to characterize the similarity of two\npolygonal chains is the famous Fr ́echet distance and with the application of protein-related\nresearch, a related discrete Fr ́echet distance has been used recently. In this paper, following\nthe recent work of Jiang, et al. we investigate the protein local structural alignment problem\nusing bounded discrete Fr ́echet distance. Given m proteins (or protein backbones, which are\n3D polygonal chains), each of length O(n), our main results are summarized as follows.\n• If the number of proteins, m, is not part of the input, then the problem is NP-complete;\nmoreover, under bounded discrete Fr ́echet distance it is NP-hard to approximate the max-\nimum size common local structure within a factor of n1−ǫ. These results hold both when\nall the proteins are static or when translation/rotation are allowed.\n• If the number of proteins, m, is a constant, then there is a polynomial time solution for\nthe problem.\nKeywords: Protein structure alignment, Fr ́echet distance, Discrete Fr ́echet distance, Approxima-\ntion, NP-hardness\n∗Department of Computer Science,\nMontana State University, Bozeman,\nMT 59717-3880,\nUSA. Email:\nbhz@cs.montana.edu.\nManuscript\nSeptember 5, 2007"},{"paragraph_id":"p2","order":2,"text":"1\nIntroduction\nAs a famous distance measure in the field of abstract spaces, Fr ́echet distance was first defined\nby Maurice Fr ́echet a century ago [7]. Alt and Godau first used it in measuring the similarity of\npolygonal chains in 1992 [1]. It is well known that the Fr ́echet distance between two two-dimensional\n(2D) polygonal chains (polylines) can be computed in polynomial time [1, 2], and even under\ntranslation or rotation (though the running time is much higher) [3]. In three-dimensional space\n(3D), Wenk should that given two chains with sum of length N, the minimum Fr ́echet distance\nbetween them can be computed in O(N 3f+2 log N) time, where f is the degree of freedom for\nmoving the chains [22]. So with translation alone this minimum Fr ́echet distance can be computed\nin in O(N 11 log N) time, and when both translation and rotation are allowed the corresponding\nminimum Fr ́echet distance can be computed in O(N 20 log N) time. These results can be generalized\nto any fixed dimensions [22]. While computing (approximating) Fr ́echet distance for surfaces is in\ngeneral NP-hard [8, 12], it is polynomially solvable for restricted surfaces [4].\nIn 1994, Eiter and Mannila defined the discrete Fr ́echet distance between two polygonal chains\nA and B (in any fixed dimensions) and it turns out that this simplified distance is always realized\nby two vertices in A and B [6]. They also showed that with dynamic programming the discrete\nFr ́echet distance between them can be computed in O(|A||B|) time.\nRecently, Jiang, Xu and Zhu applied the discrete Fr ́echet distance in (globally) aligning the\nbackbones of proteins (which is called the protein structure-structure alignment or more generally,\nthe protein global alignment problem) [14]. In fact, in this application the discrete Fr ́echet distance\nmakes more sense as the backbone of a protein is simply a polygonal chain in 3D, with each vertex\nbeing the alpha-carbon atom of a residue. So if the (continuous) Fr ́echet distance is realized by an\nalpha-carbon atom and some other point which does not represent an atom, it is not meaningful\nbiologically. Jiang, et al. showed that given two 2D (or 3D) polygonal chains the minimum discrete\nFr ́echet distance between them, under both translation and rotation, can be computed in polynomial\ntime. They also applied some ideas therein to design an efficient heuristic for the original protein\nstructure-structure alignment problem in 3D and the empirical results showed that their alignment\nis more accurate compared with previously known solutions.\nIn essence, the result of Jiang, Xu and Zhu [14] implies that the protein global alignment\nproblem, which is to find all proteins in a given set P similar to a query protein or some protein\nin P (under translation and rotation), is polynomially solvable.\nHowever, very little algorith-\nmic/complexity results is known regarding the protein local structure alignment problem. The\nonly such recent result was due to Qian, et al. who showed that under the RMSD distance the\nproblem is NP-complete but admits a PTAS [19].\nOn the other hand, there have been lots of\nexperimental/heuristic methods with practical systems since 1989, e.g., SSAP [21], DALI [11, 10],\nCATH [17], CE [20], SCOP [5], MAMMOTH [18] and TALI [16]. In this paper, we show that if\n1"},{"paragraph_id":"p3","order":3,"text":"many proteins are given then the local structure alignment problem, under the discrete Fr ́echet\ndistance, is very hard; on the other hand, if only a small number of proteins are given then there\nis a polynomial time solution for the problem.\nThe paper is organized as follows. In Section 2, we introduce some basic definitions regarding\nFr ́echet distance and review some known results. In Section 3, we show the hardness result for the\nprotein local structure alignment problem. In Section 4, we show how to solve the problem when\nm is a constant. In Section 5, we conclude the paper with several open problems.\n2\nPreliminaries\nGiven two 3D polygonal chains A, B with |A| = k and |B| = l vertices respectively, we aim at\nmeasuring the similarity of A and B (possibly under translation and rotation) such that their\ndistance is minimized under certain measure. Among the various distance measures, the Hausdorff\ndistance is known to be better suited for matching two point sets than for matching two polygonal\nchains; the (continuous) Fr ́echet distance is a superior measure for matching two polygonal chains,\nbut it is not quite easy to compute [1].\nLet X be the Euclidean space R3; let d(a, b) denote the Euclidean distance between two points\na, b ∈X. The (continuous) Fr ́echet distance between two parametric curves f : [0, 1] →X and\ng : [0, 1] →X is\nδF(f, g) = inf\nα,β max\ns∈[0,1] d(f(α(s)), g(β(s))),\nwhere α and β range over all continuous non-decreasing real functions with α(0) = β(0) = 0 and\nα(1) = β(1) = 1 1.\nImagine that a person and a dog walk along two different paths while connected by a leash;\nmoreover, they always move forward, possibly at different paces. Intuitively, the minimum possible\nlength of the leash is the Fr ́echet distance between the two paths. To compute the Fr ́echet distance\nbetween two polygonal curves A and B (in the Euclidean plane) of |A| and |B| vertices, respectively,\nAlt and Godau [1] presented an O(|A||B| log2(|A||B|)) time algorithm.\nLater this bound was\nreduced to O(|A||B| log(|A||B|)) time [2].\nWe now define the discrete Fr ́echet distance following [6].\nDefinition 2.1 Given a polygonal chain (polyline) in 3D, P = ⟨p1, . . . , pk⟩of k vertices, a m-\nwalk along P partitions the path into m disjoint non-empty subchains {Pi}i=1..m such that Pi =\n⟨pki−1+1, . . . , pki⟩and 0 = k0 < k1 < · · · < km = k.\nGiven two 3D polylines A = ⟨a1, . . . , ak⟩and B = ⟨b1, . . . , bl⟩, a paired walk along A and\nB is a m-walk {Ai}i=1..m along A and a m-walk {Bi}i=1..m along B for some m, such that, for\n1This definition holds in any fixed dimensions.\n2"},{"paragraph_id":"p4","order":4,"text":"1 ≤i ≤m, either |Ai| = 1 or |Bi| = 1 (that is, Ai or Bi contains exactly one vertex). The cost of\na paired walk W = {(Ai, Bi)} along two paths A and B is\ndW\nF (A, B) = max\ni\nmax\n(a,b)∈Ai×Bi\nd(a, b).\nThe discrete Fr ́echet distance between two polylines A and B is\ndF (A, B) = min\nW dW\nF (A, B).\nThe paired walk that achieves the discrete Fr ́echet distance between two paths A and B is also called\nthe Fr ́echet alignment of A and B.\nConsider the scenario in which the person walks (jumps) along A and the dog along B. Intu-\nitively, the definition of the paired walk is based on three cases:\n1. |Bi| > |Ai| = 1: the person stays and the dog moves (jumps) forward;\n2. |Ai| > |Bi| = 1: the person moves (jumps) forward and the dog stays;\n3. |Ai| = |Bi| = 1: both the person and the dog move (jump) forward.\nb\no\no\n(I)\n(II)\na\na\na\na\na\n1\n2\n3\n2\n3\nb1\n2\nb1\n2\nb\nb\n1\na\nFig. 1. The relationship between discrete and continuous Fr ́echet distances.\nEiter and Mannila presented a simple dynamic programming algorithm to compute dF (A, B)\nin O(|A||B|) = O(kl) time [6]. Recently, Jiang, et al. showed that the minimum discrete Fr ́echet\ndistance between two chains in 2D, A and B, under translation can be computed in O(k3l3 log(k+l))\ntime, and under both translation and rotation it can be computed in O(k4l4 log(k + l)) time [14].\nFor 3D chains these bounds are O(k4l4 log(k +l)) and O(k7l7 log(k +l)) respectively [14]. They are\nsignificantly faster than the corresponding bounds for the continuous Fr ́echet distance (certainly\ndue to a simpler distance structure), which are O((k + l)11 log(k + l)) and O((k + l)20 log(k + l))\nrespectively for 3D chains [22].\nWe comment that while the discrete Fr ́echet distance could be arbitrarily larger than the corre-\nsponding continuous Fr ́echet distance (e.g., in Fig. 1 (I), they are d(a2, b2) and d(a2, o) respectively),\nby adding sample points on the polylines, one can easily obtain a close approximation of the con-\ntinuous Fr ́echet distance using the discrete Fr ́echet distance (e.g., one can use d(a2, b) in Fig. 1 (II)\n3"},{"paragraph_id":"p5","order":5,"text":"to approximate d(a2, o)). This fact was pointed before in [6, 13] and is supported by the fact that\nthe segments in protein backbones are mostly of similar lengths. Moreover, the discrete Fr ́echet\ndistance is a more natural measure for matching the geometric shapes of biological sequences such\nas proteins. As we mentioned in the introduction, in such an application, continuous Fr ́echet does\nnot make much sense to biologists.\nIn the remaining part of this paper, for the first time, we investigate the locally aligning a set\nof polygonal chains (proteins or protein backbones) in 3D, under the discrete Fr ́echet distance.\n3\nProtein Local Structure Alignment is Hard\nGiven a set of proteins modeled as simple 3D polygonal chains, the Protein Local Structure Align-\nment (PLSA) problem is defined as follows.\nInstance: Given a set m of proteins P1, P2, ..., Pm in 3D, each with length O(n), and a real\nnumber D.\nProblem: Does there exist a chain C of k vertices such that the vertices of C are from Pi’s, and\nC and a subsequence of Pi (1 ≤i ≤m) has discrete Fr ́echet distance at most D (under translation\nand rotation)?\nIf no translation and rotation is allowed, we call the corresponding problem static PLSA. For\nthe optimal version of the problem, we wish to maximize k when D is given. The (polynomial-time)\napproximation solution will also be referred to as approximating the optimal solution value k∗when\nit is hard to compute exactly. We will see that it is also hard to approximate k∗even for static\nPLSA. We first prove the following theorem.\nTheorem 3.1 Given D = δ, the static PLSA problem does not admit any approximation of factor\nn1−ǫ unless P=NP.\nProof.\nIt is easy to see that PLSA belongs to NP. We use a reduction from Independent Set to\nthe Protein Local Structure Alignment Problem. Independent Set is a well known NP-complete\nproblem which cannot be approximated within a factor of n1−ǫ [9]. The general idea is similar to\nthat of the longest common subsequence problem for multiple sequences [15], but our details are\nmuch more involved due to the geometric properties of the problem.\nGiven a graph G = (V, E), V = {v1, v2, · · · , vN}, E = {e1, e2, · · · , eM}, we construct M + 1 3D\nchains P0, P1, P2, ..., PM as follows. (We assume that the vertices and edges in G are sorted by their\ncorresponding indices.)\nThe overall reduction is as follows: P = {P0, P1, P2, ..., PM}, and\nP0 = ⟨v′\n1, v′\n2, · · · , v′\nn⟩,\n4"},{"paragraph_id":"p6","order":6,"text":"where v′\ni = (i, i2, 0) is a 3D point for i = 1, ..., n.\nFor each er = (vi, vj) in G, we have a corresponding sequence (3D chain)\nPr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩,\nwhere v′\ni = (i, i2, 0) and v”i = (i, i2, δ) are 3D points for i = 1, ..., n and δ is an arbitrarily small\npositive real number less than 0.1.\nWe claim that G has an independent set of size k if and only if there is a chain C of k vertices\nsuch that the discrete Fr ́echet distance between C and a subsequence of Pr, Sr, is at most δ (i.e.,\ndF (C, Sr) ≤δ). The following claims are made with the detailed proofs left out.\nClaim A. Pr is a simple polygonal chain in 3D.\nClaim B. Sr is a simple polygonal chain in 3D with |Sr| = k.\nIf G has an independent set of size k, then the chain C can be constructed as follows. Let the\nindependent set of G be ordered as I = ⟨vi1, vi2, ..., vik⟩with i1 < i2 < ... < ik. For r = 0, 1, ..., M,\nwe scan Pr in a greedy fashion to obtain the first v′\nj or v”j such that the first component of its\ncoordinate is i1. Repeat this process to obtain Sr. Then let any Sr be C. Obviously, C has k\nvertices and |Sr| = k for r = 0, 1..., M.\nIf there is a chain C of k vertices such that the discrete Fr ́echet distance between C and a\nsubsequence of Pr, Sr, is at most δ (i.e., dF (C, Sr) ≤δ), then we can see the following.\nProperty (a) Let Pr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩, then\nd(v′\np, v”q) > 3 for all p ̸= q.\nProperty (b) Let Pr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩, then\nd(v′\np, v”p) ≤δ for all p ̸= i, p ̸= j.\nProperty (c) Let Pr = ⟨u1, u2, · · · , uO(n)⟩, then |d(up, uq) −d(up′, uq′)| >> δ as long as the first\ncomponents of the 4 coordinates of up, uq, up′, uq′ are all different.\nAs δ is very small, when dF (C, Sr) ≤δ, the vertices of C and Sr must be matched orderly in\na one-to-one fashion. (In other words, the man walking on C and the dog walking on Sr must\nmove/jump together at each vertex. Otherwise, dF (C, Sr) > 3 >> δ.) We now claim that the\n(ordered) vertices of C correspond to an independent set I of G; moreover, if C = ⟨C1, C2, · · · , Ck⟩\nand Cp = (xp, yp, zp), then vxp ∈I. Suppose that Cp = (xp, yp, zp), Cq = (xq, yq, zq) and vxp, vxq ∈I\nbut there is an edge et = (vxp, vxq) ∈E. By our construction of Pt (from et), v′\nxp and v”xq are not\nincluded in Pt and v′\nxq precedes v”xp in Pt. This is a contradiction.\nTo conclude the proof of this theorem, notice that the reduction take O(MN) time.\n⊓⊔\nIn the example shown in Figure 1, we have\nP1 = ⟨v′\n1, v′\n3, v′\n4, v′\n5, v”1, v”2, v”4, v”5⟩,\nP2 = ⟨v′\n1, v′\n3, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩,\nP3 = ⟨v′\n2, v′\n3, v′\n4, v′\n5, v”1, v”3, v”4, v”5⟩,\nP4 = ⟨v′\n2, v′\n3, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩,\n5"},{"paragraph_id":"p7","order":7,"text":"v\nv\nv\n1\nv\ne\ne\ne\ne\n3\nv5\n2\n4\n1\n3\n2\ne\n4\n5\ne\n6\n2\n3\n4\n3D chain for e 3\n1\n5\nFigure 1. Illustration of a simple graph for the reduction.\nP5 = ⟨v′\n1, v′\n2, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩, and\nP6 = ⟨v′\n1, v′\n2, v′\n3, v′\n5, v”1, v”2, v”3, v”4⟩.\nAn example of P3 is shown in Figure 1 as well, in which case black nodes are on the Z = 0 plane\nand white nodes are on the Z = δ plane (apparently for the visualization reason, the XY-plane\nis slanted). The solid segments are on the Z = 0 plane, the dotted segments are on the Z = δ\nplane and the only dashed segment connects two points on different planes. Corresponding to the\noptimal independent set {v1, v3, v5} in G, the optimal local alignment C = ⟨v′\n1, v′\n3, v′\n5⟩matches P3\nat its subsequence S3 = ⟨v”1, v”3, v”5⟩.\nCorollary 3.1 Given D = δ and when both translation and rotation are allowed, the (maximization\nversion of) PLSA problem does not admit any approximation of factor n1−ǫ unless P=NP.\nProof. Due to Property (a), (b) and (c), translation/rotation will not be able to generate another\nC′ which is topologically different from C.\n⊓⊔\nNotice that in our proof all the adjacent vertices in C could be non-adjacent in Pi, for i =\n0, 1, ..., m. Biologically, this might be a problem as one residue alone sometimes cannot carry out\nany biological function. Define a c-substring or a c-subchain of Pi as a continuous subchain of Pi\nwith at least c vertices. Unfortunately, even if we introduce this condition by forcing that C is\ncomposed of k ordered c-substrings of each Pi, for some constant c, the above proof can be modified\nto maintain a valid reduction from Independent Set. Call this corresponding problem Protein c-\nLocal Structure Alignment (PcLSA), in which C must be composed of k ordered c-subchains of\neach Pi. We have the following corollary.\nCorollary 3.2 The maximization version of PcLSA does not admit any approximation of factor\nn1−ǫ unless P=NP.\n4\nPolynomial Time Solutions for PLSA When m is Small\nIn this section, we present a polynomial time solution for the PLSA problem when m is a constant.\nWe first show a dynamic programming solution for the static PLSA and then we show how to use\n6"},{"paragraph_id":"p8","order":8,"text":"that as a subroutine for the general PLSA problem, when m is small.\n4.1\nA Dynamic Programming Solution for the Static PLSA When m is Small\nIn this subsection, we present a dynamic programming solution for the static PLSA problem when\nm is small. Such a solution can be used as a subroutine for the general PLSA problem. We first\nconsider the case when m = 2. Besides C, we try to maximize the length of the aligned subsequences\nin P1 = A and P2 = B with |A| = n1, |B| = n2. For the ease of description, we only show how to\nobtain these lengths which are stored in D[−, −, −, −] and M[−, −, −, −] respectively. It is easy to\nreconstruct C from these arrays.\nLet A[i1, i2] be a subchain of A starting from the index i1 and ending at the index i2. Let\nB[j1, j2] be a subchain of B starting from the index j1 and ending at the index j2. D[i1, i2, j1, j2]\nstores the length of the aligned subsequences of A[i1, i2] as a consequence of the alignment of C\nand A[i1, i2], and C and B[j1, j2]. M[i1, i2, j1, j2] is defined symmetrically.\nIntuitively D[−, −, −, −] stores the length of aligned subsequences from chain A (dog’s route)\nand M[−, −, −, −] stores the length of aligned subsequences from chain B (man’s route). Define\nTF (i1, i2, j1, j2) as the sum of aligned subsequences in both A[i1, i2] and B[j1, j2]. Writing A[i] as\nai and B[j] as bj, we have the dynamic programming solution as follows.\nTF(i1, i2, j1, j2) = D(i1, i2, j1, j2) + M(i1, i2, j1, j2),\nwhere\nD(i1, i2, j1, j2) = max"},{"paragraph_id":"p9","order":9,"text":"maxi1≤k1 δ.\n(3)\nThe final solution value is stored in TF [1, n1, 1, n2]. We have the following theorem.\n7"},{"paragraph_id":"p12","order":12,"text":"Theorem 4.1 When m = 2, the static PLSA problem can be solved in O(n4) time and space.\nIt is easy to generalize this algorithm to the more general case when m is some constant. We\nthus have the following corollary.\nCorollary 4.1 When m is a constant, the static PLSA problem can be solved in O(m3n2m) time\nand O(mn2m) space.\n4.2\nA Polynomial Time Solution for PLSA When m is Small\nApparently, for any solution for PLSA we should allow translation and rotation. When m = 2\nand when both translation and rotation are allowed, we can use a method similar to that in [14]\nto compute the optimal local alignment with fixed δ.\nThe idea is as follows.\nWithout loss of\ngenerality, we assume that A is static and we translate/rotate B and let τ(B) be the copy of B\nafter some translation/rotation. Let |A| = n1, |B| = n2 and let f be the degree of freedom for\nmoving B. As we are in 3D and both translation and rotation are allowed, we have f = 6. We\ncan enumerate all possible configurations for A and τ(B) to realize a discrete Fr ́echet distance of\nδ. There are O((n1n2)f) = O(n12) number of such configurations, following an argument similar\nto [22, 14]. Then for each configuration, we can use the above Theorem 4.1 to obtain the optimal\nlocal alignment for each configuration and finally we simply return the overall optimal solution.\nCorollary 4.2 When m = 2 and when both translation and rotation are allowed, the PLSA problem\ncan be solved in O(n16) time and O(n4) space.\nWe comment that when m is larger, but still a constant, the above idea can be carried over\nso that we will still be able to solve PLSA in polynomial time. It follows from [22, 14] that we\nhave O(nmf) = O(n6m) number of configurations between the m chains. Then we can again use\nCorollary 4.1 to obtain the optimal local alignment for each configuration. The overall complexity\nwould be O(n6m × m3n2m) = O(m3n8m) time and O(mn2m) space. Certainly, such an algorithm\nis only meaningful in theory.\nCorollary 4.3 When m is a constant and when both translation and rotation are allowed, the\nPLSA problem can be solved in O(m3n8m) time and O(mn2m) space.\n5\nConcluding Remarks\nIn this paper, for the first time, we study the complexity/algorithmic aspects of the famous protein\nlocal structure alignment problem under the discrete Fr ́echet distance. We show that the general\nproblem is NP-complete; in fact, it is even NP-hard to approximate within a factor of n1−ǫ. On\nthe other hand, when a constant number of proteins are given then the problem can be solved in\n8"},{"paragraph_id":"p13","order":13,"text":"polynomial time. It would be interesting to see the empirical comparisons of protein local structure\nalignment under the discrete Fr ́echet distance with the existing methods. Another open problem,\nobviously, is whether it is possible to improve the running time of the dynamic programming\nalgorithms in Section 4.\nReferences\n[1] H. Alt and M. Godau. Measuring the resemblance of polygonal curves. In Proceedings of the\n8th Annual Symposium on Computational Geometry (SoCG’92), pages 102–109, 1992.\n[2] H. Alt and M. Godau. Computing the Fr ́echet distance between two polygonal curves. Intl. J.\nComputational Geometry and Applications, 5:75-91, 1995.\n[3] H. Alt, C. Knauer and C. Wenk. Matching polygonal curves with respect to the Fr ́echet\ndistance. In Proceedings of the 18th Annual Symposium on Theoretical Aspects of Computer\nScience (STACS’01), pages 63–74, 2001.\n[4] K. Buchin, M. Buchin and C. Wenk. Computing the Fr ́echet distance between simple polygons\nin polynomial time. In Proceedings of the 22nd Annual Symposium on Computational Geometry\n(SoCG’06), pages 80–87, 2006.\n[5] L. Conte, B. Ailey, T. Hubbard, S. Brenner, A. Murzin and C. Chothia. SCOP: a structural\nclassification of protein database. Nucleic Acids Res., 28:257-259, 2000.\n[6] T. Eiter and H. Mannila. Computing discrete Fr ́echet distance. Tech. Report CD-TR 94/64,\nInformation Systems Department, Technical University of Vienna, 1994.\n[7] M. Fr ́echet. Sur quelques points du calcul fonctionnel. Rendiconti del Circolo Mathematico di\nPalermo, 22:1-74, 1906.\n[8] M. Godau. On the complexity of measuring the similarity between geometric objects in higher\ndimensions. PhD thesis, Freie Universitaet Berlin, 1998.\n[9] J. H ̈astad. Clique is hard to approximate within n1−ǫ. Acta Mathematica, 182:105-142, 1999.\n[10] L. Holm and J. Park. DaliLite workbench for protein structure comparison. Bioinformatics,\n16:566-567, 2000.\n[11] L. Holm and C. Sander. Protein structure comparison by alignment of distance matrices. J.\nMol. Biol., 233:123-138, 1993.\n[12] P. Hui and M. Shaefer. Paired pointset traversal. In Proceedings of the 15th Annual Symposium\non Algorithms and Computation (ISAAC’04), pages 534-544, 2004.\n9"},{"paragraph_id":"p14","order":14,"text":"[13] P. Indyk. Approximate nearest neighbor algorithms for Fr ́echet distance via product metrics.\nIn Proceedings of the 18th Annual Symposium on Computational Geometry (SoCG’02), pages\n102–106, 2002.\n[14] M. Jiang, Y. Xu and B. Zhu. Protein structure-structure alignment with discrete Fr ́echet\ndistance. In Proceedings of the 5th Asia-Pacific Bioinformatics Conf. (APBC’07), pages 131–\n141, 2007. (Revised version to appear in J. of Bioinformatics and Computational Biology.)\n[15] T. Jiang and M. Li. On the approximation of shortest common supersequences and longest\ncommon subsequences. SIAM J. Comput., 24(5):1122-1139, 1995.\n[16] X. Miao, P. Waddell and H. Valafar. TALI: Local alignment of protein structures using back-\nbone torsion angles. J. of Bioinformatics and Computational Biology., to appear, 2008.\n[17] C. Orengo, A. Michie, S. Jones, D. Jones, M. Swindles and J. Thornton. CATH—a hierarchic\nclassification of protein domain structures. Structure, 5:1093-1108, 1997.\n[18] A. Oritz, C. Strauss and O. Olmea. MMAMOTH (matching molecular models obtained from\ntheory): an automated method for model comparison. Protein Science, 11:2606-2621, 2002.\n[19] J. Qian, S. Li, D. Bu, M. Li and J. Xu. Finding compact structural motifs. In Proceedings of\nthe 18th Annual Symposium on Combinatorial Pattern Matching (CPM’07), pages 142–149,\n2007.\n[20] I. Shindyalov and P. Bourne. Protein structure alignment by incremental combinatorial ex-\ntension (CE) of the optimal path. Protein Engineering, 11:739-747, 1998.\n[21] W. Taylor and C. Orengo. Protein structure alignment. J. Mol. Biol., 208:1-22, 1989.\n[22] C. Wenk. Shape Matching in Higher Dimensions. PhD thesis, Freie Universitaet Berlin, 2002.\n10"}],"pages":[{"page":1,"text":"arXiv:0709.0677v1 [cs.CC] 5 Sep 2007\nOn the Complexity of Protein Local Structure Alignment Under\nthe Discrete Fr ́echet Distance\nBinhai Zhu ∗\nAbstract\nProtein structure alignment is a fundamental problem in computational and structural bi-\nology. While there has been lots of experimental/heuristic methods and empirical results, very\nlittle is known regarding the algorithmic/complexity aspects of the problem, especially on pro-\ntein local structure alignment.\nA well-known measure to characterize the similarity of two\npolygonal chains is the famous Fr ́echet distance and with the application of protein-related\nresearch, a related discrete Fr ́echet distance has been used recently. In this paper, following\nthe recent work of Jiang, et al. we investigate the protein local structural alignment problem\nusing bounded discrete Fr ́echet distance. Given m proteins (or protein backbones, which are\n3D polygonal chains), each of length O(n), our main results are summarized as follows.\n• If the number of proteins, m, is not part of the input, then the problem is NP-complete;\nmoreover, under bounded discrete Fr ́echet distance it is NP-hard to approximate the max-\nimum size common local structure within a factor of n1−ǫ. These results hold both when\nall the proteins are static or when translation/rotation are allowed.\n• If the number of proteins, m, is a constant, then there is a polynomial time solution for\nthe problem.\nKeywords: Protein structure alignment, Fr ́echet distance, Discrete Fr ́echet distance, Approxima-\ntion, NP-hardness\n∗Department of Computer Science,\nMontana State University, Bozeman,\nMT 59717-3880,\nUSA. Email:\nbhz@cs.montana.edu.\nManuscript\nSeptember 5, 2007"},{"page":2,"text":"1\nIntroduction\nAs a famous distance measure in the field of abstract spaces, Fr ́echet distance was first defined\nby Maurice Fr ́echet a century ago [7]. Alt and Godau first used it in measuring the similarity of\npolygonal chains in 1992 [1]. It is well known that the Fr ́echet distance between two two-dimensional\n(2D) polygonal chains (polylines) can be computed in polynomial time [1, 2], and even under\ntranslation or rotation (though the running time is much higher) [3]. In three-dimensional space\n(3D), Wenk should that given two chains with sum of length N, the minimum Fr ́echet distance\nbetween them can be computed in O(N 3f+2 log N) time, where f is the degree of freedom for\nmoving the chains [22]. So with translation alone this minimum Fr ́echet distance can be computed\nin in O(N 11 log N) time, and when both translation and rotation are allowed the corresponding\nminimum Fr ́echet distance can be computed in O(N 20 log N) time. These results can be generalized\nto any fixed dimensions [22]. While computing (approximating) Fr ́echet distance for surfaces is in\ngeneral NP-hard [8, 12], it is polynomially solvable for restricted surfaces [4].\nIn 1994, Eiter and Mannila defined the discrete Fr ́echet distance between two polygonal chains\nA and B (in any fixed dimensions) and it turns out that this simplified distance is always realized\nby two vertices in A and B [6]. They also showed that with dynamic programming the discrete\nFr ́echet distance between them can be computed in O(|A||B|) time.\nRecently, Jiang, Xu and Zhu applied the discrete Fr ́echet distance in (globally) aligning the\nbackbones of proteins (which is called the protein structure-structure alignment or more generally,\nthe protein global alignment problem) [14]. In fact, in this application the discrete Fr ́echet distance\nmakes more sense as the backbone of a protein is simply a polygonal chain in 3D, with each vertex\nbeing the alpha-carbon atom of a residue. So if the (continuous) Fr ́echet distance is realized by an\nalpha-carbon atom and some other point which does not represent an atom, it is not meaningful\nbiologically. Jiang, et al. showed that given two 2D (or 3D) polygonal chains the minimum discrete\nFr ́echet distance between them, under both translation and rotation, can be computed in polynomial\ntime. They also applied some ideas therein to design an efficient heuristic for the original protein\nstructure-structure alignment problem in 3D and the empirical results showed that their alignment\nis more accurate compared with previously known solutions.\nIn essence, the result of Jiang, Xu and Zhu [14] implies that the protein global alignment\nproblem, which is to find all proteins in a given set P similar to a query protein or some protein\nin P (under translation and rotation), is polynomially solvable.\nHowever, very little algorith-\nmic/complexity results is known regarding the protein local structure alignment problem. The\nonly such recent result was due to Qian, et al. who showed that under the RMSD distance the\nproblem is NP-complete but admits a PTAS [19].\nOn the other hand, there have been lots of\nexperimental/heuristic methods with practical systems since 1989, e.g., SSAP [21], DALI [11, 10],\nCATH [17], CE [20], SCOP [5], MAMMOTH [18] and TALI [16]. In this paper, we show that if\n1"},{"page":3,"text":"many proteins are given then the local structure alignment problem, under the discrete Fr ́echet\ndistance, is very hard; on the other hand, if only a small number of proteins are given then there\nis a polynomial time solution for the problem.\nThe paper is organized as follows. In Section 2, we introduce some basic definitions regarding\nFr ́echet distance and review some known results. In Section 3, we show the hardness result for the\nprotein local structure alignment problem. In Section 4, we show how to solve the problem when\nm is a constant. In Section 5, we conclude the paper with several open problems.\n2\nPreliminaries\nGiven two 3D polygonal chains A, B with |A| = k and |B| = l vertices respectively, we aim at\nmeasuring the similarity of A and B (possibly under translation and rotation) such that their\ndistance is minimized under certain measure. Among the various distance measures, the Hausdorff\ndistance is known to be better suited for matching two point sets than for matching two polygonal\nchains; the (continuous) Fr ́echet distance is a superior measure for matching two polygonal chains,\nbut it is not quite easy to compute [1].\nLet X be the Euclidean space R3; let d(a, b) denote the Euclidean distance between two points\na, b ∈X. The (continuous) Fr ́echet distance between two parametric curves f : [0, 1] →X and\ng : [0, 1] →X is\nδF(f, g) = inf\nα,β max\ns∈[0,1] d(f(α(s)), g(β(s))),\nwhere α and β range over all continuous non-decreasing real functions with α(0) = β(0) = 0 and\nα(1) = β(1) = 1 1.\nImagine that a person and a dog walk along two different paths while connected by a leash;\nmoreover, they always move forward, possibly at different paces. Intuitively, the minimum possible\nlength of the leash is the Fr ́echet distance between the two paths. To compute the Fr ́echet distance\nbetween two polygonal curves A and B (in the Euclidean plane) of |A| and |B| vertices, respectively,\nAlt and Godau [1] presented an O(|A||B| log2(|A||B|)) time algorithm.\nLater this bound was\nreduced to O(|A||B| log(|A||B|)) time [2].\nWe now define the discrete Fr ́echet distance following [6].\nDefinition 2.1 Given a polygonal chain (polyline) in 3D, P = ⟨p1, . . . , pk⟩of k vertices, a m-\nwalk along P partitions the path into m disjoint non-empty subchains {Pi}i=1..m such that Pi =\n⟨pki−1+1, . . . , pki⟩and 0 = k0 < k1 < · · · < km = k.\nGiven two 3D polylines A = ⟨a1, . . . , ak⟩and B = ⟨b1, . . . , bl⟩, a paired walk along A and\nB is a m-walk {Ai}i=1..m along A and a m-walk {Bi}i=1..m along B for some m, such that, for\n1This definition holds in any fixed dimensions.\n2"},{"page":4,"text":"1 ≤i ≤m, either |Ai| = 1 or |Bi| = 1 (that is, Ai or Bi contains exactly one vertex). The cost of\na paired walk W = {(Ai, Bi)} along two paths A and B is\ndW\nF (A, B) = max\ni\nmax\n(a,b)∈Ai×Bi\nd(a, b).\nThe discrete Fr ́echet distance between two polylines A and B is\ndF (A, B) = min\nW dW\nF (A, B).\nThe paired walk that achieves the discrete Fr ́echet distance between two paths A and B is also called\nthe Fr ́echet alignment of A and B.\nConsider the scenario in which the person walks (jumps) along A and the dog along B. Intu-\nitively, the definition of the paired walk is based on three cases:\n1. |Bi| > |Ai| = 1: the person stays and the dog moves (jumps) forward;\n2. |Ai| > |Bi| = 1: the person moves (jumps) forward and the dog stays;\n3. |Ai| = |Bi| = 1: both the person and the dog move (jump) forward.\nb\no\no\n(I)\n(II)\na\na\na\na\na\n1\n2\n3\n2\n3\nb1\n2\nb1\n2\nb\nb\n1\na\nFig. 1. The relationship between discrete and continuous Fr ́echet distances.\nEiter and Mannila presented a simple dynamic programming algorithm to compute dF (A, B)\nin O(|A||B|) = O(kl) time [6]. Recently, Jiang, et al. showed that the minimum discrete Fr ́echet\ndistance between two chains in 2D, A and B, under translation can be computed in O(k3l3 log(k+l))\ntime, and under both translation and rotation it can be computed in O(k4l4 log(k + l)) time [14].\nFor 3D chains these bounds are O(k4l4 log(k +l)) and O(k7l7 log(k +l)) respectively [14]. They are\nsignificantly faster than the corresponding bounds for the continuous Fr ́echet distance (certainly\ndue to a simpler distance structure), which are O((k + l)11 log(k + l)) and O((k + l)20 log(k + l))\nrespectively for 3D chains [22].\nWe comment that while the discrete Fr ́echet distance could be arbitrarily larger than the corre-\nsponding continuous Fr ́echet distance (e.g., in Fig. 1 (I), they are d(a2, b2) and d(a2, o) respectively),\nby adding sample points on the polylines, one can easily obtain a close approximation of the con-\ntinuous Fr ́echet distance using the discrete Fr ́echet distance (e.g., one can use d(a2, b) in Fig. 1 (II)\n3"},{"page":5,"text":"to approximate d(a2, o)). This fact was pointed before in [6, 13] and is supported by the fact that\nthe segments in protein backbones are mostly of similar lengths. Moreover, the discrete Fr ́echet\ndistance is a more natural measure for matching the geometric shapes of biological sequences such\nas proteins. As we mentioned in the introduction, in such an application, continuous Fr ́echet does\nnot make much sense to biologists.\nIn the remaining part of this paper, for the first time, we investigate the locally aligning a set\nof polygonal chains (proteins or protein backbones) in 3D, under the discrete Fr ́echet distance.\n3\nProtein Local Structure Alignment is Hard\nGiven a set of proteins modeled as simple 3D polygonal chains, the Protein Local Structure Align-\nment (PLSA) problem is defined as follows.\nInstance: Given a set m of proteins P1, P2, ..., Pm in 3D, each with length O(n), and a real\nnumber D.\nProblem: Does there exist a chain C of k vertices such that the vertices of C are from Pi’s, and\nC and a subsequence of Pi (1 ≤i ≤m) has discrete Fr ́echet distance at most D (under translation\nand rotation)?\nIf no translation and rotation is allowed, we call the corresponding problem static PLSA. For\nthe optimal version of the problem, we wish to maximize k when D is given. The (polynomial-time)\napproximation solution will also be referred to as approximating the optimal solution value k∗when\nit is hard to compute exactly. We will see that it is also hard to approximate k∗even for static\nPLSA. We first prove the following theorem.\nTheorem 3.1 Given D = δ, the static PLSA problem does not admit any approximation of factor\nn1−ǫ unless P=NP.\nProof.\nIt is easy to see that PLSA belongs to NP. We use a reduction from Independent Set to\nthe Protein Local Structure Alignment Problem. Independent Set is a well known NP-complete\nproblem which cannot be approximated within a factor of n1−ǫ [9]. The general idea is similar to\nthat of the longest common subsequence problem for multiple sequences [15], but our details are\nmuch more involved due to the geometric properties of the problem.\nGiven a graph G = (V, E), V = {v1, v2, · · · , vN}, E = {e1, e2, · · · , eM}, we construct M + 1 3D\nchains P0, P1, P2, ..., PM as follows. (We assume that the vertices and edges in G are sorted by their\ncorresponding indices.)\nThe overall reduction is as follows: P = {P0, P1, P2, ..., PM}, and\nP0 = ⟨v′\n1, v′\n2, · · · , v′\nn⟩,\n4"},{"page":6,"text":"where v′\ni = (i, i2, 0) is a 3D point for i = 1, ..., n.\nFor each er = (vi, vj) in G, we have a corresponding sequence (3D chain)\nPr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩,\nwhere v′\ni = (i, i2, 0) and v”i = (i, i2, δ) are 3D points for i = 1, ..., n and δ is an arbitrarily small\npositive real number less than 0.1.\nWe claim that G has an independent set of size k if and only if there is a chain C of k vertices\nsuch that the discrete Fr ́echet distance between C and a subsequence of Pr, Sr, is at most δ (i.e.,\ndF (C, Sr) ≤δ). The following claims are made with the detailed proofs left out.\nClaim A. Pr is a simple polygonal chain in 3D.\nClaim B. Sr is a simple polygonal chain in 3D with |Sr| = k.\nIf G has an independent set of size k, then the chain C can be constructed as follows. Let the\nindependent set of G be ordered as I = ⟨vi1, vi2, ..., vik⟩with i1 < i2 < ... < ik. For r = 0, 1, ..., M,\nwe scan Pr in a greedy fashion to obtain the first v′\nj or v”j such that the first component of its\ncoordinate is i1. Repeat this process to obtain Sr. Then let any Sr be C. Obviously, C has k\nvertices and |Sr| = k for r = 0, 1..., M.\nIf there is a chain C of k vertices such that the discrete Fr ́echet distance between C and a\nsubsequence of Pr, Sr, is at most δ (i.e., dF (C, Sr) ≤δ), then we can see the following.\nProperty (a) Let Pr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩, then\nd(v′\np, v”q) > 3 for all p ̸= q.\nProperty (b) Let Pr = ⟨v′\n1, v′\n2, · · · , v′\ni−1, v′\ni+1, · · · , v′\nn, v”1, v”2, · · · , v”j−1, v”j+1, · · · , v”n⟩, then\nd(v′\np, v”p) ≤δ for all p ̸= i, p ̸= j.\nProperty (c) Let Pr = ⟨u1, u2, · · · , uO(n)⟩, then |d(up, uq) −d(up′, uq′)| >> δ as long as the first\ncomponents of the 4 coordinates of up, uq, up′, uq′ are all different.\nAs δ is very small, when dF (C, Sr) ≤δ, the vertices of C and Sr must be matched orderly in\na one-to-one fashion. (In other words, the man walking on C and the dog walking on Sr must\nmove/jump together at each vertex. Otherwise, dF (C, Sr) > 3 >> δ.) We now claim that the\n(ordered) vertices of C correspond to an independent set I of G; moreover, if C = ⟨C1, C2, · · · , Ck⟩\nand Cp = (xp, yp, zp), then vxp ∈I. Suppose that Cp = (xp, yp, zp), Cq = (xq, yq, zq) and vxp, vxq ∈I\nbut there is an edge et = (vxp, vxq) ∈E. By our construction of Pt (from et), v′\nxp and v”xq are not\nincluded in Pt and v′\nxq precedes v”xp in Pt. This is a contradiction.\nTo conclude the proof of this theorem, notice that the reduction take O(MN) time.\n⊓⊔\nIn the example shown in Figure 1, we have\nP1 = ⟨v′\n1, v′\n3, v′\n4, v′\n5, v”1, v”2, v”4, v”5⟩,\nP2 = ⟨v′\n1, v′\n3, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩,\nP3 = ⟨v′\n2, v′\n3, v′\n4, v′\n5, v”1, v”3, v”4, v”5⟩,\nP4 = ⟨v′\n2, v′\n3, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩,\n5"},{"page":7,"text":"v\nv\nv\n1\nv\ne\ne\ne\ne\n3\nv5\n2\n4\n1\n3\n2\ne\n4\n5\ne\n6\n2\n3\n4\n3D chain for e 3\n1\n5\nFigure 1. Illustration of a simple graph for the reduction.\nP5 = ⟨v′\n1, v′\n2, v′\n4, v′\n5, v”1, v”2, v”3, v”5⟩, and\nP6 = ⟨v′\n1, v′\n2, v′\n3, v′\n5, v”1, v”2, v”3, v”4⟩.\nAn example of P3 is shown in Figure 1 as well, in which case black nodes are on the Z = 0 plane\nand white nodes are on the Z = δ plane (apparently for the visualization reason, the XY-plane\nis slanted). The solid segments are on the Z = 0 plane, the dotted segments are on the Z = δ\nplane and the only dashed segment connects two points on different planes. Corresponding to the\noptimal independent set {v1, v3, v5} in G, the optimal local alignment C = ⟨v′\n1, v′\n3, v′\n5⟩matches P3\nat its subsequence S3 = ⟨v”1, v”3, v”5⟩.\nCorollary 3.1 Given D = δ and when both translation and rotation are allowed, the (maximization\nversion of) PLSA problem does not admit any approximation of factor n1−ǫ unless P=NP.\nProof. Due to Property (a), (b) and (c), translation/rotation will not be able to generate another\nC′ which is topologically different from C.\n⊓⊔\nNotice that in our proof all the adjacent vertices in C could be non-adjacent in Pi, for i =\n0, 1, ..., m. Biologically, this might be a problem as one residue alone sometimes cannot carry out\nany biological function. Define a c-substring or a c-subchain of Pi as a continuous subchain of Pi\nwith at least c vertices. Unfortunately, even if we introduce this condition by forcing that C is\ncomposed of k ordered c-substrings of each Pi, for some constant c, the above proof can be modified\nto maintain a valid reduction from Independent Set. Call this corresponding problem Protein c-\nLocal Structure Alignment (PcLSA), in which C must be composed of k ordered c-subchains of\neach Pi. We have the following corollary.\nCorollary 3.2 The maximization version of PcLSA does not admit any approximation of factor\nn1−ǫ unless P=NP.\n4\nPolynomial Time Solutions for PLSA When m is Small\nIn this section, we present a polynomial time solution for the PLSA problem when m is a constant.\nWe first show a dynamic programming solution for the static PLSA and then we show how to use\n6"},{"page":8,"text":"that as a subroutine for the general PLSA problem, when m is small.\n4.1\nA Dynamic Programming Solution for the Static PLSA When m is Small\nIn this subsection, we present a dynamic programming solution for the static PLSA problem when\nm is small. Such a solution can be used as a subroutine for the general PLSA problem. We first\nconsider the case when m = 2. Besides C, we try to maximize the length of the aligned subsequences\nin P1 = A and P2 = B with |A| = n1, |B| = n2. For the ease of description, we only show how to\nobtain these lengths which are stored in D[−, −, −, −] and M[−, −, −, −] respectively. It is easy to\nreconstruct C from these arrays.\nLet A[i1, i2] be a subchain of A starting from the index i1 and ending at the index i2. Let\nB[j1, j2] be a subchain of B starting from the index j1 and ending at the index j2. D[i1, i2, j1, j2]\nstores the length of the aligned subsequences of A[i1, i2] as a consequence of the alignment of C\nand A[i1, i2], and C and B[j1, j2]. M[i1, i2, j1, j2] is defined symmetrically.\nIntuitively D[−, −, −, −] stores the length of aligned subsequences from chain A (dog’s route)\nand M[−, −, −, −] stores the length of aligned subsequences from chain B (man’s route). Define\nTF (i1, i2, j1, j2) as the sum of aligned subsequences in both A[i1, i2] and B[j1, j2]. Writing A[i] as\nai and B[j] as bj, we have the dynamic programming solution as follows.\nTF(i1, i2, j1, j2) = D(i1, i2, j1, j2) + M(i1, i2, j1, j2),\nwhere\nD(i1, i2, j1, j2) = max\n \n \n \n \n \n \n \n \n \nmaxi1≤k1 δ.\n(3)\nThe final solution value is stored in TF [1, n1, 1, n2]. We have the following theorem.\n7"},{"page":9,"text":"Theorem 4.1 When m = 2, the static PLSA problem can be solved in O(n4) time and space.\nIt is easy to generalize this algorithm to the more general case when m is some constant. We\nthus have the following corollary.\nCorollary 4.1 When m is a constant, the static PLSA problem can be solved in O(m3n2m) time\nand O(mn2m) space.\n4.2\nA Polynomial Time Solution for PLSA When m is Small\nApparently, for any solution for PLSA we should allow translation and rotation. When m = 2\nand when both translation and rotation are allowed, we can use a method similar to that in [14]\nto compute the optimal local alignment with fixed δ.\nThe idea is as follows.\nWithout loss of\ngenerality, we assume that A is static and we translate/rotate B and let τ(B) be the copy of B\nafter some translation/rotation. Let |A| = n1, |B| = n2 and let f be the degree of freedom for\nmoving B. As we are in 3D and both translation and rotation are allowed, we have f = 6. We\ncan enumerate all possible configurations for A and τ(B) to realize a discrete Fr ́echet distance of\nδ. There are O((n1n2)f) = O(n12) number of such configurations, following an argument similar\nto [22, 14]. Then for each configuration, we can use the above Theorem 4.1 to obtain the optimal\nlocal alignment for each configuration and finally we simply return the overall optimal solution.\nCorollary 4.2 When m = 2 and when both translation and rotation are allowed, the PLSA problem\ncan be solved in O(n16) time and O(n4) space.\nWe comment that when m is larger, but still a constant, the above idea can be carried over\nso that we will still be able to solve PLSA in polynomial time. It follows from [22, 14] that we\nhave O(nmf) = O(n6m) number of configurations between the m chains. Then we can again use\nCorollary 4.1 to obtain the optimal local alignment for each configuration. The overall complexity\nwould be O(n6m × m3n2m) = O(m3n8m) time and O(mn2m) space. Certainly, such an algorithm\nis only meaningful in theory.\nCorollary 4.3 When m is a constant and when both translation and rotation are allowed, the\nPLSA problem can be solved in O(m3n8m) time and O(mn2m) space.\n5\nConcluding Remarks\nIn this paper, for the first time, we study the complexity/algorithmic aspects of the famous protein\nlocal structure alignment problem under the discrete Fr ́echet distance. We show that the general\nproblem is NP-complete; in fact, it is even NP-hard to approximate within a factor of n1−ǫ. On\nthe other hand, when a constant number of proteins are given then the problem can be solved in\n8"},{"page":10,"text":"polynomial time. It would be interesting to see the empirical comparisons of protein local structure\nalignment under the discrete Fr ́echet distance with the existing methods. Another open problem,\nobviously, is whether it is possible to improve the running time of the dynamic programming\nalgorithms in Section 4.\nReferences\n[1] H. Alt and M. Godau. Measuring the resemblance of polygonal curves. In Proceedings of the\n8th Annual Symposium on Computational Geometry (SoCG’92), pages 102–109, 1992.\n[2] H. Alt and M. Godau. Computing the Fr ́echet distance between two polygonal curves. Intl. J.\nComputational Geometry and Applications, 5:75-91, 1995.\n[3] H. Alt, C. Knauer and C. Wenk. Matching polygonal curves with respect to the Fr ́echet\ndistance. In Proceedings of the 18th Annual Symposium on Theoretical Aspects of Computer\nScience (STACS’01), pages 63–74, 2001.\n[4] K. Buchin, M. Buchin and C. Wenk. Computing the Fr ́echet distance between simple polygons\nin polynomial time. In Proceedings of the 22nd Annual Symposium on Computational Geometry\n(SoCG’06), pages 80–87, 2006.\n[5] L. Conte, B. Ailey, T. Hubbard, S. Brenner, A. Murzin and C. Chothia. SCOP: a structural\nclassification of protein database. Nucleic Acids Res., 28:257-259, 2000.\n[6] T. Eiter and H. Mannila. Computing discrete Fr ́echet distance. Tech. Report CD-TR 94/64,\nInformation Systems Department, Technical University of Vienna, 1994.\n[7] M. Fr ́echet. Sur quelques points du calcul fonctionnel. Rendiconti del Circolo Mathematico di\nPalermo, 22:1-74, 1906.\n[8] M. Godau. On the complexity of measuring the similarity between geometric objects in higher\ndimensions. PhD thesis, Freie Universitaet Berlin, 1998.\n[9] J. H ̈astad. Clique is hard to approximate within n1−ǫ. Acta Mathematica, 182:105-142, 1999.\n[10] L. Holm and J. Park. DaliLite workbench for protein structure comparison. Bioinformatics,\n16:566-567, 2000.\n[11] L. Holm and C. Sander. Protein structure comparison by alignment of distance matrices. J.\nMol. Biol., 233:123-138, 1993.\n[12] P. Hui and M. Shaefer. Paired pointset traversal. In Proceedings of the 15th Annual Symposium\non Algorithms and Computation (ISAAC’04), pages 534-544, 2004.\n9"},{"page":11,"text":"[13] P. Indyk. Approximate nearest neighbor algorithms for Fr ́echet distance via product metrics.\nIn Proceedings of the 18th Annual Symposium on Computational Geometry (SoCG’02), pages\n102–106, 2002.\n[14] M. Jiang, Y. Xu and B. Zhu. Protein structure-structure alignment with discrete Fr ́echet\ndistance. In Proceedings of the 5th Asia-Pacific Bioinformatics Conf. (APBC’07), pages 131–\n141, 2007. (Revised version to appear in J. of Bioinformatics and Computational Biology.)\n[15] T. Jiang and M. Li. On the approximation of shortest common supersequences and longest\ncommon subsequences. SIAM J. Comput., 24(5):1122-1139, 1995.\n[16] X. Miao, P. Waddell and H. Valafar. TALI: Local alignment of protein structures using back-\nbone torsion angles. J. of Bioinformatics and Computational Biology., to appear, 2008.\n[17] C. Orengo, A. Michie, S. Jones, D. Jones, M. Swindles and J. Thornton. CATH—a hierarchic\nclassification of protein domain structures. Structure, 5:1093-1108, 1997.\n[18] A. Oritz, C. Strauss and O. Olmea. MMAMOTH (matching molecular models obtained from\ntheory): an automated method for model comparison. Protein Science, 11:2606-2621, 2002.\n[19] J. Qian, S. Li, D. Bu, M. Li and J. Xu. Finding compact structural motifs. In Proceedings of\nthe 18th Annual Symposium on Combinatorial Pattern Matching (CPM’07), pages 142–149,\n2007.\n[20] I. Shindyalov and P. Bourne. Protein structure alignment by incremental combinatorial ex-\ntension (CE) of the optimal path. Protein Engineering, 11:739-747, 1998.\n[21] W. Taylor and C. Orengo. Protein structure alignment. J. Mol. Biol., 208:1-22, 1989.\n[22] C. Wenk. Shape Matching in Higher Dimensions. PhD thesis, Freie Universitaet Berlin, 2002.\n10"}]},"section_tree":[],"assets":{"figures":[],"tables":[],"images":[]},"math_expressions":{"inline":[],"block":[{"equation_id":"eq1","equation_number":null,"raw_text":"Given two 3D polygonal chains A, B with |A| = k and |B| = l vertices respectively, we aim at","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq2","equation_number":null,"raw_text":"δF(f, g) = inf","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq3","equation_number":null,"raw_text":"where α and β range over all continuous non-decreasing real functions with α(0) = β(0) = 0 and","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq4","equation_number":null,"raw_text":"Definition 2.1 Given a polygonal chain (polyline) in 3D, P = ⟨p1, . . . , pk⟩of k vertices, a m-","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq5","equation_number":null,"raw_text":"walk along P partitions the path into m disjoint non-empty subchains {Pi}i=1..m such that Pi =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq6","equation_number":null,"raw_text":"⟨pki−1+1, . . . , pki⟩and 0 = k0 < k1 < · · · < km = k.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq7","equation_number":null,"raw_text":"Given two 3D polylines A = ⟨a1, . . . , ak⟩and B = ⟨b1, . . . , bl⟩, a paired walk along A and","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq8","equation_number":null,"raw_text":"B is a m-walk {Ai}i=1..m along A and a m-walk {Bi}i=1..m along B for some m, such that, for","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq9","equation_number":null,"raw_text":"1 ≤i ≤m, either |Ai| = 1 or |Bi| = 1 (that is, Ai or Bi contains exactly one vertex). The cost of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq10","equation_number":null,"raw_text":"a paired walk W = {(Ai, Bi)} along two paths A and B is","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq11","equation_number":null,"raw_text":"F (A, B) = max","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq12","equation_number":null,"raw_text":"dF (A, B) = min","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq13","equation_number":null,"raw_text":"1. |Bi| > |Ai| = 1: the person stays and the dog moves (jumps) forward;","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq14","equation_number":null,"raw_text":"2. |Ai| > |Bi| = 1: the person moves (jumps) forward and the dog stays;","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq15","equation_number":null,"raw_text":"3. |Ai| = |Bi| = 1: both the person and the dog move (jump) forward.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq16","equation_number":null,"raw_text":"in O(|A||B|) = O(kl) time [6]. Recently, Jiang, et al. showed that the minimum discrete Fr ́echet","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq17","equation_number":null,"raw_text":"Theorem 3.1 Given D = δ, the static PLSA problem does not admit any approximation of factor","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq18","equation_number":null,"raw_text":"n1−ǫ unless P=NP.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq19","equation_number":null,"raw_text":"Given a graph G = (V, E), V = {v1, v2, · · · , vN}, E = {e1, e2, · · · , eM}, we construct M + 1 3D","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq20","equation_number":null,"raw_text":"The overall reduction is as follows: P = {P0, P1, P2, ..., PM}, and","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq21","equation_number":null,"raw_text":"P0 = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq22","equation_number":null,"raw_text":"i = (i, i2, 0) is a 3D point for i = 1, ..., n.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq23","equation_number":null,"raw_text":"For each er = (vi, vj) in G, we have a corresponding sequence (3D chain)","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq24","equation_number":null,"raw_text":"Pr = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq25","equation_number":null,"raw_text":"i = (i, i2, 0) and v”i = (i, i2, δ) are 3D points for i = 1, ..., n and δ is an arbitrarily small","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq26","equation_number":null,"raw_text":"Claim B. Sr is a simple polygonal chain in 3D with |Sr| = k.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq27","equation_number":null,"raw_text":"independent set of G be ordered as I = ⟨vi1, vi2, ..., vik⟩with i1 < i2 < ... < ik. For r = 0, 1, ..., M,","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq28","equation_number":null,"raw_text":"vertices and |Sr| = k for r = 0, 1..., M.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq29","equation_number":null,"raw_text":"Property (a) Let Pr = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq30","equation_number":null,"raw_text":"p, v”q) > 3 for all p ̸= q.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq31","equation_number":null,"raw_text":"Property (b) Let Pr = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq32","equation_number":null,"raw_text":"p, v”p) ≤δ for all p ̸= i, p ̸= j.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq33","equation_number":null,"raw_text":"Property (c) Let Pr = ⟨u1, u2, · · · , uO(n)⟩, then |d(up, uq) −d(up′, uq′)| >> δ as long as the first","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq34","equation_number":null,"raw_text":"(ordered) vertices of C correspond to an independent set I of G; moreover, if C = ⟨C1, C2, · · · , Ck⟩","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq35","equation_number":null,"raw_text":"and Cp = (xp, yp, zp), then vxp ∈I. Suppose that Cp = (xp, yp, zp), Cq = (xq, yq, zq) and vxp, vxq ∈I","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq36","equation_number":null,"raw_text":"but there is an edge et = (vxp, vxq) ∈E. By our construction of Pt (from et), v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq37","equation_number":null,"raw_text":"P1 = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq38","equation_number":null,"raw_text":"P2 = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq39","equation_number":null,"raw_text":"P3 = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq40","equation_number":null,"raw_text":"P4 = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq41","equation_number":null,"raw_text":"P5 = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq42","equation_number":null,"raw_text":"P6 = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq43","equation_number":null,"raw_text":"An example of P3 is shown in Figure 1 as well, in which case black nodes are on the Z = 0 plane","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq44","equation_number":null,"raw_text":"and white nodes are on the Z = δ plane (apparently for the visualization reason, the XY-plane","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq45","equation_number":null,"raw_text":"is slanted). The solid segments are on the Z = 0 plane, the dotted segments are on the Z = δ","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq46","equation_number":null,"raw_text":"optimal independent set {v1, v3, v5} in G, the optimal local alignment C = ⟨v′","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq47","equation_number":null,"raw_text":"at its subsequence S3 = ⟨v”1, v”3, v”5⟩.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq48","equation_number":null,"raw_text":"Corollary 3.1 Given D = δ and when both translation and rotation are allowed, the (maximization","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq49","equation_number":null,"raw_text":"version of) PLSA problem does not admit any approximation of factor n1−ǫ unless P=NP.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq50","equation_number":null,"raw_text":"Notice that in our proof all the adjacent vertices in C could be non-adjacent in Pi, for i =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq51","equation_number":null,"raw_text":"n1−ǫ unless P=NP.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq52","equation_number":null,"raw_text":"consider the case when m = 2. Besides C, we try to maximize the length of the aligned subsequences","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq53","equation_number":null,"raw_text":"in P1 = A and P2 = B with |A| = n1, |B| = n2. For the ease of description, we only show how to","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq54","equation_number":null,"raw_text":"TF(i1, i2, j1, j2) = D(i1, i2, j1, j2) + M(i1, i2, j1, j2),","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq55","equation_number":null,"raw_text":"D(i1, i2, j1, j2) = max","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq56","equation_number":null,"raw_text":"M(i1, i2, j1, j2) = max","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq57","equation_number":null,"raw_text":"D(i1, i1, j1, j1) = M(i1, i1, j1, j1) =","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq58","equation_number":null,"raw_text":"Theorem 4.1 When m = 2, the static PLSA problem can be solved in O(n4) time and space.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq59","equation_number":null,"raw_text":"Apparently, for any solution for PLSA we should allow translation and rotation. When m = 2","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq60","equation_number":null,"raw_text":"after some translation/rotation. Let |A| = n1, |B| = n2 and let f be the degree of freedom for","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq61","equation_number":null,"raw_text":"moving B. As we are in 3D and both translation and rotation are allowed, we have f = 6. We","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq62","equation_number":null,"raw_text":"δ. There are O((n1n2)f) = O(n12) number of such configurations, following an argument similar","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq63","equation_number":null,"raw_text":"Corollary 4.2 When m = 2 and when both translation and rotation are allowed, the PLSA problem","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq64","equation_number":null,"raw_text":"have O(nmf) = O(n6m) number of configurations between the m chains. Then we can again use","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq65","equation_number":null,"raw_text":"would be O(n6m × m3n2m) = O(m3n8m) time and O(mn2m) space. Certainly, such an algorithm","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"}],"equation_refs":[]},"symbol_table":[],"references":{"in_text_markers":[],"bibliography":[]},"claims":[],"flow_graph":{"nodes":[],"edges":[]},"quality":{"text_char_count":25772,"parse_confidence":0.5,"equation_parse_rate_proxy":1.0,"citation_resolution_rate_proxy":0.0,"structure_coverage_proxy":0.0,"asset_coverage_proxy":0.0,"accepted_for_training":true}}