1. Home
  2. Explore
  3. Mathematics
  4. Graphs, Matrices, and Computation

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Graphs, Matrices, and Computation

Speaker 1Speaker 2

Graphs, Matrices, and Computation

10:50
0:00-10:50
  1. Simon

    Today’s talk begins with a birthday celebration, but the subject is a long-running partnership between graphs and matrices—and, ultimately, the programming languages and tools that let us compute with them. The speaker has spent much of his career working with both, and his central point is that each has repeatedly helped us understand and compute with the other.

  2. Anna

    And programming is part of that story because it shapes how we organize the computation. The talk is mostly retrospective, but it ends with an open challenge: how can we make large-scale parallel programming for irregular problems more productive?

  3. Simon

    There’s also a personal thread. The speaker recalls meeting Alan when Alan was at Berkeley, and later joining his applied parallel computing course at MIT in 2002. That year helped him rethink parallel computing and programming, and even gave him a skeleton for a course he later designed at Santa Barbara.

  4. Anna

    What stood out was Alan’s willingness to experiment live: open MATLAB, look something up, try it, and explain what happened. The speaker also remembers a lecture connecting multigrid to three different perspectives: algorithms and discrete data structures, approximation theory, and programming arithmetic on multipole expansions.

  5. Simon

    The lesson he took from that was that a complicated algorithm can become easier to understand once you choose the right conceptual basis. He also quotes Alan’s idea that a computational trick can be a theoretical trick. That’s a good bridge into the technical story: graphs and matrices are not just related in theory; their relationship can directly guide computation.

  6. Anna

    Let’s start with using graphs to compute with matrices. A classic example is a vertex-elimination game, described by Seymour Parter in 1959 and later called the vertex elimination game by Don Rose. You choose a vertex, mark it, and connect all of its unmarked neighbors to one another; then you repeat.

  7. Simon

    The goal is to finish with as few edges as possible. Sometimes you can choose an order that adds no edges at all. But on a four-vertex cycle, whichever vertex you mark first has two unmarked neighbors that aren’t connected, so you have to add an edge.

  8. Anna

    And choosing the best order is hard in general: the talk says optimal play is NP-complete. Still, the game has a powerful mathematical outcome. The graph you finish with is always chordal, meaning every cycle with at least four vertices has a shortcut edge, or chord.

  9. Simon

    You can play without adding any edges if and only if the original graph is chordal. And if you change the score so that you care about the smallest complete subgraph involved, you arrive at the graph’s treewidth. Treewidth matters because it is central to fixed-parameter tractable algorithms.

  10. Anna

    So where does the matrix enter? An undirected graph can be represented by a symmetric matrix: an edge corresponds to a nonzero entry. Choosing an order in the elimination game corresponds to symmetrically permuting the rows and columns of that matrix.

  11. Simon

    Then the extra edges added during elimination are exactly the fill-in pattern that appears in the Cholesky factorization of the reordered sparse matrix. That’s why a graph game can help predict the structure and cost of a matrix computation.

  12. Anna

    The talk makes that connection quantitative. For each vertex, count its higher-numbered neighbors—the unmarked neighbors it had when eliminated—and put those counts in a vector. Their sum tracks the edges in the filled graph and the storage needed for the Cholesky factor.

  13. Simon

    The same vector also helps estimate other costs. The sum of the squares of its entries gives the number of floating-point operations for the factorization. And the square of the largest entry describes the amount of fast memory needed by the multifrontal algorithm discussed in the talk; that largest-entry measure is also tied to treewidth.

  14. Anna

    This is why chordal graphs became so useful in sparse linear algebra: their theory explains fill-in, complexity, and algorithm design. The speaker points to work from the 1970s onward, when graph orderings were already being used to guide Cholesky factorization.

  15. Simon

    There’s an earlier piece of the history, too. Harry Markowitz, an economist at Rand in the 1950s, is credited in the talk with introducing the phrase “sparse matrix.” His work on portfolio theory helped establish a canonical example of combinatorics serving linear algebra.

  16. Anna

    The speaker notes that Markowitz shared the 1990 Nobel Prize in economics, and says that, as far as he knows, it is the only Nobel Prize connected to sparse-matrix work. The broader point is that graph structure has been indispensable to sparse matrix computation.

  17. Simon

    By the early 2000s, many graph algorithms had been developed and implemented at large scale for scientific computing and sparse matrices. The speaker says that, as of then, the largest graph computations in the world were often being done in service of scientific computing.

  18. Anna

    Then the direction began to swing back. Graphs became important objects of computation in their own right, with applications such as financial transactions, protein interactions, and social networks. The people who already knew how to handle very large graphs in parallel were often the sparse-matrix community.

  19. Simon

    That exchange led to graph algorithms being expressed in the language of linear algebra. A 2006 study at Lincoln Laboratory helped develop that approach, and the work eventually contributed to GraphBLAS, whose C API was issued around 2017.

  20. Anna

    The key idea is to use matrix operations over different semirings, rather than only ordinary real or complex arithmetic. With min-plus operations, for example, matrix computation can express shortest paths; Boolean operations can express connectivity.

  21. Simon

    The interpretation depends on the algorithm. Values can represent attributes on vertices and edges; addition can aggregate information at a vertex, while multiplication can process information as it crosses an edge. Change the operations and you can express different graph computations.

  22. Anna

    GraphBLAS gives programmers a precise API for that style of computation, though the speaker notes that expressing generic programming ideas in C can look messy. He especially praises Tim Davis’s SuiteSparse GraphBLAS implementation, which supports extremely large, hyper-sparse matrices and is used underneath systems including RedisGraph.

  23. Simon

    That brings us to the programming question: what language should you use? The answer depends on whether you’re developing an algorithm, experimenting with it at small or medium scale, or trying to run it at the very largest scale.

  24. Anna

    The speaker’s own history starts with Fortran 77 for graph algorithms, then moves to C. MATLAB was a major step for exploration: it offered interactive, expressive computing with quick turnaround, first for smaller matrix problems and later for medium-scale graph algorithms using linear algebra and sparse matrices.

  25. Simon

    That progression helped convince him that linear algebra was a useful way to think about graph algorithms. He sees Julia as a continuation of the effort to make exploratory computing work well for graphs, matrices, and other problems, from small scale to large.

  26. Anna

    But exploratory computing isn’t the same as implementing an irregular algorithm at enormous scale. Parallel machines bring scheduling and locality into the picture: communication can cost time, so high performance depends on keeping data and computation close together.

  27. Simon

    Some systems, such as MATLAB Star-P, addressed this by providing higher-level primitives that hid parallel details. That can work well when the computation fits those primitives. For the speaker and his colleagues in the 2000s and early 2010s, another productive approach was PGAS: Partitioned Global Address Space languages such as UPC.

  28. Anna

    PGAS gives you an apparent shared-memory space while still letting you know what data is local and what is remote. You try to keep work local, but can occasionally communicate with another processor—for instance, to inspect a remote priority queue—without managing every message yourself.

  29. Simon

    That approach worked well on machines that handled fine-grained communication effectively. The speaker’s favorite examples were the Cray T3E and Cray X1. But newer parallel computers made frequent, fine-grained communication less practical: instead, programmers had to bundle messages and exchange them, which starts to feel like programming in MPI.

  30. Anna

    The team wanted a way to handle that aggregation without making every application manage it directly. So they built a library—called xStack in the talk, with Conveyors described as a more user-friendly version. The goal was to gather operations into messages and use the machine’s communication capacity efficiently.

  31. Simon

    One example is an indexed gather: each processor has local indices and destinations, and uses them to pick entries from a distributed table. In UPC, the code is very short. In the aggregation library, the underlying work is more elaborate, but the library manages queues and communication.

  32. Anna

    For the large-graph applications they studied, the xStack code was extremely fast and made effective use of measures such as bisection bandwidth and injection bandwidth. But there’s a trade-off: the code looked so unpleasant that the speaker joked it was worse than Fortran 77.

  33. Simon

    That tension is what motivated the final challenge, called Bail in the talk. It bundles the aggregation library and Conveyors with nine small applications, including the indexed gather, as a way to discuss productive programming for distributed, irregular problems.

  34. Anna

    The invitation is for people to implement those applications in their own languages and styles, including the aggregation idea. The talk points to examples in Rust, different styles of C++, a C library, and Chapel—which hides so much of the work that the communication is not even visible.

  35. Simon

    The speaker’s bet is that aggregation under the covers will be necessary for productive programming on the largest parallel machines. But the goal isn’t to be writing Conveyor code forever; it’s to make parallel programming easier and more productive. He specifically challenges someone to build a distributed-memory aggregation library for Julia.

  36. Anna

    So the full story comes back to that two-way relationship: graph ideas have helped us understand sparse matrix computation, and linear algebra has given us tools for graph computation. The next step is finding programming approaches that let people express those ideas clearly while still using large machines effectively.

  37. Simon

    And that’s the birthday wish embedded in the technical talk: take up the programming challenge, and keep making computation more understandable and productive. Happy birthday to Alan—and thank you for bringing everyone together.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent