Abstract
We give subquadratic algorithms that, given two necklaces each with n beads at arbitrary positions, compute the optimal rotation of the necklaces to best align the beads. Here alignment is measured according to the ℓ p norm of the vector of distances between pairs of beads from opposite necklaces in the best perfect matching. We show surprisingly different results for p=1, p=2, and p=∞. For p=2, we reduce the problem to standard convolution, while for p=∞ and p=1, we reduce the problem to (min,+) convolution and (median,+) convolution. Then we solve the latter two convolution problems in subquadratic time, which are interesting results in their own right. These results shed some light on the classic sorting X + Y problem, because the convolutions can be viewed as computing order statistics on the antidiagonals of the X + Y matrix. All of our algorithms run in o(n 2) time, whereas the obvious algorithms for these problems run in Θ(n 2) time.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Baran, I., Demaine, E.D., Pǎtraşcu, M.: Subquadratic algorithms for 3SUM. In: Dehne, F., López-Ortiz, A., Sack, J.-R. (eds.) WADS 2005. LNCS, vol. 3608, pp. 409–421. Springer, Heidelberg (2005)
Bellman, R., Karush, W.: Mathematical programming and the maximum transform. J. SIAM 10(3), 550–567 (1962)
Bernstein, D.J.: Fast multiplication and its applications. In: Buhler, J., Stevenhagen, P. (eds.) Algorithmic Number Theory. Cambridge University Press, Cambridge (to appear)
Bussieck, M., Hassler, H., Woeginger, G.J., Zimmermann, U.T.: Fast algorithms for the maximum convolution problem. Oper. Res. Lett. 15(3), 133–141 (1994)
Cardinal, J., Kremer, S., Langerman, S.: Juggling with pattern matching. Theory Comput. Syst. 39(3), 425–437 (2006)
Chan, T.M.: All-pairs shortest paths with real weights in O(n 3/logn) time. In: Dehne, F., López-Ortiz, A., Sack, J.-R. (eds.) WADS 2005. LNCS, vol. 3608, pp. 318–324. Springer, Heidelberg (2005)
Cohn, H., Kleinberg, R., Szegedy, B., Umans, C.: Group-theoretic algorithms for matrix multiplication. In: Proc. 46th IEEE Symp. Found. Computer Science, pp. 379–388 (2005)
Colannino, J., Damian, M., Hurtado, F., Iacono, J., Meijer, H., Ramaswami, S., Toussaint, G.: An O(n logn)-time algorithm for the restriction scaffold assignment. J. Comput. Biol. 13(4), 979–989 (2006)
Cole, R., Hariharan, R.: Verifying candidate matches in sparse and wildcard matching. In: Proc. 34th ACM Symp. Theory of Computing, pp. 592–601 (2002)
Cooley, J.W., Tukey, J.W.: An algorithm for the machine calculation of complex Fourier series. Math. Comp. 19, 297–301 (1965)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)
Demaine, E.D., Mitchell, J.S.B., O’Rourke, J.: Problem 41: Sorting X + Y (pairwise sums). In: The Open Problems Project, http://cs.smith.edu/~orourke/TOPP/P41.html
Demaine, E.D., O’Rourke, J.: Open problems from CCCG 2005. In: Proc. 18th Canadian Conference on Computational Geometry (2006)
Díaz-Báñez, J.M., Farigu, G., Gómez, F., Rappaport, D., Toussaint, G.T.: El compás flamenco: A phylogenetic analysis. In: Proc. BRIDGES: Mathematical Connections in Art, Music, and Science, pp. 61–70 (2004)
Erickson, J.: Lower bounds for linear satisfiability problems. Chic. J. Theoret. Comput. Sci. (1999)
Felzenszwalb, P.F., Huttenlocher, D.P.: Distance transforms of sampled functions. TR2004-1963, Faculty of Computing and Information Science, Cornell Univ
Fischer, M.J., Paterson, M.S.: String-matching and other products. In: Proc. SIAM-AMS Applied Math. Symp. Complexity of computation, pp. 113–125 (1973)
Frederickson, G.N., Johnson, D.B.: The complexity of selection and ranking in X + Y and matrices with sorted columns. J. Comput. System Sci. 24(2), 197–208 (1982)
Fredman, M.L.: How good is the information theory bound in sorting? Theoret. Comput. Sci. 1(4), 355–361 (1976)
Fredman, M.L.: New bounds on the complexity of the shortest path problem. SIAM J. Comput. 5(1), 83–89 (1976)
Gauss, C.F.: Werke, Königlichen Gesellschaft der Wissenschaften, vol. 3 (1866)
Heideman, M.T., Johnson, D.H., Burrus, C.S.: Gauss and the history of the fast Fourier transform. Arch. Hist. Exact Sci. 34(3), 265–277 (1985)
Indyk, P.: Faster algorithms for string matching problems: Matching the convolution bound. In: Proc. 39th Symp. Found. Computer Science, pp. 166–173 (1998)
Maragos, P.: Differential morphology. In: Mitra, S., Sicuranza, G. (eds.) Nonlinear Image Processing, Ch. 10, pp. 289–329. Academic Press, London (2000)
Moreau, J.-J.: Inf-convolution, sous-additivité, convexité des fonctions numériques. J. Math. Pures Appl. 49(9), 109–154 (1970)
Rockafellar, R.T.: Convex Analysis. Princeton University Press, Princeton (1970)
Steiger, W.L., Streinu, I.: A pseudo-algorithmic separation of lines from pseudo-lines. Infor. Process. Lett. 53(5), 295–299 (1995)
Strömberg, T.: The operation of infimal convolution. Dissertationes Math. (Rozprawy Mat.) 352, 58 (1996)
Toussaint, G.: The geometry of musical rhythm. In: Akiyama, J., Kano, M., Tan, X. (eds.) JCDCG 2004. LNCS, vol. 3742, pp. 198–212. Springer, Heidelberg (2005)
Toussaint, G.T.: A comparison of rhythmic similarity measures. In: Proc. 5th International Conference on Music Information Retrieval, pp. 242–245 (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bremner, D. et al. (2006). Necklaces, Convolutions, and X + Y . In: Azar, Y., Erlebach, T. (eds) Algorithms – ESA 2006. ESA 2006. Lecture Notes in Computer Science, vol 4168. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11841036_17
Download citation
DOI: https://doi.org/10.1007/11841036_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-38875-3
Online ISBN: 978-3-540-38876-0
eBook Packages: Computer ScienceComputer Science (R0)