Skip to main content

Maximum Flows in Parametric Graph Templates

  • Conference paper
  • First Online:
Algorithms and Complexity (CIAC 2023)


Execution graphs of parallel loop programs exhibit a nested, repeating structure. We show how such graphs that are the result of nested repetition can be represented by succinct parametric structures. This parametric graph template representation allows us to reason about the execution graph of a parallel program at a cost that only depends on the program size. We develop structurally-parametric polynomial-time algorithm variants of maximum flows. When the graph models a parallel loop program, the maximum flow provides a bound on the data movement during an execution of the program. By reasoning about the structure of the repeating subgraphs, we avoid explicit construction of the instantiation (e.g., the execution graph), potentially saving an exponential amount of memory and computation. Hence, our approach enables graph-based dataflow analysis in previously intractable settings.

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

Access this chapter

USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.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


  1. Ahuja, R.K., Magnanti, T.L., Orlin, J.B.: Network Flows: Theory, Algorithms, and Applications. Prentice-Hall Inc. (1993)

    Google Scholar 

  2. Aissi, H., Mahjoub, A.R., McCormick, S.T., Queyranne, M.: Strongly polynomial bounds for multiobjective and parametric global minimum cuts in graphs and hypergraphs. Math. Program. 154(1-2), 3–28 (2015).

  3. Aneja, Y.P., Chandrasekaran, R., Nair, K.: Parametric min-cuts analysis in a network. Discret. Appl. Math. 127(3), 679–689 (2003).

    Article  MathSciNet  MATH  Google Scholar 

  4. Bauderon, M., Courcelle, B.: Graph expressions and graph rewritings. Math. Syst. Theory 20(2–3), 83–127 (1987).

    Article  MathSciNet  MATH  Google Scholar 

  5. Ben-Nun, T., de Fine Licht, J., Ziogas, A.N., Schneider, T., Hoefler, T.: Stateful dataflow multigraphs: a data-centric model for performance portability on heterogeneous architectures. In: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC 2019. Association for Computing Machinery, New York (2019).

  6. Besta, M., Hoefler, T.: Slim fly: a cost effective low-diameter network topology. In: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC 2014, pp. 348–359 (2014).

  7. Cheriyan, J., Jordán, T., Ravi, R.: On 2-coverings and 2-packings of laminar families. In: Nešetřil, J. (ed.) ESA 1999. LNCS, vol. 1643, pp. 510–520. Springer, Heidelberg (1999).

    Chapter  Google Scholar 

  8. Chu, W.W., Holloway, L.J., Lan, M., Efe, K.: Task allocation in distributed data processing. Computer 13(11), 57–69 (1980).

    Article  Google Scholar 

  9. Chvátal, V.: Linear Programming. Series of Books in the Mathematical Sciences. W. H. Freeman (1983)

    Google Scholar 

  10. Courcelle, B.: An axiomatic definition of context-free rewriting and its application to NLC graph grammars. In: Cori, R., Wirsing, M. (eds.) STACS 1988. LNCS, vol. 294, pp. 237–247. Springer, Heidelberg (1988).

    Chapter  Google Scholar 

  11. Dantzig, G.B., Fulkerson, D.R.: On the Max Flow Min Cut Theorem of Networks. RAND Corporation, Santa Monica (1955)

    Google Scholar 

  12. Dinh, G., Demmel, J.: Communication-optimal tilings for projective nested loops with arbitrary bounds. In: Scheideler, C., Spear, M. (eds.) 32nd ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2020, Virtual Event, USA, 15–17 July 2020, pp. 523–525. ACM (2020).

  13. Drewes, F., Hoffmann, B., Plump, D.: Hierarchical graph transformation. J. Comput. Syst. Sci. 64(2), 249–283 (2002).

    Article  MathSciNet  MATH  Google Scholar 

  14. Ehrig, H., Pfender, M., Schneider, H.J.: Graph-grammars: an algebraic approach. In: 14th Annual Symposium on Switching and Automata Theory, Iowa City, Iowa, USA, 15–17 October 1973, pp. 167–180 (1973).

  15. Engelfriet, J.: Context-free NCE graph grammars. In: Csirik, J., Demetrovics, J., Gécseg, F. (eds.) FCT 1989. LNCS, vol. 380, pp. 148–161. Springer, Heidelberg (1989).

    Chapter  Google Scholar 

  16. Erickson, J.: Maximum flows and parametric shortest paths in planar graphs. In: Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2010, Austin, Texas, USA, 17–19 January 2010, pp. 794–804 (2010).

  17. Feautrier, P.: Some efficient solutions to the affine scheduling problem. I. One-dimensional time. Int. J. Parallel Program. 21(5), 313–347 (1992).

  18. Gallo, G., Grigoriadis, M.D., Tarjan, R.E.: A fast parametric maximum flow algorithm and applications. SIAM J. Comput. 18(1), 30–55 (1989).

    Article  MathSciNet  MATH  Google Scholar 

  19. Ginsburg, A., Ben-Nun, T., Asor, R., Shemesh, A., Ringel, I., Raviv, U.: Reciprocal grids: a hierarchical algorithm for computing solution X-ray scattering curves from supramolecular complexes at high resolution. J. Chem. Inf. Model. 56(8), 1518–1527 (2016)

    Article  Google Scholar 

  20. Granot, F., McCormick, S.T., Queyranne, M., Tardella, F.: Structural and algorithmic properties for parametric minimum cuts. Math. Program. 135(1–2), 337–367 (2012).

    Article  MathSciNet  MATH  Google Scholar 

  21. Karger, D.R.: Enumerating parametric global minimum cuts by random interleaving. In: Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, 18–21 June 2016, pp. 542–555 (2016).

  22. Karp, R.M., Orlin, J.B.: Parametric shortest path algorithms with an application to cyclic staffing. Discret. Appl. Math. 3(1), 37–45 (1981).

    Article  MathSciNet  MATH  Google Scholar 

  23. Kim, J., Dally, W.J., Scott, S., Abts, D.: Technology-driven, highly-scalable dragonfly topology. In: 2008 International Symposium on Computer Architecture, pp. 77–88 (2008).

  24. Kwasniewski, G., et al.: Pebbles, graphs, and a pinch of combinatorics: towards tight I/O lower bounds for statically analyzable programs. In: Agrawal, K., Azar, Y. (eds.) 33rd ACM Symposium on Parallelism in Algorithms and Architectures, Virtual Event, USA, 6–8 July 2021, SPAA 2021, pp. 328–339. ACM (2021).

  25. Lattner, C., Adve, V.: LLVM: a compilation framework for lifelong program analysis transformation. In: International Symposium on Code Generation and Optimization, CGO 2004, pp. 75–86 (2004).

  26. Orlin, J.B.: Max flows in O(nm) time, or better. In: Symposium on Theory of Computing Conference, STOC 2013, Palo Alto, CA, USA, 1–4 June 2013, pp. 765–774 (2013).

  27. Pavlidis, T.: Linear and context-free graph grammars. J. ACM 19(1), 11–22 (1972).

    Article  MathSciNet  MATH  Google Scholar 

  28. Poulovassilis, A., Levene, M.: A nested-graph model for the representation and manipulation of complex objects. ACM Trans. Inf. Syst. 12(1), 35–68 (1994).

    Article  Google Scholar 

  29. Shen, C., Tsai, W.: A graph matching approach to optimal task assignment in distributed computing systems using a minimax criterion. IEEE Trans. Comput. 34(3), 197–203 (1985).

    Article  Google Scholar 

  30. Valadarsky, A., Shahaf, G., Dinitz, M., Schapira, M.: Xpander: towards optimal-performance datacenters. In: Proceedings of the 12th International on Conference on Emerging Networking EXperiments and Technologies, CoNEXT 2016, pp. 205–219. Association for Computing Machinery, New York (2016).

  31. Vasilache, N., et al.: Tensor comprehensions: framework-agnostic high-performance machine learning abstractions. CoRR abs/1802.04730 (2018)

    Google Scholar 

Download references


This work received support from the PASC project DaCeMI and from the European Research Council under the European Union’s Horizon 2020 programme (Project PSAP, No. 101002047), as well as funding from EuroHPC-JU under grant DEEP-SEA, No. 955606.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Lukas Gianinazzi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ben-Nun, T., Gianinazzi, L., Hoefler, T., Oltchik, Y. (2023). Maximum Flows in Parametric Graph Templates. In: Mavronicolas, M. (eds) Algorithms and Complexity. CIAC 2023. Lecture Notes in Computer Science, vol 13898. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-30447-7

  • Online ISBN: 978-3-031-30448-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics