EP03

EP03: Bach and Graph Connectivity

k-连通性, 割顶
Graph Theory

Overview

Bach’s Fugue in C Major (BWV 846) has four independent voices: soprano, alto, tenor, bass. Delete any one of them and the remaining three still form a coherent harmonic structure. Why? The mathematical answer is graph connectivity: the voice-structure of polyphonic music forms a 2-connected graph with no cut vertices, while homophonic music (melody + accompaniment) is at best 1-connected, with the melody as a potential cut vertex.

This episode develops the theory of graph connectivity — cut vertices, bridges, -connectivity — and applies it to a Bach chorale model. We also introduce Tarjan’s linear-time algorithm for finding cut vertices via depth-first search, and sketch the topological extension using simplicial complexes and Betti numbers.

中文: “复调音乐的’删不坏感',并非偶然,而源于其分布式结构。”


Prerequisites


Definitions

Definition 3.1 (Graph Connectivity)

An undirected graph is connected if for every pair of vertices there exists a path from to .

The connected components of are its maximal connected subgraphs.

Definition 3.2 (Cut Vertex (Articulation Point))

A vertex is a cut vertex (or articulation point) of a connected graph if the subgraph (obtained by deleting and all edges incident to ) is disconnected.

Equivalently, is a cut vertex if and only if there exist vertices such that every path from to passes through .

Definition 3.3 (Bridge)

An edge is a bridge if the graph (obtained by deleting only the edge ) is disconnected.

Every bridge satisfies: is a cut vertex in and vice versa (unless one of them has degree 1, in which case is a pendant edge).

Definition 3.4 (k-Connectivity)

For , a graph with is -connected if removing any set of fewer than vertices leaves connected. Formally:

is the vertex connectivity of . We say is -connected if .

Special cases:

  • : connected (no vertex whose removal disconnects)
  • : 2-connected — no cut vertices
  • : 3-connected — no pair of vertices whose removal disconnects
Definition 3.5 (DFS Discovery and Finish Times)

In a depth-first search of a graph starting from vertex , each vertex receives:

  • Discovery time : the step at which is first visited
  • Finish time : the step at which all neighbors of have been explored

A back edge in an undirected DFS tree is an edge where is an ancestor of in the DFS tree (i.e., and was not processed via ).

Definition 3.6 (Low Value)

For each vertex in a DFS tree, define the low value:

Informally, is the smallest discovery time reachable from the subtree rooted at using at most one back edge.

Definition 3.7 (Voice Graph of a Polyphonic Work)

Given a -voice polyphonic composition, define the voice graph where:

  • : one vertex per voice (soprano, alto, tenor, bass)
  • : an edge is present if voices and form a consonant harmonic interval (third, fifth, sixth, octave) simultaneously at some point in the piece

In the weighted version, the weight counts the number of beats at which and are in consonance.


Main Theorems

