Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Math & Fixed points

Similar presentations


Presentation on theme: "Discrete Math & Fixed points"โ€” Presentation transcript:

1 Discrete Math & Fixed points
CS 350 โ€” Fall 2018 gilray.org/classes/fall2018/cs350/

2 ๐ด={1,2,3}

3 ๐ดร—๐ด= {(1,1),(1,2),(1,3), (2,1),(2,2),(2,3), (3,1),(3,2),(3,3)}

4 โ„•ร—โ„•= {(0,0),(0,1),(0,2),(0,3),โ‹ฏ (1,0),(1,1),(1,2),(1,3),โ‹ฏ
(2,0),(2,1),(2,2),(3,3),โ‹ฏ (3,0),(3,1),(3,2),(3,3), โ‹ฑ โ‹ฎ

5 ๐‘…โŠ†โ„•ร—โ„•

6 โˆƒ๐‘ฅโˆˆ๐ด.Even(๐‘ฅ) โˆ€๐‘ฅโˆˆ๐ด.Even(๐‘ฅ) ๐ด={1,2,3} Even(๐‘ฅ) = ฮ” ๐‘ฅโ‰ก0(mod2)
Propositions are statements that are True or False. E.g., ๐ด={1,2,3} Predicates are functions that yield True or False. E.g., Even(๐‘ฅ) = ฮ” ๐‘ฅโ‰ก0(mod2) Quantifiers lift a proposition over elements to a proposition over sets. E.g. โˆƒ๐‘ฅโˆˆ๐ด.Even(๐‘ฅ) โˆ€๐‘ฅโˆˆ๐ด.Even(๐‘ฅ)

7 Applies to sets as well:
De Morganโ€™s Laws ๐‘Žโˆจ๐‘โŸบยฌ(ยฌ๐‘Žโˆงยฌ๐‘) ๐‘Žโˆง๐‘โŸบยฌ(ยฌ๐‘Žโˆจยฌ๐‘) Applies to sets as well: ๐ดโˆฉ๐ตโŸบ ( ๐ด โˆช ๐ต )

8 Or, using set-builder notation:
๐‘…={(0,1),(1,2),(2,3),(3,4),โ€ฆ} Or, using set-builder notation: ๐‘…={(๐‘›,๐‘›+1)|๐‘›โˆˆโ„•}

9 Or, as a graph: 1 2 3 4 5

10 |๐ด|=3 |๐ดร—๐ด|=|๐ด|ร—|๐ด|=9 |๐’ซ(๐ด)|=| 2 ๐ด |= 2 |๐ด| =8

11 Counting Problems

12 ๐’ซ(๐ด)= 2 ๐ด = {ร˜,{1},{2},{3}, {1,2},{1,3},{2,3},{1,2,3}}

13 ๐’ซ(๐ด)= 2 ๐ด = โ€œHasseโ€ diagram {1,2,3} {1,2} {1,3} {2,3} {1} {2} {3} ร˜

14 (โŠ†)โŠ†๐’ซ(๐ด)ร—๐’ซ(๐ด)

15 ๐‘ฅ๐‘…๐‘ฆโŸน๐‘ฆ๐‘…๐‘ฅ ๐‘ฅ๐‘…๐‘ฆโˆง๐‘ฆ๐‘…๐‘ฅโŸน๐‘ฅ=๐‘ฆ ๐‘ฅ๐‘…๐‘ฆโˆง๐‘ฆ๐‘…๐‘งโŸน๐‘ฅ๐‘…๐‘ง โˆ€๐‘ฅ.๐‘ฅ๐‘…๐‘ฅ Reflexivity of R:
Symmetry of R: ๐‘ฅ๐‘…๐‘ฆโŸน๐‘ฆ๐‘…๐‘ฅ Antisymmetry of R: ๐‘ฅ๐‘…๐‘ฆโˆง๐‘ฆ๐‘…๐‘ฅโŸน๐‘ฅ=๐‘ฆ Transitivity of R: ๐‘ฅ๐‘…๐‘ฆโˆง๐‘ฆ๐‘…๐‘งโŸน๐‘ฅ๐‘…๐‘ง

16 โŠ‘ โŠ‘ (โ„,โ‰ค) (๐’ซ(โ„•),โŠ†) โˆ€๐‘ฅ,๐‘ฆ.๐‘ฅ๐‘…๐‘ฆโˆจ๐‘ฆ๐‘…๐‘ฅ
Partial orders are reflexive, antisymmetric, and transitive. If , then the order is total. If it is not antisymmetric, then itโ€™s a preorder. If it is irreflexive, then it is a strict partial order. A set S and a partial order ( ) form a poset (S, ) togetherโ€”a partially ordered set. For example: or A equivalence relation is reflexive, symmetric, and transitiveโ€”has equivalence classes. What does itโ€™s graph look like? โˆ€๐‘ฅ,๐‘ฆ.๐‘ฅ๐‘…๐‘ฆโˆจ๐‘ฆ๐‘…๐‘ฅ โŠ‘ โŠ‘ (โ„,โ‰ค) (๐’ซ(โ„•),โŠ†)

17 A join , also called a least upper bound, is the unique element of a poset no less than than x and y, but strictly less than all other elements no less than either x or y. A meet , also called a greatest lower bound, is the unique element of a poset no greater than than x and y, but strictly greater than all other elements no greater than either x or y. A lattice is a partially ordered set such that, for all x and y, both a meet and a join exist for x and y. (๐‘ฅโŠ”๐‘ฆ) ๐‘ฅโŠ‘(๐‘ฅโŠ”๐‘ฆ)โˆง๐‘ฆโŠ‘(๐‘ฅโŠ”๐‘ฆ)โˆงโˆ€๐‘ง.(๐‘ฅโŠ‘๐‘งโˆง๐‘ฆโŠ‘๐‘งโˆง๐‘งโŠ‘(๐‘ฅโŠ”๐‘ฆ)โŸน๐‘ง=(๐‘ฅโŠ”๐‘ฆ) (๐‘ฅโŠ“๐‘ฆ) ๐‘ฅโŠ’(๐‘ฅโŠ“๐‘ฆ)โˆง๐‘ฆโŠ’(๐‘ฅโŠ“๐‘ฆ)โˆงโˆ€๐‘ง.(๐‘ฅโŠ’๐‘งโˆง๐‘ฆโŠ’๐‘งโˆง๐‘งโŠ’(๐‘ฅโŠ“๐‘ฆ)โŸน๐‘ง=(๐‘ฅโŠ“๐‘ฆ)

18 (1.0m, 100kg) (0.5m, 100kg) (1.0m, 50kg) (1.0m, 10kg) (0.5m, 50kg) (0.5m, 10kg)

19 โˆ€๐‘ฅ.โˆƒ๐‘ฆ.(๐‘ฅ,๐‘ฆ)โˆˆ๐น โˆ€๐‘ฆ.โˆƒ๐‘ฅ.(๐‘ฅ,๐‘ฆ)โˆˆ๐น โˆ€๐‘ฅ,๐‘ฆ.๐น(๐‘ฅ)=๐น(๐‘ฆ)โŸน๐‘ฅ=๐‘ฆ
F is a function: โˆ€๐‘ฅ,๐‘ฆ,๐‘ง.(๐‘ฅ,๐‘ฆ)โˆˆ๐นโˆง(๐‘ฅ,๐‘ง)โˆˆ๐นโŸน๐‘ฆ=๐‘ง F is a total function: โˆ€๐‘ฅ.โˆƒ๐‘ฆ.(๐‘ฅ,๐‘ฆ)โˆˆ๐น F is injective/1-1: โˆ€๐‘ฅ,๐‘ฆ.๐น(๐‘ฅ)=๐น(๐‘ฆ)โŸน๐‘ฅ=๐‘ฆ F is surjective/onto: โˆ€๐‘ฆ.โˆƒ๐‘ฅ.(๐‘ฅ,๐‘ฆ)โˆˆ๐น

20 sets, then they must have the same cardinality.
๐น:โ„•โ†’โ„™ ๐น(๐‘›)=๐‘›+1 1 2 3 4 5 6 7 8 9 10 11 If a bijective function (injective, surjective) exists between two finite sets, then they must have the same cardinality.

21 n f(n) โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ

22 n f(n) โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ d โ€ฆ

23 n f(n) โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ โ€ฆ d โ€ฆ dโ€™ cannot exist as it must disagree at the dโ€™th digit! dโ€™ โ€ฆ

24 Cantorโ€™s Diagonalization Proof

25 Fixed-point algorithms

26 What are fixed points (a.k.a. fixpoints)?

27 f(x) = x2 (1,1) (0,0)

28 {๐‘ฅ|(๐‘ฅ,๐‘ฅ)โˆˆ๐น} or {๐‘ฅ|๐น(๐‘ฅ)=๐‘ฅ}

29 Babylonian method for computing .
2


Download ppt "Discrete Math & Fixed points"

Similar presentations


Ads by Google