Negative triangles #
A weighted tripartite graph with parts I, J, K is given by three matrices over
MinTropical R: A : Matrix I K _ holds the weights of the edges between I and K,
B : Matrix K J _ those between K and J, and C : Matrix I J _ those between I and J. The
tropical zero 0 = ⊤ means that there is no edge. A triple (i, j, k) is a negative triangle
if w(i, k) + w(k, j) + w(i, j) < 0 in R; a missing edge has weight ⊤, so a negative
triangle uses three edges. This is the negative triangle problem of Vassilevska Williams and
Williams over the (min,+) structure, in its tripartite form (Section 2, "Negative Triangles Over
Structures").
The pair (i, j) lies on a negative triangle exactly when (A * B) i j + C i j < 0, because the
(min,+) product entry (A * B) i j is the minimum of w(i, k) + w(k, j) over k
(onNegTriangle_iff). This is the link between negative triangles and (min,+) products used in
both directions of the equivalence.
Padding a graph with isolated vertices (padIsolated) creates no negative triangles
(onNegTriangle_padIsolated); it lets the blocking reduction run on any number of vertices.
Main definitions #
Cslib.Algorithms.ShortestPaths.IsNegTriangle,OnNegTriangle,HasNegTriangle: a negative triangle; a pair on a negative triangle; a graph with a negative triangle.Cslib.Algorithms.ShortestPaths.IsNegTriangleAnswer: the specification of negative triangle finding.Cslib.Algorithms.ShortestPaths.padIsolated: add isolated vertices.Cslib.Algorithms.ShortestPaths.FiniteEntriesBounded: every finite entry lies in[-W, W].
Main results #
Cslib.Algorithms.ShortestPaths.IsNegTriangle.ne_zero_left,Cslib.Algorithms.ShortestPaths.IsNegTriangle.ne_zero_right: a negative triangle uses existing edges.Cslib.Algorithms.ShortestPaths.isNegTriangle_submatrix: relabelling the parts.Cslib.Algorithms.ShortestPaths.onNegTriangle_iff:(i, j)lies on a negative triangle iff(A * B) i j + C i j < 0.Cslib.Algorithms.ShortestPaths.hasNegTriangle_iff: the graph has a negative triangle iff some(A * B) i j + C i j < 0.Cslib.Algorithms.ShortestPaths.padIsolated_apply_inl,Cslib.Algorithms.ShortestPaths.padIsolated_apply_eq_zero,Cslib.Algorithms.ShortestPaths.padIsolated_forall: the entries of a padded matrix.Cslib.Algorithms.ShortestPaths.onNegTriangle_padIsolated: padding preserves negative triangles.Cslib.Algorithms.ShortestPaths.FiniteEntriesBounded.mono,Cslib.Algorithms.ShortestPaths.FiniteEntriesBounded.submatrix,Cslib.Algorithms.ShortestPaths.FiniteEntriesBounded.padIsolated,Cslib.Algorithms.ShortestPaths.FiniteEntriesBounded.mask,Cslib.Algorithms.ShortestPaths.FiniteEntriesBounded.mul: closure ofFiniteEntriesBoundedunder weakening the bound, submatrices, padding, masking to0(⊤), and (min,+) products.
References #
(i, j, k) is a negative triangle of the tripartite graph (A, B, C): the weights of the
edges i k, k j and i j add up to a negative number.
Instances For
The pair (i, j) lies on a negative triangle.
Instances For
The tripartite graph (A, B, C) has a negative triangle.
Instances For
The specification of negative triangle finding: none means that there is no negative
triangle, and some (i, j, k) means that (i, j, k) is one.
Relabelling the three parts maps negative triangles to negative triangles.
Padding with isolated vertices #
Add isolated vertices: padIsolated e e' A is A on the image of Sum.inl and 0 (no edge)
elsewhere, relabelled along e : U ≃ I₀ ⊕ I₁ and e' : V ≃ J₀ ⊕ J₁.
Every entry of padIsolated e e' A is either 0 or an entry of A, so any entry predicate
closed under 0 is preserved by padding.
Isolated vertices create no negative triangles. After padding all three parts, the pairs of original vertices on a negative triangle are exactly the original ones.
Negative triangles and (min,+) products. The pair (i, j) lies on a negative triangle
iff (A * B) i j + C i j < 0.
The tripartite graph has a negative triangle iff (A * B) i j + C i j < 0 for some
(i, j).
Bounded entries #
Every finite entry of A lies in [-W, W]; ⊤ (no edge) entries are allowed. This is the
weight range {-W, …, W} ∪ {∞} of Vassilevska Williams and Williams with maxint W, without
-∞.
Increasing the bound preserves FiniteEntriesBounded.
Taking a submatrix preserves FiniteEntriesBounded.
Padding with isolated vertices (0 = ⊤, no edge) preserves FiniteEntriesBounded.
Masking entries to 0 (⊤, no edge) preserves FiniteEntriesBounded.
If the finite entries of A and B lie in [-M, M], those of the (min,+) product A * B
lie in [-2M, 2M].