Unit 24 Answers:
1. (x² + 2x + 3) / (x + 1) = x + 1 + 2 / (x+ 1) < 2x for all x > 1. Hence (x² + 2x + 3) / (x+ 1) is O(x).
Alternatively, (x² + 2x + 3) / (x + 1) = x + 1 + 2 / (x + 1), which goes to infinity as x becomes large. Hence (x2 + 2x + 3) / (x + 1) is O(x).2. ( 5x4 +
x² + 1 ) / (x4/2 )
= 10 + 2/x2 + 2/x4, which goes to 10 as
x becomes large. Hence 5x4 +
x² + 1 is
O(x4/2).
Similarly ( x4/2 ) /
( 5x4 +
x² + 1 )
= 1 / ( 10 + 2/x2 + 2/x4 ),
which goes to 1/10 as x becomes large. Hence x4/2
is
O(5x4 +
x² + 1).
3. Since 2n < 3n for all n > 0, it follows that 2n is O(3n). On the other hand, if 3n were O(2n), then for some positive number C, 3n C2n for all sufficiently large n. This means that C (3/2)n for all sufficiently large n, which is impossible, because (3/2)n goes to infinity as n becomes large. Hence, 3n is not O(2n).
4. It means that for a function f(x) there exist real numbers n0 and C with |f(x)| C for x > n0. These are the functions f(x) that are bounded above and below by some constant for all sufficiently large x.
5. a) O(n³) b) O(n5)