EECS 3101 Tutorials Fall 2016

advertisement
EECS 3101
Tutorials
Fall 2016
This is a summary of what we have discussed during the tutorials so far.
(The light colored text is from the previous year.)

Sep. 15:
1. LS1 pages 14, 15 clarified.
2. Assignment 1, Problem 1 [LS1, Exercise 11(a)] clarified.
3. LS1, p. 26: The # disk moves by Towers of Hanoi Algorithm is 2n-1. Why is this optimum?
Proof by the principle of minimality discussed.
4. LS1, Exercise 6(a) [Red-Blue Towers of Hanoi with 3 stacks] recursive solution discussed.
Part (b) [R-B TH with 4 stacks] will be discussed in the next tutorial.

Sep. 22:
1. LS2 & LS3: Asymptotic Notations and Summations.
2. Any difference between 2(n) and (2n) ?
3. LS2, Exercise 7(c,h).
4. Why is log(n!) = log 1 + log 2 + … + log n = (n log n)?
Proofs by the table method (LS3, pp: 22-23, arithmetic sum) and summation by parts method given.
5. LS3, Exercise 1(k), 12(a).
2
log 𝑖
6. ∑𝑛𝑖=1 ∑𝑗=1 2𝑖+𝑗 (𝑗 2 + 7𝑗 log 𝑗) = Θ(? ).
7. Claim: 1 + 2 + 3 + ⋯ + 𝑛 = 𝑛(𝑛 + 1)/2 ∀𝑛 ∈ 𝑁.
Proof by the Principle of Minimality given.

Sep. 29:
1. LS3: Summations & Recurrence Relations.
Exercises: 1(l), 3(a), 6(j), 9, 13.

Wed., Jan. 20:
1. LS2, p. 26, Rule 9: f(n) = g(n) + o(g(n)) implies f(n) = (g(n)).
Similarly: f(n) = g (n)) + O(g(n)) implies f(n) = (g(n)).
LS4, Exercises 1, 9(a): 2SUM (idea: how to implicitly “merge two sorted arrays”).
2. LS4, Exercise 9(b): 3SUM left to class to think about.
Mon., Jan. 25:
1. LS4: Exercise 9(b): 3SUM.
2. Problem: Given n points in the plane, are any three of them collinear?
3. LS4: Exercise 6(a).
Wed., Jan. 27:
1. LS4, p. 94: Closest Pair Problem further explained.
2. LS4, Exercises 13, 23.
3. LS4, Exercises 25, 27 left to students to work on.
Mon., Feb. 1:
1. Assignment 1: Posted solution to the last question explained.
2. How to properly strengthen pre-/post- conditions of a recursive algorithm.
3. LS4, Exercises 25, 16.








Wed., Feb. 3:
1. How to properly strengthen pre-/post- conditions of a recursive algorithm.
2. LS4, Exercise 30.
Mon., Feb. 8:
1. Questions 1 and 2 of A2 clarified. See the course Forum for further Q&A.
2. LS5, Exercises 4 and 6 (to be continued).
Wed., Feb. 10:
1. LS3: summations revisited.
2. LS5, p. 124: The Adversary argument explained further: why should S? be empty.
3. LS5, Exercise 6(c): discussion continued.
Mon. Feb. 15, Wed., Feb. 17:
1. Reading Week. No lectures/tutorials.
Mon., Feb. 22: Midterm Review Session:













Q1(a) of sample midterm 2013W.
How to solve a recurrence by the
guess-&-verify method; an example.
Some recursive algorithms.
LS1, Exercise 12 (King’s wise men).
LS4, Exercise 25 (again).

LS5, page 102: Quiz Question.
 LS5, exercise 10.
 Assignment 2, Problem 2: The posted
alternative solution explained.
Wed., Feb. 24:
1. Midterm test in class. No follow up tutorial that day.
Mon., Feb. 29:
1. LS5, Exercises 16 and 17.
Wed., Mar. 2:
1. LS5, Exercises 16 explanation completed with a new data structure.
2. LS6, Exercise 3: How to prove the greedy LI is maintained.
Mon., Mar. 7:
1. LS7: Matrix Chain Product algorithm explained.
2. LS6, Exercise 5: Several solutions discussed and their correctness/incorrectness analyzed.
Wed., Mar. 9:
1. Dynamic Programming: how to go through the design steps.
2. LS7, Exercises 3 and 5.
Mon., Mar. 14:
1. More on Dynamic Programming versus Greedy.
2. LS7, Exercise 5(d): more discussion.
3. LS7, Exercise 28: A card game against Elmo: Greedy versus DP.
Parts (a) and (b) completed. Part (c) left for the next session.
Wed., Mar. 16:
1. LS7, Exercises 5(d) and 28(c) completed.
Mon., Mar. 21:
1. Graph Algorithms.
2. LS8, Exercises 1, 4.



Wed., Mar. 23:
1. LS7, Exercise 3 explained again.
2. LS8, p. 161: Proof of the Graph Matching Augmenting Path Theorem explained.
3. LS8, Exercise 5.
Mon., Mar. 28:
1. Problem 4 (Max-Flow-Min-Cut) from the Sample Final Exam, Winter 2011 discussed.
2. LS8, Exercise 12, 48.
Wed., Mar. 30:
1. Course Review Session.
2. LS8, Exercise 15: Tree Broadcast (also in the sample Final Exam).
3. LS8, Exercise 19.
Download