Knapsack in Graph Groups, HNN-Extensions and Amalgamated Products

Authors Markus Lohrey, Georg Zetzsche

Thumbnail PDF


  • Filesize: 0.67 MB
  • 14 pages

Document Identifiers

Author Details

Markus Lohrey
Georg Zetzsche

Cite AsGet BibTex

Markus Lohrey and Georg Zetzsche. Knapsack in Graph Groups, HNN-Extensions and Amalgamated Products. In 33rd Symposium on Theoretical Aspects of Computer Science (STACS 2016). Leibniz International Proceedings in Informatics (LIPIcs), Volume 47, pp. 50:1-50:14, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2016)


It is shown that the knapsack problem, which was introduced by Myasnikov et al. for arbitrary finitely generated groups, can be solved in NP for graph groups. This result even holds if the group elements are represented in a compressed form by SLPs, which generalizes the classical NP-completeness result of the integer knapsack problem. We also prove general transfer results: NP-membership of the knapsack problem is passed on to finite extensions, HNN-extensions over finite associated subgroups, and amalgamated products with finite identified subgroups.
  • Graph groups
  • HNN-extensions
  • amalgamated products
  • knapsack


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. I. Agol. The virtual Haken conjecture. Technical report,, 2012. URL:
  2. R. B. J. T. Allenby and R. J. Gregorac. On locally extended residually finite groups. In Conference on Group Theory (Univ. Wisconsin-Parkside, Kenosha, Wis., 1972), number 319 in Lecture Notes in Mathematics, pages 9-17. Springer, 1973. Google Scholar
  3. M. Benois. Parties rationnelles du groupe libre. C. R. Acad. Sci. Paris, Sér. A, 269:1188-1190, 1969. Google Scholar
  4. A. Bertoni, G. Mauri, and N. Sabadini. Membership problems for regular and context free trace languages. Information and Computation, 82:135-150, 1989. Google Scholar
  5. M. Bestvina and N. Brady. Morse theory and finiteness properties of groups. Inventiones Mathematicae, 129(3):445-470, 1997. Google Scholar
  6. V. N. Bezverkhniĭ. On the intersection of subgroups in HNN-groups. Fundamentalnaya i Prikladnaya Matematika, 4(1):199-222, 1998. Google Scholar
  7. M. Charikar, E. Lehman, A. Lehman, D. Liu, R. Panigrahy, M. Prabhakaran, A. Sahai, and A. Shelat. The smallest grammar problem. IEEE Transactions on Information Theory, 51(7):2554-2576, 2005. Google Scholar
  8. J. Crisp and B. Wiest. Embeddings of graph braid and surface groups in right-angled Artin groups and braid groups. Algebraic &Geometric Topology, 4:439-472, 2004. Google Scholar
  9. W. Dicks and M. J. Dunwoody. Groups Acting on Graphs. Cambridge University Press, 1989. Google Scholar
  10. V. Diekert and G.Rozenberg, editors. The Book of Traces. World Scientific, 1995. Google Scholar
  11. V. Diekert and J. Kausch. Logspace computations in graph products. Journal of Symbolic Computation, 2015. to appear. URL:
  12. V. Diekert and M. Lohrey. Word equations over graph products. International Journal of Algebra and Computation, 18(3):493-533, 2008. Google Scholar
  13. V. Diekert and A. Muscholl. Solvability of equations in graph groups is decidable. International Journal of Algebra and Computation, 16(6):1047-1069, 2006. Google Scholar
  14. M. Elberfeld, A. Jakoby, and T. Tantau. Algorithmic meta theorems for circuit classes of constant and logarithmic depth. Electronic Colloquium on Computational Complexity (ECCC), 18:128, 2011. Google Scholar
  15. E. Frenkel, A. Nikolaev, and A. Ushakov. Knapsack problems in products of groups. Journal of Symbolic Computation, 74:96-108, 2016. Google Scholar
  16. R. Ghrist and V. Peterson. The geometry and topology of reconfiguration. Advances in Applied Mathematics, 38(3):302-323, 2007. Google Scholar
  17. C. Haase. On the complexity of model checking counter automata. PhD thesis, University of Oxford, St Catherine’s College, 2011. Google Scholar
  18. F. Haglund and D. T. Wise. Coxeter groups are virtually special. Advances in Mathematics, 224(5):1890-1903, 2010. Google Scholar
  19. N. Haubold and M. Lohrey. Compressed word problems in HNN-extensions and amalgamated products. Theory of Computing Systems, 49(2):283-305, 2011. Google Scholar
  20. G. Higman, B. H. Neumann, and H. Neumann. Embedding theorems for groups. Journal of the London Mathematical Society. Second Series, 24:247-254, 1949. Google Scholar
  21. B. Jenner. Knapsack problems for NL. Information Processing Letters, 54(3):169-174, 1995. Google Scholar
  22. M. Kambites, P. V. Silva, and B. Steinberg. On the rational subset problem for groups. Journal of Algebra, 309(2):622-639, 2007. Google Scholar
  23. I. Kapovich, R. Weidmann, and A. Myasnikov. Foldings, graphs of groups and the membership problem. International Journal of Algebra and Computation, 15(1):95-128, 2005. Google Scholar
  24. R. M. Karp. Reducibility among combinatorial problems. In R. E. Miller and J. W. Thatcher, editors, Complexity of Computer Computations, pages 85-103. Plenum Press, 1972. Google Scholar
  25. A. Karrass and D. Solitar. The subgroups of a free product of two groups with an amalgamated subgroup. Transactions of the American Mathematical Society, 150:227-255, 1970. Google Scholar
  26. A. Karrass and D. Solitar. Subgroups of HNN groups and groups with one defining relation. Canadian Journal of Mathematics, 23:627-643, 1971. Google Scholar
  27. D. König, M. Lohrey, and G. Zetzsche. Knapsack and subset sum problems in nilpotent, polycyclic, and co-context-free groups. Technical report,, 2015. URL:
  28. D. Kuske and M. Lohrey. Logical aspects of Cayley-graphs: the monoid case. International Journal of Algebra and Computation, 16(2):307-340, 2006. Google Scholar
  29. M. Lohrey. The Compressed Word Problem for Groups. SpringerBriefs in Mathematics. Springer, 2014. Google Scholar
  30. M. Lohrey and G. Sénizergues. Theories of HNN-extensions and amalgamated products. In Proceedings of the 33rd International Colloquium on Automata, Languages and Programming (ICALP 2006), number 4052 in Lecture Notes in Computer Science, pages 504-515. Springer, 2006. Google Scholar
  31. M. Lohrey and G. Sénizergues. Rational subsets in HNN-extensions and amalgamated products. International Journal of Algebra and Computation, 18(1):111-163, 2008. Google Scholar
  32. M. Lohrey and B. Steinberg. The submonoid and rational subset membership problems for graph groups. Journal of Algebra, 320(2):728-755, 2008. Google Scholar
  33. M. Lohrey and G. Zetzsche. Knapsack in graph groups, HNN-extensions and amalgamated products. Technical report,, 2015. URL:
  34. R. C. Lyndon and P. E. Schupp. Combinatorial Group Theory. Springer, 1977. Google Scholar
  35. V. Metaftsis and E. Raptis. Subgroup separability of graphs of abelian groups. Proceedings of the American Mathematical Society, 132:1873-1884, 2004. Google Scholar
  36. A. Myasnikov, A. Nikolaev, and A. Ushakov. Knapsack problems in groups. Mathematics of Computation, 84:987-1016, 2015. Google Scholar
  37. C. H. Papadimitriou. On the complexity of integer programming. Journal of the Association for Computing Machinery, 28(4):765-768, 1981. Google Scholar
  38. J. R. Stallings. Group Theory and Three-Dimensional Manifolds. Number 4 in Yale Mathematical Monographs. Yale University Press, 1971. Google Scholar
  39. A. W. To. Unary finite automata vs. arithmetic progressions. Information Processing Letters, 109(17):1010-1014, 2009. Google Scholar
  40. J. von zur Gathen and M. Sieveking. A bound on solutions of linear integer equalities and inequalities. Proceedings of the American Mathematical Society, 72(1):155-158, 1978. Google Scholar
  41. D. T. Wise. Research announcement: the structure of groups with a quasiconvex hierarchy. Electronic Research Announcements in Mathematical Sciences, 16:44-55, 2009. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail