CS 3343/3341
Analysis of Algorithms
Spring 2012
Online Course
Materials
Weird Topics.
1 WOM Storage
. (Jan 17)
2 Fibonacci Search
. (Jan 19)
3 Bolts & Nuts
. (Jan 24)
4 Fake Coin
. (Jan 26)
5 Fibonacci Matrix 1
. (Jan 31)
6 Newton's Method 1
. (Feb 7)
7 Fibonacci Matrix 2
(Feb 14)
8 Half-a-Bit 1
(Feb 16)
9 Merkle's Puzzles
(Mar 1)
10 Hamiltonian Path
(Mar 6)
11 Newton's Meth. 2
(Mar 22)
12 Zero-Knowledge Proofs
(Apr 12)
Induction.
Fibonacci matrix identity:
Rec 4, Question 1
,
Fibonacci sum identity:
Rec 6, Question 5
Loop Invariant.
Standard (Slow) Exponentiation:
Rec 1, Question 4
,
Multiplication:
Rec 4, Question 3
, and
Quick Exponentiation:
Rec 4, Question 3
.
Division:
Rec 8 Review, Question 1
Specialized:
Mid-term Exam, Answers, Question 5
Exclusive-Or (xor).
Xor
.
Exponentiation.
Exponentiation
.
Two items under "Loop Invariant" above.
Circular Queues.
Circular Queues
.
Questions about Circular Queues
.
Recursion.
Recitation 2: Recursion
.
Linked Lists.
Recitation 3: Linked Lists
.
Binary search.
Binary Search, with and without recursion
.
Test Comparing Searches: binary, ternary, Fibonacci
.
Binary search trees.
Binary Search Tree of Chars
.
Depth of Binary Search Tree, Rec 4, Probs 4, 5 ans
.
Depth of Binary Search Tree
.
Quicksort.
Quicksort Explained
.
Random Numbers and Randomization.
Random Number Generators in C
.
Randomize an Array
.
Randomization on Exam Review
: (5, 6, 7)
Randomization on Exam
: (7)
Medians.
Recitation 5: Medians
.
Strassen Matrix Multiplication.
Divide and Conquer: Ordinary matrix multiplication:
Matrix Multiplication
.
Strassen's matrix multiplication:
Strassen's Matrix Multiplication
.
Strassen's Matrix Multiplication: Theory:
Strassen's Theory
.
Multiplying 3-by-3 matrices:
Recitation 6: Questions 6, 7, 8
.
Heapsort, Priority Queues.
All heaps are
max
-heaps.
Discussion and algorithms, including for heapsort and for a priority queue:
Heaps
.
Examples using diagrams of the heap at each stage:
Building a heap from an array in random order:
Building a heap
.
Running heapsort from an array in random order:
Heapsort
.
Repeatedly extracting the maximum from a heap:
Extract Maximum
.
Repeatedly inserting a new element into a heap:
Inserting Into a Heap
.
Heapsort implementation and test:
Implementation and test of heapsort
.
Priority Queue implementation and test:
Implementation and test of a priority queue
.
Examples in Recreation 5:
Heap examples
.
Examples in Recreation 6:
Priority Queue examples
.
Recursion Trees.
For analysing an algorithm and for solving recurrences. The method applied to:
Merge Sort:
Recursion Tree for Merge Sort
,
Quicksort:
Recursion Tree Unbalanced Quick Sort
, and
Medians:
Median of an Array, Question 6
Master Method.
Cookbook for solving recurrences.
Master Method
, and
Rec 6: Recurrences (Question 1)
.
Graph Representations.
Internal representation of a graph.
Java
,
C
.
Graph Searches.
Graph Search discussed
Rec 10: About Graph Seaches
Dijkstra's Shortest Path in a Graph.
Dijkstra's Algorithm
Hashing.
Hashing
NP, NP-Complete.
NP
,
NP-complete
,
NPC Examples
Turing Machines.
Turing Machines
,
Undecidable Problems
Revision date:
2012-04-03
. (Please use
ISO 8601
, the International Standard.)