CSI30. Chapter 2. Basic Structures: Sets, Functions, Sequences, Sums. 2.1 Sets and subsets 2.2 Sets of sets

Similar documents
Sec$on Summary. Definition of sets Describing Sets

With Question/Answer Animations. Chapter 2

A set is an unordered collection of objects.

1.7 Proof Methods and Strategy

Discrete Mathematics. (c) Marcin Sydow. Sets. Set operations. Sets. Set identities Number sets. Pair. Power Set. Venn diagrams

4. Sets The language of sets. Describing a Set. c Oksana Shatalov, Fall Set-builder notation (a more precise way of describing a set)

4. Sets The language of sets. Describing a Set. c Oksana Shatalov, Fall

1.1 Introduction to Sets

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Spring

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

CS 2336 Discrete Mathematics

ICS141: Discrete Mathematics for Computer Science I

Chapter-2 SETS In Mathematics, Set theory was developed by George Cantor ( ).

Sets. your school. A group of odd natural numbers less than 25.

Exclusive Disjunction

Discrete Basic Structure: Sets

In this initial chapter, you will be introduced to, or more than likely be reminded of, a

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

Discrete Mathematical Structures: Theory and Applications

1. SET 10/9/2013. Discrete Mathematics Fajrian Nur Adnan, M.CS

CSE 20 DISCRETE MATH WINTER

Show Your Work! Point values are in square brackets. There are 35 points possible. Some facts about sets are on the last page.

Set Theory. CPT Section D Quantitative Aptitude Chapter 7 Brijeshwar Prasad Gupta

Sets. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Sets. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

1. From Lewis Carroll: extract a pair of premises and finish the conclusion.

SETS. Chapter Overview

SET THEORY. 1. Roster or Tabular form In this form the elements of the set are enclosed in curly braces { } after separating them by commas.

Section 2.2 Set Operations. Propositional calculus and set theory are both instances of an algebraic system called a. Boolean Algebra.

SETS. JEE-Mathematics

Step-by-step and detailed demonstrations of how a specific concept or technique is applied in solving problems.

PREFACE. Synergy for Success in Mathematics 7 is designed for Grade 7 students. The textbook

MATH 13 FINAL EXAM SOLUTIONS

CSE 20 DISCRETE MATH. Winter

CS 173: Discrete Structures. Eric Shaffer Office Hour: Wed. 1-2, 2215 SC

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

Mathematical Preliminaries. Sipser pages 1-28

Welcome to CS103! Two Handouts Today: Course Overview Introduction to Set Theory The Limits of Computation

Logic, Sets, and Proofs

Contents. 4. Principle of Mathematical Induction Introduction Motivation The Principle of Mathematical Induction 88

Recall that the expression x > 3 is not a proposition. Why?

The Real Number System

Sets McGraw-Hill Education

Today s topics. Introduction to Set Theory ( 1.6) Naïve set theory. Basic notations for sets

Chapter 2 - Basics Structures

Section 0. Sets and Relations

n CS 160 or CS122 n Sets and Functions n Propositions and Predicates n Inference Rules n Proof Techniques n Program Verification n CS 161

Welcome to CS103! Three Handouts Today: Course Overview Introduction to Set Theory The Limits of Computation

Tutorial on Axiomatic Set Theory. Javier R. Movellan

Axiomatic set theory. Chapter Why axiomatic set theory?

Background for Discrete Mathematics

Sets. Introduction to Set Theory ( 2.1) Basic notations for sets. Basic properties of sets CMSC 302. Vojislav Kecman

Introduction to Set Operations

The objects in a set are the elements or members of the set. Always enclose the elements of a set in curly brackets. is read is an element of

Propositional Logic, Predicates, and Equivalence

1 Chapter 1: SETS. 1.1 Describing a set

Functions. Definition 1 Let A and B be sets. A relation between A and B is any subset of A B.

LIN1032 Formal Foundations for Linguistics

STA2112F99 ε δ Review

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

Section 1.1 Notes. Real Numbers

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

