Sec$on Summary. Definition of sets Describing Sets

Similar documents
With Question/Answer Animations. Chapter 2

A set is an unordered collection of objects.

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

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

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

Sets McGraw-Hill Education

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

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

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

ICS141: Discrete Mathematics for Computer Science I

1.7 Proof Methods and Strategy

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

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

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

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

Discrete Mathematical Structures: Theory and Applications

Discrete Basic Structure: Sets

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

CS 2336 Discrete Mathematics

(c) Give a proof of or a counterexample to the following statement: (3n 2)= n(3n 1) 2

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

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

CM10196 Topic 2: Sets, Predicates, Boolean algebras

CHAPTER 1. Preliminaries. 1 Set Theory

Background for Discrete Mathematics

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

LIN1032 Formal Foundations for Linguistics

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

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

1.1 Introduction to Sets

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.1: Introduction to the Logic of Quantified Statements

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

Exclusive Disjunction

SETS. JEE-Mathematics

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

BASIC MATHEMATICAL TECHNIQUES

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009

Solutions to Problem Set 1

CISC 1100: Structures of Computer Science

Chapter 2 Sets, Relations and Functions

Intro to Logic and Proofs

Propositional Logic, Predicates, and Equivalence

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

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

Mathematical Preliminaries. Sipser pages 1-28

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

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

1 Chapter 1: SETS. 1.1 Describing a set

Huan Long Shanghai Jiao Tong University

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Discrete Mathematics Set Operations

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

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

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

Class 29 - November 3 Semantics for Predicate Logic

Topics in Logic and Proofs

Math 144 Summer 2012 (UCR) Pro-Notes June 24, / 15

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

COMP Logic for Computer Scientists. Lecture 16

Section 1: Sets and Interval Notation

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

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

SETS. Chapter Overview

Predicate Logic: Sematics Part 1

Digital Logic Design: a rigorous approach c

SPEAKING MATHEMATICALLY. Prepared by Engr. John Paul Timola

Chapter 2 - Basics Structures

Preparing for the CS 173 (A) Fall 2018 Midterm 1

CHAPTER 6. Copyright Cengage Learning. All rights reserved.

CHAPTER 1 SETS AND EVENTS

Introduction to Proofs

CSCI3390-Lecture 6: An Undecidable Problem

In English, there are at least three different types of entities: letters, words, sentences.

0 Sets and Induction. Sets

Tutorial on Axiomatic Set Theory. Javier R. Movellan

Logic. Facts (with proofs) CHAPTER 1. Definitions

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

CITS2211 Discrete Structures (2017) Cardinality and Countability

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.

Axiomatic set theory. Chapter Why axiomatic set theory?

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

Discrete Mathematics for M.Sc.CS

CA320 - Computability & Complexity

MAGIC Set theory. lecture 1

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

Introduction to Logic and Axiomatic Set Theory

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

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

CSE 20 DISCRETE MATH. Winter

SETS AND FUNCTIONS JOSHUA BALLEW

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Logical Reasoning. Chapter Statements and Logical Operators

Chapter 4. Basic Set Theory. 4.1 The Language of Set Theory

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

1. (B) The union of sets A and B is the set whose elements belong to at least one of A

Set theory background for probability

ICS141: Discrete Mathematics for Computer Science I

CSE 20. Final Review. CSE 20: Final Review

Transcription:

Section 2.1

Sec$on Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal Set Subsets and Set Equality Cardinality of Sets Tuples Cartesian Products 2

Introduc$on Sets are one of the basic building blocks for the types of objects considered in discrete mathematics. Important for counting. Programming languages have set operations. Set theory is an important branch of mathematics. Many different systems of axioms have been used to develop set theory. Here we are not concerned with a formal set of axioms for set theory. Instead, we will use what is called naïve set theory. 3

Sets A set is an unordered collection of objects. the students in this class the chairs in this room The objects in a set are called the elements, or members of the set. A set is said to contain its elements. The notation a A denotes that a is an element of the set A. If a is not a member of A, write a A 4

Describing a Set: Roster Method S = {a,b,c,d} Order not important S = {a,b,c,d} = {b,c,a,d} Each distinct object is either a member or not; listing more than once does not change the set. S = {a,b,c,d} = {a,b,c,b,c,d} Elipses ( ) may be used to describe a set without listing all of the members when the pattern is clear. S = {a,b,c,d,,z } 5

Roster Method Set of all vowels in the English alphabet: V = {a,e,i,o,u} Set of all odd positive integers less than 10: O = {1,3,5,7,9} Set of all positive integers less than 100: S = {1,2,3,..,99} Set of all integers less than 0: S = {., -3,-2,-1} 6

Some Important Sets N = natural numbers = {0,1,2,3.} Z = integers = {,-3,-2,-1,0,1,2,3, } Z+ = positive integers = {1,2,3,..} Q = set of rational numbers R = set of real numbers R + = set of positive real numbers C = set of complex numbers. C R Q Z N 7

Set-Builder Nota$on Specify the property or properties that all members must satisfy: S = {x x is a positive integer less than 100} O = {x x is an odd positive integer less than 10} O = {x Z+ x is odd and x < 10} A predicate may be used: S = {x P(x)} Example: S = {x Prime(x)} Positive rational numbers: Q + = {x R x = p/q, for some positive integers p,q} 8

