NIST

triangle inequality

(definition)

Definition: The property that a complete weighted graph satisfies weight(u,v) ≤ weight(u,w) + weight(w,v) for all vertices u, v, w. Informally, the graph has no short cuts.

Note: This holds for any graph representing points in a metric space. Many problems involving edge-weighted graphs have better approximation algorithms if the problem is restricted to weights satisfying the triangle inequality.

From Algorithms and Theory of Computation Handbook, page 34-17, Copyright © 1999 by CRC Press LLC. Appearing in the Dictionary of Computer Science, Engineering and Technology, Copyright © 2000 CRC Press LLC.

Author: CRC-A


Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul Black.

Entry modified 17 December 2004.
HTML page formatted Wed Mar 13 12:42:46 2019.

Cite this as:
Algorithms and Theory of Computation Handbook, CRC Press LLC, 1999, "triangle inequality", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed. 17 December 2004. (accessed TODAY) Available from: https://www.nist.gov/dads/HTML/trianglnqlty.html