Discrete Mathematics

Similar documents
CSC Discrete Math I, Spring Sets

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

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

CS100: DISCRETE STRUCTURES

SET DEFINITION 1 elements members

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

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

What is Set? Set Theory. Notation. Venn Diagram

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

2 Review of Set Theory

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

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

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

Discrete Mathematics Lecture 4. Harper Langston New York University

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

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

Set and Set Operations

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

Today s Topics. What is a set?

2.1 Symbols and Terminology


Introduction. Sets and the Real Number System

11 Sets II Operations

Sets and set operations

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

Slides for Faculty Oxford University Press All rights reserved.

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

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

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

The Language of Sets and Functions

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

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

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.

Fault Tree Analysis (Minimal Cutset)

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

Sets and set operations. Lecture 5 ICOM 4075

Lecture 15: The subspace topology, Closed sets

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

CS February 17

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

Problem One: A Quick Algebra Review

Intersection of sets *

Algorithm. Algorithm Analysis. Algorithm. Algorithm. Analyzing Sorting Algorithms (Insertion Sort) Analyzing Algorithms 8/31/2017

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

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

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

LECTURE 8: SETS. Software Engineering Mike Wooldridge

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

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

1 Sets, Fields, and Events

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

Pre-Calc Unit 1 Lesson 1

Math Week in Review #5

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

LECTURE NOTES ON SETS

Lecture : Topological Space

Domination, Independence and Other Numbers Associated With the Intersection Graph of a Set of Half-planes

CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN. Lecture 1: Introduction

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

BOOLEAN ALGEBRA AND CIRCUITS

Lecture 1. 1 Notation

Section Sets and Set Operations

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

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

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

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

Lecture-12: Closed Sets

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

IB Sets and Venn Diagram Questions- Package #1

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

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

SEVENTH EDITION and EXPANDED SEVENTH EDITION

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.

Algebraic Expressions

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

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

Algebra of Sets (Mathematics & Logic A)

4 Mathematical Data Types

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

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

1.2 Venn Diagrams and Partitions

Figure 1.1: This is an illustration of a generic set and its elements.

Binary Relations McGraw-Hill Education

HW Graph Theory SOLUTIONS (hbovik) - Q

Alphabets, strings and formal. An introduction to information representation

Introduction. Computer Vision & Digital Image Processing. Preview. Basic Concepts from Set Theory

Morphological Image Processing

Boolean Algebra. P1. The OR operation is closed for all x, y B x + y B

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

Relational Model and Relational Algebra

Lecture - 8A: Subbasis of Topology

Definitions. 03 Logic networks Boolean algebra. Boolean set: B 0,

Lecture 4: examples of topological spaces, coarser and finer topologies, bases and closed sets

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

Logic and Discrete Mathematics. Section 2.5 Equivalence relations and partitions

r=1 The Binomial Theorem. 4 MA095/98G Revision

Why Don t Computers Use Base 10? Lecture 2 Bits and Bytes. Binary Representations. Byte-Oriented Memory Organization. Base 10 Number Representation

Summary of Course Coverage

Transcription:

Discrete Mathematics Lecture 2: Basic Structures: Set Theory MING GAO DaSE@ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 18, 2017

Outline 1 Set Concepts 2 Set Operations 3 Application 4 Take-aways MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 2 / 15

Set Concepts Set Definition Set A is a collection of objects (or elements). a A : a is an element of A or a is a member of A ; a A : a is not an element of A ; A = {a 1, a 2,, a n } : A contains a 1, a 2,, a n ; Order of elements is meaningless; It does not matter how often the same element is listed. MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 3 / 15

Set Concepts Set Definition Set A is a collection of objects (or elements). a A : a is an element of A or a is a member of A ; a A : a is not an element of A ; A = {a 1, a 2,, a n } : A contains a 1, a 2,, a n ; Order of elements is meaningless; It does not matter how often the same element is listed. Set equality Sets A and B are equal if and only if they contain exactly the same elements. If A = {9, 2, 7, 3} and B = {7, 9, 2, 3}, then A = B. If A = {9, 2, 7} and B = {7, 9, 2, 3}, then A B.; If A = {9, 2, 3, 9, 7, 3} and B = {7, 9, 2, 3}, then A = B. MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 3 / 15

