This course is based on the COS 423 Princeton course.
These slides are based heavily on Kevin Wayne's slide material.
(as in Sedgewick and Wayne of COS 265 Algorithms book)
At the end of the term, you will fill out an evaluation.
Please be critical, letting me know what worked and what did not.
Read the assigned book readings, so I can know if they were helpful.
“A procedure for solving a mathematical problem (as of finding the greatest common divisor) in a finite number of steps that frequently involves repetition of an operation.
”
–webster.com
“An algorithm is a finite, definite, effective procedure, with some input and some output.
”
–Donald Knuth
Etymology
Algorism: process of doing arithmetic using Arabic numerals
A misperception: algiros (painful) + arithmos (number)
True origin: Muḥammad ibn Mūsā al-Khwārizmī was a famous 9th century Persian textbook author who wrote Kitāb al-jabr wa'l-muqābala, which evolved into today's high school algebra text
COS 265: Data Structures and Algorithms
private static void sort(double[] a, int lo, int hi) { if(hi <= lo) return; int lt = lo, gt = hi; int i = lo; while(i <= gt) { if (a[i] < a[lo]) exch(a, lt++, i++); else if(a[i] > a[lo]) exch(a, i, gt--); else i++; } sort(a, lo, lt-1); sort(a, gt+1, hi); }
COS 320: Algorithm Design
\[\begin{array}{rcl} \sum_{i=1}^n \sum_{j=i+1}^n \frac{2}{j-i-1} & = & 2 \sum_{i=1}^n \sum_{j=2}^{n-i+1} \frac{1}{j} \\ & \le & 2n \sum_{j=1}^n \frac{1}{j} \\ & \sim & 2n \int_{x=1}^n \frac{1}{x} dx \\ & = & 2n \ln n \end{array}\]
We emphasize algorithms and techniques that are useful in practice
My main objective: help students to learn how to...
Mounting research indicates that electronics usage in classroom harms student's ability to retain and process information.
For example, although students that take notes using laptops tended to record more information, follow-up tests show that they processed and retained much less than those that take notes on paper.
Therefore, I have adopted a no-computer-use policy.
During lecture time, you are not allowed to use a computer, even for taking notes.
Exception may be granted to those that write a 1-page argument.
See syllabus and course Brightspace page for details.
You will need to refer to these resources frequently:
The slides are provided in interactive format using HTML
They have been tested to run and look OK in Google Chrome and mostly OK in Firefox
There may be bugs. Let me know, and I will fix them.
Assessment will fall in these categories:
General participation:
Solving problem assignments:
Generally, I will post these assignments while we are still covering the needed materials, so that you can:
Crafting problem assignments:
Coding problem assignments:
Programming Competition assignment(s):
See syllabus for full details; ask if unsure; never assume.
If assignment is marked "Collaboration Permitted", you...
If assignment is marked "No Collaboration", you...
For COS 320 (and many others I teach), I use a 3pt grading system.
Each gradeable item is scored 0–3 (or a scaled version). Assignments will have many gradeable items.
0 | nothing of value was submitted | F |
1 | submitted, but clearly not correct | D- |
2 | not a 0, 1, or 3 | C |
3 | perfect solution, meets every requirement and expectation |
A |
Submitting nothing is clearly a 0, but also submissions that contain very little actual work will receive a 0.
Submissions that are missing significant portions or produce incorrect or unexpected output will likely get a 1.
See my student page for break-down
template with formatting and without formatting