Valiant's depth reduction #
A grading of a set E of edges with D levels is a labelling of the vertices by numbers below
D that increases along every edge (IsGrading). The levels increase along every path, so a path
of edges of E has at most D vertices; labelling every vertex of a directed acyclic graph by the
number of vertices on a longest path ending at it is a grading, so this is a way of bounding the
depth of the graph. Valiant's depth reduction [Val77],
Jukna, Lemma 1.4: if E has a grading with 2 ^ k levels, then for every r ≤ k,
removing some r / k of the edges leaves edges with a grading with 2 ^ (k - r) levels
(IsGrading.exists_sdiff).
An edge (u, v) is in class b when the levels of u and v first differ, from the top, at
bit b (InClass). Each edge is in at most one class, so among k classes one has at most 1 / k
of the edges; deleting bit b from every level grades all edges outside class b with half the
levels. Repeating r times removes at most r / k of the edges.
Main definitions #
Cslib.IsGrading: a labelling of the vertices that increases along the edges.
Main results #
Cslib.IsGrading.exists_sdiff: Valiant's depth reduction.
References #
Valiant's depth reduction. If E has a grading with 2 ^ k levels and r ≤ k, then
removing at most r / k of the edges leaves edges with a grading with 2 ^ (k - r) levels.