Set Concepts Applications Examples Bag of words model: documents, reviews, tweets, news, etc; Transactions: shopping list, app downloading, book reading, video watching, music listening, etc; Records in a DB, data item in a data streaming, etc; Neighbors of a vertex in a graph; MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 4 / 15

Set Concepts Applications Examples Bag of words model: documents, reviews, tweets, news, etc; Transactions: shopping list, app downloading, book reading, video watching, music listening, etc; Records in a DB, data item in a data streaming, etc; Neighbors of a vertex in a graph; Standard sets Natural numbers: N = {0, 1, 2, 3, } Integers: Z = {, 2, 1, 0, 1, 2, } Positive integers: Z + = {1, 2, 3, 4, } Real Numbers: R = {47.3, 12, 0.3, } Rational Numbers: Q = {1.5, 2.6, 3.8, 15, } MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 4 / 15

Set Concepts Representation of sets Tabular form A = {1, 2, 3, 4, 5}; B = { 2, 0, 2}; MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 5 / 15

Set Concepts Representation of sets Tabular form A = {1, 2, 3, 4, 5}; B = { 2, 0, 2}; Descriptive form A = set of first five natural numbers; B = set of positive odd integers; MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 5 / 15

Set Concepts Representation of sets Tabular form A = {1, 2, 3, 4, 5}; B = { 2, 0, 2}; Descriptive form A = set of first five natural numbers; B = set of positive odd integers; Set builder form Q = {a/b : a Z b Z b 0}; B = {y : P(y)}, where P(Y ) : y E 0 < y 50; MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 5 / 15

Set Concepts Representation of sets Remarks A = : empty set, or null set; Universal set U: contains all the objects under consideration. A = {{a, b}, {b, c, d}}; MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 6 / 15

Set Concepts Representation of sets Remarks A = : empty set, or null set; Universal set U: contains all the objects under consideration. A = {{a, b}, {b, c, d}}; Venn diagrams In general, a universal set is represented by a rectangle. MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 6 / 15

Set Concepts Subsets Definition Set A is a subset of B iff every element of A is also an element of B, denoted as A B. A B = x(x A x B); For every set S, we have: (1) S; and (2) S S; When we wish to emphasize that set A is a subset of set B but that A B, we write A B and say that A is a proper subset of B, i.e., x(x A x B) (x B x A); Two useful rules: (1) A = B (A B) (B A); (2) (A B) (B C) (A C);

Set Concepts Subsets Definition Set A is a subset of B iff every element of A is also an element of B, denoted as A B. A B = x(x A x B); For every set S, we have: (1) S; and (2) S S; When we wish to emphasize that set A is a subset of set B but that A B, we write A B and say that A is a proper subset of B, i.e., x(x A x B) (x B x A); Two useful rules: (1) A = B (A B) (B A); (2) (A B) (B C) (A C); Given a set S, the power set of S is the set of all subsets of S, denoted as P(S). The size of 2 S, where S is the size of S. MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 7 / 15

Set Concepts Cartesian product Definition Let A and B be sets. The Cartesian product of A and B, denoted by A B, is set A B = {(a, b) : a A b B}, where (a, b) is a ordered 2-tuples, called ordered pairs. Let A = {1, 2} and B = {a, b, c}, the Cartesian product A B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}; The Cartesian product of A 1, A 2,, A n is denoted as A 1 A 2 A n A 1 A 2 A n = {(a 1, a 2,, a n ) : i a i A i }; A subset R of the Cartesian product A B is called a relation from A to B. MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 8 / 15

Set Operations Set operations Operators Let A and B be two sets, and U be the universal set Union: A B = {x : x A x B}; Intersection: A B = {x : x A x B}; Difference: A B = {x : x A x B} (sometimes denoted as A \ B); Complement: A = U A = {x U : x A};

