The Quadrangle Inequality
State the quadrangle inequality and what it buys.
w(a,c)+w(b,d)≤w(a,d)+w(b,c) for all a≤b≤c≤d: crossing costs no more than containing. With interval monotonicity it narrows the split range by a constant factor, cutting interval DP from O(n3) to O(n2logn).
w(a,c)+w(b,d)≤w(a,d)+w(b,c) for all a≤b≤c≤d: crossing costs no more than containing. With interval monotonicity it forces the optimal split point to be monotone, cutting interval DP from O(n3) to O(n2).
w(a,c)+w(b,d)≥w(a,d)+w(b,c) for all a≤b≤c≤d: containing costs no more than crossing. With interval monotonicity it forces the optimal split point to be monotone, cutting interval DP from O(n3) to O(n2).
w(a,b)+w(c,d)≤w(a,c)+w(b,d) for all a≤b≤c≤d: disjoint costs no more than overlapping. With interval monotonicity it forces the optimal split point to be monotone, cutting interval DP from O(n3) to O(n2).
Sign in to answer questions and track your progress
Sign In