Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CS1001 Lecture 19. 2 Overview Midterm Midterm OOP Wrap-up OOP Wrap-up Functions, Hilbert’s Hotel Functions, Hilbert’s Hotel.

Similar presentations


Presentation on theme: "1 CS1001 Lecture 19. 2 Overview Midterm Midterm OOP Wrap-up OOP Wrap-up Functions, Hilbert’s Hotel Functions, Hilbert’s Hotel."— Presentation transcript:

1 1 CS1001 Lecture 19

2 2 Overview Midterm Midterm OOP Wrap-up OOP Wrap-up Functions, Hilbert’s Hotel Functions, Hilbert’s Hotel

3 3 Goals Learn foundations of modern functions/etc Learn foundations of modern functions/etc

4 4 Assignments Brookshear: Ch 5.5, Ch 6.3/6.4, Ch 7 (especially 7.7) (Read) Brookshear: Ch 5.5, Ch 6.3/6.4, Ch 7 (especially 7.7) (Read) Read linked documents on these slides (slides will be posted in courseworks) Read linked documents on these slides (slides will be posted in courseworks)

5 5 Midterm Expected Mean was 70. Actual Mean was ~67 Expected Mean was 70. Actual Mean was ~67 All grades are B- or higher (good work) All grades are B- or higher (good work) –A/A- is >= 81 –B to B+ is 55 to 81 –B- is < 55

6 6 Grade Distribution 4 Homeworks: 28% 4 Homeworks: 28% Tech project: 16% Tech project: 16% Final Paper: 16% Final Paper: 16% Midterm: 17% Midterm: 17% Final: 23% Final: 23%

7 7 Sets Functions are really just maps from a set of things to another set of things Functions are really just maps from a set of things to another set of things –For Example, f(x) = 2x establishes the discrete map (1 =>2, 2=>4, 3=>6 …) Since f(1) = 2, f(2) = 4, f(3) = 6 Most functions we work with are continuous and work over the real numbers Most functions we work with are continuous and work over the real numbers

8 8 Propositional Logic Information definition: a proposition is a statement of fact Information definition: a proposition is a statement of fact –“It is raining” (english) Connectives: operators on propositions Connectives: operators on propositions –And, or, not, implies, if and only if Raining

9 9 Theories A Theory in propositional logic is a set of constants, functions, relations and axioms. A Theory in propositional logic is a set of constants, functions, relations and axioms. Example: (theory of ordered integers) Example: (theory of ordered integers) –Constants: non-negative integers –Function: +, Relation: < –Axioms:

10 10 Why? Why do computer scientists care? Why do computer scientists care? Because theories are specifications of a collection of structures Because theories are specifications of a collection of structures To reason about code correctness To reason about code correctness To enable code transformations To enable code transformations –Must preserve invariants

11 11 Key Idea Sets and mappings define a function Sets and mappings define a function Functions (along with axioms and relations) form theories Functions (along with axioms and relations) form theories Theories are the foundation of logic Theories are the foundation of logic Our entire system of logic is built on the axioms of arithmetic (+, -, etc) Our entire system of logic is built on the axioms of arithmetic (+, -, etc)

12 12 Sets A finite set holds some number of things. A finite set holds some number of things. An infinite set holds a concept, not a number. It holds an infinite number of things. An infinite set holds a concept, not a number. It holds an infinite number of things. Are all infinite sets equal in size? No! (Cantor) Are all infinite sets equal in size? No! (Cantor)

13 13 Hilbert’s Hotel http://www.salon.com/comics/lay/2002/09/10/lay/ http://www.salon.com/comics/lay/2002/09/10/lay/ http://www.salon.com/comics/lay/2002/09/10/lay/ Is the set of Real Numbers equal to the size of the set of Integers? In other words are there more integers than real numbers? What about fractions? Are there more Rational (fractional) numbers than integers? Is the set of Real Numbers equal to the size of the set of Integers? In other words are there more integers than real numbers? What about fractions? Are there more Rational (fractional) numbers than integers?


Download ppt "1 CS1001 Lecture 19. 2 Overview Midterm Midterm OOP Wrap-up OOP Wrap-up Functions, Hilbert’s Hotel Functions, Hilbert’s Hotel."

Similar presentations


Ads by Google