How can we write
This is analysis of prim's algo.At the end of text this particular thing is given and I am not able to understand it.Code:O(V lg V+E lg V)=O(E lg V) V-No of vertices E-No of edges lg-log to the base 2
This is a discussion on Big Oh Notation problem within the C++ Programming forums, part of the General Programming Boards category; How can we write Code: O(V lg V+E lg V)=O(E lg V) V-No of vertices E-No of edges lg-log to ...
How can we write
This is analysis of prim's algo.At the end of text this particular thing is given and I am not able to understand it.Code:O(V lg V+E lg V)=O(E lg V) V-No of vertices E-No of edges lg-log to the base 2
Big-O only lists the most dominant term. Minor terms and constants are not shown in the final result.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
But how can we say E>V?
> But how can we say E>V?
Isn't that in the preceding text?
I'd say than in a graph, a single vertex can be the locus of many edges (at least two for a simple vertex with an edge in, and and edge out).
Unless you have a really boring graph of two vertices and one edge, in which case the answer is pretty moot.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Why even mention the base? It doesn't matter.Originally Posted by vaibhav
There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.