Search code examples
notation

What do the absolute value bars mean in graph theory?


Just wanted to know, for example in the wikipedia page Dijkstra's algorithm what the absolute value bars meant in O(|E| + |V|log|V|)


Solution

  • The vertical bars indicate the cardinality (or size) of a set. In the case of Dijkstra's algorithm, |E| is the number of edges and |V| is the number of vertices.