Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

Similar documents
Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Sets Fall / 31

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

2.1 Sets 2.2 Set Operations

CSC Discrete Math I, Spring Sets

SETS. Sets are of two sorts: finite infinite A system of sets is a set, whose elements are again sets.

Slides for Faculty Oxford University Press All rights reserved.

Math 110 FOUNDATIONS OF THE REAL NUMBER SYSTEM FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS

Set and Set Operations

Review of Sets. Review. Philippe B. Laval. Current Semester. Kennesaw State University. Philippe B. Laval (KSU) Sets Current Semester 1 / 16

1.1 - Introduction to Sets

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

Chapter 3. Set Theory. 3.1 What is a Set?

Algebra of Sets. Aditya Ghosh. April 6, 2018 It is recommended that while reading it, sit with a pen and a paper.

COMP Logic for Computer Scientists. Lecture 17

CS 1200 Discrete Math Math Preliminaries. A.R. Hurson 323 CS Building, Missouri S&T

Sets. X. Zhang Dept. of Computer & Information Sciences Fordham University

Discrete Mathematics

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

MATH 22 MORE ABOUT FUNCTIONS. Lecture M: 10/14/2003. Form follows function. Louis Henri Sullivan

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

CS100: DISCRETE STRUCTURES

9.5 Equivalence Relations

SET DEFINITION 1 elements members

Problem One: A Quick Algebra Review

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


Outline. CISC 1100/1400 Structures of Comp. Sci./Discrete Structures Chapter 1 Sets. Sets. Enumerating the elements of a set

The Further Mathematics Support Programme

Introduction. Sets and the Real Number System

The Language of Sets and Functions

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

Discrete Mathematics Lecture 4. Harper Langston New York University

A.1 Numbers, Sets and Arithmetic

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

Today s Topics. What is a set?

Numbers. Definition :Heading 4...1

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Introduction to Sets and Logic (MATH 1190)

11 Sets II Operations

CSE 20 DISCRETE MATH. Fall

Euclid s Axioms. 1 There is exactly one line that contains any two points.

2/18/14. Uses for Discrete Math in Computer Science. What is discrete? Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.

What is Set? Set Theory. Notation. Venn Diagram

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers

Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions

Algebraic Expressions

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

This Lecture. We will first introduce some basic set theory before we do counting. Basic Definitions. Operations on Sets.

Math 187 Sample Test II Questions

EDAA40 At home exercises 1

2 Review of Set Theory

Properties. Comparing and Ordering Rational Numbers Using a Number Line

LECTURE NOTES ON SETS

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Chapter 1: Number and Operations

MAT 090 Brian Killough s Instructor Notes Strayer University

Circuit analysis summary

10/11/2018. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings

NAME UNIT 4 ALGEBRA II. NOTES PACKET ON RADICALS, RATIONALS d COMPLEX NUMBERS

Fundamental Mathematical Concepts Math 107A. Professor T. D. Hamilton

Power Set of a set and Relations

Relational Database: The Relational Data Model; Operations on Database Relations

LECTURE 2 An Introduction to Boolean Algebra

Set theory is a branch of mathematics that studies sets. Sets are a collection of objects.

CISC 1400 Discrete Structures

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

What Is A Relation? Example. is a relation from A to B.

An Interesting Way to Combine Numbers

Algebra 1 Review. Properties of Real Numbers. Algebraic Expressions

Lecture 6,

Section 1.2 Fractions

Quadratic Equations over Matrices over the Quaternions. By Diana Oliff Mentor: Professor Robert Wilson

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g;

Section 1.8. Simplifying Expressions

Decimal Binary Conversion Decimal Binary Place Value = 13 (Base 10) becomes = 1101 (Base 2).

Definition. A set is a collection of objects. The objects in a set are elements.

CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University. Name: ID#: Section #: Score: / 4

CSE 20 DISCRETE MATH. Winter

MITOCW watch?v=kz7jjltq9r4

