CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.

Slides:



Advertisements
Similar presentations
Discrete Mathematics Lecture 3
Advertisements

Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
Discrete Mathematics Lecture 2 Logic of Quantified Statements,
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Discrete Mathematics Lecture 4 Harper Langston New York University.
CMSC 250 Discrete Structures Exam #1 Review. 21 June 2007Exam #1 Review2 Symbols & Definitions for Compound Statements pq p  qp  qp  qp  qp  q 11.
CMSC 250 Discrete Structures Number Theory. 20 June 2007Number Theory2 Exactly one car in the plant has color H( a ) := “ a has color”  x  Cars –H(
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Adapted from Discrete Math
Predicates and Quantifiers
MATH 224 – Discrete Mathematics
Valid Arguments Decide if each argument is valid. If the stones are rolling, they are not gathering moss. If the stones are not gathering moss, they are.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Fall 2010 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Discrete Mathematics, Part II CSE 2353 Fall 2007 Margaret H. Dunham Department of Computer Science and Engineering Southern Methodist University Some slides.
MATH 224 – Discrete Mathematics
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
1 Introduction to Abstract Mathematics Chapter 3: Elementary Number Theory and Methods of Proofs Instructor: Hayk Melikya Direct.
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Spring 2011 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
MATH 224 – Discrete Mathematics
CompSci 102 Discrete Math for Computer Science
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Mathematical Preliminaries
Sets Goal: Introduce the basic terminology of set theory.
Methods of Proof Dr. Yasir Ali. Proof A (logical) proof of a statement is a finite sequence of statements (called the steps of the proof) leading from.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
DISCRETE COMPUTATIONAL STRUCTURES CSE 2353 Fall 2010 Most slides modified from Discrete Mathematical Structures: Theory and Applications by D.S. Malik.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
Lecture 1 Overview Topics 1. Proof techniques: induction, contradiction Proof techniques June 1, 2015 CSCE 355 Foundations of Computation.
CS 2800 Midterm Review. Announcements Midterm Tuesday, 11/3, 7:30PM, UP B17 Covers up to and including HW #4 (induction) Practice Prelim / Homework Solutions.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
1 CMSC 250 Chapter 3, Number Theory. 2 CMSC 250 Introductory number theory l A good proof should have: –a statement of what is to be proven –"Proof:"
CSCI 115 Course Review.
Cryptography Lecture 14 Arpita Patra © Arpita Patra.
CMSC250 S ECTIONS 0303 & 0304 M IDTERM R EVIEW Sri Kankanahalli Discussion 10: 9 March 2016 Office Hrs: Mon. and Wed. 4-6PM AVW 1112.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Great Theoretical Ideas in Computer Science.
English for Economic Informatics I Tomáš Foltýnek Theoretical Foundations of Informatics.
Discrete Mathematics Lecture 3 (and 4)
CSCE 355 Foundations of Computation
CSE 311 Foundations of Computing I
MATH 224 – Discrete Mathematics
CSE 321 Review Session Dave Bacon.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
CSE 311 Foundations of Computing I
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
CSCE 355 Foundations of Computation
Propositional Calculus: Boolean Algebra and Simplification
CS 280 Midterm Review.
Propositional Logic Defining Propositional Logic
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
CSE 311 Foundations of Computing I
CHAPTER 1: LOGICS AND PROOF
CSE 311: Foundations of Computing
CSE 311: Foundations of Computing
A Brief Summary for Exam 1
First Order Logic Rosen Lecture 3: Sept 11, 12.
Copyright © Cengage Learning. All rights reserved.
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Presentation transcript:

CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett

Final review 2

What did we study?  Boolean logic: propositions, predicates, formulas, truth tables, CNFs, DNFs  Data representation: graphs, sets, functions, relations, equivalence relations  Proofs: direct, contrapositive, contradiction, cases, induction, strong induction  Number theory: factorization to primes, GCD, basis representation, modular arithmetics  Number theory algorithms: div-mod, fast exponentiation, casting out 9s 3

What did we really study? Language of mathematics Expression intuitive (or not) ideas in a formal language Giving formal proofs for mathematical theorems 4

Boolean logic 5

Propositional logic  What is a proposition?  How to translate from English to logic, and vice versa  Connectives  Truth tables  CNFs, DNFs  Equivalence rules 6

Propositional logic  You should know:  Translating English from/to logic  Negating / De-Morgan laws  Computing truth tables from formulas  Computing CNFs / DNFs from truth table  Equivalence rules, derivation rules 7

Predicate logic  Universal / existential quantifiers  Multiple quantifiers  Negation / De-Morgan laws  The importance of the domain 8

Predicate logic  You should know:  Translating English from/to logic  Negating / De-Morgan laws  Equivalence rules, derivation rules  Deciding if a quantified formula is true/false in a specific domain 9

Data representation 10

Graphs  What do graphs represent? Examples..  Terminology: vertices, edges, degree  Directed / undirected graphs  (Eulerian graphs – not for final) 11

Sets  Definition, notations, examples  Operations: union, intersection, complement, difference, power set, Cartesian product  Expressing sets (eg primes) using set builder notation  Venn diagrams, algebraic / symbolic proofs  Set sizes, and how these change under the above operations  Infinite sets 12

Relations  What do they represent? Examples..  Connection to graphs  Types: reflexive, symmetric, transitive  How to prove / disprove that a relation is reflexive / symmetric / transitive 13

Equivalence relations  Definition  How to prove/disprove  Important example: modular arithmetics (equivalent MOD m) 14

Functions  Definition, examples  Injective, surjective, bijective  Inverse function  Proving properties of set sizes using functions 15

Proofs 16

Direct proof  To prove p  q  Assume p, plug in definitions, derive q 17

Contrapositive proof  To prove p  q  Prove instead ~q  ~p  Assume ~q, plug in definitions, derive ~p 18

Proof by contradiction  To prove p  q  Assume p,~q and derive a contradiction (either to one of the assumptions, or to a basic axiom) 19

Proof by cases  To prove p  q  Partition assumption p into cases  Prove each case individually, using any of the previous proof techniques 20

Induction  Useful to prove theorems of the form: for all n>=1, some P(n) holds  Base: n=1 (say)  Basic induction: assume true for n-1, prove for n  Strong induction: assume true for all k=1,…,n-1, prove for n 21

Number theory + algorithms 22

Primes  Definition of primes / composites  Every integer has a unique factorization as a product of prime numbers  If p is prime, p|xy  p|x or p|y  Hard to find – basis for RSA encryption 23

GCD  Greatest common divisor of 2 numbers  Can find efficiently using Euclid’s algorithm 24

Modular arithmetics  Definitions “x MOD m”  Addition, multiplication  Inversion when m is prime 25

Number theory algorithms  DIV-MOD: Divide a by b, get quotient q and reminder r: a=bp+r  Fast exponentiation: compute a b using only ~log(b) multiplications  Casting out 9s: check if a number is divisible by 9 26

Review questions 27

Question 1 28

Question 2 29

Question 3  Let G be an undirected graph with n vertices and no loops.  What is the maximal possible number of edges in G? A. n B. n 2 C. n(n-1)/2 D. n 2 /2 30

Question 4 31

Question 5 32

Question 6 33

Some words for conclusion  I enjoyed teaching you, I hope that you enjoyed the class as well  I hope that it opened your mind to the wonderful world of mathematics, and its many applications in computer science; this was just the first step  Good luck in the final! 34