CSC Discrete Math I, Spring Sets

Similar documents
2.1 Sets 2.2 Set Operations

CS100: DISCRETE STRUCTURES

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

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

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

1.1 - Introduction to Sets

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

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

Set and Set Operations

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics

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

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

SET DEFINITION 1 elements members

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

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

Today s Topics. What is a set?

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


2 Review of Set Theory

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

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

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

What is Set? Set Theory. Notation. Venn Diagram

CSE20: Discrete Mathematics

Sets and set operations

CSE 20 DISCRETE MATH. Fall

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

11 Sets II Operations

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.

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

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

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

9.5 Equivalence Relations

CSE 20 DISCRETE MATH. Winter

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

CMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012

4 Mathematical Data Types

2.1 Symbols and Terminology

TA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009

LECTURE 8: SETS. Software Engineering Mike Wooldridge

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

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

CS February 17

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

COMP Logic for Computer Scientists. Lecture 17

Sets. Margaret M. Fleck. 15 September 2010

Copyright 2006 Melanie Butler Chapter 1: Review. Chapter 1: Review

SEVENTH EDITION and EXPANDED SEVENTH EDITION

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

Math Week in Review #5

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

BOOLEAN ALGEBRA AND CIRCUITS

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

1 Sets, Fields, and Events

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

Chapter 2: Sets. Diana Pell. In the roster method: elements are listed between braces, with commas between the elements

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

Slides for Faculty Oxford University Press All rights reserved.

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

Summary of Course Coverage

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

Chapter 11. Topological Spaces: General Properties

Lecture 15: The subspace topology, Closed sets

Functions. Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A.

Math Week in Review #5. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both.

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and

CSC 501 Semantics of Programming Languages

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

Topology notes. Basic Definitions and Properties.

THEORY OF COMPUTATION

for all x, the assertion P(x) is false. there exists x, for which the assertion P(x) is true.

A.1 Numbers, Sets and Arithmetic

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

T. Background material: Topology

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

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

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

Lecture 17: Continuous Functions

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p.

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Lectures on Order and Topology

What is a Computer Algorithm?

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

Introduction. Sets and the Real Number System

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

2.3 Algebraic properties of set operations

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

Functions. How is this definition written in symbolic logic notation?

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

Lecture 1. 1 Notation

The Language of Sets and Functions

Lecture 6,

1-1 Sets of Numbers. Warm Up Lesson Presentation Lesson Quiz. Holt Algebra 2

Algebraic Expressions

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

Power Set of a set and Relations

Review of Operations on the Set of Real Numbers

Transcription:

CSC 125 - Discrete Math I, Spring 2017 Sets

Sets A set is well-defined, unordered collection of objects 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 The notation a / A denotes that a is not an element of the set A

The Roster Method of Describing a Set The syntax for the roster method is: S = {a, b, c, d} where the members of a set are delimited by curly braces and separated by commas The order does not matter: S = {a, b, c, d} = {b, c, a, d} Listing an element more than once does not change the set: S = {a, b, c, d} = {a, b, a, b, c, d, c} Ellipses (...) can be used when there is a clear pattern: S = {a, b, c,..., z}

