Does it simplify to 2O (n), O (2n) or O (n)? "
All of the above, but the first two are too complicated. O (n) will be the canonical designation.
2 * N is proportional to N, therefore, if the maximum cost is not more than proportional to 2 * N for a sufficiently large N (O (2 * N)), the maximum value is also not more than proportional to N for a sufficiently large N (O (N)).
If we were trying to find a lower bound, can this rule still apply?
Most definitely yes.
2 * N is proportional to N, therefore, if the minimum cost is at least proportional to 2 * N for a sufficiently large N (Ω (2 * N)), the minimum value is also at least proportional to N for a sufficiently large N (Ω (N)).
For example, let's say you have an algorithm that executes 300 ms + 100 * N ms to execute. The lower limit of its speed is Θ (N) and, therefore, Ω (N).
What if the algorithm should run twice as much? Even if it took 600 ms + 200 * N ms to execute, the lower limit of its speed is still equal to Θ (N) and, therefore, Ω (N).
The most important thing to understand in order to understand Θ (N) and the like is that these notations are used to study how well something scales. This one algorithm takes twice as much as the other, does not say anything about how well or it scales, so it should not be a surprise that they can have the same Ω () for the lower limit of their speed.
source share