{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture2

# lecture2 - Discrete Computation Structures CSE 2353 Bhanu...

This preview shows pages 1–10. Sign up to view the full content.

Discrete Computation Structures CSE 2353 Bhanu Kapoor, PhD Department of Computer Science & Engineering Southern Methodist University, Dallas, TX [email protected] , 214-336-4973 September 01, 2009 Embrey 129, SMU, Dallas, Texas Lecture 02 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Lecture 02 Agenda Learn about sets Explore various operations on sets Venn diagrams Representation of sets in computer memory Learn about statements L i l i bi Logical connectives to combine statements Explore how to draw logical conclusions Quantifiers and predicates 2
Sets Definition: Well-defined collection of distinct objects Members or Elements: part of the collection Roster Method: Description of a set by listing the elements, enclosed with braces Examples: Vowels = {a e i o u} Vowels = {a,e,i,o,u} Primary colors = {red, blue, yellow} Membership examples “a belongs to the set of Vowels” is written as: a Vowels “j does not belong to the set of Vowels: j Vowels 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Sets Set-builder method A { | S P( ) } A { S | P( ) } A = { x | x S, P(x) } or A = { x S | P(x) } A is the set of all elements x of S, such that x satisfies the property P Example: If X = {2,4,6,8,10}, then in set-builder notation, X can be described as X { Z | i d 2 10} X = {n Z | n is even and 2 n 4
Sets Standard Symbols which denote sets of numbers N : The set of all natural numbers (i.e.,all positive integers) Z Th t f ll i t Z : The set of all integers Z* : The set of all nonzero integers E : The set of all even integers Q : The set of all rational numbers Q* : The set of all nonzero rational numbers Q + : The set of all positive rational numbers R : The set of all real numbers R* : The set of all nonzero real numbers R + : The set of all positive real numbers C : The set of all complex numbers C* : The set of all nonzero complex numbers 5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Sets Subsets “X is a subset of Y” is written as X Y “X is not a subset of Y” is written as X Y X is not a subset of Y is written as X Example: X = {a,e,i,o,u}, Y = {a, i, u} and z = {b,c,d,f,g} Y X, since every element of Y is an element of X Y Z, since a Y, but a Z 6
Sets Superset X and Y are sets If X Y then “X is X and Y are sets. If X Y, then X is contained in Y” or “Y contains X” or Y is a superset of X, written Y X Proper Subset X and Y are sets. X is a proper subset of Y if X Y and there exists at least one element in Y that is not in X. This is written X Y. Example: X = {a,e,i,o,u}, Y = {a,e,i,o,u,y} X Y , since y Y, but y X 7

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Sets Set Equality X and Y are sets. They are said to be equal if l t f X i l t f Y d every element of X is an element of Y and every element of Y is an element of X, i.e. X Y and Y X Examples: {1,2,3} = {2,3,1} X = {red blue yellow} and Y = {c | c is a primary color} X = {red, blue, yellow} and Y = {c | c is a primary color} Therefore, X=Y Empty (Null) Set A Set is Empty (Null) if it contains no elements. The Empty Set is written as Th E t S t i b t f t The Empty Set is a subset of every set 8
Sets Finite and Infinite Sets X i t If th i t ti X is a set. If there exists a nonnegative integer n such that X has n elements, then X is called a finite set with n elements.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}