Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP 170 L2 Page 1 Review for Midterm 2 Part II: Number Theory and Cryptography L06: RSA Part III: Logic L07, L08, L09 Part IV: Induction and Recurrence.

Similar presentations


Presentation on theme: "COMP 170 L2 Page 1 Review for Midterm 2 Part II: Number Theory and Cryptography L06: RSA Part III: Logic L07, L08, L09 Part IV: Induction and Recurrence."— Presentation transcript:

1 COMP 170 L2 Page 1 Review for Midterm 2 Part II: Number Theory and Cryptography L06: RSA Part III: Logic L07, L08, L09 Part IV: Induction and Recurrence L10, L11, L12 Big-O, Asymptotic behaviors excluded from midterm 2

2 COMP 170 L2 L06: Public-Key Cryptography

3 COMP 170 L2 RSA Algorithm lKey generation lEncrypt/decrypt message

4 COMP 170 L2 Theorems Page 4

5 COMP 170 L2 Decipherability/Security

6 COMP 170 L2 Repeated Squaring Page 6

7 COMP 170 L2 The Chinese Remainder Theorem

8 COMP 170 L2 Part III: Logic l Introduce the basics of logic (L07, L08) l Discuss the logic principles behind proofs (L09) Page 8

9 COMP 170 L2 What make up logic statements? Page 9

10 COMP 170 L2 Truth Table for Logic Statements l Shows whether a compound statement is true for false in all cases l Allow us to determine whether two statements are equivalent Page 10

11 COMP 170 L2 Quantifiers Page 11

12 COMP 170 L2 Quantifiers Page 12

13 COMP 170 L2 Proving Quantified Statements True or False Page 13

14 COMP 170 L2 Inference Rules l Rules for logic connectives Page 14

15 COMP 170 L2 Inference Rules Page 15 l Modus Ponens l Rules for proving implication

16 COMP 170 L2 Page 16

17 COMP 170 L2 L10: Induction Page 17 l Base Case (n=b): Show that p(b) is True l Induction (n>b): Show p(n-1) => p(n) n Induction Hypothesis  p(n-1) is True n Inductive Step:  p(n) is True l Inductive conclusion: n p(n) is True for all n>=b

18 COMP 170 L2 l Equivalent to Proof by smallest counter example n Can you rewrite proof in one form into proof in another form? Page 18 L10: Induction

19 COMP 170 L2 L11/12: Recursion and Recurrence Page 19 l Towers of Hanoi: First order linear recurrence l D&C, Binary Search l Can you figure out recurrence for running time of simple recursive algorithms?

20 COMP 170 L2 Closed-Form Solution: Iterating Recurrences l Pay attention to the red terms Page 20

21 COMP 170 L2 Closed-Form Solution: Iterating Recurrences l Pay attention to the red terms

22 COMP 170 L2 Asymptotic Behaviors Page 22

23 COMP 170 L2 Asymptotic Behaviors Page 23


Download ppt "COMP 170 L2 Page 1 Review for Midterm 2 Part II: Number Theory and Cryptography L06: RSA Part III: Logic L07, L08, L09 Part IV: Induction and Recurrence."

Similar presentations


Ads by Google