Skip to content

rajendrarrv/Introduction-to-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Introduction to algorithm

image

1. Role of Algorithm in computing

Excercise 1.0

[ ] Give a real world example that requires sorting or a real-world example that requires computing a convex hull

[ ] Other than speed what other measures of efficeincy might one use in a real-world setting?

[ ] Select a data structure that you have seen previously, and discuss its strengths and limitations

[ ] How are the shortest-path and travelling-salesman problems given above similar? How are they are different?

[ ] Come up with a real-world problem in which only the best solution will do. Then come up with one in which a solution that is "approximately" the best is good enough.

Excercise 1.2

[ ] Give an example of an application that requires algorithms content at the application level and discuss the function of the algorithms involved.

[ ] Suppose we are comparing implementations of insertion sort and merge sort on the same machine. For inputs of size n, insertion sort runs in 8n^2^ steps, while merge sort runs in 64n lg n steps. For which values of n does insertion sort beat merge sort?

[ ] What is the smallest value of n such that an algorithm whose running time is 100n^2^ runs faster than an algorithm whose runing time is 2^n^ on the same machine.

Problems

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.

WhatsApp Image 2022-12-16 at 7 54 22 PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published