Linear Pseudo-Polynomial Factor Algorithm for Automaton Constrained Tree Knapsack Problem

  • Soh Kumabe
  • Takanori MaeharaEmail author
  • Ryoma Sin’ya
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11355)


The automaton constrained tree knapsack problem is a variant of the knapsack problem in which the items are associated with the vertices of the tree, and we can select a subset of items that is accepted by a tree automaton. If the capacities or the profits of items are integers, it can be solved in pseudo-polynomial time by the dynamic programming algorithm. However, this algorithm has a quadratic pseudo-polynomial factor in its complexity because of the max-plus convolution. In this study, we propose a new dynamic programming technique, called heavy-light recursive dynamic programming, to obtain algorithms having linear pseudo-polynomial factors in the complexity. Such algorithms can be used for solving the problems with polynomially small capacities/profits efficiently, and used for deriving efficient fully polynomial-time approximation schemes. We also consider the k-subtree version problem that finds k disjoint subtrees and a solution in each subtree that maximizes total profit under a budget constraint. We show that this problem can be solved in almost the same complexity as the original problem.


Knapsack problem Dynamic programming Tree automaton 



We thank the anonymous reviewers for their helpful comments.


  1. 1.
    Backurs, A., Indyk, P., Schmidt, L.: Better approximations for tree Sparsity in nearly-linear time. In: Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2017), pp. 2215–2229 (2017)Google Scholar
  2. 2.
    Bremner, D., et al.: Necklaces, convolutions, and X + Y. In: Azar, Y., Erlebach, T. (eds.) ESA 2006. LNCS, vol. 4168, pp. 160–171. Springer, Heidelberg (2006). Scholar
  3. 3.
    Chekuri, C., Pál, M.: A recursive greedy algorithm for walks in directed graphs. In: Proceedings of the 46th Annual Symposium on Foundations of Computer Science (FOCS 2005), vol. 2005, pp. 245–253 (2005)Google Scholar
  4. 4.
    Cho, G., Shaw, D.X.: A depth-first dynamic programming algorithm for the tree knapsack problem. J. Comput. 9(4), 431–438 (1997)MathSciNetzbMATHGoogle Scholar
  5. 5.
    Comon, H., et al.: Tree automata techniques and applications (2007)Google Scholar
  6. 6.
    Cygan, M., Mucha, M., Węgrzycki, K., Włodarczyk, M.: On problems equivalent to (min,+)-convolution. arXiv:1702.07669 (2017)
  7. 7.
    Hirao, T., Yoshida, Y., Nishino, M., Yasuda, N., Nagata, M.: Single-document summarization as a tree knapsack problem. In: Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing (EMNLP 2013), pp. 1515–1520 (2013)Google Scholar
  8. 8.
    Hochbaum, D.S., Pathria, A.: Node-optimal connected k-subgraphs. University of California, Berkeley, Technical report (1994)Google Scholar
  9. 9.
    Ibarra, O., Kim, C.: Fast approximation algorithms for the knapsack and sum of subset problems. J. ACM 22(4), 463–468 (1975)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Ishihata, M., Maehara, T., Rigaux, T.: Algorithmic meta-theorems for monotone submodular maximization. arXiv:1807.04575 (2018)
  11. 11.
    Johnson, D.S., Niemi, K.: On knapsacks, partitions, and a new dynamic programming technique for trees. Mathe. Oper. Res. 8(1), 1–14 (1983)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Kellerer, H., Pferschy, U., Pisinger, D.: Knapsack Problems. Springer, Heidelberg (2003). Scholar
  13. 13.
    Lawler, E.L.: Fast approximation algorithms for knapsack problems. In: Proceedings of the 18th Annual Symposium on Foundations of Computer Science (FOCS 1977), vol. 4(4), pp. 339–357 (1977)Google Scholar
  14. 14.
    Lukes, J.A.: Efficient algorithm for the partitioning of trees. IBM J. Res. Dev. 18(3), 217–224 (1974)MathSciNetCrossRefGoogle Scholar
  15. 15.
    Van der Merwe, D., Hattingh, J.M.: Tree knapsack approaches for local access network design. Eur. J. Oper. Res. 174(3), 1968–1978 (2006)CrossRefGoogle Scholar
  16. 16.
    Pferschy, U., Schauer, J.: The knapsack problem with conflict graphs. J. Graph Algorithms Appl. 13(2), 233–249 (2009)MathSciNetCrossRefGoogle Scholar
  17. 17.
    Sleator, D.D., Tarjan, R.E.: A data structure for dynamic trees. J. Comput. Syst. Sci. 26(3), 362–391 (1983)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Thatcher, J.W., Wright, J.B.: Generalized finite automata theory with an application to a decision problem of second-order logic. Mathe. Syst. Theor. 2(1), 57–81 (1968)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.The University of TokyoTokyoJapan
  2. 2.RIKEN Center for Advanced Intelligence ProjectTokyoJapan
  3. 3.Akita UniversityAkitaJapan

Personalised recommendations