Solving Woeginger’s Hiking Problem: Wonderful Partitions in Anonymous Hedonic Games

Authors Andrei Constantinescu , Pascal Lenzner , Rebecca Reiffenhäuser , Daniel Schmand , Giovanna Varricchio

Thumbnail PDF


  • Filesize: 0.84 MB
  • 18 pages

Document Identifiers

Author Details

Andrei Constantinescu
  • ETH Zürich, Switzerland
Pascal Lenzner
  • Hasso Plattner Institute, University of Potsdam, Germany
Rebecca Reiffenhäuser
  • University of Amsterdam, The Netherlands
Daniel Schmand
  • University of Bremen, Germany
Giovanna Varricchio
  • University of Calabria, Rende, Italy


We would like to thank the Schloss Dagstuhl - Leibniz-Zentrum für Informatik who hosted the event "Computational Social Dynamics" (Seminar 22452) in November 2022 [Hoefer et al., 2023], where the work leading to this paper was started. We are grateful to Martin Hoefer, Sigal Oren, and Roger Wattenhofer for organizing this event. We additionally thank Roger Wattenhofer for the useful discussions concerning this work.

Cite AsGet BibTex

Andrei Constantinescu, Pascal Lenzner, Rebecca Reiffenhäuser, Daniel Schmand, and Giovanna Varricchio. Solving Woeginger’s Hiking Problem: Wonderful Partitions in Anonymous Hedonic Games. In 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 297, pp. 48:1-48:18, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


A decade ago, Gerhard Woeginger posed an open problem that became well-known as "Woeginger’s Hiking Problem": Consider a group of n people that want to go hiking; everyone expresses preferences over the size of their hiking group in the form of an interval between 1 and n. Is it possible to efficiently assign the n people to a set of hiking subgroups so that every person approves the size of their assigned subgroup? The problem is also known as efficiently deciding if an instance of an anonymous Hedonic Game with interval approval preferences admits a wonderful partition. We resolve the open problem in the affirmative by presenting an O(n⁵) time algorithm for Woeginger’s Hiking Problem. Our solution is based on employing a dynamic programming approach for a specific rectangle stabbing problem from computational geometry. Moreover, we propose natural, more demanding extensions of the problem, e.g., maximizing the number of satisfied participants and variants with single-peaked preferences, and show that they are also efficiently solvable. Last but not least, we employ our solution to efficiently compute a partition that maximizes the egalitarian welfare for anonymous single-peaked Hedonic Games.

Subject Classification