The Size of the Cantor Set

SOFTWARE ENGINEERING DESIGN I

1 Sets, Fields, and Events

Binary Relations McGraw-Hill Education

2.1 Symbols and Terminology

Chapter 3: Theory of Modular Arithmetic 1. Chapter 3: Theory of Modular Arithmetic

Rational Numbers CHAPTER Introduction

The Intersection of Two Sets

MAT 003 Brian Killough s Instructor Notes Saint Leo University

Finite Math - J-term Homework. Section Inverse of a Square Matrix

Math 202 Test Problem Solving, Sets, and Whole Numbers 19 September, 2008

13 th Annual Johns Hopkins Math Tournament Saturday, February 19, 2011 Automata Theory EUR solutions

Sets. {1, 2, 3, Calvin}.

Topology notes. Basic Definitions and Properties.

Introduction II. Sets. Terminology III. Definition. Definition. Definition. Example

6. Relational Algebra (Part II)

CGF Lecture 2 Numbers

Page 1. Kobrin/Losquadro Math 8. Unit 10 - Types of Numbers Test Review. Questions 1 and 2 refer to the following:

Cardinality of Sets. Washington University Math Circle 10/30/2016

Proof Techniques Alphabets, Strings, and Languages. Foundations of Computer Science Theory

Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube

Transcription:

Sets 1 Where does mathematics start? What are the ideas which come first, in a logical sense, and form the foundation for everything else? Can we get a very small number of basic ideas? Can we reduce it to just one thing? For a long time the basic idea was though to be number. We now see a set as the single starting point. A set in mathematics is a very simple idea - a collection of things. The word 'set' is also used in everyday English, but a maths set is different. A set of cutlery has 'slots' or 'roles', such as knife, fork, soup spoon, desert spoon. A set of golf clubs also has standard slots, such as a driver, a putter and a wedge. These things in maths terms would be called tuples. But a mathematical set is more general than this, and there is no need for slots with fixed purposes. A set is just any collection of anything, with the things not being in order, and with no duplicates. Because sets are the foundation of mathematics, we should have a formal logical basis for them. We outline that later - including more precision as to what the 'things' in a set can be. We start off informally. Set notation For example we could have S1 = { A, B, C } which means that the set S1 is made of the elements A B and C. What kind of thing are A B and C? At the moment, anything. So we might have { red, green blue } a set of colours, { Paris, New York, Chicago } a set of cities { 1,2,3,4,5 } a set of numbers The elements of a set The things in a set are called the elements of it. If x is an element of the set S, we say x S read as 'x is an element of S' For example 2 { 1,2,3} Or maybe x is not an element of S: x S such as 4 {1,2,3} Equality of sets Two sets are equal if they contain exactly the same things. So A = B if and only if every element of A is an element of B, and vice versa. In other words, if x is in A, x is in B, and also the other way round: if x is in B, x is in A For example { 1,2,3 } = {1,2,3}

