1 / 40

Discrete Mathematics: Sets, Sequences and Functions

Discrete Mathematics: Sets, Sequences and Functions. 1.1 Some Special Sets 1.2 Set Operations 1.3 Functions. Discrete Mathematics. http://www.cs.tufts.edu/research/dmw/what_is_dm.html http://en.wikipedia.org/wiki/Discrete_mathematics. Sets.

darrel-sims
Download Presentation

Discrete Mathematics: Sets, Sequences and Functions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete Mathematics:Sets, Sequences and Functions 1.1 Some Special Sets 1.2 Set Operations 1.3 Functions

  2. Discrete Mathematics • http://www.cs.tufts.edu/research/dmw/what_is_dm.html • http://en.wikipedia.org/wiki/Discrete_mathematics

  3. Sets • In the past few decades, it has become traditional to use set theory as the underlying basis for mathematics. • Set – a collection of objects • Must be unambiguous

  4. Sets • Sets – A, B, S, X • Objects – a, b, s, x • a is a member of S (a∈S) • a is not an element of S (a∉S)

  5. Some Special Sets • Natural numbers ℕ = {0, 1, 2, 3, …} • Positive integers ℙ = {1, 2, 3, …} • (some texts do not include 0 in ℕ) • Integers (Zahl) ℤ = {0, ±1, ±2, ±3, …} • Rational numbers (ratios of integers) ℚ = {m/n: m∈ℤ, n∈ℤ} • Real numbers ℝ

  6. Notation • Positive even numbers less than 12: {2, 4, 6, 8, 10} • Primes less than 20: {2, 3, 5, 7, 11, 13, 17, 19} • { : } • The colon is read “such that”

  7. Notation • {n:n∈ℕ and n is even} = {0, 2, 4, 6, …} • {x:x∈ℝ and 1≤x<3} • {n∈ℕ: n is even} • {x∈ℝ: 1≤x<3} • {n2: n∈ℕ} = {m∈ℕ: m = n2 for some n∈ℕ} = {0, 1, 4, 9, 16, …}= {n2: n∈ℤ} • {(-1)n: n∈ℕ} = {-1, 1}

  8. Definitions • Two sets are equal if they contain the same elements. • Order is irrelevant • No advantage or harm in repeating • {2, 4, 6, 8, 10} = {10, 8, 6, 4, 2} = {2, 8, 2, 6, 2, 10, 4, 2}

  9. Definitions • S is a subset of T (ST) if every element of S belongs to T • Thus, S = T iff ST and TS

  10. Examples • ℙℕ, ℕℤ, ℤℚ, ℚℝ • ℙℕℤℚℝ • {n∈ℙ: n is prime and n≥3}  {n∈ℙ: n is odd} • SS ( instead of )

  11. Notation • TS means TS and T≠S • T is a proper subset of S

  12. Interval Notation • [a, b] = {x∈ℝ: a≤x≤b} • [a, b) = {x∈ℝ: a≤x<b} • (a, b] = {x∈ℝ: a<x≤b} • (a, b) = {x∈ℝ: a<x<b} • [a, b] = closed interval • (a, b) = open interval • Intervals can also be used with ±∞

  13. Some Special Sets • {n∈ℕ: 2<n<3} • {x∈ℝ: x2<0} • {r∈ℚ: r2=2} • {x∈ℝ: x2+1=0} • Empty sets are denoted by { } and ∅ • Norwegian and Danish letter, not Greek Φ • ∅ is a subset of every set S, because x∈∅ implies x∈S

  14. Inception • Sets are objects, and can be members of other sets • Ex.: {{1, 2}, {1, 3}, {2}, {3}} has 4 members • Thus, {∅} has one member, and ∅ and {∅} are different. • ∅∈{∅}, and ∅{∅}, but ∅∉∅

  15. Power Sets • The set of all subsets of a set S is called the power set of S • P(∅) = {∅} • If S={a, b} and a≠b, then P(S)={∅, {a}, {b}, {a, b}} has 4 elements • If S = {a, b, c}, then P(S) = {∅, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, {a, b, c}} has 8 elements • If S is a finite set with n elements, and if n≤3, then P(S) has 2n elements

  16. Languages • Alphabet = a finite nonempty set Σ whose members are symbols, or letters of Σ, and which is subject to some minor restrictions • Word = a finite string of letters from Σ • Σ* = the set of all words using letters from Σ • Language = any subset of Σ*

  17. Languages • Let Σ={a, b, c, ..., z} • Any string of letters from Σ belongs to Σ* • Σ* contains math, is, fun, aint, lieblich, amour, zzyzzoomph, etcetera, etc. (infinite) • We could define the American language L to be the subset of Σ* consisting of words in Webster’s New World Dictionary of the American Language. • Thus, L={a, aachen, aardvark, aardwolf,…, zymurgy} (finite)

  18. Null • The empty word, or null word, is the string with no letters at all, and is denoted by λ

  19. Restrictions on Σ • Σ cannot contain any letters that are themselves strings of letters in Σ • Σ={a, b, c} • Σ={a, b, c, ac} • Σ={a, b, ca} • Σ={a, b, Ab} • Σ={a, b, ac}

  20. Length • length(w) is the number of letters from Σ in w • length(aab); Σ={a, b} • length(bab); Σ={a, b} • length(abbAb); Σ={a, b, Ab} • length(λ)

  21. Set Operations • Union - A∪B = {x:x∈A or x∈B or both} • Intersection - A∩B = {x:x∈A and x∈B} • Disjoint – no elements in common (A∩B= ∅) • Relative complement – set of objects in A and not in B (A\B={x:x∈A and x∉B} = {x∈A:x∉B}

  22. Set Operations • Symmetric difference A⊕B={x:x∈A or x∈B but not both} • A⊕B=(A∪B)\(A∩B)=(A\B)∪(B\A) • Venn diagrams

  23. Universe • Set U is the universe or universal set • U can be ℕ, ℝ, or Σ* • Only consider elements in U and subsets of U • Absolute complement (or complement) of A, Ac=AU • U is denoted by a box in Venn diagrams • Note that A\B=A∩Bc • Ac∩Bc=(A∪B)c

  24. Commutative Laws • A∪B = B∪A • A∩B = B∩A

  25. Associative Laws • (A∪B)∪C = A∪(B∪C) • (A∩B)∩C = A∩(B∩C) • (A∪B)∩C ≟ A∪(B∩C) • (A∩B)∪C ≟ A∩(B∪C)

  26. Distributive Laws • (A∪B)∩C = (A∪B)∩(A∪C) • (A∩B)∪C = (A∩B)∪(A∩C)

  27. Idempotent Laws • A∪A = A • A∩A = A

  28. Identity Laws • A∪∅ = A • A∩U = U • A∩∅ = ∅ • A∪U = A

  29. Double Complementation • (Ac)c = A

  30. Other Laws • A∪Ac = U • A∩Ac = ∅ • Uc = ∅ • ∅c = U

  31. DeMorgan Laws • (A∪B)c = Ac∩Bc • (A∩B)c = Ac∪Bc

  32. Other Properties • (A∪B)∩Ac  B • (A⊕B)⊕C = A⊕(B⊕C)

  33. Product • Consider sets S and T, with s∈S and t∈T • (s, t) is an ordered pair (order is important) • Product – the set of all ordered pairs (s, t) • S x T = {(s, t): s∈S and t∈T} • If S = T, S x S can be written as S2

  34. Notation • For any finite set S, |S| indicates the number of elements in the set • |S x T| = |S| ∙ |T| • |P(S)| = 2|S| • P(S) can be written as 2S

  35. Product Set • Product set S1 x S2 x ∙∙∙ x Sn consists of all ordered n-tuples (s1, s2, …, sn)

  36. Functions • A function f assigns to some element x in some set S a unique element in a set T. • f is defined on S with values in T • S – domain of f, Dom(f) • The element assigned to x is written f(x)

  37. Functions • f is complete specified by Dom(f) and the formula or rule giving f(x) for each x∈Dom(f) • f(x) is the image of x under f • Im(f)T is the image of f, or the set of all images f(x)

  38. Functions • T is the codomain of f • Any set containing Im(f) can be a codomain • f:S→T means “f is a function with domain s and codomain T” • Or: f maps S into T

  39. Functions • Graph(f) = {(x, y)∈S x T: y = f(x)}

More Related