notation question
Date: 08/04/06
(Algorithms) Keywords: no keywords
I'm studying a graph algorithm, and the notation used for efficiency is:
O(|V| + |E|)
where V is vertices, and E is edges.
I understand the big oh notation. The part that puzzles me is why the | | is necessary to indicate count.
I've noticed this | | notation used a lot to indicate the count of something. It seems to me it would be clear enough if I put:
O(V + E)
because V and E could not sensibly mean anything except the count of the vertices and edges.
So why is the convention to use | |?
Source: http://community.livejournal.com/algorithms/82240.html