Discrete Math - Basic Notes
Discrete Math - Basic Notes
sequence of vertices & edges. v & e can Dijkstra's To find the shortest path between nodes in
Property-Law Set Theory Formula Boundedness A+1 = 1 & A.0 = 0 Rules of Inference Walk
be repeated. k-length = k edges (example) a weighted graph - Greedy Approach Every element in Set A , maps to one element in set B
Injective
A⋂B=B⋂A
Sum of products: Product of sums:
Modus Ponens
⇒
(p ∧ (p → q)) q,
Trail a walk, no e is repeated Stage
Shortest
Vertex Distance
Previous
Not Visited
(One-to-One) f(a) = f(b) ↔ a = b or
f(x,y,z) = x.y+x.z+y.z f(x,y,z) = (x+y).(x+z).(y+z) if p → q is True and p is True, then q is True from S
Vertex f(a) ≠ f(b) ↔ a ≠ b
Commutativity
((p → q) ∧ ¬q) ⇒ ¬p,
A∪B=B∪A Modus Tollens
if p → q is True and ¬q is True, then ¬p is True
Path a trail, no v & e can be repeated a 0 undefined Horizontal Line test Line intersects graph only once = injective
Hypothetical ((p → q) ∧ (q → r)) ⇒ (p → r), a closed trail, starts & ends at the same
A ⋂ (B⋂C) = (A⋂B) ⋂ C Cirquit b ∞ undefined Vertical Line test Not a function if intersects more than once
Syllogism if p → q is True and q → r is True, then p → r is True vertex
((p ∨ q) ∧ ¬p) ⇒ q,
Associativity
Disjunctive initialization a,b,c,d
A ∪ (B∪C) = (A∪B) ∪ C Cycle a closed path, vertex reachable from self c ∞ undefined Every element in Set B , has at least one preimage in set A
Syllogism if (p ∨ q) is True and ¬p is True, then q is True
Surjective
K-Maps ≠ T.T. only for 2,3,4,5 variables From T.T. use only
Distributivity A ⋂ (B∪C) = (A⋂B) ∪ (A⋂C) lines that f= true. If input=1 use uncomplemented, if input = 0 Addition p ⇒ (p ∨ q), if p is True, then (p ∨ q) is True Eulerian Path
a walk, traverses each edge only once
(traversable)
d ∞ undefined
(Onto) f(x) = y, solve for xprove for ∀y in the Co-Domain,
∃x in the Domain (Range = Co-Domain)
use complemented. Cell = binary value, number of cells = 2^k
((p) ∧ (q)) ⇒ (p ∧ q), Eulerian path, starts & ends in same
A⋂A=A Conjunction
if p is True and q is True, then (p ∧ q) is True
Eulerian Cycle
vertex
a 0 undefined From Graph: x axis = Domain, y axis = Range
Idempotent
A∪A=A Simplification (p ∧ q) ⇒ p, if (p ∧ q) is True, then p is True Hamiltonian Path
a path, visits each vertex only once
(traceable)
b x a Inverse Function
If function = bijective, then inverse:
Set f(x) = y, Swap x and y, solve for y. Swap x and y again
((p ∨ q) ∧ (¬p ∨ r)) ⇒ (q ∨ r),
Let f (x) = 2x & g (x) = x+3:
1 b,c,d
Hamiltonian a Hamiltonian path, starts & ends in Composite
A∪Ø=A Resolution if (p ∨ q) is True and (¬p ∨ r) is True, then (q ∨ r) is
Cycle same vertex
c x a
Functions (f∘g) (x) = f (g (x) ) = f (x+3) = 2 (x+3) = 2x+6
Identity True
(g∘f) (x) = g (f (x) ) = g (2x) = 2x+3
G →G*: Check which paths do not have
A⋂U=A Logical Implication: A → B ≡ ~A ∨ B Transitive closure
a directed edge and add it
d ∞ undefined Logarithms y = a^x ↔ log base a of y = x
Equivalences Biconditional: A ↔ B ≡ (A → B) ∧ (B → A)
A ∩ (A ∪ B) = A Vertex Degree Number of incident edges a 0 undefined RELATIONS