Crib Sheet - Discrete Structures | CS 173, Study notes of Discrete Structures and Graph Theory

Material Type: Notes; Class: Discrete Structures; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Spring 2008;

Typology: Study notes

Pre 2010

Uploaded on 03/16/2009

koofers-user-pxl-1
koofers-user-pxl-1 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS173 Cheat Sheet (Spring 2008)
Set Theory Notation
empty set { }
subset ABx:xAxB
proper subset AB A B yB:y6∈ A
superset AB B A
proper superset AB B A
set equality A=B A BBA
union AB{x|xAxB}
intersection AB{x|xAxB}
difference A\B{x|xAx6∈ B}=AB
symmetric difference AB{x|xAx6∈ B}
complement A{x|x6∈ A}=U\A
Cartesian product A×B{(a, b)|aAbB}
power set P(A){B|BA}
cardinality |A|# of elements (if finite)
Logic
proposition statement which is unambiguously true or false
predicate proposition which incorporates a variable
logical operations and , or , not ¬
universal quantifier for all, written
existential quantifier there exists, written
implication if pthen q, written pq
inverse of pq¬p ¬q
converse of pq q p
contrapositive of pq¬q ¬p
Binary relation RA×A
relation notation aand bare related (a, b)R
inverse R1{(b, a)A×A|(a, b)R}
reflexive aA, (a, a)R
symmetric a, b A, if (a, b)Rthen (b, a)R
antisymmetric a, b A, if (a, b)Rand (b, a)R, then a=b
transitive a, b, c A, if (a, b)Rand (b, c)R, then (a, c)R
Equivalence relation
An equivalence relation is a binary relation which is reflexive, symmetric, and transitive
1
pf3

Partial preview of the text

Download Crib Sheet - Discrete Structures | CS 173 and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

CS173 Cheat Sheet (Spring 2008)

Set Theory Notation empty set ∅ { } subset A ⊆ B ∀x : x ∈ A → x ∈ B proper subset A ⊂ B A ⊆ B ∧ ∃y ∈ B : y 6 ∈ A superset A ⊇ B B ⊆ A proper superset A ⊃ B B ⊂ A set equality A = B A ⊆ B ∧ B ⊆ A union A ∪ B {x | x ∈ A ∨ x ∈ B} intersection A ∩ B {x | x ∈ A ∧ x ∈ B} difference A \ B {x | x ∈ A ∧ x 6 ∈ B} = A ∩ B symmetric difference A∆B {x | x ∈ A ↔ x 6 ∈ B} complement A {x | x 6 ∈ A} = U \ A Cartesian product A × B {(a, b) | a ∈ A ∧ b ∈ B} power set P(A) {B | B ⊆ A} cardinality |A| # of elements (if finite)

Logic proposition statement which is unambiguously true or false predicate proposition which incorporates a variable logical operations and ∧, or ∨, not ¬ universal quantifier for all, written ∀ existential quantifier there exists, written ∃ implication if p then q, written p → q inverse of p → q ¬p → ¬q converse of p → q q → p contrapositive of p → q ¬q → ¬p

Binary relation R ⊆ A × A relation notation a and b are related ⇐⇒ (a, b) ∈ R inverse R−^1 {(b, a) ∈ A × A | (a, b) ∈ R} reflexive ∀a ∈ A, (a, a) ∈ R symmetric ∀a, b ∈ A, if (a, b) ∈ R then (b, a) ∈ R antisymmetric ∀a, b ∈ A, if (a, b) ∈ R and (b, a) ∈ R, then a = b transitive ∀a, b, c ∈ A, if (a, b) ∈ R and (b, c) ∈ R, then (a, c) ∈ R

Equivalence relation ∼ An equivalence relation is a binary relation which is reflexive, symmetric, and transitive

Partial order π A partial order, or poset, is a binary relation which is reflexive, antisymmetric, and transitive.

Function f : A → B A function f from A to B associates each element a ∈ A to exactly one element b ∈ B. Notation b = f (a) if b is associated to a one-to-one (or injective) ∀a 1 , a 2 ∈ A, if a 1 6 = a 2 then f (a 1 ) 6 = f (a 2 ) onto (or surjective) ∀b ∈ B, ∃a ∈ A such that f (a) = b bijection one-to-one and onto inverse f −^1 : B → A {(b, a) | b = f (a)} (if f is a bijection)

Recursion tree for T (n) = aT (n/b) + f (n) f (n)

f (n/b)

f (n/b^2 ) .. .

... f (n/b^2 ) .. . ... f (n/b)

f (n/b^2 ) .. .

... f (n/b^2 ) .. .

−→ f (n)

−→ a · f (n/b)

−→ a^2 · f (n/b^2 ) (logb n levels)

∃c < 1 : a · f (n/b) = c · f (n) =⇒ T (n) = Θ(f (n)) a · f (n/b) = f (n) =⇒ T (n) = Θ(f (n) log n) ∃c > 1 : a · f (n/b) = c · f (n) =⇒ T (n) = Θ(nlogb^ a)

Asymptotic notation f (n) = o(g(n)) ∀c > 0 : ∃N > 0 : ∀n ≥ N : f (n) <<< c · g(n) f (n) = O(g(n)) ∃c > 0 : ∃N > 0 : ∀n ≥ N : f (n) ≤≤≤ c · g(n) f (n) = Θ(g(n)) f (n) = O(g(n)) and f (n) = Ω(g(n)) f (n) = Ω(g(n)) ∃c > 0 : ∃N > 0 : ∀n ≥ N : f (n) ≥≥≥ c · g(n) f (n) = ω(g(n)) ∀c > 0 : ∃N > 0 : ∀n ≥ N : f (n) >>> c · g(n)

nlim→∞^ f^ (n) g(n)

= 0 =⇒ f (n) = o(g(n)) < ∞ =⇒ f (n) = O(g(n))

0 =⇒ f (n) = Ω(g(n)) = ∞ =⇒ f (n) = ω(g(n)) f (n) = o(g(n)) ⇐⇒ g(n) = ω(f (n)) f (n) = O(g(n)) ⇐⇒ g(n) = Ω(f (n)) f (n) = Θ(g(n)) ⇐⇒ g(n) = Θ(f (n))