CSCI 311 Midterm 1 Flashcards
set
a collection of elements without any structure (except membership)
set operations
union (U), intersection (∩), difference (-), complementation (overbar)
union (U)
S1 U S2 = {x : x ∈ S1 or x ∈ S2}
intersection (∩)
S1 ∩ S2 = {x : x ∈ S1 and x ∈ S2}
difference (-)
S1 - S2 = {x : x ∈ S1 and x ∉ S2}
complementation (overbar)
S overbar = {x : x ∈ U (the universal set), x ∉ S}
U represents the
universal set
∅ represents the
empty set
S double overbar simply represents
S (the complement of the complement is the set)
DeMorgan’s Law
the complement of S1 U S2 is the complement of S1 ∩ the complement of S2;
the complement of S1 ∩ S2 is the complement of S1 U the complement of S2
subset
S1 ⊆ S if every element of S1 is also and element of S (S1 could be the same as S)
proper subset
S1 ⊂ S if S contains at least one element not in S1
disjoint
S1 ∩ S2 = ∅
power set
the set of all susbsets of S is the power set of S
Cartesian Product of Sets
S = S1 x S2 = {(x,y) : x ∈ S1, y ∈ S2}
partition
S = S1 U S2 U … U Sn and for any Si ∩ Sj = ∅, i =/= j, then S1, S2, …, Sn is a partition of S
functions
f : S1 → S2 is a rule that assigns a unique element of S2 to elements in S1 (S1 = domain, S2 = range)
total function
f(x) ∈ S2 ∀ x ∈ S1
relations
a subset of a Cartesian product of sets
a function can be a ? but a ? is not necessarily a function
relation
equivalence relations
E ] {(x,y) : …} ⊂ S x S is an equivalence relation if it is reflexive, symmetric, and transitive (notation ≡)
graphs
vertices (singular) and edges (pairs > direction specified by pair order [vertex to vertex])
walk
travel the edges
path
no repeated edges
simple path
no repeated edge or vertices
cycle
a walk from vi to itself with no repeated edges