Theorem 3.1 (Tarjan's Cut Vertex Algorithm)

A non-root vertex in a DFS tree is a cut vertex of if and only if has a child in the DFS tree such that

The root of the DFS tree is a cut vertex if and only if it has at least two children in the DFS tree.

This algorithm finds all cut vertices in time.

Proof.

Correctness of the non-root condition:

Suppose is a non-root DFS vertex and is a child of in the DFS tree. The condition means that no vertex in the subtree rooted at has a back edge to any proper ancestor of .

() If for some child , then the subtree of cannot reach any ancestor of without going through . Hence removing disconnects the subtree of from the rest of the graph, so is a cut vertex.

() Suppose is a cut vertex. Let be a connected component of that does not contain ’s parent in the DFS tree. Pick any vertex of that was first reached from in the DFS (i.e., is in ’s DFS subtree). Since has no direct path to ’s parent (otherwise would not separate ), all paths from the subtree of to ancestors of pass through , meaning .

Root case: The root has no parent; it is a cut vertex exactly when its removal separates its subtrees, which happens iff it has children.

Complexity: DFS runs in . Computing for all vertices during the DFS adds no asymptotic overhead (one pass, bottom-up).

Visual: Trace DFS on a small example: vertices , edges . Vertex has ; child ’s subtree can only reach and , so . Hence is a cut vertex. Removing disconnects from .

Theorem 3.2 (Whitney's Theorem)

For any graph with :

where is vertex connectivity, is edge connectivity (minimum number of edges whose removal disconnects ), and is the minimum degree.

Proof.

: Let be a vertex of minimum degree . The edges incident to form a cut set (removing them isolates ). Hence .

: Given a minimum edge cut with , we construct a vertex cut of size at most . For each edge , choose one of its endpoints (say ) to include in a vertex cut . Removing separates the graph (since was a cut and each edge in has an endpoint in ). This argument may select the same vertex for multiple edges, so , giving .

Remark: The bounds are tight but not always equal. The complete bipartite graph satisfies . The graph obtained from by subdividing one edge has .

Theorem 3.3 (Menger's Theorem)

For vertices in a graph , the maximum number of internally vertex-disjoint - paths equals the minimum size of a vertex cut separating from .

Consequently, is -connected if and only if every pair of distinct vertices is connected by at least internally vertex-disjoint paths.

Proof.

This is a special case of the max-flow min-cut theorem applied to the auxiliary network defined as follows:

  • Each vertex is split into and with a directed edge of capacity 1.
  • Each undirected edge becomes two directed edges: and , each with capacity 1 (or if we only care about vertex cuts).
  • The source is , the sink is .

In this network, a flow of value corresponds to internally vertex-disjoint paths, and a minimum cut of value corresponds to a minimum vertex separator of size . The max-flow min-cut theorem then gives Menger’s result.

Prop 3.1 (Polyphony Is 2-Connected)
The voice graph of a Bach four-voice fugue is 2-connected (no cut vertices). The voice graph of a standard homophonic texture (single melody with chordal accompaniment) is at most 1-connected and typically has the melody as a cut vertex.
Proof.

(Empirical argument supporting the mathematical claim.) In a four-voice fugue such as BWV 846, every pair of voices forms at least one consonant interval during the piece (verified by score analysis). Moreover, every voice is in consonance with every other voice in multiple passages. Consequently, the voice graph is (the complete graph on 4 vertices), which has . Even after removing one voice, the remaining three form , which is connected.

In homophonic texture, the accompaniment voices may only be in consonance with the melody but not with each other except through the melody. This produces a star graph with the melody at the center — a graph with and the center as the unique cut vertex.

中文: “复调音乐是分布式结构,每个声部都与其他声部密切连接,形成高连通的网状拓扑,没有不可或缺的中心。”


Tarjan’s Algorithm: Worked Example

Consider with and edges .

DFS from vertex 0 (discovery order: 0,1,2 backtracks; 1 continues to 3,4):

Vertex
0 0 9 0
1 1 8 0
2 2 3 0 (back edge to 0)
3 4 7 4
4 5 6 4

Check cut-vertex condition:

  • Vertex 1: child 3 has . Cut vertex.
  • Vertex 3: child 4 has . Cut vertex.

Removing vertex 1 disconnects from . Removing vertex 3 disconnects . These are precisely the articulation points.


Extension: Simplicial Complexes and Betti Numbers

Definition 3.8 (Simplicial Complex of a Score)

Given a -voice piece, define a simplicial complex where:

  • 0-simplices: individual notes (pitch classes at time )
  • 1-simplices: dyads (pairs of simultaneously sounding notes)
  • 2-simplices: trichords (three simultaneously sounding notes)
  • -simplices: -note chords

The -th Betti number counts -dimensional “holes” in . counts connected components, counts independent cycles.

中文: “传统的图只能捕捉两个音符之间的关系,但和弦是三个或更多音符的同时交互,这种高阶关系需要更高级的数学工具:单纯复形。”

The 2025 paper cited below used this approach to distinguish fugues from dances in Bach’s WTC. Fugues exhibit high (many harmonic cycles) while dances show simpler topology.


Musical Connection

音乐联系

Cut Vertices and Harmonic Syntax

In a chord-progression graph (vertices = chords, weighted directed edges = transition frequency), the dominant seventh chord V7 functions as a near-cut-vertex in common-practice tonality. Almost all progressions to the tonic I pass through V7, making it the bottleneck of harmonic syntax.

In Bach’s chorales, Rameau’s principle of fundamental bass predicts that V → I is the strongest directed edge. A chord-graph analysis of a Bach chorale corpus (e.g., the 371 harmonized chorales) reveals:

  • V7 (G7 in C major) has the highest betweenness centrality of any chord — it lies on the most shortest paths between other chords
  • The I–IV–V–I “loop” has no interior cut vertex (it is the backbone 3-cycle of the graph)
  • Chromatic chords (viio7, augmented sixths) appear as bridges: edges whose removal would disconnect remote key areas from the tonic region

This is why Wagner could exploit chromatic bridges so dramatically: by avoiding the V7 → I resolution (the strongest edge), he kept the harmonic graph in a perpetually “almost-disconnected” state, creating sustained tension.

中文: “从图论的连通性,到复调音乐的声部结构,数学再一次揭示了音乐的深层逻辑。”


Limits and Open Questions

  1. Directed vs. undirected graphs: The voice graph model (Definition 3.7) is undirected, but chord-progression graphs are naturally directed. Directed connectivity (strong vs. weak connectivity) is a stronger notion: a directed graph is strongly connected if for every ordered pair there is a directed path from to . The harmonic syntax graph of a key is strongly connected within the diatonic scale but not across all chromatic chords.

  2. Temporal dynamics: Graph connectivity is a static measure. A sliding-window analysis that recomputes at each time window reveals how connectivity evolves during a piece — tension arches correspond to drops in .

  3. Edge weights and weighted connectivity: Weighted -connectivity (where edge weights represent transition probabilities) uses flow-based generalizations of Menger’s theorem. The maximum weighted flow through the network gives a more musically meaningful notion of “structural importance.”

  4. Simplicial homology and music: Computing Betti numbers for a Bach fugue requires building the full simplicial complex (Definition 3.8) and then computing the ranks of homology groups . For large choral works, this is computationally feasible but the musical interpretation of (3-dimensional holes) remains open.

Conjecture (Polyphony Degree and Connectivity)
For a -voice polyphonic work where every pair of voices forms at least one consonant interval, the voice graph contains as a subgraph, so . Conversely, the minimum connectivity of any -voice homophonic texture is at most 1. This suggests a sharp connectivity threshold distinguishing polyphonic from homophonic texture, independent of the specific harmony used.

Academic References

  1. Tarjan, R. E. (1972). Depth-first search and linear graph algorithms. SIAM Journal on Computing, 1(2), 146–160.

  2. Whitney, H. (1932). Congruent graphs and the connectivity of graphs. American Journal of Mathematics, 54(1), 150–168.

  3. Menger, K. (1927). Zur allgemeinen Kurventheorie. Fundamenta Mathematicae, 10, 96–115.

  4. Tymoczko, D. (2011). A Geometry of Music. Oxford University Press. Ch. 2 (Harmonic progressions as graphs).

  5. Bergomi, M. G., Baratè, A., & Di Fabio, B. (2015). Towards a topological fingerprint of music. Lecture Notes in Computer Science, 9067, 88–100.

  6. Cantù, D., & Andreatta, M. (2025). Topological analysis of Bach’s Well-Tempered Clavier using simplicial homology. Journal of Mathematics and Music, 19(1), 1–22.

  7. Diestel, R. (2017). Graph Theory (5th ed.). Springer. Ch. 3 (Connectivity).

  8. Popoff, A., Andreatta, M., & Ehresmann, A. (2018). Relational poly-Klumpenhouwer networks for transformational and voice-leading analysis. Journal of Mathematics and Music, 12(1), 35–55.