Set Operations Set operations Operators Let A and B be two sets, and U be the universal set Union: A B = {x : x A x B}; Intersection: A B = {x : x A x B}; Difference: A B = {x : x A x B} (sometimes denoted as A \ B); Complement: A = U A = {x U : x A}; A B = A B; A B = A + B A B. MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 9 / 15

Set identities Set Operations Table of logical equivalence equivalence name A U = A Identity laws A = A A A = A Idempotent laws A A = A (A B) C = A (B C) Associative laws (A B) C = A (B C) A (A B) = A Absorption laws A (A B) = A A A = Complement laws A A = U MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 10 / 15

Set Operations Logical equivalence Cont d Table of logical equivalence equivalence name A U = U Domination laws A = A B = B A Commutative laws A B = B A (A B) C = (A C) (B C) Distributive laws (A B) C = (A C) (B C) (A B) = A B De Morgan s laws (A B) = A B MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 11 / 15

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise = {x : x A B} definition of complement

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise = {x : x A B} definition of complement = {x : (x A B)} definition of does not belong symbol

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise = {x : x A B} definition of complement = {x : (x A B)} definition of does not belong symbol = {x : (x A x B)} definition of intersection

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise = {x : x A B} definition of complement = {x : (x A B)} definition of does not belong symbol = {x : (x A x B)} definition of intersection = {x : (x A) (x B)} De Morgan law for logic

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise = {x : x A B} definition of complement = {x : (x A B)} definition of does not belong symbol = {x : (x A x B)} definition of intersection = {x : (x A) (x B)} De Morgan law for logic = {x : (x A) (x B)} definition of does not belong symbol

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise = {x : x A B} definition of complement = {x : (x A B)} definition of does not belong symbol = {x : (x A x B)} definition of intersection = {x : (x A) (x B)} De Morgan law for logic = {x : (x A) (x B)} definition of does not belong symbol = {x : (x A) (x B)} definition of complement

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise = {x : x A B} definition of complement = {x : (x A B)} definition of does not belong symbol = {x : (x A x B)} definition of intersection = {x : (x A) (x B)} De Morgan law for logic = {x : (x A) (x B)} definition of does not belong symbol = {x : (x A) (x B)} definition of complement = {x : x (A B)} definition of union

Proof of De Morgan law Set Operations Proof Use set builder notation and logical equivalences to establish the first De Morgan law Steps Reasons A B primise = {x : x A B} definition of complement = {x : (x A B)} definition of does not belong symbol = {x : (x A x B)} definition of intersection = {x : (x A) (x B)} De Morgan law for logic = {x : (x A) (x B)} definition of does not belong symbol = {x : (x A) (x B)} definition of complement = {x : x (A B)} definition of union = A B meaning of set builder notation MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 12 / 15

Set Operations Generalized unions and intersections Union A 1 A 2 A n = n i=1 A i; A 1 A 2 A n = i=1 A i; MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 13 / 15

Set Operations Generalized unions and intersections Union A 1 A 2 A n = n i=1 A i; A 1 A 2 A n = i=1 A i; Intersection A 1 A 2 A n = n i=1 A i; A 1 A 2 A n = i=1 A i; MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 13 / 15

Set covering problem Application Input Universal set U = {u 1, u 2,, u n } Subsets S 1, S 2,, S m U Cost c 1, c 2,, c m MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 14 / 15

Set covering problem Application Input Universal set U = {u 1, u 2,, u n } Subsets S 1, S 2,, S m U Cost c 1, c 2,, c m Goal Find a set I {1, 2,, m} that minimizes i I c i, such that i I S i = U MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 14 / 15

Application Set covering problem Input Universal set U = {u 1, u 2,, u n } Subsets S 1, S 2,, S m U Cost c 1, c 2,, c m Goal Find a set I {1, 2,, m} that minimizes i I c i, such that i I S i = U Applications Document summarization Natural language generation Information cascade MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 14 / 15

Take-aways Take-aways Course homepage http://dase.ecnu.edu.cn/mgao/teaching/dm_2017_fall/dm.html Advices to learning DM Not a reading course. More than a mathematics course, though it is workload-heavy MING GAO (DaSE@ecnu) Discrete Mathematics Sep. 18, 2017 15 / 15