What is a Set? Set Theory. Set Notation. Standard Sets. Standard Sets. Part 1.1. Organizing Information

Similar documents
SET DEFINITION 1 elements members

CSC Discrete Math I, Spring Sets

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

CS100: DISCRETE STRUCTURES

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

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

Set and Set Operations

Introduction. Sets and the Real Number System

1.1 - Introduction to Sets

2.1 Sets 2.2 Set Operations

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

2 Sets. 2.1 Notation. last edited January 26, 2016

Pre-Calc Unit 1 Lesson 1

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

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

The Language of Sets and Functions

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

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

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

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

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

Today s Topics. What is a set?

LECTURE 8: SETS. Software Engineering Mike Wooldridge

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

COMS 1003 Fall Introduction to Computer Programming in C. Bits, Boolean Logic & Discrete Math. September 13 th

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.

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

Discrete Mathematics

Dr. Relja Vulanovic Professor of Mathematics Kent State University at Stark c 2008

2 Review of Set Theory

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

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

Set Theory in Computer Science. Binary Numbers. Base 10 Number. What is a Number? = Binary Number Example

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

In this section we take an aside from the normal discussion in algebra.

Figure 1: From Left to Right, General Venn Diagrams for One, Two, and Three Sets

What is Set? Set Theory. Notation. Venn Diagram

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

CS102 Unit 2. Sets and Mathematical Formalism Programming Languages and Simple Program Execution

Phil 320 Chapter 1: Sets, Functions and Enumerability I. Sets Informally: a set is a collection of objects. The objects are called members or

MAINE ASSOCIATION OF MATH LEAGUES RULES GOVERNING QUESTIONS, ANSWERS, AND GRADING

A.1 Numbers, Sets and Arithmetic

Sets. Sets. Subset, universe. Specifying sets, membership. Examples: Specifying a set using a predicate. Examples

Grade 6 Math Circles Winter February 3/4 Sets. Some of These Things Are Not Like the Others

Tuesday, November 5, 2013 Name: Per:

4 Mathematical Data Types

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

9. MATHEMATICIANS ARE FOND OF COLLECTIONS

Computer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth

Situation 3. Parentheses vs. Brackets. Colleen Foy

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

Problem One: A Quick Algebra Review

Sets. Margaret M. Fleck. 15 September 2010

Chapter 2: Lists, Arrays and Dictionaries

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

Grade 6 Math Circles Winter February 3/4 Sets. Some of These Things Are Not Like the Others

COLLEGE ALGEBRA. Intro, Sets of Real Numbers, & Set Theory

1/12/2012. Jim Williams HONP-112 Week 3

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

Binary, Hexadecimal and Octal number system

Summary of Course Coverage

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

IB Sets and Venn Diagram Questions- Package #1

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1

MAT 090 Brian Killough s Instructor Notes Strayer University

Fault Tree Analysis (Minimal Cutset)

Sets. Sets. Examples. 5 2 {2, 3, 5} 2, 3 2 {2, 3, 5} 1 /2 {2, 3, 5}

Regular Expressions Explained

Hillel Academy. Grade 9 Mathematics End of Year Study Guide September June 2013

The Intersection of Two Sets

Eric Roberts Handout #39 CS 106B February 20, 2015 Sets

Examination Duration Date

It can be confusing when you type something like the expressions below and get an error message. a range variable definition a vector of sine values

Honu. Version November 6, 2010

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

CSC Web Technologies, Spring Web Data Exchange Formats

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

Section 1.2 Fractions

SOFTWARE ENGINEERING DESIGN I

MAT 003 Brian Killough s Instructor Notes Saint Leo University

Cantor s Diagonal Argument for Different Levels of Infinity

Section Sets and Set Operations

Chapter 2. Designing a Program. Input, Processing, and Output Fall 2016, CSUS. Chapter 2.1

IDP : conga/minisat(id)

AdvanceDataStructures-Unit-1(Dictionaries)

1. The collection of the vowels in the word probability. 2. The collection of real numbers that satisfy the equation x 9 = 0.

Functions of Several Variables

Math Week in Review #5

ch02 True/False Indicate whether the statement is true or false.

c) the set of students at your school who either are sophomores or are taking discrete mathematics

Review of Operations on the Set of Real Numbers

Let s briefly review important EER inheritance concepts

MITOCW watch?v=kz7jjltq9r4

Haskell 98 in short! CPSC 449 Principles of Programming Languages

5.7 Solving Linear Inequalities

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

The concept of set is a very basic one. It is simple; yet, it suffices as the basis on which all abstract notions in mathematics can be built.

CS103 Spring 2018 Mathematical Vocabulary

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

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

Transcription:

Set Theory What is a Set? Part 1.1 Organizing Information What is a Set? Set Notation A set is an unordered collection of objects The collection objects are also called members or "elements" One of the most fundamental structures in mathematics We typically denote a set name using capital letter Members are separated with commas and encapsulated within curly brackets 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2019 3 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 4 Standard Sets Standard Sets Letter Name Members Letter Name Members Z Integers, -2, -1, 0, 1, 2, 3, R Real Numbers All non-imaginary numbers. e.g. 1, 2.5, 3.1415. N Natural Numbers 1, 2, 3, 4, U Universal Set All values of potential interest (U depends on context) Q Rational Numbers a / b where both a and b are integers and b is not 0 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 5 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 6 1

Set Notation: Membership Set Notation: Membership Set notation uses a special symbol to denote if an object is a member of a set Below, the set V contains vegetables This is read as "potato is an element of V" or "potato is a member of V" potato V potato V 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 7 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 8 Set Notation: Not a Member Multiple members can be listed There is another special symbol that denotes an object is not a member of a set In the example below, the set F contains fluffy animals Multiple elements can be listed The expression below states that both potato and carrot are in the set V. lizard F potato, carrot V 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 9 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 10 Defining Sets How to specify items Defining Sets Sets can be defined a number of different ways Each competing notation has advantages & disadvantages depending on what you are defining 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 12 2