R1: Sets A set is a collection of objects sets are written using set brackets each object in onset is called an element or member

= A. Example 2. Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, A = {4, 6, 7, 9, 10}, and B = {2, 6, 8, 9}. Draw the sets on a Venn diagram.

CITS2211 Discrete Structures (2017) Cardinality and Countability

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Review 1. Andreas Klappenecker

Math 110 (S & E) Textbook: Calculus Early Transcendentals by James Stewart, 7 th Edition

1.1 Language and Logic

Quiz 1. Directions: Show all of your work and justify all of your answers.

Topics in Logic and Proofs

This section will take the very naive point of view that a set is a collection of objects, the collection being regarded as a single object.

Philosophy of Religion. Notes on Infinity

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

Undecidability. Andreas Klappenecker. [based on slides by Prof. Welch]

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

CHAPTER 8: EXPLORING R

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Intro to Logic and Proofs

SETS AND FUNCTIONS JOSHUA BALLEW

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

2.1 Sets. Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R.

Set builder notation: Describe the set in terms of its properties, Chapter 1: SETS AND PROBABILITY. 1.1 Introduction to Sets

Discrete Mathematics Set Operations

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Set Theory. CSE 215, Foundations of Computer Science Stony Brook University

CSE 20 DISCRETE MATH. Fall

CISC 1100: Structures of Computer Science

2. Ordered sets. A theorem of Hausdorff.

A Semester Course in Basic Abstract Algebra

Section-A. Short Questions

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

Introduction. Chapter 1. Contents. EECS 600 Function Space Methods in System Theory Lecture Notes J. Fessler 1.1

Copyright c 2007 Jason Underdown Some rights reserved. statement. sentential connectives. negation. conjunction. disjunction

Section 1: Sets and Interval Notation

1.4 Cardinality. Tom Lewis. Fall Term Tom Lewis () 1.4 Cardinality Fall Term / 9

MATH 201 Solutions: TEST 3-A (in class)

PRELIMINARIES FOR GENERAL TOPOLOGY. Contents

Transcription:

Chapter 2. Basic Structures: Sets, Functions, Sequences, Sums 2.1 Sets and subsets 2.2 Sets of sets 1

Set is an unordered collection of objects. - used to group objects together, - often the objects with similar properties 2

Set is an unordered collection of objects. - used to group objects together, - often the objects with similar properties This description of a set (without specification what an object is) was started by the German mathematician Georg Cantor, in 1895. He is considered to be the founder of set theory. We will use Cantor's original version of set theory (called naive set theory). the objects in a set are called elements, or members, of the set. A set is said to contain its elements. 3

Set is an unordered collection of objects. - used to group objects together, - often the objects with similar properties This description of a set (without specification what an object is) was started by the German mathematician Georg Cantor, in 1895. He is considered to be the founder of set theory. We will use Cantor's original version of set theory (called naive set theory). the objects in a set are called elements, or members, of the set. A set is said to contain its elements. Example 1: A={a,b,c,d,e} set A contains elements a, b, c, d, and e a A a is an element of set A a belongs to A f A f is not an element of set A f doesn't belong to A 4

Example 2: A={0, 1, 2, 3,..., 100} set A contains elements integers from 0 to 100, including 77 A 120 A 5

Example 2: A={0, 1, 2, 3,..., 100} set A contains elements integers from 0 to 100, including 77 A 120 A Example 3 (set builder notation): A = { x x is even positive integer} which means that A = { 2, 4, 6, 8, 10,...} -we can use this notation when it is not possible to list all the elements of the set. 6

Example 2: A={0, 1, 2, 3,..., 100} set A contains elements integers from 0 to 100, including 77 A 120 A Example 3 (set builder notation): A = { x x is even positive integer} which means that A = { 2, 4, 6, 8, 10,...} -we can use this notation when it is not possible to list all the elements of the set. Example 4 (set builder notation): T = { x x 2 =64} Can you tell what numbers set T consists of? 7

