Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Class 1: What makes computers go?

David Evans
August 23, 2016

Class 1: What makes computers go?

cs2102: Discrete Mathematics
University of Virginia, Fall 2016

See course site for notes:
https://uvacs2102.github.io

David Evans

August 23, 2016
Tweet

More Decks by David Evans

Other Decks in Technology

Transcript

  1. 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!
  2. 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!
  3. 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
  4. Developing Mathematical Skills Precise Tools for Thinking: Definitions Proofs Before

    Friday (questions on Survey): “Habits of highly mathematical people”
  5. Join the course slack group: csmath.slack.com/signup Some of you received

    an invitation with a link if you are enrolled/waiting for class. Please accept the invitation now (and then I’ll invite the rest of the class).
  6. 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?
  7. Continuous Discrete There is something between any two numbers There

    is nothing between adjacent numbers Real numbers Integers
  8. 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.
  9. “Hard” Problems y2 = x3 + 7 What does y2

    = x3 + 7 look like in finite field?
  10. “Hard” Problems y2 = x3 + 7 mod G (G

    = 629) Why do we want “hard” problems?
  11. y2 = x3 + 7 mod G (G = 2256-232-977)

    Bitcoin Market Value Depends on it being hard to find points on this (discrete) curve.
  12. 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
  13. 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.
  14. Axioms An axiom is a proposition that is accepted to

    be true. Axioms are assumed, not proven.
  15. 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.
  16. Mathematical Proof Axioms P Chain of steps using inference rules,

    starting from set of axioms, resulting in P.
  17. Soundness An inference rule is sound, if it can only

    be used to conclude true things. antecedents conclusion
  18. Soundness An inference rule is unsound, if there is a

    way to make its antecedents all true, and its conclusion false. antecedents conclusion
  19. Precise Meaning of Implies P implies Q means: if P

    is true, Q must be true. Variables are propositions: either true or false.
  20. Precise Meaning of Implies P implies Q means: if P

    is true, Q must be true. P Q P implies Q true true true true false false false true true false false true
  21. Is it sound? NOT(P) implies NOT(Q) Q implies P P

    Q NOT(P) implies NOT(Q) Q implies P true true true false false true false false
  22. Is it sound? NOT(P) implies NOT(Q) Q implies P P

    Q NOT(P) implies NOT(Q) Q implies P true true true true true false true true false true false false false false true true
  23. Contrapositive Rule NOT(P) implies NOT(Q) Q implies P P Q

    NOT(P) implies NOT(Q) Q implies P true true true true true false true true false true false false false false true true
  24. Inference Rule: Modus Tollens NOT(Q), P implies Q NOT(P) P

    Q P implies Q true true true true false false false true true false false true
  25. Proposition If the product of x and y is even,

    at least one of x or y must be even.
  26. 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 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)