Simple Linear Comparison of Strings in V-Order

(Extended Abstract)
  • Ali Alatabbi
  • Jackie Daykin
  • M. Sohel Rahman
  • William F. Smyth
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8344)


In this paper we focus on a total (but non-lexicographic) ordering of strings called V-order. We devise a new linear-time algorithm for computing the V-comparison of two finite strings. In comparison with the previous algorithm in the literature, our algorithm is both conceptually simpler, based on recording letter positions in increasing order, and more straightforward to implement, requiring only linked lists.


algorithm array comparison complexity data structure lexicographic order linear linked-list V-order Lyndon word string total order word 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [ABM-08]
    Adjeroh, D., Bell, T., Mukherjee, A.: The Burrows-Wheeler trans- form: data compression, suffix arrays, and pattern matching, p. 352. Springer (2008)Google Scholar
  2. [BGM-11]
    Breslauer, D., Grossi, R., Mignosi, F.: Simple real-time constant-space string matching. In: Giancarlo, R., Manzini, G. (eds.) CPM 2011. LNCS, vol. 6661, pp. 173–183. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  3. [BLPR-09]
    Brlek, S., Lachaud, J.-O., Provençal, X., Reutenauer, C.: Lyndon + Christoffel = digitally convex. Pattern Recognition 42(10), 2239–2246 (2009)CrossRefzbMATHGoogle Scholar
  4. [C-04]
    Chemillier, M.: Periodic musical sequences and Lyndon words. Soft Computing - A Fusion of Foundations, Methodologies and Applications 8(9), 611–616 (2004) ISSN: 1432-7643 (Print), 1433-7479 (Online)Google Scholar
  5. [CT-03]
    Chemillier, M., Truchet, C.: Computation of words satisfying the “rhythmic oddity property” (after Simha Arom’s works). Inf. Proc. Lett. 86, 255–261 (2003)CrossRefzbMATHMathSciNetGoogle Scholar
  6. [CFL-58]
    Chen, K.T., Fox, R.H., Lyndon, R.C.: Free differential calculus, IV - The quotient groups of the lower central series. Ann. Math. 68, 81–95 (1958)CrossRefMathSciNetGoogle Scholar
  7. [CDP-05]
    Crochemore, M., Désarménien, J., Perrin, D.: A note on the Burrows-Wheeler transformation. Theor. Comput. Sci. 332(1-3), 567–572 (2005)CrossRefzbMATHGoogle Scholar
  8. [CP-91]
    Crochemore, M., Perrin, D.: Two-way string-matching. J. Assoc. Comput. Mach. 38(3), 651–675 (1991)CrossRefzbMATHMathSciNetGoogle Scholar
  9. [D-85]
    Daykin, D.E.: Ordered ranked posets, representations of integers and inequalities from extremal poset problems. In: Rival, I. (ed.) Graphs and Order, Proceedings of a Conference in Banff, Canada. NATO Advanced Sciences Institutes Series C: Mathematical and Physical Sciences, vol. 147, pp. 395–412. Reidel, Dordrecht-Boston (1984, 1985)Google Scholar
  10. [D-11]
    Daykin, D.E.: Algorithms for the Lyndon unique maximal factorization. J. Combin. Math. Combin. Comput. 77, 65–74 (2011)zbMATHMathSciNetGoogle Scholar
  11. [DaD-96]
    Danh, T.-N., Daykin, D.E.: The structure of V-order for integer vectors. In: Hilton, A.J.W. (ed.) Congr. Numer., vol. 113, pp. 43–53. Utilas Mat. Pub. Inc., Winnipeg (1996)Google Scholar
  12. [DaD-97]
    Danh, T.-N., Daykin, D.E.: Ordering integer vectors for coordinate deletions. J. London Math. Soc. 55(2), 417–426 (1997)CrossRefMathSciNetGoogle Scholar
  13. [DD-03]
    Daykin, D.E., Daykin, J.W.: Lyndon-like and V-order factorizations of strings. J. Discrete Algorithms 1, 357–365 (2003)CrossRefzbMATHMathSciNetGoogle Scholar
  14. [DD-08]
    Daykin, D.E., Daykin, J.W.: Properties and construction of unique maximal factorization families for strings. Internat. J. Found. Comput. Sci. 19(4), 1073–1084 (2008)CrossRefzbMATHMathSciNetGoogle Scholar
  15. [DDIS-13]
    Daykin, D.E., Daykin, J.W., Iliopoulos, C.S., Smyth, W.F.: Generic algorithms for factoring strings. In: Aydinian, H., Cicalese, F., Deppe, C. (eds.) Ahlswede Festschrift. LNCS, vol. 7777, pp. 402–418. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  16. [DDS-09]
    Daykin, D.E., Daykin, J.W., (Bill) Smyth, W.F.: Combinatorics of unique maximal factorization families (UMFFs). In: Janicki, R., Puglisi, S.J., Rahman, M.S. (eds.) Fund. Inform, vol. 97-3, pp. 295–309 (2009); Special Issue on StringologyGoogle Scholar
  17. [DDS-11]
    Daykin, D.E., Daykin, J.W., Smyth, W.F.: String comparison and lyndon-like factorization using V-order in linear time. In: Giancarlo, R., Manzini, G. (eds.) CPM 2011. LNCS, vol. 6661, pp. 65–76. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  18. [DDS-13]
    Daykin, D.E., Daykin, J.W., Smyth, W.F.: A linear partitioning algorithm for Hybrid Lyndons using V-order. Theoret. Comput. Sci. 483, 149–161 (2013)CrossRefzbMATHMathSciNetGoogle Scholar
  19. [DIS-94]
    Daykin, J.W., Iliopoulos, C.S., Smyth, W.F.: Parallel RAM algorithms for factorizing words. Theoret. Comput. Sci. 127, 53–67 (1994)CrossRefzbMATHMathSciNetGoogle Scholar
  20. [DS-13]
    Daykin, J.W., Smyth, W.F.: A bijective variant of the Burrows-Wheeler transform using V-Order (submitted)Google Scholar
  21. [Du-83]
    Duval, J.P.: Factorizing words over an ordered alphabet. J. Algorithms 4, 363–381 (1983)CrossRefzbMATHMathSciNetGoogle Scholar
  22. [G-53]
    F. Gray, Pulse code communication, U.S. patent no. 2,632,058 (March 17, 1953)Google Scholar
  23. [I-86]
    Iliopoulos, C.S.: Optimal cost parallel algorithms for lexicographical ordering, Purdue University, Tech. Rep. 86-602 (1986)Google Scholar
  24. [IS-92]
    Iliopoulos, C.S., Smyth, W.F.: Optimal algorithms for computing the canonical form of a circular string. Theoret. Comput. Sci. 92(1), 87–105 (1992)CrossRefzbMATHMathSciNetGoogle Scholar
  25. [KSB-06]
    Kärkkäinen, J., Sanders, P., Burkhardt, S.: Linear work suffix array construction. J. ACM 53(6), 918–936 (2006)CrossRefMathSciNetGoogle Scholar
  26. [KA-03]
    Ko, P., Aluru, S.: Space efficient linear time construction of suffix arrays. In: Baeza-Yates, R., Chávez, E., Crochemore, M. (eds.) CPM 2003. LNCS, vol. 2676, pp. 200–210. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  27. [KS-98]
    Kreher, D.L., Stinson, D.R.: Combinatorial Algorithms: Generation, Enumeration, and Search. CRC Press (1998)Google Scholar
  28. [L-83]
    Lothaire, M.: Combinatorics on Words. Addison-Wesley, Reading (1983); 2nd edn. Cambridge University Press, Cambridge (1997)Google Scholar
  29. [NM-07]
    Navarro, G., Mäkinen, V.: Compressed full-text indexes. ACM Computing Surveys - CSUR 39(1), 2-es (2007)Google Scholar
  30. [NZC-09]
    Nong, G., Zhang, S., Chan, W.H.: Linear suffix array construction by almost pure induced-sorting. In: Proc. 2009 Data Compression Conf., pp. 193–202 (2009)Google Scholar
  31. [R-03]
    Ruskey, F.: Combinatorial Generation (Unpublished book). CiteSeerX:, on combinatorics (2003)Google Scholar
  32. [S-97]
    Savage, C.: A survey of combinatorial Gray codes. SIAM Rev. 39(4), 605–629 (1997)CrossRefzbMATHMathSciNetGoogle Scholar
  33. [SVM-11]
    Sirén, J., Välimäki, N., Mäkinen, V.: Indexing finite language representation of population genotypes. In: Przytycka, T.M., Sagot, M.-F. (eds.) WABI 2011. LNCS, vol. 6833, pp. 270–281. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  34. [S-03]
    Smyth, B.: Computing patterns in strings, p. 423. Pearson (2003)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Ali Alatabbi
    • 1
  • Jackie Daykin
    • 1
    • 2
  • M. Sohel Rahman
    • 1
    • 3
  • William F. Smyth
    • 4
  1. 1.Department of InformaticsKing’s College LondonUK
  2. 2.Department of Computer ScienceRoyal Holloway, University of LondonUK
  3. 3.AℓEDA Group, Department of Computer Science and EngineeringBangladesh University of Engineering and TechnologyDhakaBangladesh
  4. 4.Algorithms Research Group, Department of Computing & SoftwareMcMaster UniversityCanada

Personalised recommendations