lemonthree
- 47
- 0
Let $$ \mid h \mid $$< 1. Which of the following functions are O(h)? Explain.
$$ -4h $$
$$h+h^2 $$
$$ \mid h \mid ^{0.5} $$
$$h + cos (h) $$
Based on my notes, f(h) = O(h) only if $$ \mid f \mid $$ ≤ C $$ \mid h \mid $$, where C is a constant independent of h.
I can only solve for the first function -4h, as I can take C = -4 to give $$ \mid f \mid $$ = -4 $$ \mid h \mid $$
For the rest, I am not very sure how I should go about solving since I cannot get C to be a constant independent of h. Are there any tips to solving them? Although I am guessing that the remaining functions are not O(h) anyways...
I tried searching the net but the results led me to general cases of O(h), O(log(h)) type which does not go into detail the math part behind it.
$$ -4h $$
$$h+h^2 $$
$$ \mid h \mid ^{0.5} $$
$$h + cos (h) $$
Based on my notes, f(h) = O(h) only if $$ \mid f \mid $$ ≤ C $$ \mid h \mid $$, where C is a constant independent of h.
I can only solve for the first function -4h, as I can take C = -4 to give $$ \mid f \mid $$ = -4 $$ \mid h \mid $$
For the rest, I am not very sure how I should go about solving since I cannot get C to be a constant independent of h. Are there any tips to solving them? Although I am guessing that the remaining functions are not O(h) anyways...
I tried searching the net but the results led me to general cases of O(h), O(log(h)) type which does not go into detail the math part behind it.