Sets and Functions

Sets and Functions

Digital Logic Design: a rigorous approach c Chapter 1: Sets and Functions Guy Even Moti Medina School of Electrical Engineering Tel-Aviv Univ. June 15, 2020 Book Homepage: http://www.eng.tau.ac.il/~guy/Even-Medina 1 / 1 Universal Sets Naive definition of sets fails due to paradoxes (Cantor, Russel). Beginning of 20th century: axiomatization of set theory (Zermelo-Fraenkel axioms). Bypass based on a universal set. Definition The universal set is a set that contains all the possible objects. Example Universal set - set of all real numbers R Universal set - set of all natural numbers N (integers ≥ 0) numbers. 2 / 1 What is a Set? Definition A set is a collection of objects from a universal set. 3 / 1 Specification We denote the set of all elements in U that satisfy property P as follows fx 2 U j x satisfies property Pg: Notation: the symbol =4 + 4 + N = fn 2 N j n ≥ 1g means \N is defined be the set of all positive natural numbers". (Compare: = and =)4 Example 4 Q = fx 2 R j x is a rational numberg 4 P = fx 2 N j x is a prime numberg 4 Z = fx 2 R j x is a multiple of 1g 4 N = fx 2 Z j x ≥ 0g set of even integers is fx 2 Z j x is a multiple of 2g 4 / 1 Set Notations 4 Suppose U = N. A =4 f1; 5; 12g means \the set A contains the elements1 ; 5, and 12". Membership x 2 A means \x is an element of A". Cardinality jAj denotes the number of elements in A. Example 12 2 A: 12 is an element of A. 7 2= A: 7 is not an element of A. jAj = 3. Question Is it true that f1; 5; 12g = f5; 12; 1g = f1; 1; 1; 12; 5g? 5 / 1 Equality and Containment Definition A is a subset of B if every element in A is also an element in B. Notation: A ⊆ B. Definition Two sets A and B are equal if A ⊆ B and B ⊆ A. Notation: A = B. Definition (strict containment) A ( B , A ⊆ B and A 6= B: Example 4 U = R A =4 f1; π; 4g B is the interval [1; 10] A B. ( 6 / 1 Venn diagrams U U A B A B (a) Union: A [ B (b) Intersection: A \ B U U A B A B (c) Difference: A n B (d) Complement: U n A = A¯ 7 / 1 The Empty Set Definition The empty set is the set that does not contain any element. It is usually denoted by ;. The empty set is a very important set (as important as the number zero). Claim 8x 2 U : x 2= ; 8A ⊆ U : ; ⊆ A 8A ⊆ U : A [; = A 8A ⊆ U : A \; = ;. 8 / 1 The Power Set Definition The power set of a set A is the set of all the subsets of A. The power set of A is denoted by P(A) or 2A. Example The power set of A =4 f1; 2; 4; 8g is the set of all subsets of A, namely, P(A) = f;; f1g; f2g; f4g; f8g; f1; 2g; f1; 4g; f1; 8g; f2; 4g; f2; 8g; f4; 8g; f1; 2; 4g; f1; 2; 8g; f2; 4; 8g; f1; 4; 8g; f1; 2; 4; 8gg: 9 / 1 The Power Set Question What is the power set of the empty set P(;)? Question What is the power set of the power set of the empty set P(P(;))? 10 / 1 the power set (cont.) Claim B 2 P(A) iff B ⊆ A. 8A : ; 2 P(A) If A has n elements, then P(A) has 2n elements. (to be proved) 11 / 1 ordered pairs We can pair elements together to obtain ordered pairs. Definition Two objects (possibly equal) with an order (i.e., the first object and the second object) are called an ordered pair. Notation: The ordered pair (a; b) means that a is the first object in the pair and b is the second object in the pair. 12 / 1 ordered pairs (cont.) Example names of people (first name, family name) coordinates of points in the plane (x; y). Equality:( a; b) = (a0; b0) if a = a0 and b = b0. Coordinates: An ordered pair (a; b) has two coordinates. The first coordinate equals a, the second coordinate equals b. 13 / 1 Cartesian product Definition The Cartesian product of the sets A and B is the set A × B =4 f(a; b) j a 2 A and b 2 Bg: Every element in a Cartesian product is an ordered pair. We abbreviate A2 =4 A × A. Example Let A =4 f0; 1g and B =4 f1; 2; 3g. Then, A × B = f(0; 1); (0; 2); (0; 3); (1; 1); (1; 2); (1; 3)g Riddle Who invented the Cartesian product? (hint: same person invented analytic geometry) 14 / 1 Cartesian product (cont) Example 2 The Euclidean plane is the Cartesian product R . Every point in the plane has an x-coordinate and a y-coordinate. Thus, a point p is a pair (px ; py ). For example, the point p = (1; 5) is the point whose x-coordinate equals 1 and whose y coordinate equals 5. 15 / 1 k-tuples Definition A k-tuple is a set of k objects with an order. This means that a k-tuple has k coordinates numbered f1;:::; kg. For each coordinate i, there is object in the ith coordinate. Alternatively, a k-tuple is a sequence of k elements. Example An ordered pair is a 2-tuple. (x1;:::; xk ) where xi is the element in the ith coordinate. Equality: compare in each coordinate, thus, 0 0 0 (x1;:::; xk ) = (x1;:::; xk ) if and only if xi = xi for every i 2 f1;:::; ng. 16 / 1 k-tuples (cont.) Definition The Cartesian product of the sets A1; A2;::: Ak is the set of all k-tuples (a1;:::; ak ), where ai 2 Ai . 4 A1 × A2 × · · · × Ak = f(a1;:::; ak ) j ai 2 Ai for every 1 ≤ i ≤ kg: If A = A1 = ··· = Ak , then we abbreviate: k 4 A = A1 × A2 × · · · × Ak Example 3 R = 3-dimensional Euclidean space 12 N = all sequences of natural numbers that consist of 12 elements. 17 / 1 De Morgan's Law U A B Figure: Venn diagram for U n (A [ B) = A¯ \ B¯. Theorem (De Morgan's Laws) U n (A [ B) = A¯ \ B¯ U n (A \ B) = A¯ [ B¯ : To be proved in chapter on Propositional Logic... 18 / 1 Relations Definition A subset R ⊆ A × B is called a binary relation. Example Relation of matches between teams in a soccer league. (Liverpool, Chelsea) means that Liverpool hosted the match. Thus the matches (Liverpool,Chelsea) and (Chelsea,Liverpool) are different matches. Let R ⊆ N × N denote the binary relation \smaller than and not equal" over the natural number. That is, (a; b) 2 R if and only if a < b. R =4 f(0; 1); (0; 2);:::; (1; 2); (1; 3);:::g : 19 / 1 Functions A function is a binary relation with an additional property. Definition A binary relation R ⊆ A × B is a function if for every a 2 A there exists a unique element b 2 B such that (a; b) 2 R. A function R ⊆ A × B is usually denoted by R : A ! B. The set A is called the domain and the set B is called the range. Lowercase letters are usually used to denote functions, e.g., f : R ! R denotes a real function f (x). 20 / 1 functions (cont.) Consider relations R1; R2; R3; R4 ⊆ f0; 1; 2g × f0; 1; 2g: 4 R1 = f(1; 1)g ; 4 R2 = f(0; 0); (1; 1); (2; 2)g ; 4 R3 = f(0; 0); (0; 1); (2; 2)g ; 4 R4 = f(0; 2); (1; 2); (2; 2)g : Example The relation R1 is not a function. R2 is a function. The relation R3 is not a function. The relation R4 is a constant function. R2 is the identity function. 21 / 1 function vs. relation Example M =4 set of mothers. C =4 set of children. P =4 f(m; c) j m is the biological mother of cg. Q =4 f(c; m) j c is a child of mg. P ⊆ M × C is a relation (usually not a function) Q ⊆ C × M is a function. 22 / 1 composition Definition Let f : A ! B and g : B ! C denote two functions. The composed function g ◦ f is the function h : A ! C defined by h(a) =4 g(f (a)), for every a 2 A. Note that two functions can be composed only if the range of the first function is contained in the domain of the second function. A B C h f g 23 / 1 restricting the domain of a function Lemma Let f : A ! B denote a function, and let A0 ⊆ A. The relation R =4 (A0 × B) \ f is a function R : A0 ! B. R is called the restriction of f to the domain A0. 24 / 1 Extension of a Function Definition Let f and g denote two functions. g is an extension of f if f ⊆ g (every ordered pair in f is also an ordered pair in g). Claim If f : A ! B and g is an extension of f , then f is a restriction of g to the domain A. Example 4 f : R × f0g ! R defined by f (x; 0) = jxj. 4 p g : R × R ! R defined by g(x; y) = x2 + y 2.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    40 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us