Skip to main content

Better Heuristic Algorithms for the Repetition Free LCS and Other Variants

  • Conference paper
  • First Online:
String Processing and Information Retrieval (SPIRE 2018)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11147))

Included in the following conference series:

Abstract

In Discrete Applied Mathematics 2010, Adi et al. introduce and study a variant of the well known Longest Common Subsequence problem, named Repetition Free Longest Common Subsequence (RFLCS). In RFLCS the input consists of two strings A and B over an alphabet \(\varSigma \) and the goal is to find the longest common subsequence containing only distinct characters from \(\varSigma \). Adi et al. prove that the problem is \(\mathcal {APX}\)-hard and show three approximation algorithms. Castelli et al. (Operations Research Letters 2013) propose a heuristic genetic algorithm and Blum and Blesa introduce metaheuristic algorithms (International Conference on Artificial Evolution 2013 and Evolutionary Computation in Combinatorial Optimization 2016).

In this paper we design and test several new heuristic algorithms for RFLCS. The first algorithm, uses dynamic programming and in our testing setup outperforms the algorithms of Adi et al. The second heuristic algorithm improves upon the first and becomes comparable to the state-of-the-art algorithms of Blum and Blesa. The third algorithm transforms the RFLCS instance into an instance of the Maximum Independent Set (MIS) problem with the same value of the optimum solution. Then, we apply known algorithms for the MIS problem. We also augment one of the approximation algorithms of Adi et al. and we prove that we achieve an approximation of factor \(2\sqrt{\min \{|A|,|B|\}}\).

Finally, we introduce a new variant of the LCS problem, named Multiset Restricted Common Subsequence (MRCS), that is a generalization of RFLCS. We present an exact polynomial time algorithm for MRCS for constant size alphabet. Additionally, we show that MRCS admits a \(2\sqrt{\min \{|A|,|B|\}}\) approximation.