Set Notation: Explicit Set Notation: Pattern We can explicitly define this by listing each element For example, we can define a set S for members of the Three Stooges We can also specify a set by using a pattern. In the example below we are define a set of integers between 0 and 9. S = {moe, larry, curly, shemp} A = {0, 1, 2,... 9} 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 13 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 14 Set Builder Notation By Characteristic A set can also be defined using set builder notation Consists of a variable name, a pipe symbol, and an true/false expression The most basic form consists of a variable and an true/false statement In this example, everything that satisfies "x is an even integer" will be the set {x x is a even integer} 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 15 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 16 By Characteristic Examples Shorthand Notation Expression Result { x x is an integer } {, -1, 0, 1, 2, 3, } Definitions can also be restricted by another set There are two different notations that mean the same thing { x x is an even integer } {, -2, 0, 2, 4, 6, } { x x is odd natural number} { 1, 3, 5, 7, 9, } {x S true/false expression on x} {x x S and true/false expression on x} 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 17 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 18 3

Characteristic Example By Characteristic Examples Remember, Z is the set of all integers It reads: "All x where x is in Z and x is even" Expression Result { x Z 0 < x < 5 } {1, 2, 3, 4} { x x N and x < 7 } {1, 2, 3, 4, 5, 6} A = {x x Z and x is even} 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 19 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 20 Characteristic with Structure Let s Try One The left-hand-side (before the pipe) doesn't have to be a simple variable name It can also be any mathematical expression The second part of the notation must always be a true/false expression So, how do we create a set that contains: {f(x) true/false expression using x} {y y = f(x) and true/false using x} {2, 4, 6, 8, 10, } 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 21 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 22 Let s Try One How Does It Evaluate? First approach: A = {x x N and x is even} Second approach: A = {2x x N} Basically, when you look at something like: { 2x x N }, you should do the following Steps: 1. Identify which variables make the right-handside true 2. Plug them into the left-hand-side. These are the values in the set. 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 23 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 24 4

More Examples Empty Set Expression Result { 2x + 1 x Z } {, -3, -1, 1, 3, 5, } { x Z sqrt(x) Z } {0, 1, 4, 9, 16, 25, } An empty set contains no elements Can be represented with two curly-brackets (nothing in between) There is also a special symbol for empty sets A = { } A = 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 25 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 26 Set Your Sets to Fun Commonly, sets are compared to one another using set relationship operators Basically, set are defined on elements which they may have in common 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 28 Set A is considered a subset of set B if all the members of A are also members of B The subset operator is similar looking to the member operator In the example below, the set {1, 4} is a subset of the set {1, 3, 4, 5} Note that the reverse is not true. A B if and only if: for all x A there is x B { 1, 4 } { 1, 3, 4, 5 } 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 29 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 30 5

Null is Always a Subset To denote a set is not a subset, we use the subset operator and add a slash Below, the set {3, 5} is not a subset of {3, 7} because {3, 7} does not contain 5. A null set contains no elements Hence, the null set is always a subset { 3, 5 } { 3, 7 } { 2, 3 } {} { 2, 3 } 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 31 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 32 Proper Equality Set A is a proper subset of B if A is a subset of B, but not equal to B Note: the notation lacks the underline it is consistent with other operators like < and Sets A and B are considered equal if-and-onlyif { 3, 5 } { 3, 5, 7 } { 1, 2 } { 1, 2 } A = B if and only if: all x A there is x B and all y B there is y A 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 33 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 34 Equality So, are { 1, 2, 3 } and { 2, 1, 3 } equal? How about { 1, 1, 2, 3, 3 } and { 3, 2, 1 } Answer is yes! order does not matter in a set multiple occurrences does not change if an element is a member Venn Diagrams Graphically Representing Sets 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 35 6

Venn Diagrams Basic Venn Diagram Sets can also be abstractly representing graphically using Venn Diagrams Each set is represented by circle Overlaps between each set can show logical relations with set members 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 37 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 38 Example: A = {2, 7, 1, 4} Subset Venn Diagram A 7 4 2 1 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 39 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 40 Equality Example: Letters in English Vowels Consonants A E I O U Y B C D F G H J K L M N P Q R S T V W X Z 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 41 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 42 7

LOUD BLUE Babies Ocean Sapphires Thunder Neptune Alarms Windex Tuples Documentation HELPFUL GPS Order is Important Tuples & Sets Tuples To denote sets, we delimit the list of members with curly brackets For example, the prime numbers between 1 and 10 is {2, 3, 5, 7} Order does not matter, so {2, 3, 5, 7} = {7, 5, 3, 2} However, in many cases the order is important These are called n-tuples where "n" is the number of elements 2-tuples are also called ordered pairs 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 45 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 46 Tuple Notation Tuple Examples To denote a tuple we delimit the elements by either parenthesis, angle brackets or square brackets Curly-brackets are never used to avoid obvious confusion Order is important, so any element out of position will cause inequality ( 1, 2, 3 ) < 1, 2, 3 > [ 1, 2, 3 ] ( 1, 2, 3 ) ( 3, 2, 1 ) 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 47 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 48 8

Tuple Examples Logic generally applies to algorithms since, in procedural programming, order is important The following is a tuple of events in California History ( Sutter's Fort Built, Bear Flag Revolt, Gold Rush, California Joins Union ) 1/31/2019 Sacramento State - Cook - CSc 28 - Spring 2018 49 9