Docsity

Sets Operations for Discrete Structures - Notes | CMSC 250, Study notes of Discrete Structures and Graph Theory

Toggle sidebar
bg1
1
Sets
Definition of a Set:
NAME = {list of elements or description of elements}
i.e. B = {1,2,3} or C = {xโˆˆZ+| -4 < x < 4}
Axiom of Extension:
A set is completely defined by its elements
i.e. {a,b} = {b,a} = {a,b,a} = {a,a,a,b,b,b}
Subset
AโІB โ†” โˆ€xโˆˆU, xโˆˆAโ†’xโˆˆB
A is contained in B
B contains A
AโІB โ†” โˆƒx โˆˆU, xโˆˆA ^ xโˆ‰B
Relationship between membership and subset:
โˆ€xโˆˆU, xโˆˆA โ†”{x} โІA
Definition of set equality: A = B โ†”AโІB ^ BโІA
Same Set or Not??
X={xโˆˆZ | โˆƒp โˆˆZ, x = 2p}
Y={yโˆˆZ | โˆƒqโˆˆZ, y = 2q-2}
A={xโˆˆZ | โˆƒi โˆˆZ, x = 2i+1}
B={xโˆˆZ | โˆƒi โˆˆZ, x = 3i+1}
C={xโˆˆZ | โˆƒi โˆˆZ, x = 4i+1}
pf3
pf4
pf5

Partial preview of the text

Download Sets Operations for Discrete Structures - Notes | CMSC 250 and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

Sets

Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {xโˆˆZ+^ | -4 < x < 4}

Axiom of Extension: A set is completely defined by its elements i.e. {a,b} = {b,a} = {a,b,a} = {a,a,a,b,b,b}

Subset

AโІB โ†” โˆ€xโˆˆU, xโˆˆAโ†’xโˆˆB A is contained in B B contains A

AโІ B โ†” โˆƒx โˆˆU, xโˆˆA ^ xโˆ‰B

Relationship between membership and subset: โˆ€xโˆˆU, xโˆˆA โ†” {x} โІ A

Definition of set equality: A = B โ†” AโІ B ^ BโІ A

Same Set or Not??

X={xโˆˆZ | โˆƒp โˆˆZ, x = 2p} Y={yโˆˆZ | โˆƒqโˆˆZ, y = 2q-2}

A={xโˆˆZ | โˆƒi โˆˆZ, x = 2i+1} B={xโˆˆZ | โˆƒi โˆˆZ, x = 3i+1} C={xโˆˆZ | โˆƒi โˆˆZ, x = 4i+1}

Set Operations

Formal Definitions and Venn Diagrams

Union:

Intersection:

Complement:

Difference:

A  B ={ x โˆˆ U | x โˆˆ A โˆจ x โˆˆ B }

A  B ={ x โˆˆ U | x โˆˆ A โˆง x โˆˆ B }

A โˆ’ B ={ x โˆˆ U | x โˆˆ A โˆง x โˆ‰ B }

Ac^ = A ' ={ x โˆˆ U | x โˆ‰ A }

A โˆ’ B = A  B '

Ordered n-tuple

and the Cartesian Product

  • Ordered n-tuple โ€“ takes order and multiplicity into account
  • (x 1 ,x 2 ,x 3 ,โ€ฆ,xn)
    • n values
    • not necessarily distinct
    • in the order given
  • (x 1 ,x 2 ,x 3 ,โ€ฆ,xn) = (y 1 ,y 2 ,y 3 ,โ€ฆ,yn) โ†” โˆ€iโˆˆZ^1 โ‰คiโ‰คn, xi=yi
  • Cartesian Product

A ร— B ={( a , b )| a โˆˆ A โˆง b โˆˆ B }

Formal Languages

  • ฮฃ = alphabet = a finite set of symbols
  • string over ฮฃ = empty (or null) string denoted as ฮต OR ordered n-tuple of elements
  • ฮฃn^ = set of strings of length n
  • ฮฃ*^ = set of all finite length strings

Using Venn Diagrams to help

find counter example

A  ( B  C )=?=( A  B )( A  C )

A  ( B  C )=?=( A  B ) C

Deriving new Properties

using rules and Venn diagrams

B โˆ’ ( A  C )=( B โˆ’ A )( B โˆ’ C )

A โˆ’ B = A โˆ’( A  B )

A โІ B โˆง A โІ C โ†’ A โІ( B  C )

Partitions of a set

  • A collection of nonempty sets {A 1 ,A 2 ,โ€ฆ,An} is a partition of the set A if and only if
  1. A = A 1 โˆชA 2 โˆชโ€ฆโˆชAn
  2. A 1 ,A 2 ,โ€ฆ,An are mutually disjoint

Proofs about Power Sets

Power set of A = P (A) = Set of all subsets of A

  • Prove that

โˆ€โˆ€โˆ€โˆ€ A,B โˆˆโˆˆโˆˆโˆˆ {sets}, A โІโІโІโІ B โ†’โ†’โ†’โ†’ PPPP (A) โІโІโІโІ PPPP (B)

  • Prove that (where n(X) means the size of set X)

โˆ€โˆ€โˆ€โˆ€ A โˆˆโˆˆโˆˆโˆˆ {sets}, n(A) = k โ†’โ†’โ†’โ†’ n( PPPP (A)) = 2k