{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# lect5 - Sets Different discrete structures are used in...

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

1 Different discrete structures are used in modeling and problem solving: sets (unordered collections) relations (sets of pairs) graphs (sets of vertices and edges) Sets are used to group objects together. A set is a collection of objects (members, elements). A set is completely defined by its elements. An element ‘belongs to’ a set (or a set contains its elements). Notation: x A , x belongs to set A y A , y does not belong to set A Sets

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

View Full Document
2 Ways to describe sets: 1. To list its elements in curly braces: a set of vowels in English alphabet V = {a, e, i, o, u} a set of odd positive integers less then 10 B ={1, 3, 5, 7, 9} a set of natural numbers (nonnegative integers) Ν = {0, 1, 2, 3, …} a set of integers: Z ={…,-2, -1, 0, 1, 2, …}
3 2. To use set builder notation set of odd positive integers less then 10: B ={ x | x is positive odd integer less then 10} set of rational numbers: Q = { a / b | a , b Z and b 0 } set of positive integers: Z + = { x | x Z x> 0 } a set of squares of natural numbers: S ={ x 2 | x N } A = { ( a , b )| a , b N and a | b } 3. Special notation: an empty (null) set ={} or 2200 x [ x ]

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

View Full Document
4 Definition. The set A is said to be a subset of B if and only if every element of A is also an element of B. A B 2200 x [ x A x B ] The subset A is said to be a proper subset of B if and only if B contains at least one element that is not in A. A B 2200 x [ x A x B ] ∧5 x [ x B x A ]
5 Venn diagrams help visualize relation between sets B A x A B: 2200 x [ x A x B ] y A B: 2200 x [ x A x B ] and 5 y [ y B y A ] U - universe (of discourse), a set that contains all elements under consideration. U

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

View Full Document
6 Theorem . Empty set is a subset of every set, that is ∅⊆ S Proof . We need to prove that any x that belongs to belongs to S, i. e. 2200 x [ x ∈∅ x S ]. But the hypothesis x ∈∅ is always false by the definition of empty set. So, the implication x ∈∅ x S is vacuously true.
7 Do not confuse and (or ) signs! a A { a } A a A { a } A { a } A { b } A { b } A { a , { b }} A { a , { b }} A A A { } A Let A ={ a , , { b }}. T F F T T F T T T T T T

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

View Full Document
8 Equality of two sets Definition . Two sets are equal if and only if each of them is a subset of the other. A = B A B B A Two sets are considered to be equal if they contain the same elements. For example: {1, 3, 5} = {3, 5, 1, 5} {1, 4, 9, 16} = { x 2 | x Z + x 2 <20} More rigorously:
9 Set operations The union of two sets contain elements which belong to either of them or to both: } | { B x A x x B A

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 ]}