
Mathematical Preliminaries CSCI 2670 CSCI 2670 Mathematical Preliminaries Outline for Today Material from Chapter 0. I Sets I Functions I Relations I Graphs CSCI 2670 Mathematical Preliminaries Sets I A set is an unordered collection of objects. The objects in the set are called its elements or members. I In writing, uppercase Roman letters and braces f...g indicate sets. S = f1; 2; 3; 5; 8; 13; 21g I a 2 S (a 62 S) indicates a is (is not) a member of S. I For sets too big to list, we use \:::" or state a rule. I S = f2; 4; 6; 8 :::g I T = fxjx is a positive, even integerg I Order and repetition do not matter with sets. I f1; 3; 5; 7; 9g and f3; 1; 7; 9; 5g denote the same set. I fa; a; b; b; c; cg and fa; b; cg denote the same set. CSCI 2670 Mathematical Preliminaries Common Sets of Numbers I N = f0; 1; 2;:::g, the natural numbers. I Z = f0; ±1; ±2;:::g, the integers. p I Q = f q j p 2 Z and q 2 Z; q 6= 0g, the rational numbers. I R, the real numbers (numbers with infinite decimal representations). I Some authors use N; Z; Q; R. + I Some use superscripts: Z = f1; 2;:::g (the positive integers). I Some don't consider 0 a natural number. CSCI 2670 Mathematical Preliminaries Subsets and Supersets I If all members of A are members of B, then A is a subset of B. I A ⊆ B: A is a subset of B. I A * B: A is not a subset of B. I If A ⊆ B, then B is a superset of A. I If A ⊆ B and B ⊆ A, then A = B. I If A ⊂ B and A 6= B, then A is a proper subset of B. I Observe that for any set S, S ⊆ S and S 6⊂ S. CSCI 2670 Mathematical Preliminaries Subsets and Supersets I The empty set ? (or ;, or fg) is the set with no members. I For any set S, ? ⊆ S. I Note: f?g 6= ?. I List all of the proper subsets of the following: I fag I fa; bg I fa; b; cg I ffa; fbg; fcgg I ? CSCI 2670 Mathematical Preliminaries Cardinality I The cardinality jSj of set S is the number of elements in S. I For finite sets, jSj will be an integer. S = ? jSj = 0 S = fa; a; ag jSj = 1 S = fa; b; cg jSj = 3 S = ffag; fb; cgg jSj = 2 S = fxj x 2 Ng jSj is \countably infinite” CSCI 2670 Mathematical Preliminaries Powersets I The powerset P(S) of set S is the set of all subsets of S. n I In general, if jSj = n, then jP(S)j = 2 . S jSj P(S) jP(S)j ? 0 ? ? fag 1 ? ? fa; bg 2 ? ? fa; b; cg 3 ? ? fa; b; c; dg 4 ? ? CSCI 2670 Mathematical Preliminaries Powersets I The powerset P(S) of set S is the set of all subsets of S. n I In general, if jSj = n, then jP(S)j = 2 . S jSj P(S) jP(S)j ? 0 f?g 1 fag 1 f?; fagg 2 fa; bg 2 f?; fag; fbg; fa; bgg 4 fa; b; cg 3 f?; fag; fbg; fcg; fa; bg; fa; cg; fb; cg; fa; b; cgg 8 fa; b; c; dg 4 f?; fag; fbg; fcg; fdgfa; bg; fa; cg; fa; dg; fb; cg; fb; dg; fc; dg; fa; b; cg; fa; b; dg; fa; c; dg; 16 fb; c; dg; fa; b; c; dgg CSCI 2670 Mathematical Preliminaries ordered n-tuples I Let a1, a2, ::: an be elements of a set. I An ordered list of these elements is a sequence. I (a1; a2;:::; an) is called an ordered n-tuple. I (ai ; aj ) is an ordered pair. I The order of the elements matters. I (ai ; aj ) = (aj ; ai ) if and only if ai = aj . I If ai 6= aj , then (ai ; aj ) 6= (aj ; ai ). I In a sequence or n-tuple, repetitions can occur: (1,1,2,3,5,8). CSCI 2670 Mathematical Preliminaries Cartesian Products I A × B is the Cartesian product (cross product) of sets A and B. A × B = f(a; b)j a 2 A and b 2 Bg I N-ary Cartesian product: If A1, :::, An are sets, A1 × ::: × An = f(a1;:::; an)j ai 2 Ai for each i = 1;:::; ng n I A is shorthand for A × A × ::: × A. I Note that × is not commutative or associative. I A × B 6= B × A. I A × (B × C) 6= (A × B) × C. CSCI 2670 Mathematical Preliminaries Cartesian Products I Let A = fa; b; cg and B = f0; 1g I What is A × A, A × B, B × A, and B × B. I Let R be the set f(1; 1)g. Is R a subset of any of the above? I Let R be the set f(b; 1); (1; 1)g. Is R a subset of any of the above? CSCI 2670 Mathematical Preliminaries Venn Diagrams I Sets can be represented using Venn diagrams. I A rectangle represents U, the universal set (the set of everything). I Sets are drawn using closed shapes inside of U. I Points inside each shape represent elements of the set. I (We may cross out a region to indicate that it is empty). I bob 2 A, A ⊂ U. CSCI 2670 Mathematical Preliminaries Venn Diagrams I Draw a Venn diagram showing that A ⊆ B. I Draw a Venn diagram showing that A * B. I Draw a Venn diagram showing that A * B and B * A. I Draw a Venn diagram showing that A ⊆ B and A ⊆ C but B 6= C. CSCI 2670 Mathematical Preliminaries Set Operations I Union: A [ B = fxjx 2 A OR x 2 Bg I Intersection: A \ B = fxjx 2 A AND x 2 Bg I If A \ B = ?, then A and B are disjoint. I Set Difference: A − B = fxjx 2 A AND x 2= Bg I Complement: A = U − A CSCI 2670 Mathematical Preliminaries Generalized Union and Intersection Let A1, A2, :::, An be sets. n [ I Ai = A1 [ A2 [ ::: [ An i=1 n \ I Ai = A1 \ A2 \ ::: \ An. i=1 Example: Let A1 = f1; 2; 3g, A2 = f3; 4; 5g, A3 = f1; 3; 6g. 3 [ I Ai = f1; 2; 3; 4; 5; 6g i=0 3 \ I Ai = f3g i=0 CSCI 2670 Mathematical Preliminaries Questions Let U = f0; 1; 2; 3; 4; 5; 6; 7; 8; 9g, A = f1; 2; 3; 4; 5g, B = f0; 3; 6g. What is: I A [ B I A \ B I A − B I B − A I A I U I A \ U CSCI 2670 Mathematical Preliminaries Functions I Let A and B be nonempty sets. I A function f from A to B (f : A ! B) is an assignment of exactly one element in B to each element in A. I A is the domain of f . I B is the codomain of f . I ff (a)ja 2 Ag is the range of f . I f is sometimes called a map, mapping, or transformation. I If a 2 A, f (a) denotes the element in B assigned to a. I If f : A ! B is defined for each a 2 A, then f is a total function. I If there is an a 2 A with f (a) undefined, f is a partial function. I Functions can be written in prefix notation|g(x; y)|or infix notation|x + y. CSCI 2670 Mathematical Preliminaries Functions I Given function f : A ! B: I A = fa; b; c; dg. I B = f0; 1; 2; 3g. a f (x) a 1 b 0 c 0 d 1 I What's the domain of f ? I What's the codomain of f ? I What's the range of f ? I How would you represent f as a set? CSCI 2670 Mathematical Preliminaries Injective, Surjective, and Bijective Functions Let f : A ! B be a function. f is I injective (one-to-one) if and only if each element of A gets mapped to a unique element of B. I surjective (onto) if and only if the codomain of f equals the range of f . I bijective (a one-to-one correspondence) if it is injective and surjective. Important! if f : A ! B is bijective, then jAj = jBj. Is this function bijective? Assume A = fa; b; c; dg and B = f0; 1; 2; 3g. a f (x) a 1 b 0 c 0 d 1 CSCI 2670 Mathematical Preliminaries Which are Bijective? I Assume f : R ! R. I f (x) = 3x I f (x) = sin(x) + 20 2 I f (x) = x + 1 3 I f (x) = x + + I What if f : R ! R ? I Suppose g : N ! R. Can g be bijective? CSCI 2670 Mathematical Preliminaries Unary, Binary, k-ary Functions I f : A ! B is a unary function (it has one input). I f : A1 × A2 ! B is a binary function (it has two inputs). I It maps ordered pairs from A1 × A2 to elements of B. I f : A1 × A2 × ::: × Ak ! B is a k-ary (or arity k) function (it has k inputs). I It maps ordered k-tuples from A1 × A2 × ::: × Ak to elements of B. I Finite binary functions can be represented using a table. I Let A = f1; 2; 3g and B = f2; 5g. Define f : A × B ! N as: f 2 5 1 2 5 2 4 10 3 6 15 CSCI 2670 Mathematical Preliminaries Relations I A subset of A1 × A2 × ::: × Ak is a k-ary relation.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages59 Page
-
File Size-