Week 1 - 10 Flashcards
Bipartite graph
vertices can be divided into 2 sections
Complete graph
vertices are all connected to every other vertices
matching
a set of edges so that every vertex is incident with at most one vertex in the matching
perfect matching
a set of edges where each vertex is incident with exactly one vertex in the matching - solves the assignment problem
path
sequence of vertices joined together in edges
alternating path
edges in the path alternate from being in the matching and not in the matching
set
collection of objects
power sets
contains other sets
data structure
method of storing information so that a computer can access it
cartesian product
the set of all ordered pairs with the first element A and the second element from B
function
each input is mapped to exactly one input
symmetric difference
set of elements in exactly one of A or B
injective function
- one-to-one
- different arrows go to different locations
- if (a1, b) and (a2, b) both belong to f then a1 = a2
surjective function
- every element of the codomain there is an element of the domain relating to it
- image of f = B
bijective function
both injective and surjective
relation
a relation from A to B is a subset of the cartesian product A x B
reflexive graph
- every element has a self directed arrow loop
symmetric graph
- every arrow is two-way
- whenever (a, b) is contained in R, then (b, a) is in R
anti-symmetric graph
- no two-way arrows (exception for loops)
transitive graph
- if we can get from a to c in two steps, we can get there in one step
equivalence relation
- symmetric
- reflexive
- transitive
partial order
- anti-symmetric
- reflexive
- transitive
predicate
act likes a function which can take an element of the domain as input and produce a truth value as a output
existential quantifier
there exists x, an element of the domain such that … is true
universal quantifier
for every value of x such that … is true
¬ (universal quantifier(x)…)
existential quantifier(x)¬(…)
¬(existential quantifier(x)…)
universal quantifier(x)¬(…)
A ⇒ B is the same as …
(¬A) v B
arguments
- sequence of statements (premises) and a conclusion
- valid = accept the premises as being true then we must accept the conclusion as true
rules of interference
- list of premises of the argument
- use rules to produce logical statements
- eventually, produce the conclusion of the argument
conjunction elimination
j: A ^ B
= A (or B)
- ^ Elim j
conjunction introduction
j:A
k: B
= A ^ B
- ^Intro j, k
implication introduction
j:A
k:B
= A ⇒ B
- ⇒Intro j-k
implication elimination
j:A ⇒ B
= A becomes B
- ⇒Elim j,k
disjunction introduction
j:A
= A v B (or B v A)
- v Intro j
disjunction elimination
j: A v B
k: ¬A
= B
- v Elim j, k
negation introduction
j: A ⇒ (B ^ (¬B)
- ¬ Intro j
types of proof
- direct - X ⇒Y
- contrapositive - ¬X ⇒ ¬Y
- by contradiction - ¬X ⇒ (p ^ (¬p)
inductive proof
- check the base case - prove the property holds for 1 or 0
- hypthesis - states that it works up to an arbituary point int the integers - k
- prove that statement is past the arbituary point in the integers - k + 1
- if we accomplish these steps, we have proved the statement is true for all positive integers
well-ordering principle
inductive proofs work because if P(x) is false for some choice of x, then it is false for some smallest choice of x
uses of the well-ordering principle
- analysing running time for algorithms
- proving the correctness of algorithms
cardinality
the number of elements in a set - |A|