# Homework Solution: Using the formal definitions of Big-O show that a. n^2 + n + 11 elementof O(n^2) b. n^2 elemento… Using the formal definitions of Big-O show that a. n^2 + n + 11 elementof O(n^2) b. n^2 elementof O(n^2+6n) c. lg(n) elementof O(n) Using the definitions of Big-O and Ohm and theta a. Show that n^2 + 3n+ lg(n) elementof Ohm (n^2) c. Show that n^2 + 3n + lg(n) elementof Ohm (n^2) Show that n^2 + 3n+lg(n) elementof theta(n^2) Using the definitions of Big-O and o a. Show that n g o[n) using a proof by contradiction

`O(g(n)) = { f(n): there exist positive constants c and` Using the explicit definitions of Big-O demonstration that a. n^2 + n + 11 elementof O(n^2) b. n^2 elementof O(n^2+6n) c. lg(n) elementof O(n) Using the definitions of Big-O and Ohm and theta a. Demonstration that n^2 + 3n+ lg(n) elementof Ohm (n^2) c. Demonstration that n^2 + 3n + lg(n) elementof Ohm (n^2) Demonstration that n^2 + 3n+lg(n) elementof theta(n^2) Using the definitions of Big-O and o a. Demonstration that n g o[n) using a probation by contradiction

## Expert Counterpart

```O(g(n)) = { f(n): there consist dogmatical constants c and
n0 such that 0 <= f(n) <= cg(n) control
integral n >= n0}
```

3) a) n2+n+11 < 2 n2

Take c as 2 and n0=4

```0 <= f(n) <= cg(n) control integral n >= n0
```

=>O(n2) Complexity

b) n2 <= c n2 + 6n

Take c=1 and n0=1

n2 < =n2 + 6n

=>Complexity O(n2 + 6n)

c) lg(n) <= c n

Take c=1 and n0=1

lg(n) <= n

=>Complexity O(n)