This work was supported by the research programme PN 1819 “Advanced IT resources to support digital transformation processes in the economy and society - RESINFO-TD” (2018), project PN 1819-01-01 “New research in complex systems modelling and optimization with applications in industry, business and cloud computing”, funded by the Ministry of Research and Innovation.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Adi, S.S., et al.: Repetition-free longest common subsequence. Discret. Appl. Math. 158(12), 1315–1324 (2010). https://doi.org/10.1016/j.dam.2009.04.023, traces from LAGOS07 IV Latin American Algorithms, Graphs, and Optimization Symposium Puerto Varas - 2007

    Article  MathSciNet  Google Scholar 

  2. Andrade, D.V., Resende, M.G.C., Werneck, R.F.: Fast local search for the maximum independent set problem. J. Heuristics 18(4), 525–547 (2012). https://doi.org/10.1007/s10732-012-9196-4

    Article  MATH  Google Scholar 

  3. Apostolico, A.: String editing and longest common subsequences. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 361–398. Springer, Heidelberg (1997). https://doi.org/10.1007/978-3-662-07675-0_8

    Chapter  Google Scholar 

  4. Bergroth, L., Hakonen, H., Raita, T.: A survey of longest common subsequence algorithms. In: Proceedings Seventh International Symposium on String Processing and Information Retrieval, SPIRE 2000, pp. 39–48 (2000). https://doi.org/10.1109/SPIRE.2000.878178

  5. Blum, C., Blesa, M.J.: Construct, merge, solve and adapt: application to the repetition-free longest common subsequence problem. In: Chicano, F., Hu, B., García-Sánchez, P. (eds.) EvoCOP 2016. LNCS, vol. 9595, pp. 46–57. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-30698-8_4

    Chapter  Google Scholar 

  6. Blum, C., Blesa, M.J.: A comprehensive comparison of metaheuristics for the repetition-free longest common subsequence problem. J. Heuristics 24(3), 551–579 (2018). https://doi.org/10.1007/s10732-017-9329-x

    Article  Google Scholar 

  7. Blum, C., Blesa, M.J., Calvo, B.: Beam-ACO for the repetition-free longest common subsequence problem. In: Legrand, P., Corsini, M.-M., Hao, J.-K., Monmarché, N., Lutton, E., Schoenauer, M. (eds.) EA 2013. LNCS, vol. 8752, pp. 79–90. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11683-9_7

    Chapter  Google Scholar 

  8. Bonizzoni, P., Della Vedova, G., Dondi, R., Fertin, G., Rizzi, R., Vialette, S.: Exemplar longest common subsequence. IEEE/ACM Trans. Comput. Biol. Bioinform. 4(4), 535–543 (2007). https://doi.org/10.1109/TCBB.2007.1066

    Article  MATH  Google Scholar 

  9. Bonizzoni, P., Vedova, G.D., Dondi, R., Pirola, Y.: Variants of constrained longest common subsequence. Inf. Process. Lett. 110(20), 877–881 (2010). https://doi.org/10.1016/j.ipl.2010.07.015

    Article  MathSciNet  MATH  Google Scholar 

  10. Castelli, M., Beretta, S., Vanneschi, L.: A hybrid genetic algorithm for the repetition free longest common subsequence problem. Oper. Res. Lett. 41(6), 644–649 (2013). https://doi.org/10.1016/j.orl.2013.09.002

    Article  MATH  Google Scholar 

  11. Castelli, M., Dondi, R., Mauri, G., Zoppis, I.: The longest filled common subsequence problem. In: Kärkkäinen, J., Radoszewski, J., Rytter, W. (eds.) 28th Annual Symposium on Combinatorial Pattern Matching (CPM 2017). Leibniz International Proceedings in Informatics (LIPIcs), vol. 78, pp. 14:1–14:13. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany (2017). https://doi.org/10.4230/LIPIcs.CPM.2017.14

  12. Chin, F.Y., Santis, A.D., Ferrara, A.L., Ho, N., Kim, S.: A simple algorithm for the constrained sequence problems. Inf. Process. Lett. 90(4), 175–179 (2004). https://doi.org/10.1016/j.ipl.2004.02.008

    Article  MathSciNet  MATH  Google Scholar 

  13. Fernandes, C.G., Kiwi, M.: Repetition-free longest common subsequence of random sequences. Discret. Appl. Math. 210, 75–87 (2016). https://doi.org/10.1016/j.dam.2015.07.005. lAGOS13: Seventh Latin-American Algorithms, Graphs, and Optimization Symposium, Playa del Carmen, Mxico (2013)

    Article  MathSciNet  Google Scholar 

  14. Gotthilf, Z., Hermelin, D., Lewenstein, M.: Constrained LCS: hardness and approximation. In: Ferragina, P., Landau, G.M. (eds.) CPM 2008. LNCS, vol. 5029, pp. 255–262. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-69068-9_24

    Chapter  Google Scholar 

  15. Hirschberg, D.S.: Algorithms for the longest common subsequence problem. J. ACM (JACM) 24(4), 664–675 (1977). https://doi.org/10.1145/322033.322044

    Article  MathSciNet  MATH  Google Scholar 

  16. Maier, D.: The complexity of some problems on subsequences and supersequences. J. ACM 25(2), 322–336 (1978). https://doi.org/10.1145/322063.322075

    Article  MathSciNet  MATH  Google Scholar 

  17. Tsai, Y.T.: The constrained longest common subsequence problem. Inf. Process. Lett. 88(4), 173–176 (2003). https://doi.org/10.1016/j.ipl.2003.07.001

    Article  MathSciNet  MATH  Google Scholar 

  18. Wagner, R.A., Fischer, M.J.: The string-to-string correction problem. J. ACM 21(1), 168–173 (1974). https://doi.org/10.1145/321796.321811

    Article  MathSciNet  MATH  Google Scholar 

  19. Xiao, M., Nagamochi, H.: Exact algorithms for maximum independent set. Inf. Comput. 255, 126–146 (2017). https://doi.org/10.1016/j.ic.2017.06.001

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

We thank the anonymous reviewers for their useful comments and for pointing out some ideas which led to the development of the Top-k heuristic in Sect. 3.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alexandru Popa .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Mincu, R.S., Popa, A. (2018). Better Heuristic Algorithms for the Repetition Free LCS and Other Variants. In: Gagie, T., Moffat, A., Navarro, G., Cuadros-Vargas, E. (eds) String Processing and Information Retrieval. SPIRE 2018. Lecture Notes in Computer Science(), vol 11147. Springer, Cham. https://doi.org/10.1007/978-3-030-00479-8_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-00479-8_24

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-00478-1

  • Online ISBN: 978-3-030-00479-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics