Slide 1

Slide 1 text

cs2102: Discrete Mathematics Photo: Casey Kilmartin

Slide 2

Slide 2 text

Photo: Casey Kilmartin

Slide 3

Slide 3 text

Class 1: What makes computers go? I’ll have (brief) office hours after class today (until 4pm) and tomorrow (Wednesday), 3-4pm [Rice 507] TA’s office hours will start next week (schedule to be posted on course site) cs2102: Discrete Mathematics

Slide 4

Slide 4 text

What makes it go?

Slide 5

Slide 5 text

For example, there was a book that started out with four pictures: first there was a windup toy; then there was an automobile; then there was a boy riding a bicycle; then there was something else. And underneath each picture it said, “What makes it go?” From Richard Feynman, Surely You’re Joking, Mr. Feynman!

Slide 6

Slide 6 text

I thought, “I know what it is: They’re going to talk about mechanics, how the springs work inside the toy; …” It was the kind of thing my father would have talked about: “What makes it go? Everything goes because the sun is shining.” … “No, the toy goes because the spring is wound up,” I would say. “How did the spring get wound up?" … “I wound it up." “And how did you get moving?" “From eating." “And food grows only because the sun is shining. So it’s because the sun is shining that all these things are moving.”… From Richard Feynman, Surely You’re Joking, Mr. Feynman!

Slide 7

Slide 7 text

What makes it go?

Slide 8

Slide 8 text

Sun shines Plankton thrives Fossilizes

Slide 9

Slide 9 text

Electricity Transistors, Memory

Slide 10

Slide 10 text

What makes it go?

Slide 11

Slide 11 text

Transistors, Memory Programs Mathematics Algorithms

Slide 12

Slide 12 text

Focus of cs2102 This course is about the underlying mathematics that makes computers work. cs2102 cs3102 cs4102 Theory of Computation: What Can and Cannot Be Computed Algorithms: Designing and Analyzing Information Processes

Slide 13

Slide 13 text

Developing Mathematical Skills Precise Tools for Thinking: Definitions Proofs Before Friday (questions on Survey): “Habits of highly mathematical people”

Slide 14

Slide 14 text

Developing Mathematical Skills Precise Tools for Thinking: Definitions Proofs Mathematical objects used in Computing: Numbers, Sets, Graphs

Slide 15

Slide 15 text

Join the course slack group: https://csmath.slack.com/signup

Slide 16

Slide 16 text

Join the course slack group: csmath.slack.com/signup Post any questions/comments you have so far in #general Answer in #inclass: why does computer science mostly use discrete math? Any other thoughts or jokes you have in #random

Slide 17

Slide 17 text

Course Logistics Read the syllabus before Thursday’s class and post your questions in slack. We won’t talk more about course logistics unless you ask.

Slide 18

Slide 18 text

Two Professors! Mohammad Mahmoody David Evans

Slide 19

Slide 19 text

~2# Assistant Teachers

Slide 20

Slide 20 text

Assignments and Exams Problem Sets - due most Fridays (6:29pm) Main way to learn this material is to solve problems Can work in groups and discuss together, but must write up your own solutions Designed for learning Grading not meant to be stressful! Exams Two in-class exams (Oct 5, Nov 9), Final (Dec 7)

Slide 21

Slide 21 text

Help Office Hours Me: after class today (-4pm), tomorrow (Weds, 3-4pm) Lots more will be scheduled (see website) Come early – don’t wait until day or two before assignment is due don’t wait until near exam - concepts build on each other This course will require you to learn new and different ways of thinking. This can be overwhelming and it is hard to catch up if you fall behind. Please take advantage of available help!

Slide 22

Slide 22 text

Help On-Line Slack: use this for public questions #general #inclass you can use a pseudonym in slack can use direct messages for private questions Email: use this for private questions This course will require you to learn new and different ways of thinking. This can be overwhelming and it is hard to catch up if you fall behind. Please take advantage of available help!

Slide 23

Slide 23 text

Why Discrete Math? Read the syllabus before Thursday’s class and post your questions in slack. We won’t talk more about course logistics unless you ask.

Slide 24