Example 2: A={0, 1, 2, 3,..., 100} set A contains elements integers from 0 to 100, including 77 A 120 A Example 3 (set builder notation): A = { x x is even positive integer} which means that A = { 2, 4, 6, 8, 10,...} -we can use this notation when it is not possible to list all the elements of the set. Example 4 (set builder notation): T = { x x 2 =64} Can you tell what numbers set T consists of? T={-8,8} 8

Some of the known sets N = { 0, 1, 2, 3, 4,...} set of natural numbers (in math: W set of whole numbers) Z = {...,-3, -2, -1, 0, 1, 2, 3,...} set of integers Z + = { 1, 2, 3, 4,...} set of positive integers R the set of real numbers (rational and irrational numbers) Q = { p q p Z, q Z, q 0} set of fractions (quotients) 9

Two sets are equal if and only if (iff) they have the same elements A = B iff x ( x A x B) Example 5: a) {1, 4, 6, 7} = {1, 6, 7, 4} = {1, 1, 6, 7, 4, 4} the order doesn't matter; how many times element is listed doesn't matter either. b) {0,{1},6} = {6, 0, 0, 6, {1},{1}} c) {0,{1},6} {0, 1, 6} 10

Two sets are equal if and only if (iff) they have the same elements A = B iff x ( x A x B) Example 5: a) {1, 4, 6, 7} = {1, 6, 7, 4} = {1, 1, 6, 7, 4, 4} the order doesn't matter; how many times element is listed doesn't metter either. b) {0,{1},6} = {6, 0, 0, 6, {1},{1}} c) {0,{1},6} {0, 1, 6} Example 6: For each of the following sets determine whether 2 is an element of that set. a) { x R x is an integer greater than 1 } b) { x R x is the square of an integer } c) {2, {2}} d) {{2},{{2}}} e) {{2},{2,{2}}} 11 f) {{{2}}}

Two sets are equal if and only if (iff) they have the same elements A = B iff x ( x A x B) Example 5: a) {1, 4, 6, 7} = {1, 6, 7, 4} = {1, 1, 6, 7, 4, 4} the order doesn't matter; how many times element is listed doesn't metter either. b) {0,{1},6} = {6, 0, 0, 6, {1},{1}} c) {0,{1},6} {0, 1, 6} Example 6: For each of the following sets determine whether 2 is an element of that set. a) { x R x is an integer greater than 1 } belongs b) { x R x is the square of an integer } c) {2, {2}} d) {{2},{{2}}} e) {{2},{2,{2}}} 12 f) {{{2}}}

Two sets are equal if and only if (iff) they have the same elements A = B iff x ( x A x B) Example 5: a) {1, 4, 6, 7} = {1, 6, 7, 4} = {1, 1, 6, 7, 4, 4} the order doesn't matter; how many times element is listed doesn't metter either. b) {0,{1},6} = {6, 0, 0, 6, {1},{1}} c) {0,{1},6} {0, 1, 6} Example 6: For each of the following sets determine whether 2 is an element of that set. a) { x R x is an integer greater than 1 } belongs b) { x R x is the square of an integer } doesn't belong c) {2, {2}} d) {{2},{{2}}} e) {{2},{2,{2}}} 13 f) {{{2}}}

Two sets are equal if and only if (iff) they have the same elements A = B iff x ( x A x B) Example 5: a) {1, 4, 6, 7} = {1, 6, 7, 4} = {1, 1, 6, 7, 4, 4} the order doesn't matter; how many times element is listed doesn't metter either. b) {0,{1},6} = {6, 0, 0, 6, {1},{1}} c) {0,{1},6} {0, 1, 6} Example 6: For each of the following sets determine whether 2 is an element of that set. a) { x R x is an integer greater than 1 } belongs b) { x R x is the square of an integer } doesn't belong c) {2, {2}} belongs d) {{2},{{2}}} e) {{2},{2,{2}}} 14 f) {{{2}}}