{1,2,3 } = {3,2,1}.. order does not matter {1,2,3 } {2,3} { 1,2 } {1,2,3} Conversely, if A is not equal to B, there must be an x in A not in B, or an x in B not in A. 'Being equal' might be thought to be a simple obvious idea - but it is not. For example, how does 'being equal' relate to 'being the same'? For example, if we say x=y, is that just a way of saying that x and y are different names for the same thing? If so - consider 5 = 3+2. Does that mean 3+2 is the same thing as 5? EXERCISE 1 An equivalence relation must satisfy 3 properties: A~A (reflexive) if A~B and B~C then A~C (transitive) if A~B then B~A (symmetric) Are these true for set equality? In other words, is set equality an equivalence relation? We study relations and equivalence relations later. Sets of Sets We have not discussed what type of thing we can have in a set - this is discussed later. In the meantime we will just call them a b and c and so on, without saying what a and b and c are. But we can have sets of sets - for example S1 = { a,b,c } S2 = { p, q ] S3 = { S1, S2 } S1 has three elements in it. S3 has just two elements - S1 and S2 (not the five elements a b c p and q ) You have to think very carefully about this. Suppose A = { x, y, z } Is A the same as { A }? No. The set A has three elements, x y and z. But { A } has just one element, which is A. The null set The set with no elements, the empty set, is denoted by Φ Φ = { } The null set is unique - there is only one null set. Suppose S6 and S7 were both null sets, and S6 S7 then there must be an element of S6 not in S7, or one in S7 not in S6. But there are no such elements, so S6 S7 is false. Are you sure this is valid logic? The null set might be thought just a curious thing - in fact it is going to be of fundamental importance. Subsets A subset of a set is a selection of the elements of a set. So if S = {A,B,C,D,E}, then {A,C,E} is a subset of S. This is written So {A,C,E} { A,B,C,D,E} The definition is : A B if x A implies x B In other words one set is a subset of another if, when we pick one of its elements (any one), it will also be an element of the other set.

That means a set is a subset of itself, since every element of A is in A. Also the null set is a subset of every set. A proper subset excludes the set itself, and the null set. Since A A is true for all A, subsets (set inclusion) is reflexive If A B and B C, then A C, and so set inclusion is transitive If A and B are distinct and not null, then A B implies B A, so set inclusion is anti-symmetric The Power Set What about all the subsets of a set? All the subsets of { 1,2,3} are: {1,2,3} {2,3} {1,3} {1,2} {1} {2} {3} {} (the null set Φ ) The set of all subsets is called the power set. How many elements are in the power set? How many subsets does a set have? Suppose the set is S={A,B,C...N} Some subsets contain A - the rest do not. Those two groups can be combined with those that contain B, and those that do not. That's 2 X 2 sets. Combine those with those that contain C, and those that do not - that's 2 X 2 X 2. Clearly we have a total of 2 n. Or, we can represent each subset as a binary number, like 11000.. would be the subset that contains A and B but no others. The subsets are then 000..0 (n bits) to 1111..1. That's 2 n subsets. Venn diagrams One way of visualizing sets is through the use of these diagrams. For example if X = { a, b, c, d } and Y = { b, c } X this diagram shows the situation. Y a b c d Usually we do not write in the elements, and just show the set boundaries. Intersection The intersection of two sets is another set, containing all the elements which are common to both sets. The intersection of A and B is written A B So if A ={ W,X,Y} and B = {X,Y,Z} then A B = { X,Y} if x A B, then x A and x B X Y Intersection

Intersection corresponds to the logical connective AND - the intersection is the set of those elements in one set AND the other. EXERCISE 3 1. What is A Φ? 2. What is A A? 3. Is A B = B A true? Union The union of two sets is another set, containing everything which is in one set, or the other (or both) The union of A and B is written A B So if A ={ W,X,Y} and B = {X,Y,Z} then A B = { W,X,Y,Z } ( remember sets do not contain duplicate elements ) if x A B, then x A, or x B, or both. X Union Y EXERCISE 4 1. What is A Φ? 2. What is A A? Difference This is like 'subtracting' one set from another. The difference of two sets A and B, written A - B, contains those elements in A but not in B So if A ={ S, T, U} and B = {T,U,V} then A - B = { S} EXERCISE 5 1. What is A - A? 2. A - Φ? 3. If A - B = A what can you say about B? 4. If A - B = Φ what can you say? 5. If A - B = B? Complement and Universe The complement of a set are the things not in it. The complement is a set X is usually written X' X A X - Y A - B B Y C C - D D But what then is the complement of {X, Y}? Everything except X and Y, but that is rather vague, as regards what 'everything' is. So we have the idea of the universal set, which is the set of everything we are talking about. For example if the universe is { A, B, C, D, E, F} and S = {A, B, C} then S' = { D, E, F }