Interval Nota$on [a,b] = {x a x b} [a,b) = {x a x < b} (a,b] = {x a < x b} (a,b) = {x a < x < b} closed interval [a,b] open interval (a,b) [2, 7] [2, 7) (2, 7] (2, 7) 1 2 3 4 5 6 7 8 9 9

Universal Set and Empty Set The universal set U is the set containing everything currently under consideration. Sometimes implicit Sometimes explicitly stated. Contents depend on the context. The empty set is the set with no elements. Symbolized, but {} also used. Venn Diagram V a e i o u U John Venn (1834-1923) Cambridge, UK 10

Russell s Paradox Let S be the set of all sets which are not members of themselves. A paradox results from trying to answer the question Is S a member of itself? Related Paradox: Henry is a barber who shaves all people who do not shave themselves. A paradox results from trying to answer the question Does Henry shave himself? Bertrand Russell (1872-1970) Cambridge, UK Nobel Prize Winner 11

Some things to remember Sets can be elements of sets. {{1,2,3},a, {b,c}} {N,Z,Q,R} The empty set is different from a set containing the empty set. { } 12

Set Equality Definition: Two sets are equal if and only if they have the same elements. Therefore if A and B are sets, then A and B are equal if and only if. We write A = B if A and B are equal sets. {1,3,5} = {3, 5, 1} {1,5,5,5,3,3,1} = {1,3,5} 13

Subsets Definition: The set A is a subset of B, if and only if every element of A is also an element of B. The notation A B is used to indicate that A is a subset of the set B. A B holds if and only if 1. Because a is always false, S, for every set S. 2. Because a S a S, S S, for every set S. is true. U A B B A 14

Showing a Set is or is not a Subset of Another Set A is a Subset of B: To show A B, show that if x belongs to A, then x also belongs to B. A is not a Subset of B: To show A B, find an element x A such that x B. (Such an x is a counterexample to the claim that x A implies x B.) Examples: 1. The set of all computer science majors at your school is a subset of all students at your school. 2. The set of integers with squares less than 100 is not a subset of the set of nonnegative integers. 15

Another look at Equality of Sets Recall that two sets A and B are equal, denoted by A = B, iff Using logical equivalences we have that A = B iff This is equivalent to A B and B A 16

Proper Subsets Definition: If A B, but A B, then we say A is a proper subset of B, denoted by A B. If A B, then is true. Venn Diagram B A U 17

Set Cardinality Definition: If there are exactly n distinct elements in S where n is a nonnegative integer, we say that S is finite. Otherwise it is infinite. Definition: The cardinality of a finite set A, denoted by A, is the number of (distinct) elements of A. Examples: 1. ø = 0 2. Let S be the letters of the English alphabet. Then S = 26 3. {1,2,3} = 3 4. {ø} = 1 5. The set of integers is infinite. 18

Power Sets Definition: The set of all subsets of a set A, denoted P(A), is called the power set of A. Ex: If A = {a,b} then P(A) = {ø, {a},{b},{a,b}} If a set has n elements, then the cardinality of the power set is 2ⁿ. (In Ch. 5 and 6, we ll discuss different ways to show this.) 19

Tuples The ordered n-tuple (a 1,a 2,..,a n ) is the ordered collection that has a 1 as its first element and a 2 as its second element and so on until a n as its last element. Two n-tuples are equal if and only if their corresponding elements are equal. 2-tuples are called ordered pairs. The ordered pairs (a,b) and (c,d) are equal if and only if a = c and b = d. 20

René Descartes (1596-1650) Cartesian Product Definition: The Cartesian Product of two sets A and B, denoted by A B is the set of ordered pairs (a,b) where a A and b B. Example: A = {a,b} B = {1,2,3} A B = {(a,1),(a,2),(a,3), (b,1),(b,2),(b,3)} B A = {(1,a),(1,b), (2,a),(2,b), (3,a),(3,b)} Definition: A subset R of the Cartesian product A B is called a relation from the set A to the set B. (More in Chapter 9. ) 21

Cartesian Product Definition: The cartesian products of the sets A 1,A 2,,A n, denoted by A 1 A 2 A n, is the set of ordered n-tuples (a 1,a 2,,a n ) where a i belongs to A i for i = 1, n. Ex: What is A B C where A = {0,1}, B = {1,2} and C = {0,1,2} Solution: A B C = {(0,1,0), (0,1,1), (0,1,2),(0,2,0), (0,2,1), (0,2,2),(1,1,0), (1,1,1), (1,1,2), (1,2,0), (1,2,1), (1,2,2)} 22

Set Nota$on with Quan$fiers x S (P(x)) is shorthand for x(x S P(x)) x S (P(x)) is shorthand for x(x S P(x)) Ex: Express the following in English 1. x R (x 2 0) The square of every real number is nonnegative. 2. x Z (x 2 = 1) There is an integer whose square is one. 23

Truth Sets and Quan$fiers Given a predicate P and a domain D, we define the truth set of P to be the set of elements in D for which P(x) is true. The truth set of P(x) is denoted by Ex: The truth set of P(x) where the domain is the integers and P(x) is x = 1 is the set {-1,1} 24