Two sets are equal if and only if (iff) they have the same elements A = B iff x ( x A x B) Example 5: a) {1, 4, 6, 7} = {1, 6, 7, 4} = {1, 1, 6, 7, 4, 4} the order doesn't matter; how many times element is listed doesn't metter either. b) {0,{1},6} = {6, 0, 0, 6, {1},{1}} c) {0,{1},6} {0, 1, 6} Example 6: For each of the following sets determine whether 2 is an element of that set. a) { x R x is an integer greater than 1 } belongs b) { x R x is the square of an integer } doesn't belong c) {2, {2}} belongs d) {{2},{{2}}} doesn't belong e) {{2},{2,{2}}} f) {{{2}}} 15

Two sets are equal if and only if (iff) they have the same elements A = B iff x ( x A x B) Example 5: a) {1, 4, 6, 7} = {1, 6, 7, 4} = {1, 1, 6, 7, 4, 4} the order doesn't matter; how many times element is listed doesn't metter either. b) {0,{1},6} = {6, 0, 0, 6, {1},{1}} c) {0,{1},6} {0, 1, 6} Example 6: For each of the following sets determine whether 2 is an element of that set. a) { x R x is an integer greater than 1 } belongs b) { x R x is the square of an integer } doesn't belong c) {2, {2}} belongs d) {{2},{{2}}} doesn't belong e) {{2},{2,{2}}} doesn't belong f) {{{2}}} 16

Two sets are equal if and only if (iff) they have the same elements A = B iff x ( x A x B) Example 5: a) {1, 4, 6, 7} = {1, 6, 7, 4} = {1, 1, 6, 7, 4, 4} the order doesn't matter; how many times element is listed doesn't metter either. b) {0,{1},6} = {6, 0, 0, 6, {1},{1}} c) {0,{1},6} {0, 1, 6} Example 6: For each of the following sets determine whether 2 is an element of that set. a) { x R x is an integer greater than 1 } belongs b) { x R x is the square of an integer } doesn't belong c) {2, {2}} belongs d) {{2},{{2}}} doesn't belong e) {{2},{2,{2}}} doesn't belong f) {{{2}}} doesn't belong 17

Venn Diagrams - is used to show relationships between sets. - named after English mathematician Jogn Venn, who introduced their use in 1881. In Venn diagram the universal set U, which contains all the objects under consideration, is represented by a rectangle. U U - universe 18

Venn Diagrams - is used to show relationships between sets. - named after English mathematician Jogn Venn, who introduced their use in 1881. In Venn diagram the universal set U, which contains all the objects under consideration, is represented by a rectangle. 1 2 3 4 Z + U U universe Let U = Z the set of integers Inside the rectangle, circles and other geometrical figures are used to represent sets. Sometimes points are used to represent particular elements of the set. 19

Venn Diagrams Venn diagrams allow us to visualize relationships between sets. U = R 1.25 Z -2 2 N Q 0.5-5 0 3 20

Empty set is a set that has no elements; denotation: Singleton set is a set that has exactly one element. Examples 7: 1) A={2} singleton set 2) { } - singleton set 21

Empty set is a set that has no elements; denotation: Singleton set is a set that has exactly one element. Examples 7: 1) A={2} singleton set 2) { } - singleton set A is a subset of B iff every element of A is also an element of B. denotation: A B or B A We can re-write the definition in Predicate Logic: A B iff x(x A x B) is true Example 8: Let A={1,2,3} and B={0,1,2,5,3}. Then A B. U A B Venn diagram for A B 22

A is a proper subset of B iff A is a subset of B and set A and B are not equal. denotation: A B or B A We can re-write the definition in Predicate Logic: A B iff x(x A x B) x(x B x A) is true Examples 9: 1) Let A={1,2,3} and B={0,1,2,5,3}. Then A B. 2) Let A={1,2,3} and B={1,2,3} Then A B, but A B U A B Venn diagram for A B 23

Theorem 1 For every set S, (1) S (2) S S 24

Theorem 1 For every set S, (1) S (2) S S Proof: (1) Let S be a set. To show that S, we need to show that x(x x S) is true: empty set contains no elements, therefore, x is false for any x; then x x S is true for any x,because the precedent is false; hence x(x x S) is true. We proved that S for every set S. 25

