nov 18
Chapter 13 in the text: on to "computer science"
Once you have the basics of "how to write a program",
then what?
The analogy is writing: once you know
how to put together a subject, verb, and object,
you can write a sentence. But the content
of what you can write about is a much bigger topic.
Likewise, "computer science" as a field is about
how to best represent and implement various
information-related tasks. The recipes for
doing these sorts of things are called "algorithms",
and so the next step is often to look at them.
For example, given a collection of numbers, how do we find
if something specific is in there?
First: try as a class exercise. How many different
algorithms can you suggest? How can we measure how
good they are?
Turns out there's a particularly interesting to
do some algorithms, called "recursion".
Discuss the idea and go over
the attached code examples : search.py, fib.py, hanoi.py
Linear search is O(n); binary search is O(log(N)).
Define these terms and give specific examples.