ACM Subject Classification
  • Theory of computation → Dynamic programming
  • Theory of computation → Algorithmic game theory
  • Theory of computation → Discrete optimization
  • Algorithmic Game Theory
  • Dynamic Programming
  • Anonymous Hedonic Games
  • Single-Peaked Preferences
  • Social Optimum
  • Wonderful Partitions


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


  1. José Alcalde and Pablo Revilla. Researching with whom? Stability and manipulation. Journal of Mathematical Economics, 40(8):869-887, 2004. URL:
  2. Haris Aziz, Florian Brandl, Felix Brandt, Paul Harrenstein, Martin Olsen, and Dominik Peters. Fractional hedonic games. ACM Transactions on Economics and Computation, 7(2):1-29, 2019. URL:
  3. Haris Aziz, Felix Brandt, and Paul Harrenstein. Pareto optimality in coalition formation. Games and Economic Behavior, 82:562-581, 2013. URL:
  4. Haris Aziz, Felix Brandt, and Hans Georg Seedig. Computing desirable partitions in additively separable hedonic games. Artificial Intellgence, 195:316-334, 2013. URL:
  5. Haris Aziz, Serge Gaspers, Joachim Gudmundsson, Julián Mestre, and Hanjo Täubig. Welfare maximization in fractional hedonic games. In International Joint Conference on Artificial Intelligence, IJCAI 2015, pages 461-467. AAAI Press, 2015. URL:
  6. Haris Aziz, Paul Harrenstein, Jérôme Lang, and Michael J. Wooldridge. Boolean hedonic games. In Principles of Knowledge Representation and Reasoning, KR 2016, pages 166-175. AAAI Press, 2016. URL:
  7. Haris Aziz and Raul Savani. Hedonic games. In Handbook of Computational Social Choice. Handbook of Computational Social Choice. Cambridge University Press, 2016. Google Scholar
  8. Coralio Ballester. Np-completeness in hedonic games. Games and Economic Behavior, 49(1):1-30, 2004. URL:
  9. Suryapratim Banerjee, Hideo Konishi, and Tayfun Sönmez. Core in a simple coalition formation game. Social Choice and Welfare, 18:135-153, 2001. URL:
  10. Nadja Betzler, Arkadii Slinko, and Johannes Uhlmann. On the computation of fully proportional representation. Journal of Artificial Intelligence Research, 47:475-519, 2013. URL:
  11. Davide Bilò, Vittorio Bilò, Pascal Lenzner, and Louise Molitor. Tolerance is necessary for stability: Single-peaked swap schelling games. In International Joint Conference on Artificial Intelligence, IJCAI 2022, pages 81-87, 2022. URL:
  12. Duncan Black. On the rationale of group decision-making. Journal of political economy, 56(1):23-34, 1948. URL:
  13. Niclas Boehmer and Edith Elkind. Individual-based stability in hedonic diversity games. In AAAI Conference on Artificial Intelligence, AAAI 2020, pages 1822-1829, 2020. URL:
  14. Anna Bogomolnaia and Matthew O. Jackson. The stability of hedonic coalition structures. Games and Economic Behavior, 38(2):201-230, 2002. URL:
  15. Felix Brandt, Markus Brill, Edith Hemaspaandra, and Lane A. Hemaspaandra. Bypassing combinatorial protections: Polynomial-time algorithms for single-peaked electorates. Journal of Artificial Intelligence Research, 53:439-496, 2015. URL:
  16. Robert Bredereck, Edith Elkind, and Ayumi Igarashi. Hedonic diversity games. In International Conference on Autonomous Agents and MultiAgent Systems, AAMAS 2019, pages 565-573, 2019. URL:
  17. Andrei Constantinescu, Pascal Lenzner, Rebecca Reiffenhäuser, Daniel Schmand, and Giovanna Varricchio. Solving woeginger’s hiking problem: Wonderful partitions in anonymous hedonic games, 2023. URL:
  18. Andreas Darmann, Edith Elkind, Sascha Kurz, Jérôme Lang, Joachim Schauer, and Gerhard Woeginger. Group activity selection problem with approval preferences. International Journal of Game Theory, 47(3):767-796, 2018. URL:
  19. Jacques H Dreze and Joseph Greenberg. Hedonic coalitions: Optimality and stability. Econometrica: Journal of the Econometric Society, pages 987-1003, 1980. URL:
  20. Edith Elkind, Piotr Faliszewski, and Piotr Skowron. A characterization of the single-peaked single-crossing domain. Social Choice and Welfare, 54(1):167-181, 2020. URL:
  21. Edith Elkind and Michael J. Wooldridge. Hedonic coalition nets. In International Joint Conference on Autonomous Agents and Multiagent Systems AAMAS 2009, pages 417-424, 2009. URL:
  22. Guy Even, Retsef Levi, Dror Rawitz, Baruch Schieber, Shimon Shahar, and Maxim Sviridenko. Algorithms for capacitated rectangle stabbing and lot sizing with joint set-up costs. ACM Transactions on Algorithms, 4(3):34:1-34:17, 2008. URL:
  23. Tobias Friedrich, Pascal Lenzner, Louise Molitor, and Lars Seifert. Single-peaked jump schelling games. In International Symposium on Algorithmic Game Theory, SAGT 2023, pages 111-126, 2023. URL:
  24. Martin Hoefer, Sigal Oren, Roger Wattenhofer, and Giovanna Varricchio. Computational Social Dynamics (Dagstuhl Seminar 22452). Dagstuhl Reports, 12(11):28-44, 2023. URL:
  25. Jan Karel Lenstra, Franz Rendl, Frits Spieksma, and Marc Uetz. In memoriam Gerhard Woeginger. Journal of Scheduling, 25(5):503-505, 2022. URL:
  26. Martin Olsen. Nash stability in additively separable hedonic games and community structures. Theory of Computing Systems, 45:917-925, 2009. URL:
  27. Dominik Peters. Complexity of hedonic games with dichotomous preferences. In AAAI Conference on Artificial Intelligence, AAAI 2016, pages 579-585. AAAI Press, 2016. URL:
  28. Toby Walsh. Uncertainty in preference elicitation and aggregation. In AAAI Conference on Artificial Intelligence, AAAI 2007, pages 3-8, 2007. URL:
  29. Gerhard Woeginger. Core stability in hedonic coalition formation. In International Conference on Current Trends in Theory and Practice of Computer Science, SOFSEM 2013, pages 33-50. Springer, 2013. URL:
  30. Lan Yu, Hau Chan, and Edith Elkind. Multiwinner elections under preferences that are single-peaked on a tree. In International Joint Conference on Artificial Intelligence, IJCAI 2013, pages 425-431, 2013. URL: