Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.

Similar presentations


Presentation on theme: "CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA."— Presentation transcript:

1 CSE 20 DISCRETE MATH Prof. Shachar Lovett http://cseweb.ucsd.edu/classes/wi15/cse20-a/ Clicker frequency: CA

2 Todays topics Final review A few words about the final Concluding remarks

3 What did we learn? Concepts Basic algorithms Number representations Boolean logic Sets Functions Relations Modular arithmetic Proof techniques Direct Contraposition Contradiction Cases Induction Strong induction Analyzing and proving properties of all the new concepts that we learned, using the various proof techniques

4 CONCEPTS

5 Basic algorithms 1. Russian peasant multiplication 2. Fast powering 3. Casting out 9s 4. Euclid’s algorithm Main questions: Do they always terminate? Do they return the correct answer? How fast?

6 Number representations Representation integers in different bases Converting between bases Addition, subtraction

7 Boolean logic Propositional logic Truth tables, formulas, DeMorgan laws… Predicate logic Free variables Quantified variables

8 Propositional logic: basic connectives Basic connectives on 1 and 2 bits: NOT AND OR XOR IMPLIES IFF Representation of these basic connectives as truth tables

9 Propositional logic: general formulas More complicated predicates: Representation as a truth table Representation as a formula using the basic connectives Converting between these representations: formula  truth table Truth table  formula (in fact, DNF) Special cases: tautology, contradiction

10 Propositional logic: negation Negation: How to negate a truth table How to negate a Boolean formula: 1. Converting formula to use only AND,OR,NOT 2. DeMorgan laws

11 Predicate logic

12 Simplifying formulas

13 Sets

14

15

16 Functions

17 Relations

18 Equivalence relations Relations which are reflexive, symmetric, transitive Examples Equivalent definition: partition the universe to equivalence classes Important example: modular arithmetic

19 Modular arithmetic Definition of modular classes Addition Multiplication Subtraction Division (when possible) Examples of applications

20 Order relations

21 PROOF STRATEGIES

22 Direct proof

23 Contrapositive proof

24 Proof by contradiction

25 Proof by cases

26 Proof by induction

27 Proof by strong induction

28 PROOFS FOR CONCEPTS

29 Proofs for algorithms We proved that all the algorithms that we learned Terminate Return the correct answer Analyzed their time complexity (how fast do they terminate) We proved various properties of them loop invariants

30 Proofs for sets

31 Proofs for functions

32 Proofs for relations Proved that the two definitions of equivalence relations are indeed equivalent: 1. Reflexive, symmetric, transitive 2. Partitions the universe to equivalence classes Modular arithmetic: Given by equivalence classes (a mod m) Proved that is allows for addition, subtraction, multiplication and division (whenever possible) Used it to prove theorems about numbers

33 Arithmetic proofs

34 FINAL

35 The final Monday 3/16, 3-6pm, in class Bring only a pen, no other material is allowed Material: everything we learned, except for the last week (eg no Knights & Knaves, no infinite sets) Questions: 6 questions 1 bonus question Level: similar to the midterms

36 How to prepare? Go over all the lectures, make sure that you understand everything. Make sure that you can prove for yourself all the problems we discussed in class Go over homework. Make sure that you can solve all the questions. Review questions: same

37 How to prepare? Proofs: go over solutions of homeworks, midterms, review questions Make sure that you know that difference between good proofs and bad proofs If some of your proofs in homework/midterm were not good, make sure that you know why, and know not to repeat the same mistake again

38 CONCLUDING REMARKS

39 Concluding remarks I enjoyed teaching you the class; I hope that you enjoyed taking it, and that you learned some new concepts, and some new ways of rational thinking I want to keep improving the class, so that students next year will have an even better experience, so: Please fill in your CAPEs today. I want to know all that is good and bad about the class. I will send a survey after the final, with various questions on the class. Please take the time to fill it in. If you feel comfortable, I appreciate any feedback Please try to make constructive comments

40 Thanks, and good luck in your finals !


Download ppt "CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA."

Similar presentations


Ads by Google