So the complement of a set is the difference between the universal set and the given set. Cartesian Product If we have 2 sets A and B, we can form a new set, containing all pairs, one from A and one from B. For example, if A = { C, D} and B={E, F} then the Cartesian Product of A and B is { {C,E}, {C,F}, {D,E}, {D,F} } This is written A X B We modify this idea slightly in the chapter about ordered pairs. Set builder notation As well as listing elements, we can also form a set by giving a rule to decide if something is a member. For example S = { x : x > 0 and x < 5 } which could be read as S is the set of x, where x is greater than 0 and less than 5 - in other words S = { 1, 2, 3, 4 } And we could have T = { x : x is even } - which is an infinite set. Then S T = { 2,4 } The number sets The natural numbers are 1,2,3,4.. The set of all natural numbers is usually written N ( N if fancy letters are not available. The set of signed integers..-2, -1, 0, +1, +2.. is written Z (from the German Zahlen, number) A rational number is one that can be written as a/b where a and b are signed integers. So 1/9, 5/4, -7/22 are all rational numbers. The set of all rationals is written Q Irrational numbers are numbers which cannot be written as a/b. Examples are 2, π and e. The real numbers are rationals and irrationals - all numbers. The set of reals is written R. There is no standard symbol for the irrationals. It can be written R - Q - that is, the reals without the rationals. The set of complex numbers is written C.

Cardinality of a set This is how many elements there are in a set. So the cardinality of {6,7,8,9} is 4. The cardinality of a set S is written S So {5,4,3} is 3. This seems to be a very simple idea. But not always. For example, what is N? Is Q smaller than R? EXERCISE 6 1. Does A X B = B X A? ANSWERS 1. Yes. A=B iff x A implies x B and x B implies x A Clearly x A implies x A so A=A If A=B and B=C then x A implies x B and x B implies x C, so x A implies x C, so A=C If A=B then x B implies x A so B=A 3.1 Φ 3.2 A 3.3 Yes. The elements which are in A and B are the same as the ones in B and A. 4.2 A 4.3 A 5.1 Φ 5.2 A 5.3 There are no elements in B which are in A. In other words A B = Φ. This might be because B = Φ 5.4 A = B 5.5. If you remove the elements of B from A, you get the elements of B. That is impossible, unless B has no elements - so the same for A. So A = B = Φ 6.1 Yes. The elements of A X B are all of {x,y} where x A and y B The elements of B X A are all {y,x} But sets are not ordered, so {x,y} = {y,x}. So A X B = B X A DEFINITIONS OF AND A = B C iff x A x B x C

A = B C iff x A x B x C DEFINITION OF = A = B iff x A x B COMMUTATIVITY OF = Axiom : A = B definition of = x A x B x B x A reflexivity of iff Conclusion: B = A definition of = So if A=B, B=A TRANSITIVITY OF = Axiom 1: A = B Axiom 2: B = C x A x B definition of = and axiom 1 x B x C definition of = and axiom 2 x A x C transitivity of iff Conclusion : A = C transitivity of = so if A=B and B=C, A=C COMMUTATIVITY OF Axiom: A = B C x A x B x C definition of x A x C x B transitivity of iff 2 A = C B definition of 3 B C = A commutativity of =, from axiom so A B = B A B C = C B commutativity of =, from 3 and 2 ASSOCIATIVITY OF Axiom X = ( A B) C x X x ( A B) C definition of = x ( A B) x C definition of ( x A x B ) x C definition of x A ( x B x C) associativity of

x A (B C) definition of, twice Conclusion ( A B) C = A (B C) definition of = with axiom so ( A B) C = A (B C) ASSOCIATIVITY OF Axiom X = ( A B) C x X x ( A B) C definition of = x ( A B) x C definition of ( x A x B ) x C definition of x A ( x B x C) associativity of x A (B C) definition of, twice Conclusion ( A B) C = A (B C) definition of = with axiom so ( A B) C = A (B C)