% These slides are designed for 52 x 19 terminals
% but should work with slightly larger or smaller
% terminals. Should be OK with unix "less" and
% screens with fewer than 30 lines. Issue /%%etc.
% Start at lines 10, 40, 70, 100, etc.; use
% vi "set number" and "set nonumber"
% line 10: s1%%etc., line 40: s2%%etc., etc.
% unix, vi, less -- old school!
s1%%%
Welcome to CPSC 500
Google: Joel Friedman UBC Math
http://www.math.ubc.ca/~jf/courses/CS500
Note: I am Joel fRIEdman (jf@math.ubc.ca)
I am not Joel fELdman
s2%%%
Note: One scribe assignment has been posted.
It has received a perfect score of 1 out of 1.
Scribe Grades "subset" [0,1]:
This means that scribe grades will be
real numbers from 0 to 1 (e.g. 0.50, 0.33).
Warning: Do not be intimidated; the first
scribe assignment posted is well above the
1 out of 1 threshold. However, do view
this assignment as an eventual goal.
s3%%%
Last time: Turing Machine versus RAM
Many other models:
Num Anal: FLOPS
(# +/-) + 3 (# mults) + 5 (# divs)
CS Theory: PRAM (parallel),
RP, BPP (involve randomness,
another resource )
Comparators, Comparisons (sorting)
etc. etc. etc.
s3%%%
Today: The obligatory Fibonacci lecture.
My first theory grad course in algorithms
was given by John Reif. He used the entire
lecture to give successive improvements to
calculations of Fibonacci numbers. This
seems to be a common idea, but I do not
(presently) know if he invented this concept,
or if someone else did, or many people
simultaneously did, etc.
It was a fun lecture, and a great intro to
CS theory.
s4%%%
Fibonacci numbers form a classical math
sequence which illustrates many important
math ideas.
Sample Application: "Fibonacci search"
Idea: You have a function that is expensive
to compute (e.g., involves a sort of
simulation that must run all night long).
I.e., f(0)=f(1)=0. Give an algorithm that
adaptively locates a small subinterval of
[0,1] which must contain a local maximum.
(as small as possible, assume f is C^1).
s4.5%%%
It is interesting to compare (current)
Wikipedia entries on:
* Fibonacci search technique
* Golden section search
The later is a useful approximation of
the former.
At present, the Wikiped. entry for
Fibonacci search seems to miss the
basic point that Fibonacci search looks
for an extremum, as opposed to binary
search which looks for a zero...
Hence a great resource, like Wikipedia,
can, at times, be flawed.
s5%%%
Now turn to Section 0.2 of the text [DPV].
Also look at Exercise 0.4.
As far as I can tell, [DPV] does not mention
(as Prof. Reif did to us, way back when) that
Strassen's Algorithm: only 7 mults
improves the constant in the O(log n).
Quote: "The only constant a CS theoretician
cares about is the one in his/her salary."
- Richard Karp