Theorem 1 For every set S, (1) S (2) S S Proof: (1) Let S be a set. To show that S, we need to show that x(x x S) is true: empty set contains no elements, therefore, x is false for any x; then x x S is true for any x,because the precedent is false; hence x(x x S) is true. We proved that S for every set S. (2) Let S be a set. To show that S S, we need to show that x(x S x S) is true: implication x S x S is true for any x (p p is a tautology); hence x(x S x S) is true. qed 26

Let S be a set. If there are exactly n distinct elements in S, where n is a nonnegative integer, we say that S is a finite set and that n is the cardinality of S. denotation: S 27

Let S be a set. If there are exactly n distinct elements in S, where n is a nonnegative integer, we say that S is a finite set and that n is the cardinality of S. denotation: S Examples 10: find the cardinality of the given sets a) Let A be a set of even positive integers less than 8. b) Let B be a set of letters in English alphabet. c) S = 28

Let S be a set. If there are exactly n distinct elements in S, where n is a nonnegative integer, we say that S is a finite set and that n is the cardinality of S. denotation: S Examples 10: find the cardinality of the given sets a) Let A be a set of even positive integers less than 8. A = 3, because A = {2,4,6} b) Let B be a set of letters in English alphabet. B =26, because B = {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} c) S = S =0 29

Let S be a set. If there are exactly n distinct elements in S, where n is a nonnegative integer, we say that S is a finite set and that n is the cardinality of S. denotation: S Examples 10: find the cardinality of the given sets a) Let A be a set of even positive integers less than 8. A = 3, because A = {2,4,6} b) Let B be a set of letters in English alphabet. B =26, because B = {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} c) S = S =0 A set is infinite if it is not finite. Examples 11: infinity a) N = {0, 1, 2, 3, 4, 5,...} N = 30 b) S={ x x N and x is even} S =

2.2 Sets of sets It is possible that the elements of a set are themselves sets. For example, consider the set B: B = { {1,2,3},, { } } 31

2.2 Sets of sets It is possible that the elements of a set are themselves sets. For example, consider the set B: B = {,, } {1,2,3} { } 32

2.2 Sets of sets Given a set S, the power set of S is the set of all subsets of the set S. denotation: P(S) Examples 12: find the power set of the given sets a) A = {1,2,3} b) B = c) S = { } 33

2.2 Sets of sets Given a set S, the power set of S is the set of all subsets of the set S. denotation: P(S) Examples 12: find the power set of the given sets a) A = {1,2,3} P(A) = P({1,2,3}) = {,{1},{2},{3},{1,2},{2,3},{1,3},{1,2,3}} note: empty set and the set A itself are the subsets of A. b) B = c) S = { } 34

2.2 Sets of sets Given a set S, the power set of S is the set of all subsets of the set S. denotation: P(S) Examples 12: find the power set of the given sets a) A = {1,2,3} P(A) = P({1,2,3}) = {,{1},{2},{3},{1,2},{2,3},{1,3},{1,2,3}} note: empty set and the set A itself are the subsets of A. b) B = P(B) = { } c) S = { } P(S) = {,{ }} 35

2.2 Sets of sets Given a set S, the power set of S is the set of all subsets of the set S. denotation: P(S) Examples 12: find the power set of the given sets a) A = {1,2,3} P(A) = P({1,2,3}) = {,{1},{2},{3},{1,2},{2,3},{1,3},{1,2,3}} note: empty set and the set A itself are the subsets of A. b) B = P(B) = { } c) S = { } P(S) = {,{ }} Did you notice that power set is a set of sets? a possible mistake: P({1,2,3}) = {,1,2,3,{1},{2},{3},{1,2},{2,3},{1,3},{1,2,3}} 36

2.2 Sets of sets Theorem Given a set S, with n elements, the power set of S has 2 n elements, i.e. P(s) =2 n recall Example 12(a): A = {1,2,3}, P(A) = P({1,2,3}) = {,{1},{2},{3},{1,2},{2,3},{1,3},{1,2,3}} A = 3, P(A) = 8 = 2 3 37