I need to prove or contradict:$$|O(2n) - O(n)|=O(n)$$ I try: $$\\f(n)=1.5n\in O(2n),g(n)=0.25n\in O(n),h(n)>0\in O(n) : \\ |1.5n - 0.25n|=h(n)\\1.h(n)=1.25n \in O(n)\\ but: 2. h(n)=-1.25n \notin O(n)$$ Is that true?
2026-04-03 19:15:06.1775243706
Is it true that $|O(2n) - O(n)|=O(n)$?
72 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
Your conclusion is wrong. $-1.25 n$ is in $O(n)$. Re-check your definition of $O(n)$. It contains absolute values.
Also, it is fairly easy to show that $O(n) = O(2n)$.