Fall 2000

Ileana Streinu

Due: Tuesday, Sept. 19, 2000 - before class

**Programming**. Write (in C, C++, or Java) a small program for testing and profiling implementations of Sequential and Binary Search.**Big Oh notation**: a small set of functions, tell which one is Big Oh or little Oh of the other.

You can simply substitute your code for the two search functions, together with appropriate code for generating input for them. You might have to calibrate the values of n to get meaningful results.

1. | 3n^2 - 4000 n +2 | and | 2 n + 100 log n |

2. | 3n^2 - 4000 n +2 | and | 2 n log n + 20 n - 14 |

3. | 2^n + n^5 | and | 3^n + n + 2 |

4. | n/(log n) | and | log n |

5. | n^3/(n log n + n^2) | and | (n + log n)/(log n + (log n)^2) |

6. | n + log n | and | (log n)^2 |

Last modified Sept. 12, 2000.