36_split_Introduction to Algorithms 2nd Edition

36_split_Introduction to Algorithms 2nd Edition - n 2 runs...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Problems for Chapter 1 13 Exercises 1.2-1 Give an example of an application that requires algorithmic content at the applica- tion level, and discuss the function of the algorithms involved. 1.2-2 Suppose we are comparing implementations of insertion sort and merge sort on the same machine. For inputs of size n , insertion sort runs in 8 n 2 steps, while merge sort runs in 64 n lg n steps. For which values of n does insertion sort beat merge sort? 1.2-3 What is the smallest value of n such that an algorithm whose running time is 100
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n 2 runs faster than an algorithm whose running time is 2 n on the same machine? Problems 1-1 Comparison of running times For each function f ( n ) and time t in the following table, determine the largest size n of a problem that can be solved in time t , assuming that the algorithm to solve the problem takes f ( n ) microseconds. 1 1 1 1 1 1 1 second minute hour day month year century lg n √ n n n lg n n 2 n 3 2 n n !...
View Full Document

This document was uploaded on 11/22/2010.

Ask a homework question - tutors are online