Slide 24 text

Continuous Discrete

Slide 25

Slide 25 text

Continuous Discrete There is something between any two numbers There is nothing between adjacent numbers Real numbers Integers

Slide 26

Slide 26 text

Represents a 1 Represents a 0 Digital Abstraction 0 V 5 V 2 V 3 V

Slide 27

Slide 27 text

Represents a 1 Represents a 0 Digital Abstraction 0 V 5 V 2 V 3 V This is wasteful - infinitely many values used to represent only two! But useful: tolerate noise and get exact results with confidence.

Slide 28

Slide 28 text

Finite Memory Discrete math is often infinite, but also often done over finite domains.

Slide 29

Slide 29 text

Finite Memory Can continuous math be finite?

Slide 30

Slide 30 text

“Hard” Problems y2 = x3 + 7 What does y2 = x3 + 7 look like in finite field?

Slide 31

Slide 31 text

“Hard” Problems What does y2 = x3 + 7 look like in finite field? 2 = 3 + 7 mod ( = 629)

Slide 32

Slide 32 text

“Hard” Problems Why do we want “hard” problems? 2 = 3 + 7 mod ( = 629)

Slide 33

Slide 33 text

2 = 3 + 7 mod ( = 2256 − 232 − 977) Bitcoin Market Value Depends on it being hard to find points on this (discrete) curve.

Slide 34

Slide 34 text

All* Discreet Communications depend on Discrete Math * Except for whispering and passing notes. Me mod n YA =aXA mod q Diffie-Hellman Merkle Key Agreement: Discrete log problem is hard RSA Public-Key Encryption: Factoring problem is hard

Slide 35

Slide 35 text

Definitions

Slide 36

Slide 36 text

What makes a good definition?

Slide 37

Slide 37 text

Proposition A proposition is a statement that is either true or false.

Slide 38

Slide 38 text

Proposition A proposition is a statement that is either true or false. The cs2102 TAs are awesome. 2 + 2 = 5. Today is Tuesday. If today is Tuesday and it is during the semester, there is cs2102 class.

Slide 39

Slide 39 text

Axioms An axiom is a proposition that is accepted to be true. Axioms are assumed, not proven.

Slide 40

Slide 40 text

Euclid’s Axioms 1. A straight line may be drawn between any two points. 2. A piece of straight line may be extended indefinitely. 3. A circle may be drawn with any given radius and an arbitrary center. 4. All right angles are equal. 5. If a straight line crossing two straight lines makes the interior angles on the same side less than two right angles, the two straight lines, if extended indefinitely, meet on that side on which are the angles less than the two right angles.

Slide 41

Slide 41 text

Mathematical Proof Axioms P Chain of steps using inference rules, starting from set of axioms, resulting in P.

Slide 42

Slide 42 text

Inference Rule: Modus Ponens antecedents conclusion Variables: P, Q

Slide 43

Slide 43 text

Soundness An inference rule is sound, if it can only be used to conclude true things. antecedents conclusion

Slide 44

Slide 44 text

Soundness An inference rule is unsound, if there is a way to make its antecedents all true, and its conclusion false. antecedents conclusion

Slide 45

Slide 45 text

Is it sound? P Q No: It is unsound since setting = true, = false would allow drawing conclusion false.

Slide 46

Slide 46 text

Is it sound? P, P implies Q false No: It is unsound since setting = true, = true would allow drawing conclusion false.

Slide 47

Slide 47 text

Is it sound? P, NOT(P) false Yes! It is sound since there is no choice for the variables that would lead to a false conclusion. There are two cases: = true: NOT() is false, so antecedents are not satisfied and rule cannot be applied = false: is false, so antecedents are not satisfied and rule cannot be applied

Slide 48

Slide 48 text

Charge Before Thursday’s class: read MCS chapter 1, course syllabus; post questions on slack Before Friday (6:29pm): course pledge, registration survey (read “Habits of Highly Mathematical People”) I’ll have (brief) office hours now (until 4pm) and tomorrow (Wednesday), 3-4pm [Rice 507] TA’s office hours will start next week (schedule to be posted on course site)