Algorithms

Spring 2017
course
navigation

Jan 26

Discuss the homework due today - I have posted my answers which I will unlock and review.
Homework for Thursday is up.
Questions about anything?
OK, going on ...

analysis & big O notation

Browse through and discuss the material in the Analysis chapter of the text.

run time practicalities

How many steps is practical for a program that runs in a few minutes? Demonstrate explicitly. Answer : about 1e8 .
What does this imply about the size N of a manageable problem for an algorithm that is
Turns out there's an important distinction between problems which are "hard" (i.e. impractical to do for large N on a computer) and "easy" (i.e. doable for fairly large N). Essentially it comes down to exponential (hard) or polynomial (easy). (I'm oversimplifying here - the specifics do matter. But this is the "big picture".)
There are formal math-ish versions of subsets of these categories, named P (polynomial) and NP. No, NP is not "not polynomial"; it stands for "nondeterministic polynomial", and is sort-of polynomial on a quantum computer. (There are problems harder than NP.)
One of the biggest outstanding theoretical problems in CS is whether problems that seem to be in P or NP are really different, or whether we're just not clever enough to find fast algorithms for the NP problems. Most everyone believes that NP problems are intrinsically hard, and cannot be computed quickly ... but this has not yet been proven.
You can win $1,000,000 if you prove it ...

homework

I'm asking you to look at the substring problem :
>>> is_substring("one", "zero one two") True
This is actually a classic and important problem. Please do try to find an algorithm (not the most efficient one) on your own. We'll talk about tricky approaches later.

measuring execution time

Discuss ways to measure execution time of something that happens fast:
http://cs.marlboro.edu/ courses/ spring2017/algorithms/ notes/ Jan_26
last modified Thursday January 26 2017 10:10 am EST