Set-Builder Notation Set-Builder notation is a method of describing sets where the properties that all members must meet are specified: S = {x x > 0 x < 100} Reading set-builder notation: defined as {}}{}{{} S name of set = { x }{{} all elements such that {}}{ P(x) }{{} } P(x) is true

Interval Notation [a, b] = {x a x b} (closed interval) [a, b) = {x a x < b} (a, b] = {x a < x b} (a, b) = {x a < x < b} (open interval)

Some Important Sets N: the set of natural numbers Z: the set of integers Z + : the set of positive integers R: the set of real numbers R + : the set of positive real numbers C: the set of complex numbers Q: the set of rational numbers

The Universal Set and Empty Set The universal set, U, is the set containing everything currently under consideration The empty set, denoted as or {}, is the set with no elements Note: the empty set is different than the set containing the empty set: { }

Set Equality Definition: Two sets are equal if and only if they have the same elements That is, the sets A and B are equal if and only if x(x A x B)

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 B A B holds if and only if x(x A x B) Because a is always false, S, for every set S Because a S a S, S S, for every set S

Showing Things About Subsets To show that A B, show that if x A, then x B To show that A B, find an element x A with x B

Set Equality with Subset Notation Recall A = B iff x(x A x B) Using logical equivalences, we have A = B iff x[(x A x B) (x B x A)] This is equivalent to: A B B A

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 x(x A x B) x(x B x A) is true

Set Cardinality Definition: If there are exactly n distinct elements in the set S where n is a nonnegative integer, we say that S is finite otherwise S is infinite Definition: The cardinality of a finite set A, denoted by A, is the number of (distinct) elements in A

Power Sets Definition: The set of all subsets of a set A, denoted P(A), is called the power set of A Example: 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 n

Tuples The ordered n-tuple, denoted as (a 1, a 2,..., a n ) is an ordered collection the has a 1 as its first element, a 2 as its second element and so 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 iff a = c and b = d

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 That is, A B = {(a, b) a A b B} Example: A = {a, b}, B = {1, 2, 3} A B = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)}

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 A i for i = 1,... n A 1 A 2... A n = {(a 1, a 2,..., a n ) a i A i for i = 1, 2,..., n}

Truth Sets of Quantifiers 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 is denoted by {x D P(x)} Example: the truth set of P(x) where the domain is the integers and P(x) is x = 1 is the set { 1, 1}

Boolean Algebra Propositional logic and set theory are both instances of Boolean Algebra The operators in set theory are analogous to the corresponding operator in propositional logic All sets are assumed to be subsets of the universal set U

Union Definition: Let A and B be sets. The union of the sets A and B, denoted by A B, is the set {x x A x B}

Intersection Definition: The union of sets A and B, denoted by A B, is the set {x x A x B} Note: if the intersection is empty, then A and B are said to be disjoint

Complement Definition: If A is a set, then the complement of A (with respect to U), denoted by A, is the set {x U x A}

Difference Definition: Let A and B be sets. The difference of A and B, denoted by A B, is the set {x x A x B} = A B

Cardinality of the Union Operator Inclusion-Exclusion: A B = A + B A B

Symmetric Difference Definition: The symmetric difference of A and B, denoted A B, is the set (A B) (B A)

Set Identities Identity Laws: A = A, A U = A Domination Laws: A U = U, A = Idempotent Laws: A A = A, A A = A Complementation Law: (A) = A Commutative Laws: A B = B A, A B = B A Associative Laws: A (B C) = (A B) C A (B C) = (A B) C Distributive Laws: A (B C) = (A B) (A C) A (B C) = (A B) (A C) De Morgan s Laws: A B = A B, A B = A B Absorption Laws: A (A B) = A, A (A B) = A Complement Laws: A A = U, A A

Proving Set Identities Prove that each side of the identity is a subset of the other Use set builder notation and propositional logic Membership tables

Proof of Second De Morgan Law Show that 1 A B A B and 2 A B A B

Proof of Second De Morgan Law First part: Show that A B A B x A B assumption x A B def. of complement ((x A) (x B)) def. of intersection (x A) (x B) De Morgan s Law in propositional logic x A x B def. of negation x A x B def. of complement x A B def. of union

Proof of Second De Morgan Law Second part: Show that A B A B x A B assumption (x A) (x B) def. union (x A) (x B) def. of complement (x A) (x B) def. of negation ((x A) (x B)) De Morgan s Law in propositional logic (x A B) def. of intersection x A B def. of complement

Proof of Second De Morgan Law: Set-Builder Notation A B = {x x A B} def. of complement = {x (x (A B))} def of = {x (x A x B)} def. of intersection = {x (x A) (x B)} De Morgan s law = {x x A x B} def. of = {x x A x B} def. of complement = {x x A B} def. of union = A B meaning of notation

Membership Table Example Show A (B C) = (A B) (A C) A B C B C A (B C) A B A C (A B) (A C) 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0