Discrete Mathematics collection
Number of lists of length k using elements of set s without repetition, with n the size of set s and 0<=k<=n
(n)_k = n!/(n-k)!
A complete graph is...
A complete graph is a graph where an edge exists between every pair of distinct vertices. Notation is K_n. for a complete graph with n vertices.
Composition of Functions
A composition g o f is the function g[f(a)]. Then if f: A → B, and g: B → C, then g o f: A → C. Note that composition is not commutative, but is associative.
Tautology
A compound proposition that is always true.
Contingency
A compound proposition that is sometimes true and sometimes false.
Conditional & Contrapositive
A conditional statement is logically equivalent to its contrapositive.
Truth Table
For a given statement form displays the true values that correspond to all possible combinations of truth values for its component statement variables.
Equivalence Relation
For a relation R on set A, R is an equivalence relation if it is reflexive, symmetric and transitive. Note that = is an equivalence relation.
When is a^p ≡ a (mod p) true?
For all integers a and primes p.
Euler's Phi function
For n >= 1, the _______ gives the number of positive integers less than n that are relatively prime to n.
Contradiction rule
If you can show that the supposition that statement p is false leads logically to a contradiction, then you can conclude that p is true.
Universal Quantifier
Implies a predicate is true for all elements under consideration; true for all subject value. It is represented by ∀xP(x).
Existential Quantifier
Implies a predicate is true for at least one element under consideration. We represent this as ∃xP(x).
fundamental theorem of arthmetic
every integer grater than 1 can be factored uniquely into prime numbers
Logically equivalent
if p ↔ q is a tautology, p ≡ q
Empty product and empty sum
if the start term of the notation is > than the end term, then it evaluates to the empty sum (0) or the empty product (1)
We say F is a function surjective/onto B iff
image of F is equal to B
=>
implies "forces"
Coloring
in a simple graph, the assignment of a color to each vertex of the graph so that no two adjacent vertices are assigned the same color
~
denotes not.
~^
denotes or.
recursive
describes a function which invokes itself
planar
describes a graph which can be drawn without its edges crossing
reflexive
describes a relation on a set X in which (x,x) in R for every x in X
antisymmetric
describes a relation on a set X in which, for every x,y in X, if (x,y) in R and (y,x) in R, x = y
symmetric
describes a relation on a set X in which, for every x,y in X, if (x,y) is in R, (y,x) is in R
transitive
describes a relation on a set X in which, for every x,y,z in X, if (x,y) in R and (y,z) in R, (x,z) in R
increasing
describes a sequence in which s(n) < s(n+1) for all n
nondecreasing
describes a sequence in which s(n) <= s(n+1) for all n
decreasing
describes a sequence in which s(n) > s(n+1) for all n
nonincreasing
describes a sequence in which s(n) >= s(n+1) for all n
incident
describes a vertex and edge which are connected
level
describes the length of the path of the root of a tree to a vertex
parallel
describes two edges associated with the same pair of vertices
homeomorphic
describes two graphs, one of which can be reduced to a isomorphism of the other
disjoint
describes two sets with a null intersection
adjacent
describes two vertices connected by an edge
Fallacies
incorrect reasoning that leads to invalid arguments
quantifier
indicates the number of elements which a predicate is true
Z
integers
An Eulerian tour (circuit)... An Eulerian tour exists iff...
is an Eulerian trail that begins and ends at the same vertex ...it has only one non trivial component and all the vertices are even
Union
the set that contains those elements that are either in A or in B, or in both, A ∪ B
universal set
the set which contains the space in which we work with other sets
The transitive closure of R is...
the smallest superset of elements of R, denoted R^t, such that R^t is transitive
Axioms
the statements we assume to be true
concatenation
the string consisting of one string followed by another
null string
the string with no elements (lambda)
Let x in V(G). G-x is ...
the subgraph created by deleting x and all of the edges connected to x observe these graphs are induced subgraphs
Set of Rational Numbers
ℚ = {p/q | p,q ∈ ℤ, q≠0; gcd(p,q)=1}.
Set of irrational numbers
ℝ - ℚ = set of real numbers that cannot be expressed as a reduced fraction of two integers.
for all
∀
Universal Conditional Statement
∀, if p then q.
Universal Modus Ponens
∀x(P(x) → Q(x)) P(a), where a is a particular element in the domain --------- ∴ Q(a) Ex: Assuming "For all positive integers n, if n is greater than 4, then n^2 is less than 2n^" is true. Modus ponens can show that 100^2 < 2^100 Solution: Let P(n) denote "n > 4" and Q(n) denote "n^2 < 2^n." The statement "For all positive integers n, if n is greater than 4, then n^2 is less than 2^n" can be represented by ∀n(P (n) → Q(n)), where the domain consists of all positive integers. We are assuming that ∀n(P (n) → Q(n)) is true. Note that P(100) is true because 100 > 4. It follows by universal modus ponens that Q(100) is true, namely that 100^2 < 2^100.
Universal Modus Tollens
∀x(P(x) → Q(x)) ¬Q(a), where a is a particular element in the domain --------- ∴ ¬P(a)
Negation of a Universal Conditional Statement
∀x, if P(x) then Q(x) ≡ ∃x such that P(x) and ∼Q(x)
Universal Instantiation
∀xP(x) --------- ∴ P(c) Ex: "All women are wise" that "Lisa is wise," where Lisa is a member of the domain of all women.
there exists
∃
Existential Quantifier
∃ "There exists"
Existential Instantiation
∃xP(x) --------- ∴ P(c) for some element c
Cartesian product
a form of set multiplication, resulting in a set of ordered pairs
one-to-one (injective)
a function f: X -> Y in which no more than one x in X is assigned to any y in Y
onto (surjective)
a function f: X -> Y in which, for some x in X, f(x) = y for every y in Y
sequence
a function in which the domain consists of a set of consecutive integers
Invertible
a function that can have an inverse defined, a one-to-one
bijective
a function that is both injective and surjective
Injective
a function that is one-to-one
digraph
a graph consisting of edges associated with an ordered pair of vertices
simple graph
a graph containing neither loops nor parallel edges
subgraph
a graph containing only edges and vertices of another graph
element
a member of a set
Next Fit
a new bin is opened if the weight to be packed in next cannot fit that is currently being filled; the current bin is then closed.
Circuit
a path is this if it begins and ends at the same vertex
cycle
a path of nonzero length from a vertex to itself with no repeating edges
simple path
a path with no repeated vertices
isomorphism
a rearrangement of a graph which retains all of its properties
face
a region of a planar graph bounded by edges, with no internal vertices or edges
partial order
a relation which is reflexive, antisymmetric, and transitive
Function F from a set A to a set B
a relation with domain A and co-domain B that satisfies the following two properties: 1. For every element x in A, there is an element y in B such that (x,y) [- F. 2. For all elements x in A and y and z in B, if (x,y) [- F and (x,z) [- F, then y = z.
intersection
a set containing all of the elements found in both of two sets
union
a set containing all of the elements found in either of two sets
binary tree
a tree in which each node has at most two children.
Rooted Tree
a tree in which one vertex has been designated as the root and every edge is directed away from the root
breadth-first search
a type of search in which all vertices on a given level are processed before moving on to the next level
descendant
a vertex below another, not connected through the root
A leaf is...
a vertex of degree 1
internal vertex
a vertex with children
terminal vertex
a vertex with no children
A trail is....
a walk with no repeated edges (but can have repeated vertices)
A path is....
a walk with no repeated vertices. every path is a trail
Closure
a+b and a*b are integers
Mutually Relatively prime
a1, a2, a3,...,an gcd(a1,...,an)=1
Reflexive Property of Equality
a=a
Dynamic Programming
algorithm used to solve many optimization problems efficiently, an algorithm follows this paradigm when it recursively breaks down a problem into simpler overlapping subproblems
List (Ordered Tuple)
an _ordered_ collection of objects
Set
an _unordered_ collection of distinct objects. repetition cannot exist.
Multiset
an _unordered_ collection of objects. repetition is allowed.
Dijkstra's algorithm
an algorithm for finding the shortest path between two vertices in a weighted graph
Heuristic Algorithm
an algorithm that is just used but doesn't show optimal solutions
loop
an edge incident on a single vertex
A cut edge is.... A cut vertex is...
an edge whose removal increases the number of components a vertex whose removal increases the number of components
transtivity
an operation is transitive if a operates on b and b operates on c then a operated on c
permutation
an ordering of objects
Connected
an undirected graph is called this if there is a path between every pair of distinct vertices of the graph
Set
an unordered collection of objects, each called an element, said to contain its elements, A ∈ a indicates that A contains an element a
sibling
another vertex with the same parent vertex
valid argument
argument that is a tautolagy
Uniqueness Proofs
assert the existence of a unique element with a particular property, that there is exactly one element with this property; show that element x with the desired property exists; if y does not equal x, then y does not have the desired property
Existence proof
assertion that objects of a particular type exist E xP(x) where P is a predicate, can be proved by finding an element a, a witness, such that P(a) is true (constructive), nonconstructive is when we don't find witness but prove ExP(x) is true in some other way (i.e. proof by contradiction)
function
assigns to each member of a set X exactly one member of a set Y
proof technique for proof by contradiction
assume this negation is true show that this ultimately leads to some mathematically impossible
Processing Algorithm
at any given time, assign the lowest number free machine the first task on the priority list that is ready (at that time)
existential statement
at least one thing is true for a particular property
How do we know if ax + by = c has integer solutions for x and y?
ax + by = c has integer solutions for x and y if and only if gcd(a,b) | c.
divisibility is transitive
a|b and b|c =>a|c
(Graphs) Complete Bipartite (K_n,m)
bipartite graph where every vertex is connected to every vertex in the other partition
Grand Hotel
bump each guest up a room, the first room is for the new guest
Z
character representing "the set of all integers"
Q
character representing "the set of all rational numbers"
R
character representing "the set of all real numbers"
C
complex numbers
Contradiction
compound proposition that is always false
^
conjunction
compound statements
conjunction and
biimplication
conjunction of implication and converese
series reduction
consists of replacing two edges (v1,v) and (v,v2) and their vertex v with the edge (v1,v2)
providing exstential statements
construct proof existence provide an explicit solution or demonstrate how to construct some non constructive proofof the existence
Decrease
create a priority list in decreasing order
recurrence relation
defines a sequence by giving the nth value in terms of certain of its predecessors
method of exaustion
demonstrate the validity of every possible case
Cartesian Product of A and B
denoted AxB and read "A cross B" is the set of all ordered pairs (a,b) where a is in A and b is in b symbolically. AxB = { (a,b) | a [- A and b [- B }
Neighborhood of a vertex
denoted N(v), the set of all neighbors of a vertex
^
denotes and.
Roster Method
describing a set using all its elements, for example the set of the vowels V = {a,e,i,o,u}
set-builder
description of a set by a common property
∨
disjunction
Common Mistakes in Proofs
division by zero, invalid rules of inference,
We say F is a mapping function from set A to set B if...
domain of F = A and image of F is a subset of B
logical fallocy
error in reasoning resulting in an invalid argument
Two-Colorable
every bipartite graph is this
(Sets) A - B is...
everything in A not also in B
⊕
exclusive or
constant function
f(x) = C
successor function
f(x) = x+1
inverse error
fallacy deying the antecedent
pigeonhole principle
for function f: X -> Y, with |X| = n and |Y| = m, there are at least ceiling(n/m) values (y1 ... yk) such that f(y1) = .... = f(yk)
Relatively Prime
gcd = 1
gcd(a,b) x lcm(a,b) = ?
gcd(a,b) x lcm(a,b) = ab
Formal Power Series
generating functions used to solve counting problems
binomial theorem
gives a formula for the coefficients in the expansion of (a+b)^n
(Graphs) Complete (K_n)
graph for which every vertex has maximum degree and has n vertices. observe |E(K_n)| = |V| choose 2
Truth Table
has a row for each of the two possible truth values of a proposition p, each row rows the truth value of ¬p for the corresponding value
Infinite graph
has an infinite vertex set or number of edges
mathematics
idealizrtion of physioal phenomena
Transitive
if (a, b) and (b,c) are both in the relation, then (a, c) is in the relation as well for all a, b, c
statement form
is an expression made up of statement variables (such as p, q, and r) and logical connectives (such as ^, ~, and down arrow) that becomes a statement when actual statements are substituted for the component statement variables.
Reciprocal of a real number a
is b so that ab=1
Let G be a graph. The complement of G is...
is graph with vertex set V(G) and edge set containing all the edges not in E(G) observe that |E(G)| + |E(G')| = |V(G)| choose 2
R is a partial order relation iff
it is a relation, and reflexive, antisymmetric, and transitive
R is an equivalence relation iff
it is a relation, and reflexive, symmetric, and transitive
If gcd(a,b)=d then lcm(a,b) = ?
lcm(a,b) = ab / gcd(a,b)
positive divisors
let a,b e N s.t. a|b. then a<= b proof leta,b e N s,t, a|b then E k e z s.t. b= ak where k>= 1 thus 1<=k => a <=ak = b ... a,b e N s.t. a|b => a<=b
Maximum Number of Leaves, m-ary tree of height h
m^h leaves
Max number of leaves
m^h on an m-ary tree of height h
d|n
means d divides n
modus tollens
method of denying
Total vertices for m-ary tree with i internal
n = m*k + 1 vertices
cmposite number
n e z s.t. n > 1 and n is not prime
prime numbers
n e z s.t. n > 1 and the only divisor of n are 1 and n
even integers
n is even <=>k e z s.t. n=2k
odd integers
n is odd <=> k e z s.t. n= 2k+1
Number of lists of length k using elements of set s, with n the size of set s
n^k
N
natural numbers
¬
negation
two main types of negation
negation of p = ~p (if ~p is always false then p is always true) negation of p => q: p^~q (if p^~q is always false then p=>q is always true
compound statements
new statements formed from existing statements
exclusive or
one , the other , but not both
conditional statement
one thing is true forces another thing to be true
if an infinite number of elements must resort to
other generalization
Addition - Inference Rule
p --------- ∴ p ∨ q Ex: It is below freezing now. Therefore, it is either below freezing or raining now.
Modus ponens (Law of detachment) - Inference Rule
p p → q --------- ∴q
Conjunction - Inference Rule
p q --------- ∴ p ∧ q
disjunction
p (down arrow) q.
premise
preceding statement in an argument
Bin Packing
problem of finding the minimum # of bins (bin-Item that holds much smaller objects)
proof by contradiction
proving a statement true by showing that the negation of that statement is always false also called indirect proof
proof by contradiction
proving an implication by proving its counterpositive
Addition
p→(p∨q)
Logical Equivalences Involving Conditional Statements.
p→q≡¬p∨q p→q≡¬q→¬p p∨q≡¬p→q p∧q≡¬(p→¬q) ¬(p→q)≡p∧¬q (p→q)∧(p→r)≡p→(q∧r) (p→r)∧(q→r)≡(p∨q)→r (p→q)∨(p→r)≡p→(q∨r) (p→r)∨(q→r)≡(p∧q)→r
Biconditional
p↔q means (p→q)∧(q→p). It is true whenever p and q have the same truth value. p↔q is false whenever p and q have opposite truth values.
Logical Equivalences Involving Biconditional Statements.
p↔q≡(p→q)∧(q→p) p↔q≡¬p↔¬q p↔q≡(p∧q)∨(¬p∧¬q) ¬(p↔q)≡p↔¬q
Identity Laws
p∧T≡p p∨F≡p
Identity laws
p∧T≡p p∨F≡p
Conjunction
p∧q= "p and q" = proposition that is true when both p and q are true, and is false otherwise.
Simplification
p∧q→p
Absorption Laws
p∨(p∧q)≡p p∧(p∨q)≡p
Absorption laws
p∨(p∧q)≡p p∧(p∨q)≡p
Distributive Laws
p∨(q∧r)≡(p∨q)∧(p∨r) p∧(q∨r)≡(p∧q)∨(p∧r)
Distributive laws
p∨(q∧r)≡(p∨q)∧(p∨r) p∧(q∨r)≡(p∧q)∨(p∧r)
Domination Laws
p∨T≡T p∧F≡F
Domination laws
p∨T≡T p∧F≡F
Translate: p is necessary for q
q → p
Converse
q → p, equivalent to the inverse
rational numbers
r e R is rational <=> E a,b e z s.t. r = a/b, b!= 0
Q
rational numbers
R
real numbers
predicate
sentence that becomes a statement when values are substituted for variables
Cartesian Product
set of all possible relations on A
Natural numbers
set of integers >= 0
set- notation
set-roster set-builder
equal sets
sets with the same elements (order of elements dose not matter)
false
show false for ata least one value provide a counter example
to provide a universal statement is true
show it to be true for all values
conclution
statement at the end of an argument
contradiction
statement form that is always false regardless of the originating statement
tautology
statement form that is always true regardless of the originating statement
disjunction
statement that is true if either portion is true [or]
Premises
statements of an argument
Relation on a set A
subset of A xA
AND gate
takes two input signals p and q, each a bit, and produces as output the signal p ^ q
Independent Tasks
tasks that do not rely on another task in order to be completed
(Walks) W+U is...
the concatenation of W and U, given that the last vertex of W is equal to the first vertex of U
Valid
the conclusion, or final statement of the argument, must follow from the truth of the preceding statements of the argument
height
the maximum level of any vertex in a rooted tree
n choose k
the number of k element subsets of an n element set. equivalent to n!/(k!(n-k)!)
complement
the set containing all elements not in another set
Intersection
the set containing those elements in both A and B, A ∩ B
Let R be an equivalence relation on set A. Let a in A. The equivalence class of a is...
the set of all elements b in A s.t. a R b. this is denoted [a]
{x [- S | P(x)}
the set of all elements x in S such that P(x) is true.
Neighborhood
the set of all neighbors of a vertex v of G = (V, E) is denoted by N(v)
empty set
the set with no elements
Cardinality
the size of a set, i.e. the number of elements, |S|
logic
the study of reasoning
Truth Value
true, denoted by T, if it is a true proposition, and false, denoted by F, if it is a false proposition
Equivalent
two compound propositions are this if they always have the same truth value
Set Equality
two sets are equal if and only if they have the same elements
Proof by Cases
uses the tautology ((p1 or p2 ...or pn) -> q) <->{(p1->q)^(p2->q) ^...^(pn->q)), must cover all the possible cases that arise in a theorem
Union of two simple graphs, G1 U G2
vertex set V1 U V2, edge set E1 U E2
Pendant Vertex
vertex with degree one
determining a function graficly
vertical line test
Let R be a relation. We say R is a function if...
whenever (a,b) in f and (a,c) in f, b=c. the set of all objects x s.t. f(x) is defined is called the domain of f. the set of all objects y s.t. there exists x such that f(x)=y is called the image of f.
Set Builder Notation x [- S
x is an element of S
De Morgan's Laws
¬∀xP(x) ≡ ∃x¬P(x) ¬∃xP(x) ≡ ∀x¬P(x)
Universal Quantifier
∀ "For all"
Goals of three scheduling problems
-optimization- max. profit, mini. cost (scheduling machine at earliest time) -equity- equality between all bins (WF); (Home vs Away games) -conflict resolution- try to prevent conflicts from occurring (college finals)
1 ⊕ 0
1
system of creating proofs
1. convince yourself 2. convince your friend 3. convince your enemies
Even
2k
Permutation on set A
A bijective function F:A to A
Fallacy
A compound proposition that is always false.
A trail is...
A trail is a walk with no repeated edges.
Sound
An argument that is called sound if, and only if, it is valid and all its premises are true.
Proof by contradiction
Assume p∧¬q. Showing this leads to a false conclusion.
How do you find the shortest path between two vertices?
Dijkstra's algorithm.
T ^ F
F
T → F
F
T ↔ F
F
What does Kruskal's algorithm do?
Find a minimum spanning tree.
Subset A _C_ B
For all elements in x, if x [- A, then x [- B.
Even
If a is an integer, it is even if 2|a.
Partition
Let U be a non-empty set. A collection of subsets (A1, A2, A3..., An) is said to be a _______ of U provided that 1) U to the Ai, with i going from zero to n, is equal to U. 2) Ai n Aj = the empty set AND 1<= i, j<= n, and i does not equal j.
Odd
Let a∈ℤ. This integer is odd iff b∈ℤ∋a=2b+1.
(Graphs) Δ(G)
Maximum degree of all vertices in graph G
Negation
Opposite.
What does it mean to say vertices a and b are connected?
There is a path connecting a and b.
string
a finite sequence of elements from a set
|
character representing "such that"
A is a subset of B iff
every element of A is also in B. (the empty set is a subset of all sets)
→
implication
convers of p->q
q->p
p ∧ q
"And", the conjunction is true when both p and q are true.
p ↔ q
"Biconditional statement", p if and only if q. Same when p and q have the same truth values and false otherwise (true when both true or both false, but false if they are not the same). XNOR gate.
p → q
"Conditional Statement", "if p, then q". False when p is true and q is false, and true otherwise. Think of it as a promise of p to do q. A politician may say "If I'm elected I'll lower taxes". If he's elected and he lowers taxes, it's true. It he's elected and lowers taxes, it's false. If he's not elected, it's true no matter what happens with taxes since the candidate did not break his promise.
¬q →¬p
"Contrapositive" of p → q and equivalent to p → q
q → p
"Converse" of p → q
p ⊕ q
"Exclusive Or", true when exactly one of p and q is true and exactly one is false.
The existential quantification ∃xP(x)= There is at least a value of x in the domain such that P(x) is true.
"For some xP(x)." n Let P(x) is "x < 5", domain is all one-digit integers, ∃xP(x) is true
¬p →¬q
"Inverse" of p → q
¬p
"Negation", the truth of negation is the opposite of the truth of p
p ∨ q
"Or", false only when p and q are false, true otherwise.
"p only if q" means what?
"if not q then not p" or "if p then q."
Express the statement p→q as a statement in English
"if p, then q" "p implies q" "if p,q" "p only if q" "p is sufficient for q" "a sufficient condition for q is p" "q if p" "q whenever p" "q when p" "q is necessary for p" "a necessary condition for p is q" "q follows from p" "q unless ¬p"
Disjunctive Syllogism
((p∨q)∧¬p)→q
Binomial Theorem
(1 + x)^n = (n choose k)x^k, from k=0 to infinite.
(Sets) Symmetric difference of A and B is...
(A-B) U (B-A)
Proof by Induction
(Principle of Mathematical induction is this process) state what you are going to prove, prove the base case, present the inductive step, prove the inductive step - P(k) -> p(k+1) is true for all k (i.e. that P(k+1) follows P(k), state conclusion "by mathematical induction P(n) is true for all integers n with n>=b
Distributive laws
(a+b)*c=a*c+b*c
Associative Laws
(a+b)+c=a+(b+c) and (a*b)*c=a*(b*c)
Binomial Theorem
(a+b)^n = E (from k=0 to n) of (n choose k) a^(n-k) * b^k
k identical balls, n distinguished boxes problem: how many ways to sort into boxes
(n+k-1) choose (n-1) ways to do it (since you can put the dividers anywhere, add k ways and subtract 1 to handle repetition)
The degree sequence is...
(of a graph) the list of degrees of vertices of a graph, including duplicates.
Associative Laws
(p∨q)∨r≡p∨(q∨r) (p∧q)∧r≡p∧(q∧r)
Associative laws
(p∨q)∨r≡p∨(q∨r) (p∧q)∧r≡p∧(q∧r)
Binomial Theorem
(x+y)^n=sum from k=0 to n of (n choose k)*x^(n-k)*y^k
Contradiction Proof
1. Suppose the statement to be proved is false. That is, suppose the negation of the statement. 2. Show that this supposition leads logically to a contradiction. 3. Conclude that the statement to be proved is true.
Odd
2k+1
a -> b
= (not a) or b = (not(not b)) or (not a) = (not b) -> (not a).
(n choose k)
= n! / k!(n-k)!
ℵ and countably infinite
=|N| If there exists f:N to A s.t. f is a bijection, we say f is countably infinite (denumerable)
"p necessary q"
?????
Corollary
A "minor" theorem or immediate result of a theorem.
A Hamiltonian cycle...
A Hamiltonian cycle visits every vertex exactly once, then returns to the starting vertex.
A Hamiltonian Path...
A Hamiltonian path visits every vertex exactly once.
Probability Space
A Probability space is a pair (S, P). Where S ≠ ∅, S is finite, and P is a function P: S → R, where ∀s ∈ S, P(s) ≥ 0, Σ P(s) = 1.
A bipartite graph is...
A bipartite graph is a graph such that the vertices can be divided into two sets where no edge joins two vertices in the same set.
A cycle is...
A cycle is a path which starts and ends at the same vertex.
Proposition
A declarative sentence that is true or false but not both.
Proposition
A declarative statement that is either true or false, but not both.
Pairwise disjoint family of sets
A family of sets is pairwise disjoint if for every 2 sets in the family, the intersection is an empty set
Muddy Children Puzzle
A father says "at least one of you has a muddy forehead", then asks them "Do you know whether you have a muddy forehead?", after both children answer the first time, they realize they each have muddy foreheads
Onto
A function f between A and B is onto if im f = B.
Proper Subset
A is a proper subset of B if, and only if, every element of A is in B, but there is at least one element of B that is not in A.
(Sets) A is equal to B iff
A is a subset of B and B is a subset of A
A is a proper subset of B iff
A is a subset of B and there exists an element in B not in A
subset
A is a subset of B if and only if every element of A is an element of B
proper subset 'C'
A is a subset of B, but is not equal to B
K-coloring
A labeling f:v(G)->S,|S|=K.
Lemma
A less important theorem introduced in proving some other proposition; a helping theorem.
What does the Deleted Vertex algorithm give us?
A lower bound for the Travelling Salesman problem.
Composite
A natural number is said to be _______ if it is not a prime.
Prime
A natural number p is said to be _______ provided the only divisors of p are 1 and p.
Tree
A particular kind of graph, a connected undirected graph with no simple circutis, must have a unique simple path between any two of its vertices
Transposition
A permutation is a transposition if: I: If for some x, y ∈ {1, 2, ..., n} then π(x) = y, and π(y) = x. II: For k ∈ {1, 2, ..., n} where k ≠x, y π(x) = x
Permutation
A permutation on a set A, is a bijection on A. In combinatorics for the sake of convenience we view a permutation of a set A as an ordering of its elements.
Prime number
A positive integer greater than 1 that is divisible by no positive integers other than 1 and itself
Composite number
A positive integer that is greater than 1 that is not prime
Contradiction
A proposition that is always false.
Relation
A set of ordered pairs. In particular, if we have two sets A and B, and a relation R, then R ⊆ (A x B) if R is a relation between sets A and B.
An intersection of sets
A set of the elements that two sets have in common
Proof by Contraposition
A type of Indirect Proof which makes use of the fact that the conditional statement p → q is equivalent to its contrapositive, ¬q →¬p. This means that the conditional statement p → q can be proved by showing that its contrapositive, ¬q →¬p, is true. We take ¬q as a premise, and using axioms, definitions, and previously proven theorems, together with rules of inference, we show that ¬p must follow.
Leaf
A vertex of a rooted tree that has no children
Premise
All propositions in an argument except the final proposition.
Null set
Also called the empty set. Contains no elements. Denoted by ∅. Note, the null set is a subset of every set including itself.
An Eulerian circuit is...
An Eulerian circuit is a circuit which contains no repeated edges. (i.e. goes back to where it starts)
An Eulerian trail is...
An Eulerian trail is a trail which contains no repeated edges.
Unsound
An argument that is not sound.
Incident
An edge e in relation to its endpoints
Loop
An edge from an element a to a, from the vertex back to itself
Mathematical Induction
An extremely important proof method. I: Prove base cases, the smallest values for which the proposition holds true. II: Prove ∀k ∈ N, k → k + 1.
Sets
An unordered collection of elements. A set may not contain duplicate items.
:=
Assignment
x := x + 1
Assignment of x+1 to x.
Function from set A to a set B
Assigns exactly one element of B to each element pf A; b = f(a)
Directed edge
Associated with an ordered pair of vertices (u,v), said to start at u and end at v
Combination Formula
C(n,r) = n! / r!(n-r)!
x
Cartesian product
C(2n,n)/(n+1)
Catalan numbers
x(K n,n)
Chromatic number of k on n vertices of a bipartite graph.
→
Conditional Statement
⊕
Exclusive Or (also called exclusive disjunction)
0
F
F ^ F
F
F ^ T
F
F ↔ T
F
F ∨ F
F
Trichotomy law
For every a, either a>0, a<0, or a=0
Additive inverse
For every integer a, there is an integer solution x to the equation a+x=0 (This integer x, is called the additive inverse of A and is denoted by -a)
Fermats Little Theorem states that
For integer a and prime p: a^p ≡ a (mod p) a^(p-1) ≡ 1 (mod p) if and only of a is not a multiple of p
When is a^(p-1) ≡ 1 (mod p) true?
For integers a and primes p where a is not a multiple of p.
Existential Statement
Given a property that may or may not be true, there is at least one thing for which the property is true. Example: There is a prime number that is even.
Directed graph
Has a set of vertices V and directed edges E
Converse of IF A THEN B
IF B THEN A
Inverse of IF A THEN B
IF NOT A THEN NOT B
Contrapositive of IF A THEN B
IF NOT B THEN NOT A
Truth Set
If P(x) is a predicate and x has domain D, the truth set of P(x) is the set of all elements of D that make P(x) true when they are substituted for x. The truth set is denoted as {x [- D | P(x)}
The Division Algorithm
If a and b are integers such that b>o, then there are unique integers q and r such that a=bq+r with 0<=r<=b
a divides b
If a and b are integers with a not equal to zero, we say that a divides b (a | b) If there is an integer c such that ac=b If a divides b, we also say that a is a divisor or factor of b
Divisible
If a and b are integers, then we say a is divisible by b if there is some value c such that a = bc. We say b divides a (b|a). We also say b is a factor of a, or b is a divisor of a.
Closure for positive integers
If a and b are positive, then a+b and a*b are positive
Odd
If a is an integer, it is odd if 2 does not divide a.
If a number in base n is divisible by n - 1 then...
If a number in base n is divisible by n - 1 then the sum of its digits is also divisible by n - 1. The converse is also true, and you may be asked to prove this.
If a | N and b | N, what else divides N?
If a | N and b | N, then lcm(a,b) | N
If a ≡ b (mod m) and d | a and b, and gcd(d,m) = 1 then
If a ≡ b (mod m) and d | a and b and gcd(d,m) = 1 then a/d ≡ b/d (mod m)
State the division rules for congruences, i.e. when are you allowed to divide a congruence a ≡ b (mod m)
If a ≡ b (mod m) and d | a and b and gcd(d,m) = 1 then a/d ≡ b/d (mod m) If a ≡ b (mod m) and d | a and b and m, and gcd(d,m) = 1 then a/d ≡ b/d (mod m/d) If a ≡ b (mod m) and d | a and b and m, and gcd(d,m) ≠ 1 then a/d ≡ b/d (mod m/(gcd(d,m)) In general, if you can divide a and b by an integer d, you can do so, but you must divide m by gcd(d,m) if you can.
Ordering of integers
If b-a is a positive integer, then a<b If a<b, then we can also write b>a
Conditional Statement
If one thing is true then another thing is true too. Eg. If 12 is divisible by 4 then it is divisible by 2. P-->Q only false when P is true and Q is false.
Only if statement
If p and q are statements, p only if q means "if not q then not p." or "if p then q"
Fermat's Little theorem
If p is a prime such that p does not divide a, then a^(phi(p)) is congruent to 1(modp). Observe that for n > 1, p(n) = n-1 if and only if n is a prime.
Wilson's theorem
If p is any prime, then p-1! is congruent to -1(modp).
Fermat's Little Theorem
If p is prime and a is a positive integer with p does not divide a, then a^p-1=1(mod p).
Conditional of p and q
If p, then q.
Necessary conditional
If r and s are statements, r is a necessary condition for s means "if not r then not s."
Sufficient conditional
If r and s are statements, r is a sufficient condition for s means "if r then s."
Logically Equivalent
If two statements have identical truth tables.
Substitution Property of Equality
If x = y , then y can be substituted for x in any expression.
Multiplication Property of Equality
If x = y, then xz = yz.
Universal Statement
Is true for everything. Eg. All animals are black.
What is K_r,s and how many edges does it have?
K_r,s is the complete bipartite graph with r vertices in one set and s in the other. It has rs edges.
How do you find a minimum spanning tree?
Kruskal's algorithm.
Proposition (In Proofs)
Less important theorems (statements that can be shown to be true).
Equality of Cardinality
Let A and B be any two sets. If f: A -> B is a bijection, then |A| = |B|.
Union
Let A and B be sets. The union of A and B (A ∪ B), is the set of elements in A or B.
Subset
Let A and B be sets. Then B is a subset of A given every element of B is also an element of A. B ⊆ A.
Function
Let A and B be two non-empty sets. A _______ from A to B, denoted by f: A -> B, is a rule that assigns to each a belonging to A a unique b belonging to B, called f(a).
Shoder-Bernstein Theorem
Let A and B be two sets. If there exists 1-1 functions f: A -> B and g: B -> A, the there exists a bijective function from A to B.
Difference
Let A and B be two sets. The _______ between these two sets is denoted by A - B = {x | x belongs in A, x does not belong in B}
Intersection
Let A and B be two sets. The _______ of A and B, denoted by A n B = {x | x belongs to A and x belongs to B}
Cartesian Product
Let A be a non-empty set. The _______ of A with itself is denoted by A x A = {a1, a2 | a1 and a2 both belong to A}
Subset
Let A be a set. A set B is called a _______ of A, denoted by B c A, provided that for every x belonging to B, x also belongs to A.
Cartesian Product
Let And B be sets. Then A x B = {(a,b): a ∈ A, b ∈ B}.
Pairwise Disjoint
Let A₁, A₂, ... be sets. Then we say those sets are pairwise disjoint if for all unique pairs drawn from those sets, their intersection forms the null set.
Pigeonhole Principle
Let F be a mapping function from A to B, A and B are finite sets. If |A| >|B| then f is NOT one-to-one. If |A| < |B| then f is NOT onto.
induced subgraph
Let H be a graph and let A be a subset of the vertices of H. then induced is when V(H) = A and E(H) = {all edges in the A vertices} a graph G has 2^(|V(G)|) induced subgraphs
Mathematical Induction
Let P(n) to be a property that is defined for integers n, and let a be a fixed integer. Suppose the following two statements are true: 1. P(a) is true. 2. For all integers k >= a if P(k) is true then P(k+1) is true. Then the statement for all integers n>=a, P(n) is true.
Proposition 20.4
Let a and b be numbers with a not equal 0. There is at most one number x with ax + b = 0. Proof. Suppose there are two different numbers x and y such that ax + b = 0 and ay + b = 0. This gives ax + b = ay + b. Subtracting b from both sides gives ax = ay. Since a not equal 0, we can divide both sides by a to give x = y. =><=
Even
Let a be an integer. This integer is even iff there exists an integer b, such that a=2b.
Division Algorithm
Let a,b be integers with b > 0. Then there exists q,r integers, s.t. a=qb+r and 0<=r<b. Moreover the pair (q,r) is unique. a div b = q a mod b = r
Coprime
Let a,b be integers. a and b are relatively prime (coprime) if gcd(a,b) = 1.
Range
Let f: A -> B be a function. Then the _______ of f is given by the ran(f) = {f(x) | x belongs to A} is subset or equal to B.
Onto
Let f: A -> B be a function. f is said to be _______ provided for every b belonging to B, there exists and a in A such that f(a) = b. For each element in the co-domain, there exists an element in the domain that is mapped to the given co-domain element).
One-To-One (1-1)
Let f: A -> B be a function. f is said to be _______ provided for x1, x2 belonging to A, if f(x1) = f(x2), then x1 = x2. Equivalently, if x1 does not equal x2, then f(x1) does not equal f(x2).
Onto
Let f: A -> B. We say that f is onto B provided that for every b belongs to B there is an a belongs to A so that f(a)=b. In other words, im f = B.
Pigeonhole Principle
Let f: A → B. Then if |A| > |B|, f cannot be one to one. Also if |A| < |B|, f cannot be onto.
Isometry
Let f: R² → R². Then f is an isometry if for ∀(a, b), (c, d) ∈ R², distance[(a,b), (c, d)] = distance [f(a,b), f(c, d)].
Division Algorithm
Let m and n be two integers (n cannot equal zero). Then there exist integers q and r such that m = nq + r, 0 <= r < n. m is the dividend n is the divisor q is the quotient r is the remainder
Euler's theorem
Let n >= 1 and a be an integer such that gcd(a,n) = 1. Then a^(phi(n)) is congruent to 1(modn).
Factorial
Let n be a non-negative integer. Then the _______ of n, denoted by n!, is equal to 1 if n = 0 or 1, and n(n-1)(n-2)(n-3)....[n-(n-1)].
Is-congruent-to modulo n
Let n be a positive integer, x,y integers. We say x is congruent to y modulo n if n|(x-y)
Modular reciprocal and invertibility
Let n be a positive integer. Let alpha be in Z_n. The modular reciprocal of alpha is an element beta such that (alpha multiply mod n beta) = 1 If beta exists, we say alpha is invertible. Zero is never invertible and for n>=2, 1 is always invertible
Conjunction
Let p and q be propositions. p∧q is true whenever p and q are true; otherwise p∧q ≡ F.
Valid
Means the conclusion of final statement of the argument follows from the truth of the preceding statements.
(Graphs) δ(G)
Minimum degree of all vertices in graph G
State the four rules that follow if a ≡ b and c ≡ d (mod m)
Multiplication: ka ≡ kb (mod m) Addition: a + c ≡ b + d (mod m) Cross Multiplication: ac ≡ bd (mod m) Power: a^n ≡ b^n (mod m)
Double Negation Law
NOT(NOT p) ≡ p
¬
Negation
What makes a simple graph?
No multiple edges, no loops.
Inverse
Not equivalent to a conditional statement. If ~p then ~q.
Converse
Not equivalent to a conditional statement. If q--> then p.
∨
Or (also called a disjunction)
Combinations
Order doesn't matter. Formula: n!/(k! * (n-k)!)
Disjunction
P or Q It is true if either P or Q is true. False when both are false.
Universal Generalization
P(c) for an arbitrary c --------- ∴ ∀xP(x)
Existential Generalization
P(c) for some element c --------- ∴ ∃xP(x)
Permutation Formula
P(n,r) = n! / (n-r)!
Conjunction
P^Q It is true only when both are true otherwise false.
N-position
Position that is winning for the next lpayer
P-position
Position that is winning for the previous player
Premises
Preceding statements in an argument.
n factorial
Product of all the integers from 1 to n.
Proof Template 11:
Proof by Contrapositive To prove "If A, then B": Assume (not B) and work to prove (not A).
Proof Template 17
Proof by Induction. To prove every natural number has some property. Proof. Let A be the set of natural numbers for which the result is true. Prove that 0 belongs in A. This is called the basis step. It is usually easy. Prove that if K belongs to A, then k+1 belongs to A. This is called the inductive step. To do this we -Assume that the result is true for n = k. This is called the induction hypothesis. -Use the induction hypothesis to prove the result is true for n = k + 1. We invoke Theorem 22.2 to conclude A = N. Therefore the result is true for all natural numbers.
Proof Template 12:
Proof by contradiction To prove "If A, then B": We assume the conditions in A. Suppose, for the sake of contradiction, not B. Argue until we reach a contradiction. =><= (=><= means Therefore the supposition (not B) must be false. Hence B is true.)
What proof method would you use to show that the square root of 2 is irrational?
Proof by contradiction.
Proof Template 14
Proving Uniqueness. To Prove there is at most one object that satisfies conditions: Proof: Suppose there are two different objects, x and y, that satisfy conditions. Argue to a contradiction.
Proof Template 20
Proving a function is one-to-one. To show that f is one-to-one: Direct Method: Suppose f(x) = f(y)...Therefore x = y. Therefore f is one-to-one. Contrapositive method: Suppose x not equal to y...Therefore f(x) not equal to f(y). Therefore f is one-to-one. Contradiction Method: Suppose f(x) = f(y) but x not equal to y....=><= Therefore f is one-to-one.
Proof template 21
Proving a function is onto. To show f: A -> B is onto: Direct method: Let b be an arbitrary element of B. Explain how to find/construct an element a belongs to A such that f(a) = b. Therefore f is onto. Set Method: Show that the sets B and im f are equal.
Proof Template 13
Proving that a set is empty. To prove a set is empty: Assume the set is nonempty and argue to a contradiction.
Direct Proof
Proving the conditional statement p → q where the first step is the assumption that p is true; subsequent steps are constructed using rules of inference, with the final step showing that q must also be true. It shows that a conditional statement p → q is true by showing that if p is true, then q must also be true, so that the combination p true and q false never occurs.
R^-1 is an inverse relation of R when...
R^-1 = {(y,x): (x,y) in R}
Equivalence Relations
Relations that are reflexive, symmetric, and transitive
What are the steps of Kruskal's algorithm?
Remember to list the order in which edges are added.
Balanced
Root m-ary tree of height h is balanced if all leaves are at levels h or h-1
Contradiction Rule
Say if p the statement is false and can prove it's contradiction then you can prove p is true.
Universal Statement
Says that a certain property is true for all elements in a set. Example: All positive numbers are greater than zero.
Conditional Statement
Says that if one thing is true, then some other thing also has to be true. Example: If 378 is divisible by 18, then it is also divisible by 6.
If 30 elements are divided between four categories, what can be deduced?
Since 30 = 4 x 7 + 2, at least one category must contain at least 8 elements. (We have one more element that we need to prove this.)
Solve: ¬( 1 ≤ x ≤ 3)
Since this actually converts to 1 ≤ x ∧ x ≤ 3 the negation is: 1 > x ∨ x > 3
If proving a strong induction statement related to the recurrence relation u_n=u_(n-2)+u_(n-5), how many initial statements would you need to show are correct?
Six
Degree Sum Theorem
Sum of all degrees of vertices = 2*|E(G)| Proof: Let's count the number of incident pairs of edges and vertices. Vertex V belongs to degree(V) pairs, and these pairs are unique to V, so the number of incident pairs is the sum of the degrees. Each edge in the graph also belongs to two incident pairs - one for each vertex, so the number of incident pairs is 2E.
Converse
Suppose a conditional statement of the form "If p then q" is given. The converse is "if q then p."
Inverse
Suppose a conditional statement of the form "If p then q" is given. The inverse is "if ~p then ~q."
Symmetry
Symmetry often thought of as a property some geometric object possesses. More formally its an operation defined as follows. A symmetry of X is an isometry f, if for X ⊆ R², then f(X) = X.
1
T
F → F
T
F → T
T
F ↔ F
T
F ∨ T
T
F ⊕ T
T
T ^ T
T
T → T
T
T ↔ T
T
T ∨ F
T
T ∨ T
T
T ⊕ F
T
What is the Chinese Postman problem?
The Chinese Postman has to find the shortest route around a graph visiting every edge at least once and returning to the start.
Fibonacci numbers
The Fibonacci numbers are list of integers (1,1,2,3,5,8,...) = (Fo, F1,F2,...) where Fo=1, F1=1, and Fn = F(n-1) + F(n-2), for n >= 2.
How do we know that any number N > 1 can be expressed as a unique product of prime numbers?
The Fundamental Theorem of Arithmetic states that any number N > 1 can be expressed as a unique product of prime numbers.
The Fundamental Theorem of Arithmetic states that
The Fundamental Theorem of Arithmetic states that any number N > 1 can be expressed as a unique product of prime numbers.
What do we know about the number of odd vertices in any graph, and why?
The Handshaking Lemma states that the number of odd vertices in a graph must be even.
What is the Travelling Salesman Problem?
The Travelling Salesman has to visit every vertex and return to the start by the shortest possible route.
Power Set
The _______ of A, denoted by P(A), is given by P(A) = {x | x is subset or equal to A} and represents the collection of all possible subsets of a set.
How do you test for divisibility by 11?
The alternating sum of its digits is divisible by 11. e.g. 3942985: 3 - 9 + 4 - 2 + 9 - 8 + 5 = 2 which is not divisible by 11.
Hypothesis
The antecedent proposition in a conditional statement.
predicate calculus
The area of logic that deals with predicates and quantifiers
Propositional variable
The basis for propositional logic, the propositional variable is a symbol representing a proposition. The symbols we traditionally use are p, q, r, s, t. Truth values of T or F are assigned to these variables.
Proposition 20.2:
The boolean formulas a -> b and (a or not b) -> FALSE are logically equivalent. Proof. Build a truth table to see that they both are logically equivalent. Therefore a -> b = (a or not b) -> FALSE.
Cardinality
The cardinality of a set A is the number of elements in A. Denoted by |A|.
Resolvent
The conclusion of the resolution inference rule.
Converse
The conditional statement q→p.
Inverse
The conditional statement ¬p→¬q.
Contrapositive
The conditional statement ¬q→¬p.
Conclusion
The consequence of a hypothesis in a conditional statement.
Domain
The domain of f, denoted dom f = {x: ∃y (x, y) ∈ f}.
The complement of G is...
The graph G' which has the same set of vertices as G, but edges that exist in G do not exist in G', and vice versa.
Image
The image of f, denoted im f = {y: ∃x (x, y) ∈ f}.
binary search tree
The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with keys greater than the node's key. Both the left and right subtrees must also be binary search trees.
De Morgan's Laws
The negations of "and" is "or" and vice versa.
Neighborhood in graph G
The neighborhood of x in V(G) is all v in V(G) s.t. x~v (x is adjacent to v)
How do you test for divisibility by 8?
The number formed by the last three digits is divisible by 8.
How do you test for divisiblity by 4?
The number formed by the last two digits is divisible by 4.
Degree of a vertex (in an undirected graph)
The number of edges incident with it (include loops)
Degree-sum formula
The number of vertices times the degree of each vertex all divided by 2
The principle of inclusion and exclusion
The principle that the cardinal its of sets may have too many terms so some may be included and some may be excluded
Universal Generalization
The process of picking an abstract variable to represent all of the elements in the DOD. To prove ∀x(P(x)→Q(x)), we must show that the statement P(x)→Q(x) is true for every element in the domain of discourse. We pick some arbitrary c belonging to the domain of discourse that accurately represents any element for the domain of discourse.
The Handshaking Lemma states that...
The sum of degrees of the vertices of a graph is twice the number of edges.
What does it mean to say vertices a and b are adjacent?
There is an edge directly connecting a and b.
Nonsubset A (not) _C_ B
There is at least one element x, such that x [- and x (not) [- B.
Edges
Tree with n vertices has n-1 edges, ath from one vertex to another; connects its endpoints (two vertices)
Independence
Two events A and B are independent if P(A ∩ B) = P(A)P(B)
Isomorphic graphs
Two graphs which contain the same number of vertices connected in the same way.
Co-prime
Two integers a and b are said to be _______ provided gcd(a,b) = 1.
Logical equivalence
Two propositions P and Q are logically equivalent iff P↔Q ≡ T, or the biconditional is a tautology.
Equality
Two sets A and B are said to have _______, denoted by A=B, provided A c B and B c A.
Set Equality
Two sets are equal if they contain the same elements. Important proof technique.
Graph
Two sets, V(G) are the vertices, E(G) are the edges. A graph is represented as G = ( V(G), E(G) )
Logically Equivalent
Two statements are logically equivalent if, and only if, they have identical truth values for each possible substitutions of statements for their statement variables.
Adjacent (neighbors, undirected graph)
Two vertices that are endpoints of an undirected edge
Proof by contraposition
We assume the negation of the conclusion is true and deduce the negation of the hypothesis is true. ¬q→¬p ≡ p→q.
Vacuous Proof
We can quickly prove that a conditional statement p → q is true when we know that p is false, because p → q must be true when p is false. Consequently, if we can show that p is false then we have proven p → q. Ex: the proposition P(0) is true, where P(n) is "If n > 1, then n2 > n" and the domain consists of all integers. We can prove this by noting that for P(0), p is false and thus P(0) is automatically true.
Event
We have a sample space (S, P). Then an event A is a subset of S. A ⊆ S.
Big O Notation
We have two functions f, g: N → R. Then we say f ∈ O(g(n)) if there is some M for which |f(n)| ≤ M|g(n)|.
Big Omega Notation
We have two functions f, g: N → R. Then we say f ∈ Omega(g(n)) if for some M, M|g(n)| ≤ f(n).
Big Theta Notation
We have two functions f, g: N → R. Then we say f ∈ Θ(n) if there is some A, B where A|g(n)| ≤ f(n) ≤ B|f(n)|.
How does strong induction differ from weak induction?
Weak induction proves that a statement is true for n = k + 1 if the statement is true for n = k. Strong induction proves that a statement is true for n = k + 1 if the statement is true for n ≤ k. For strong induction you may have to prove more than just n = 1 for the first step.
Chinese Postman Problem
What is the least cost walk that traverses every edge and begins and ends at the same vertex? Identify pairs of odd vertices, find shortest path in between them, add it, perform Fleury's
Traveling Salesman Problem
What is the least cost walk that traverses every vertex and begins and ends at the same vertex? Nearest Neighbor Heuristic, or exhaustive enumeration
When finding the closed form for u(n+2) = a x u (n+1) + b x u(n), if the auxilliary equation gives a repeated solution k, how do you proceed?
When finding the closed form for u(n+2) = a x u (n+1) + b x u(n), if the auxilliary equation gives a repeated solution k, use the form u_n = c1 x k^n + c2 x n x k^n.
Quantifiers
Words that refer to quantities such as "some" or "all" and tell for how many elements a given predicate is true.
Proof of divisibility of sums of digits
Write as 10^p*a_p + 10^(p-1)*a_(p-1)+.... First prove that 10^j is congruent to 1 (mod divisor) using induction on j. This way you can simplify the (number mod divisor) to just the sum of the digits, and then go from there.
domain
X in f : X -> Y
codomain
Y in f: X -> Y
If ax + by = c has solutions x = p and y = q, what is the general solution and what condition exists to use this technique?
You must divide the original equation by gcd(a,b). Assuming this has been done, the general solution is given by x = p + kb and y = q - ka. It is easy to slip up here so check that your solution works for 1-2 values of k.
universal statement
a certain property is true for all elements in a set
(Walks) A cycle is...
a closed walk of at least three vertices where the only repeated vertex is the start vertex
set
a collection of elements usualy denoted with capital letters
set
a collection of objects (order is not taken into account)
A tree is...
a connected forest
Hamiltonian cycle
a cycle that contains every vertex in a graph exactly once except for the starting and ending vertex
Euler cycle
a cycle that includes all of the edges and all of the vertices of a graph
simple cycle
a cycle with no repeating vertices except for the beginning and ending vertex
Pascal's Identity
(n choose k) = ((n-1) choose k) + ((n-1) choose (k-1))
A circuit is...
A circuit is a trail which starts and ends at the same vertex.
Biconditional of p and q.
"p if, and only if q" p<-->q Only true if the both have the same truth values including if they both are false then they are true.
Biconditional Statements
"p if, and only if, q" is denoted as p <-->. It is true if both p and q have the same truth values and is false if p and q have opposite truth values.
Proposition 18.1
((n multichoose k)) = ((n-1 multichoose k)) + ((n multichoose k-1))
Theorem 18.8
((n multichoose k)) = (n + k -1 multichoose k) = (n choose k)
Fallacy of Affirming the Conclusion
((p → q) ∧ q) → p is not a tautology because it is false when p is false and q is true. Ex: If you do every problem in this book, then you will learn discrete mathematics.You learned discrete mathematics. Therefore, you did every problem in this book. This is not a tautology because you may have learned discrete mathematics from some other source.
Fallacy of Denying the Hypothesis
((p → q)∧¬p)→¬q is not a tautology because it is false when p is false and q is true. Ex: If you do every problem in this book, then you will learn discrete mathematics. You did not do every problem in this book.. Therefore, you did not learn discrete mathematics. This is not a tautology because you may have learned discrete mathematics from some other source.
Ordered Pair
(a,b) = (c,d) means that a=c and b=d
If something is a tree, that implies....
* G is connected and acyclic * G is connected and every edge of G is a cut edge * G is connected and |E(G)| = |V(G)|-1 * Between any two vertices there is a unique path * it's bipartite
A Hamiltonian path is.... A Hamiltonian cycle is....
...a path that passes through all the vertices of G ...a cycle that passes through all the vertices of G
A walk is... Length of a walk is... A closed walk is...
...a sequence of vertices ...the number of edges traversed during the walk ...a walk that begins and ends at the same vertex
Two numbers are relatively prime if...
...their gcd = 1
0 ^ 0
0
0 ^ 1
0
0 ∨ 0
0
0 ⊕ 0
0
1 ^ 0
0
1 ⊕ 1
0
0 ∨ 1
1
0 ⊕ 1
1
1 ^ 1
1
1 ∨ 0
1
1 ∨ 1
1
|A union B union C|
= |A| + |B| + |C| - |A intersect B| - |A intersect C| - |B intersect C| + |A intersect B intersect C|.
|A union B|
= |A| + |B| - |A intersect B|
Direct Proof
1. Express the statement to be proven 2. Start the proof by supposing x is a particular but arbitrary chosen element of D for which the hypothesis is true. 3. Show that the conclusion Q(x) is true by using definitions, previously established results, and the rules for logical inference.
Contraposition Proof
1. Express the statement to be proven. 2. Rewrite the statement in the contrapositive form. 3. Prove the contrapositive by a direct proof.
De Morgan's Laws
1. The negation of an and statement is logically equivalent to the or statement in which each component is negated. 2. The negation of an or statement is logically equivalent to the and statement in which each component is negated.
Critical Path Scheduling Algorithm
1. find the task that heads a critical path in the order-requirement graph. If there is a tie, choose the lowest task number 2. place task found in step one at the head of the priority list 3. remove the task along with edges leading up to the vertices once you have completed step two, obtaining a new critical path within the ordered-requirement graph 4. If there are no vertices left in the new ordered requirement digraph, the process is complete; if there are vertices left go back to step one.
Assumptions
1. when a professor starts a task, it will be completed without interruption 2. any professor can work on any of the tasks 3. NO professor could be voluntarily idle 4. order-requirement graph is used to show the task order and has the tasks time ordered/highlighted within each vertex 5. priority lists arrange the tasks in order, independent of the order requirements, used to break ties if more than one task is ready
A complete graph K_n has how many edges?
1/2 x n(n-1)
If 120 elements are divided between 10 categories, what can be deduced?
120 = 11 x 10 + 10, so at least one category must contain at least 12 elements. (We have nine more elements that we need, but this is not enough to prove that at least one category must contain at least 13 elements, which is quite obviously not the case).
Number of subsets of a relation A of size n and another B of size m for A xB
2^(m*n)
x is even iff
2|x
Proof by Contradiction
A form of indirect proof that establishes the truth or validity of a proposition by showing that the proposition being false would imply a contradiction. Suppose we want to prove that a statement p is true. Furthermore, suppose that we can find a contradiction q such that ¬p → q is true. Because q is false, but ¬p → q is true, we can conclude that ¬p is false, which means that p is true. Because the statement r ∧¬r is a contradiction whenever r is a proposition, we can prove that p is true if we can show that ¬p → (r ∧¬r) is true for some proposition r. Ex: Show that at least four of any 22 days must fall on the same day of the week. Solution: Let p be the proposition "At least four of 22 chosen days fall on the same day of the week." Suppose that ¬p is true. This means that at most three of the 22 days fall on the same day of the week. Because there are seven days of the week, this implies that at most 21 days could have been chosen, as for each of the days of the week, at most three of the chosen days could fall on that day. This contradicts the premise that we have 22 days under consideration. That is, if r is the statement that 22 days are chosen, then we have shown that ¬p → (r ∧¬r). Consequently, we know that p is true.We have proved that at least four of 22 chosen days fall on the same day of the week.
Bijection
A function f is a bijection if it is both one to one and onto.
One-to-one
A function f is called one-to-one provided that, whenever (x,b) (y,b) belongs to f, we must have x=y. In other words, if x not equal y, then f(x) not equal f(y). Note: Let f be a function. The inverse relation, f inverse, is a function if and only if f is one-to-one.
One - to - One
A function f is one to one if (a, c), (b, c) ∈ f → a = b.
Bijection/1-1 Correspondence
A function f: A -> B is said to set a _______ provided f is 1-1 and onto.
Simple graph
A grap in which each edge connects two different vertices adn where no two edges connect the same pair of vertices
A subgraph of G is...
A graph all of whose vertices and edges are in G.
A graph has an Eulerian circuit if and only if...
A graph has an Eulerian circuit if and only if it has no odd vertices (and is connected.) aka Eulerian.
A graph has an Eulerian trail if and only if...
A graph has an Eulerian trail if and only if it has exactly two odd vertices (and is connected.) aka Semi-Eulerian
K-colorable
A graph is k-colorable if it has a proper k-coloring
A graph is planar if...
A graph is planar if it can be drawn without any crossing edges.
(Graphs) R-regular
A graph is r-regular if all the vertices in G have the same degree r.
Planar graph
A graph that can be embedded in the plane i.e. It can be drawn on the plane in such a way that it's edges intersect only at their endpoints; no edges cross each other
A path is...
A path is a walk with no repeated vertices.
Indirect Proof
A proof that assumes what needs to proved is NOT true and show that this leads to a contradiction of a known fact.
proposition
A proposition is a declarative sentencethat is either true or false.
Factorial
A quantity where n! = n(n-1)...(2)(1) if n > 0, and n! = 1 if n = 0.
Random Variable
A random variable X, is a function on a sample space (S, P) such that X: S → A, where A is some set.
Symmetric
A relation R on A is said to be _______ provided for any x, y belonging to A, if (x, y) belongs to R, then (y, x) also belongs to R.
Reflexive
A relation R on A is said to be _______ provided for every x belonging to A, (x, x) belongs to R.
Transitive
A relation R on A is said to be _______ provided for every x, y, z belonging to A, if (x, y) belongs to R and (y, z) belongs to R, then (x, z) also belongs to R.
Closure
A relation created with some quality (such as transitive, symmetric, or reflexive) that it changes the given relation to make fit with the rules of the quality
Function
A relation f is called a function provided(a,b) belongs to f and (a,c) belongs to f imply b = c.
Function
A relation is called a function f if (a,b), (a,c) ∈ f, then b = c. A function f between sets B and C is denoted as f: B → C.
Equivalence Relation
A relation on a set A is called an ________ provided R is reflexive, transitive, and symmetric.
Balanced m-ary tree
A rooted tree so that the subtrees at each vertex contain paths of approximately the same length (can differ by one level)
Predicate
A sentence that contains a finite number of variables and becomes a statement when specific values are substituted for the variables.
Statement
A sentence that is true or false but not both.
Statement
A sentence that is true or false, but cannot be both.
Sequence
A sequence is a function whose domain is either all the integers between two given integers or all the integers greater than or equal to a given integer.
Argument Form
A sequence of compound propositions involving propositional variables. It is valid no matter which particular propositions are substituted for the propositional variables in its premises, the conclusion is true if the premises are all true.
Argument
A sequence of statements that end with a conclusion. May be valid (true) or invalid (false).
Countably Infinite
A set A is said to be _______ provided A is in bijective correspondence with |N. f: A -> N, f is 1-1 and onto
Infinite
A set X is said to be _______ provided it is in 1-1 correspondence with its proper subset.
Finite
A set X is said to be finite provided there exists an n in N such that the function f: X -> {1, 2, 3..., n} is a bijection.
A set
A set is a specified unordered collection of elements
Proof
A set of mathematical arguments based on true statements/a valid argument that establishes the truth of mathematical statements.
Domain of discourse
A set or group of elements under consideration.
The Empty Set
A set with no elements is called _______ and is denoted by phi. _______ is a subset of every set.
Complete graph on n vertices
A simple graph that contains exactly one edge between each pair of distinct vertices
Bipartite
A simple graph that's vertex set V can be partitioned into two disjoint sets V1 and V2 such that every edge in the graph connects a vertex in V1 and in V2
Tautology
A statement form that is always true regardless of the truth values of the individual statements substituted for its statement variables.
Contradiction
A statement from that is false regardless of the truth values of the individual statements substituted for its statement variables.
Theorem
A statement that can be shown to be true based on either axioms/postulates or definitions. Generally stated as conditional statements.
Theorem
A statement that can be shown to be true. Usually reserved for statements that are considered to be at least somewhat important.
Conjecture
A statement that is being proposed to be a true statement, usually on the basis of some partial evidence, a heuristic argument, or the intuition of an expert. Many times they are shown to be false so they are not theorems. If a proof is found it becomes a theorem.
Contradiction
A statement that is false regardless of its truth values.
Tautology
A statement that is true regardless of its truth values.
Axiom/postulate
A statement we accept as true without proof/assumed to be true.
Conjecture
A statement we believe is true, but is yet unproven.
Contradictory Statement
A statement whose form is a contradiction.
Tautological Statement
A statement whose form is a tautology.
Predicate
A statement with variables. Eg. x^2=x
Corollary
A theorem that can be established directly from a theorem that has been proved. A theorem that is an immediate consequence (and perhaps special case) of another theorem.
Lemma
A theorem that is used to prove more profound theorems.
Rooted Tree
A tree in which one vertex has been designated as the root and every edge is directed away from the root
A tree is...
A tree is a graph which contains no cycles.
Tuples (lists)
A tuple is an ordered sequence of numbers. Closely related to permutations. If a list of length n is composed of m irreplaceable elements, then there are nPm ways to create a list. If elements are replaceable then there are n ^ (m) ways to create the list.
A walk is...
A walk is any sequences of adjacent edges
Set
A well-defined collection of objects.
DeMorgan's Laws
A-(B U C) = (A-B) intersect (A-C) A-(B intersect C) = (A-B) U (A-C)
Composite
An integer n is composite if, and only if, n>1 and n=rs for some integers r and s with 1<r<n and 1<s<n
Prime
An integer n is prime if, and only if, n>1 and for all positive integers r and s, if n=rs, then either or s equals n.
What does the Nearest Neighbour algorithm give us?
An upper bound for the Travelling Salesman problem.
∧
And (also called a conjunction)
Well - Ordering Principle
Any subset of the Natural numbers contains a least element.
Hexadecimal numbers
Base 16
Binary numbers
Base 2
If there are kn + 1 elements divided into n categories, what can be deduced and why?
By the Pigeonhole Principle, at least one category must contain at least k + 1 elements.
If there are n + 1 elements divided into n categories, what can be deduced and why?
By the Pigeonhole Principle, at least one category must contain at least two elements.
logically equivalent
Compound propositions that have the same truth values in all possible cases are called logically equivalent The compound propositions p and q are called logically equivalent if p↔q is a tautology. The notation p≡q denotes that p and q are logically equivalent.
Find the modular reciprocal of alpha
Either enumerate, or: 1) Show gcd(n,alpha) = 1 2) Solve the equation alpha*x + n*y = 1 by backsolving the gcd algorithm starting from 1 3) a^-1 is x
Contrapositive
Equivalent to a conditional statement "p-->q" If ~q --> then ~p.
Euclid's Lemma states that...?
Euclid's Lemma states that if a prime p | ab then either p | a or p | b.
How do we know that if prime p | ab then either p | a or p | b?
Euclid's Lemma states that if a prime p | ab then either p | a or p | b.
A is a proper subset of B. Means what?
Every element in A is in B but there is at least one element in B that is not in A.
A is a subset of B. Means what?
Every element in A is in B. Both have identical sets.
Fundamental Theorem of Arithmetic
Every integer greater than 1 is either prime or the product of prime factors. The prime factors are unique.
Corollary 21.2
Every integer is either even or odd. Proof. Let x be any integer. If x >= 0, then x belongs to N(natural numbers), so by propositon 21.1, x is either even or odd. Otherwise, x < 0. In this case -x > 0, so -x is either even or odd. (2 cases).
Full m-ary tree
Every internal vertex has exactly m children
M-ary tree
Every internal vertex has no more than m children
Argument Form translated to Tautology
Every line above horizontal bar would be separated by ∧. Horizontal bar a ∴ means "therefore" and is the same as →. After the ∴ is the conclusion. Ex: p p → q --------- ∴q Is the same as (p ∧ (p → q)) → q
Proposition 21.1
Every natural number is either even or odd. Proof. Suppose, for the sake of contradiction, that not all natural numbers are even or odd. Then there is a smallest natural number , x, that is neither even nor odd. Since x - 1 < x, we see that x -1 is a smaller natural number and therefore is not a counterexample to Proposition 21.1. Therefore x -1 is either even or odd. We consider both possibilities. (1) Suppose x - 1 is odd. Therefore x - 1 = 2a + 1 for some integer a. Thus x = 2a +1 = 2(a +1), so x is even =><= (x is neither even nor odd). (2) Suppose x - 1 is even. Therefore x - 1 = 2b for some integer b. Thus x = 2b + 1, so x is odd =><=(x is neither even or odd). In every case, we have a contradiction, so the supposition is false and the proposition is proved.
The well-ordering property
Every no empty set of positive integers has a least element
Well Ordering Principle
Every non empty subset of N has a smallest element
Well-Ordering Principle
Every nonempty set of natural numbers contains a least element.
F ⊕ F
F
T ⊕ T
F
If F is a function, F^-1 is a function iff
F is one-to-one and onto B.
We say F:A to B is a bijection iff
F is one-to-one and onto B.
What does Dijkstra's algorithm do?
Find the shortest path between two vertices.
Prim's algorithm
Finds Minimum Spanning Tree by adding the edge which connects to the nearest vertex to the current tree one at a time providing the edge would not form a cycle
How are the number of edges in G and G' related?
G' is the complement of G. The number of edges in G and G' sum to the number of edges in K_n where n is the number of vertices in G and G'.
Handshaking theorem
G=(V,E) undirected graph with m edges; 2m = sum of the deg(v) for each vertex in the graph
If x = a (mod m) and x = a (mod n) then
If x = a (mod m) and x = a (mod n) then x = a (mod mn)
Addition Property of Equality
If x=y, then x + z = y + z.
F(x)
If A and B are sets and F is a function from A to B, then given any element x in A, the unique element in B that is related to x by F is denoted as F(x), which is read "F of x"
Power Set
If A is a set, the power set of A is the set of all subsets of A.
Proposition 22.10
If a polygon with four or more sides is triangulated, then at least two of the triangles formed are exterior. Proof. Let n denote the number of sides of the polygon. We prove Proposition 22.10 by strong induction on n. Basis case: Since this result makes sense only for n >= 4, the basis case is n = 4. The only way to triangulate a quadrilateral is to draw in one of the two possible diagonals. Either way, the two triangles formed must be exterior. Strong Induction hypothesis: Suppose Proposition 22.10 has been proved for all polygons on n = 4,5,...,k sides. Let P be any triangulated polygon with k + 1 sides. We must prove that at least two of its triangles are exterior. Let d be one of the diagonals. This diagonal separates P into two polygons A and B where (this is key comment) A and B are triangulated polygons with fewer sides than P. It is possible that one or both of A and B are triangles themselves. We consider the cases where neither, one, or both A and B are triangles.
If a ≡ b (mod m) and d | a and b and m, and gcd(d,m) = 1 then
If a ≡ b (mod m) and d | a and b and m, and gcd(d,m) = 1 then a/d ≡ b/d (mod m/d)
If a ≡ b (mod m) and d | a and b and m, and gcd(d,m) ≠ 1 then
If a ≡ b (mod m) and d | a and b and m, and gcd(d,m) ≠ 1 then a/d ≡ b/d (mod m/(gcd(d,m))
If a ≡ b and c ≡ d (mod m) then the addition rule states that:
If a ≡ b and c ≡ d (mod m) then the addition rule states that a + c ≡ b + d (mod m)
If a ≡ b and c ≡ d (mod m) then the cross multiplication rule states that:
If a ≡ b and c ≡ d (mod m) then the cross multiplication rule states that ac ≡ bd (mod m)
If a ≡ b and c ≡ d (mod m) then the multiplication rule states that:
If a ≡ b and c ≡ d (mod m) then the multiplication rule states that ka ≡ kb (mod m)
If a ≡ b and c ≡ d (mod m) then the power rule states that:
If a ≡ b and c ≡ d (mod m) then the power rule states that a^n ≡ b^n (mod m) for all natural numbers N.
Zero Product Rule
If a*b=0, then a=0 or b=0 (or both).
Cancellation law
If a*c=b*c with c not 0, then a=b
Principle of Mathematical Induction
If for any statement involving a positive integer, n, the following are true: 1) The statement holds for n=1, and 2) Whenever the statement holds for n=k, it must also hold for n=k+1 Then, the statement holds for all positive integers, n.
If gcd(a,b)=d then gcd(a,a - qb) = ?
If gcd(a,b)=d then gcd(a,a - qb) = d
If gcd(a,b)=d then gcd(a,a - b) = ?
If gcd(a,b)=d then gcd(a,a-b) = d
Product notation
If m and n are integers and m<= n, the symbol n with n on top and below k=m, and a sub k on the right., which reads product from k equals m to n of a-sub-k., is the product of all the terms.
Negation
Let p be a proposition. ¬p is defined as taking on the opposite truth value assigned to p.
Conditional Probability
Let A and B be events. The probability of A given B has occurred is denoted as P(A|B), and P(A|B) = P(A ∩ B) / P(B).
Pigeonhole Principle ( Section 25)
Let A and B be finite sets and let f: A -> B. If |A| > |B|, then f is not one-to-one. If |A| < |B|, then f is not onto.
Set Difference
Let A and B be sets. A - B = {x: x ∈ A and x ∉ B}. The set of elements in A but not in B.
Symmetric Difference
Let A and B be sets. A ∆ B = (A - B) ∪ (B - A)
Intersection
Let A and B be sets. The intersection of A and B (A ∩ B), is the set of elements in A and B.
Union
Let A and B be two sets. The _______ of A and B, denoted by A u B = {x | x belongs to A or x belongs to B}
Cardinality
Let A be a finite set. The _______ of A is the number of elements in A. It is denoted by |A|.
Equivalence Class
Let A be a non-empty set and R be an equivalence relation on A. Let x be any arbitrary element of A. Then the _______ of x, denoted by [x] = {a belongs to A | (x, a) belongs to R}
Relation
Let A be any non-empty set. A _______ on A is a subset of A x A.
How do we find the closed form of the recurrence relation u(n+1) = p un + q?
Let un = c x p^n + d. Then u(n+1) can be expressed in the same form and combined with the recurrence form.
The universal quantification ∀xP(x)= For all values of x in the domain, P(x) is true
Let P(x) is "x + 1 > x", domain is all real numbers, we have ∀xP(x) is true
If we found a value of x in that domain but P(x) is false, we call that an counterexample
Let P(x) is "x2> 0", domain is all integer, find the counterexample of xP(x)! n Because if x = 0, P(x) is false, so "x = 0" is the counterexample
Uniqueness quantifier ∃!: There is exactly one
Let P(x) is "x>8", domain is all one-digit integer, ∃!xP(x) is true
Relation Properties
Let R be a relation defined on set A. [Reflexive] If for all x ∈ A, we have x R x. [Irreflexive] ∀x ∈ A, we have x Rnot x. [Symmetric] ∀x, y ∈ A, then x R y → y R x [Antisymmetric] ∀x, y ∈ A, then (x R y ∧ y R x) → x = y [Transitive] ∀x, y, z ∈ A, then x R y ∧ y R z → x R z
Inverse Relation
Let R be a relation. Then R⁻¹ = {(b, a): (a,b) ∈ R}. The inverse relation is created by reversing all the ordered pairs in R.
Proposition 20.1:
Let R be an equivalence relation on a set A and let a, b belong in A. If a (is not related to) B, then [a] union [b] = empty set (0).
Proof to Proposition 20.1:
Let R be an equivalence relation on a set A and let a, b belong to A. We prove that the contrapositive of the statement. Suppose [a] union [b] not equal empty set. Thus there is an x belongs to [a] union [b]; that is, x belongs to [a] and x belongs to [b]. Hence x R a and x R b. By symmetry a R x, and since x R b, by transitivity we have a R b.
Equivalence Class
Let R be an equivalence relation on the set A. Also let a ∈ A. Then [a] is an equivalence class such that [a] ={x: x R a and x ∈ A}. In other words [a] is the set of elements in A related by R.
Disjoint
Let U be a non-empty set. Two subsets A and B are said to be _______ provided A n B = the empty set.
Permutation
Let X be a finite set. A _______ of X is a bijective function f: X->X (1-1 correspondence).
LCM
Let a and b be two integers. The _______ of a and b is a common multiple of a and b such that if h is any other common multiple of an and b, the _______ is less than or equal to h.
GCD
Let a and b belong to set Z, both values unequal to zero. An integer g is called the _______ of a and b provided g|a and g|b and if c is any other divisor of a and b, c<=g.
Prime
Let a be an integer. a is prime if a > 1, and if a's only divisors are itself and 1.
Composite
Let a, b be integers. a is composite if there is some b|a where 1 < b < a.
Euclid's GCD Algorithm/find GCD(a,b)
Let a>=b; a>0; b>0. Let c = a mod b. If c = 0 return b otherwise compute gcd(b,c)
Proposition 21.3
Let n be a positive integer. The sum of the first n odd natural numbers is n^2. The first n odd natural numbers are 1,3,5,...,2n-1. The proposition claims that 1+3+5+...+(2n-1) = n^2 or in sigma notation, (2k-1) = n^2, from k=1 to n. Example, n = 5, 1+3+5+7+9 = 25 = 5^2. Proof. Suppose the proposition is false. This means that there is a smallest positive integer x for which the statement is false; that is, 1+3+5+...+(2x-1) not equal x^2. Note that x not equal 1 because the sum of the first 1 odd numbers is 1 = 1^2. (this is the basis step.) So x > 1. Since x is the smallest number of which Proposition 21.3 fails and since x > 1, the sum of the first x -1 odd numbers must equal (x-1)^2; that is, 1+3+5+...+[2(x-1) - 1] = (x-1)^2. We add one more term to both sides of the equation because the left-hand side is one term short of the sum of the first x odd numbers giving us: 1+3+5+...+[2(x-1)-1] + (2x-1) = (x-1)^2 + (2x-1). RHS expands to: (x-1)^2 + (2x-1) =(x^2 - 2x +1) + (2x -1) = x^2. Contradicting 1+3+5+...+(2x-1) not equal x^2.
Direct conditional
Let p and q be propositions. p→q is the direct conditional statement such that if p ≡ T and q ≡ F, then p→q ≡ F; otherwise, p→q ≡ T.
Disjunction
Let p and q be propositions. p∨q is false whenever both p and q are false, but true otherwise.
Exclusive-or
Let p and q be propositions. p⊕q is true whenever exactly one proposition is true. Otherwise, p⊕q ≡ F, meaning p and q have exactly the same true value.
Permutations
Order matters. Formula: n!/(n-k)!
Proof Template 15
Proof by smallest counterexample First, let x be a smallest counterexample to the result we are trying to prove. It must be clear that there can be such as x. Second, rule out x being the very smallest possibility. This(usually easy) step is called the basis step. Third, consider an instance x prime of the result that is "just" smaller than x. Use the fact that the result for x prime is true but the result for x is false to reach a contradiction =><=. Conclude that the result is true.
Proof Template 18is
Proof by strong induction. To prove every natural number has some property: Proof. Let A be the set of natural numbers for which the result is true. Prove that 0 belongs to A. This is called the basis step. It is usually easy. Prove that if 0,1,2...,k belongs to A, then k + 1 belongs to A. This is called the inductive step. To do this we -Assume that the result is true for n = 0,1,2,...,k. This is called the strong induction hypothesis. -Use the strong induction hypothesis to prove the result is true for n = k + 1. Invoke Theorem 22.9 to conclude A = N. Therefore the result is true for all natural numbers.
Proof Template 16
Proof by the Well-Ordering Principle. To prove a statement about natural numbers: Proof. Suppose, for the sake of contradiction, that the statement is false. Let X be a subset of N be the set of counterexamples to the statement. Since we have supposed the statement is false, X not equal empty set. By the Well-Ordering Principle, X contains a least element, x. (Basis step): We know that x not equal 0 because show that the result holds for 0; this is usually easy. Consider x - 1. Since x > 0, we know that x - 1 belong in N and the statement is true for x - 1 (because x -1 < x). From here we argue to a contradiction, often that x both is and is not a counterexample to the statement. =><=
Proposition 20.3: No integer is both even and odd.
Re-express in if-then form, "If x is an integer, then x is not both even and odd." Let x be an integer. Suppose, for the sake of contradiction, that x is both even and odd. Since x is even, we know 2|x; that is, there is an integer a such that x = 2a. Since x is odd, we know that there is an integer b such that x = 2b + 1. Therefore, 2a = 2b + 1. Dividing both sides by 2 gives a = b + 1/2 so a - b = 1/2. Note that a - b is an integer (since a and b are integers) but 1/2 is not an integer. =><= Therefore x is not both even and odd, and the proposition is proved.
What are the steps for the Nearest Neighbour algorithm?
Remember to list the order in which the edges are added.
How can this English sentence be translated into a logical expression? "You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old."
Solution:Let q,r, and s represent "You can ride the roller coaster," "You are under 4 feet tall," and "You are older than 16 years old," respectively. Then the sentence can be translated to (r∧¬s)→¬q.
Contrapositive
The contrapositive of a conditional statement of the form "if p, then q," is "if ~q then ~p." Symbolically: The contrapositive of p --> q is ~q --> ~p.
The degree of a vertex is...
The degree of a vertex is the number of edges it has. A loop counts twice.
Domain
The domain of the predicate variable is the set if all values that may be substituted in place of the variable.
Conclusion
The final proposition in an argument.
p = (1+2 = 3) VS p = 1+2 = 3
The first one says that 1 + 2 equals 3 is the proposition p. The second says that p = 3; it is a quantity not a proposition that 1+2 equals 3.
What is the first step for finding a closed form of the recurrence relation u(n+2) = a x u (n+1) + b x u(n)?
The first step for finding a closed form of the recurrence relation u(n+2) = a x u (n+1) + b x u(n) is solving the auxilliary equation k^2 - ak - b = 0.
Domain
The set of all values that can be put in place of the predicate variables. Eg. predicate: x^2=x domain: {x ε R}
Axioms/Postulates
The statements used in a proof. An elementary mathematical truth that is assumed self-evident and not in need of proof.
Counterexample
To disprove a statement, find a value of x in D for which the hypothesis P(x) is true and the conclusion Q(x) is false. Such an x is called an counterexample.
p only if q
To remember that "p only if q" expresses the same thing as "if p, then q," *Note that "p only if q" says that p cannot be true when q is not true. => ¬q→¬p p: "you are a member of the team" q: "you take afternoon classes" p→¬q : "your are a member of the team only if you don't take afternoon classes"
Proof Template 19
To show f: A -> B. To prove that f is a function from a set A to a set B: -Prove that f is a function. -Prove that dom f = A. -Prove that im f is a subset of B.
Internal vertices
Vertices that have children
Trivial Proof
We can also quickly prove a conditional statement p → q if we know that the conclusion q is true. By showing that q is true, it follows that p → q must also be true. Ex: The propositionP(0) is "If a ≥ b, then a^0 ≥ b^0." Because a^0 = b^0 = 1, the conclusion of the conditional statement "If a ≥ b, then a^0 ≥ b^0" is true. Hence, this conditional statement, which is P(0), is true.
Direct proof
We prove p→q based on assuming p, the hypothesis, is true and deducing q, the conclusion, is true. Based on hypothetical syllogism.
Congruence Modulo n
We say a ≡ b mod n if n | (a - b). Note that this is an equivalence relation.
When finding the closed form for u(n+2) = a x u (n+1) + b x u(n), if the auxilliary equation gives complex solutions, how do you proceed?
When finding the closed form for u(n+2) = a x u (n+1) + b x u(n), if the auxilliary equation gives complex solutions, the closed form is given by un = r^n (c1 cos (nθ) + c2 sin(nθ))
Hypothetical Syllogism
[(p→q)∧(q→r)]→(p→r)
Resolution
[(p∨q)∧(¬p∨r)]→(q∨r)
Modus Ponens
[p∧(p→q)]→q
Modus Tollens
[¬q∧(p→q)]→¬p
Identity elements
a + 0 = a a * 1 = a
Proof by Contradiction
a type of indirect proof, if we want to prove p is true, we can do this by showing that -p -> (r^-r)
Proposition
a declarative sentence that is either true or false, but not both (a sentence that declares a fact), questions, equations, and commands are not propositions
Circular Reasoning
a fallacy arises when a statement is proved using itself, or a statement equivalent to it
Algorithm
a finite sequence of precise instructions for performing a computation or for solving a problem
tree
a graph in which there exists a unique, simple path between any two vertices
A connected graph is...
a graph which for all pairs of vertices in G, there exists a path between them
connected graph
a graph with a path between every pair of vertices
A forest is...
a graph with no cycles
Positive integers
a is a positive integer iff a>0
Lemma
a less important theorem that is helpful in the proof of other results
edge
a line relating vertices in a graph
vertex
a node in a graph
adjacency matrix
a representation of a graph in which element (i,j) is the number of edges incident on i and j, or twice the number of loops from i to j if i = j
incidence matrix
a representation of a graph in which element(i,j) is a 1 if edge j is incident on vertex i, and 0 otherwise
combination
a selection of objects with no regards to order
statement(proposition, clame)
a sentents that is true or false but not both
path
a sequence of edges and vertices connecting two vertices
Path
a sequence of edges that begins at a vertex of a graph and travels from vertex to vertex along edges of the graph, visits the vertices along this path
argument
a sequence of statements aimed at demonstrating the truth of an assertion
Argument
a sequence of statements that end with a conclusion, a sequence of propositions
Geometric Progression
a sequence of the form a, ar, ar^2, ...,ar^n
subsequence
a sequence retaining only certain terms from another sequence, while maintaining their order
relation
a set of ordered pairs connecting two sets
A relation on set A is...
a set of ordered pairs, and the set is a subset of A x A/elements of the ordered pairs are in A
ordered pair
a set of two elements (a, b) which is distinct from (b, a)
graph
a set of vertices and edges such that each edge is associated with an unordered pair of vertices
subset
a set which contains only elements of another set
Null Set
a set with no elements, { }
Singleton Set
a set with one element
Euler Circuit
a simple circuit containing every edge of G
Euler Path
a simple path containing every edge of G
A spanning tree is....
a spanning subgraph that is also a tree
Minimum Spanning Tree
a spanning tree in a connected weighted graph that has the smallest possible sum of weights of its edges
Theorem
a statement that can be shown to be true
negation
a statement that excaclly expresses the opposite truthe
theorem
a statement that has been proved (or proven) true
A component is... A trivial component is...
a subgraph induced by an equivalence class of the is-connected-to relation ...a component with no edges
Subgraph
a subgraph is a graph contained inside another graph
spanning tree
a subgraph which is also a tree, containing every vertex of the original graph
Bit
a symbol with two possible values, namely 0 and 1
Critical Path Scheduling
a systematic method of choosing/creating a priority list, L, that yields optimal or nearly optimal solution/schedule
An Eulerian trail is.... A graph has an Eulerian trail iff...
a trail that hits every edge ...the # of odd degree vertices is less than or equal to 2
rooted tree
a tree in which a particular vertex is given significance
Proof by Contraposition
a type of indirect proof, makes use of the fact that the conditional statement is equivalent to its contrapositive, i.e. p->q can be proved by showing that -q -> -p is true. We take -q as a premise here
depth-first search
a type of search which proceeds to successive levels in a tree at the earliest possible opportunity
Proof
a valid argument that establishes the truth of a theorem
countexexample
a value for which a universal statement id false
Quantification
a way to create a proposition from a propositional function
Associative Properties
a+(b+c)=(a+b)+c a*(b*c)=(a*b)*c
Commutative Properties
a+b=b+a a*b=b*a
Commutative laws
a+b=b+a and a*b=b*a
Arithmetic Progression
a, a + d, a + 2d, ... , a + nd, where a is the initial term and d is the common difference
ancestor
any vertex in the path from a vertex to the root of the tree
Pairwise relatively prime
b1,b2,...,bn gcd(b1,bn)=1 gcd(b2,b3)=1 gcd(bi,bj)=1 i not equal to j
↔
biconditional
if a finite number of allements can often prove by
exhasting all posibilities
set-roster
explicit listing of elements of a set
q unless ¬p
expresses the same conditional statement as "if p, then q," note that "q unless ¬p" means that if ¬p is false, then q must be true. That is, the statement "q unless ¬p" is false when p is true but q is false, but it is true otherwise. Consequently,"q unless ¬p" and p→q always have the same truth value.=> p→q
A k-coloring of G is a function... It's proper if... A graph is k-colorable if... The chromatic number of G is....
f:V(G) to {1,2...k} if for all xy in E(G), f(x) is not equal to f(y) if a graph has a proper k-coloring, we call it k-colorable the smallest k for which the graph is k-colorable. χ(G) ≥ ω(G),
converse error
fallacy of affirming the consequent
Goals of Bin Packing
find the minimum # of bins different weights packed into different bins (located differently)
Direct proof
first step is assumption that the hypothesis is true, following steps constructed using rules of inference
Fibonacci Sequence
fn = fn-1 + fn-2
Euler's formula
for a connected planar graph with e edges, f faces, and v vertices: f = e - v + 2
Let R be a relation. We say R is complete if...
for all (x,y) in A s.t. x is not equal to y, (x,y) and/or (y,x) in R.
A relation on set A is reflexive iff
for all x in A, (x,x) is in the relation.
A relation on set A is irreflexive iff
for all x in A, (x,x) is not in the relation.
Let G be a graph, S a subset of V(G). S is a clique if... ω(G)
for every pair of vertices x,y in S, xy is in E(G) ω(G) is size of the largest clique
Let G be a graph, S a subset of V(G). S is a independent set if... α(G)
for every pair of vertices x,y in S, xy is not in E(G) α(G) is size of the largest independent set
We say F is an injective/one-to-one function iff
if (x,y) in F and (z,y) in F imply x=z
A relation on set A is symmetric iff
if (x,y) in R, then (y,x) in R
<=>
if and only if abiimplication
(Graphs) Cycle (C_n)
graph for which every vertex is degree 2 and has n vertices
(Graphs) Bipartite
graphs for edges only exist between two distinct partitions of V
Reflexive
if (a,a) is a member of the set for every element a in the set
Symmetric
if (b, a) is in the relation as well as (a, b)
A relation on set A is antisymmetric iff
if (x,y) and (y,x) in R, x=y
A relation on set A is transitive iff
if (x,y) and (y,z) in R, (x,z) in R
Let R be a relation. We say R is intransitive if...
if (x,y) and (y,z) in R, then (x,z) not in R
Let R be a relation. We say R is circular if...
if (x,y) and (y,z) in R, then (z,x) in R
spanning subgraph
let G and H be graphs. We call G a spanning subgraph of H provided G is a subgraph of H and V(G) = V(H) so only edge deletions are allowed on spanning subs a graph G has 2^|E(G)| spanning subgraphs
Triangle Inequality
let a,b in R. then |a|+|b|>=|a+b|
divisibility
let n,d e z, then d|n <=> k e z s,t, n= dk
index
number describing the location of a term in a sequence
n!
number of ordered selections of n objects with no repetitions
n!/(n1! ... nt!)
number of ordered selections of n objects with repetitions described by the set (n1 ... nt)
C(k+t-1,t-1)
number of unordered selections of k elements, repetitions allowed, from among t items
C(n,r)
number of unordered selections of r objects from a set of n objects with no repetitions
substring
obtained by selecting some or all consecutive elements of a string
Conjunction
p ^ q, "p and q", true when both p and q are true, false otherwise
Translate: p is sufficient for q
p → q
Translate: p only if q
p → q
Hypothetical syllogism - Inference Rule
p → q q → r --------- ∴p → r Ex: If it rains today, then we will not have a barbecue today. If we do not have a barbecue today, then we will have a barbecue tomorrow. Therefore, if it rains today, then we will have a barbecue tomorrow.
Conditional Statement/Implication
p → q, p implies q, "if p, then q," p is called the hypothesis, q is called the conclusion
Conditional statement (implication)
p →q = proposition that is false when p is true and q is false, and is true otherwise.
Translate: p is necessary and sufficient for q
p ↔ q
Biconditional Statement
p ↔ q, "p if and only if q," true when p and q have the same truth values, and false otherwise, also called bi-implications
Biconditional statement (bi-implications)
p ↔q = proposition that is true when p and q have the same truth values, and is false otherwise.
Simplification - Inference Rule
p ∧ q --------- ∴ p Ex: It is below freezing and raining now. Therefore, it is below freezing now.
Disjunctive syllogism - Inference Rule
p ∨ q ¬p --------- ∴ q
Resolution - Inference Rule
p ∨ q ¬p ∨ r --------- ∴ q ∨ r
Disjunction
p ∨ q, "p or q", false when p and q are false and true otherwise
Exclusive or
p ⊕q = "only p or only q" = proposition that is true when exactly one of p and q is true and is false otherwise.
conjunction of p and q.
p^q.
Idempotent Laws
p∨p≡p p∧p≡p
Idempotent laws
p∨p≡p p∧p≡p
Disjunction
p∨q= "p or q" = proposition that is false when both p and q are false, and is true otherwise.
Commutative Laws
p∨q≡q∨p p∧q≡q∧p
Commutative laws
p∨q≡q∨p p∧q≡q∧p
Negation Laws
p∨¬p≡T p∧¬p≡F
Negation laws
p∨¬p≡T p∧¬p≡F
equivalence relations
relations which are reflexive, symmetric, and transitive
Dependent Tasks
relies on one or more tasks in order to be done
modd(remainder%) and div(round division no remainder)
remander 59 = 7(8)+3 59 div 7 = 8 59 mod 7 = 3 59= 3(mod7)
critical row
row in witch all premises are true
Boolean searches
searches employing techniques from propositional logic, connective AND is used to match records that contain both of two search terms, etc.
Summation Notation
sigma, used to sum from the lower limit to the upper limit all of the terms in the sequence, j is called the index of summation
Let T be a set. The powerset of T, 2^T is... Its cardinality is...
the set of all subsets of T (including the empty set). its cardinality is 2^|T|
Relation R from A to B
subset of AxB. Given an ordered pair (x,y) in AxB, x is related to y by R, written x R y, if, and only if, (x,y) is in R. The set A is called the domain of R and the set B is called the co-domain.
Prove sqrt(p) is irrational
suppose sqrt(p) = m/n in lowest terms (coprime). this implies gcd(m,n)=1. pn^2=m^2, thus p|m.... show that p|n, thus violates assumption that m/n is in lowest terms.
Generalized Multiplication Principle
suppose we want to make a list of length p and there are n_1 choices for the first element, n_2 choices for the second element.... then the # of possible lists is n_1 * n_2 * ...
OR gate
takes two input signals p and q, each a bit, and produces as output the signal p ∨ q
Universal quantification
tells us that a predicate is true for every element under consideration
Existential quantification
tells us that there is one or more element under consideration for which the predicate is true.
Four Color Theorem
the chromatic number of a planar graph is no greater than 4
Let A be a nonempty set, let P be a subset of the powerset of A. P is a partition of A if...
the elements of P are nonempty pairwise disjoint and their union is A. the elements are called parts
Conclusion
the final proposition of an argument
inverse
the function f^-1: Y -> X in relation to the one-to-one, onto function f: X -> Y
Let xy in E(G). G-xy is...
the graph created by deleting xy notice that the vertices x and y remain!
(Sets) A is disjoint from B iff...
the intersection of A and B is the empty set. (the empty set is disjoint from all sets)
Chromatic Number
the least number of colors needed for coloring of this graph, chi
Decreasing time Algorithm
the list processing algorithm applied to a list of task times arranged in order of non-increasing size is called, decreasing-time-list algorithm.
When is the schedule OPTIMAL?
the longest path in an order-required graph is the critical path the earliest time to complete the job is made up of all the tasks lengths of the longest path in the order-required graph
Worst Fit
the next weight to be packed is placed into the bin with the largest amount of space available, if the object doesn't fit in the bin, open a new one.
Chromatic Number
the number of colors you have achieved the goal with
degree
the number of edges incident on a vertex
Degree of a Vertex
the number of edges indecent with it, except that a loop contributes twice
length
the number of elements in a string x, denoted |x|
range
the set of y in Y such that f(x) = y for some x in X
Vertex Coloring
the vertex coloring problem for a graph requires assigning each vertex to a color, such that two vertices that are joined by an edge ARE NOT the same color
parent
the vertex directly above another vertex in a rooted tree
child
the vertex directly below another vertex in a rooted tree
First Fit
the weight to be packed is placed in the lowest numbered bin (already opened) in which it will fit. If it cannot be fit in ANY of the bins, you may open a new bin
Exhaustive Proof
theorems proved by examining a relatively small number of examples if that is possible
a|b iff
there exists integer c such that b=ac
x is odd iff
there exists integer y such that x=2y+1
Let F be a function and x an object. We say F is defined on x if...
there exists unique object y such that F(x) = y
Goals
to minimize time minimize number of processors minimize idle time within the processors
proving uniqueness
to prove uniqueness show that two posible values must be equal
truth table
tool for organizing truth values of compound statements
Chinese Remainder Theorem Problem
use definition of mod for first equation, plug into subsequent equations, solve up to last equation, where you solve normally. remember that there are multiple solutions if they don't ask for a single solution
inclusive or
use of or to mean one , the other , or both`
Set
used to group objects together, often have similar properties but not always; unordered collection of objects called elements or members of the set, said to contain its elements a (little e) A -- a in the set A
Venn Diagrams
used to represent sets graphically, the rectangle represents the universal set U
Informal Proofs
where more than one rule of inference may be used in each step, where steps may be skipped, where the axioms being assumed and the rules of inference used are not explicitly stated
x is prime iff
x is greater than 1 and the only positive factors of x are 1 and itself
x is composite iff
x is greater than 1 there exists an integer t such that t|x and 1<t<x
x (not) [- S
x is not an element of S
Distributive Property
x(y + z) = xy + xz
Set Roster Notation
{1,2,3}
Set Builder Notation
{x ε s | P(x)}
(Sets) Inclusion-Exclusion Principle
|A U B| = |A| +|B|-|A intersect B|
If every equivalence class of a relation R has the same size m, then the # of distinct equivalence classes is...
|A|/m
cardinality
|X| = the number of elements in X
Negation Order
~ ^ or --> <-->
Negation of a Universal Statement
~((upside down A)x [- D , Q(x)) = (Backwards E)x [- D, such that ~Q(x)
invers of p->q
~p->~q
negation for p.
~p. Not p.
contro positive of p->q
~q->~p
Negation of an Existential Statement
~~((Backwards E)x [- D, such that Q(x) = (upside down A)x [- D , ~Q(x))
De Morgan's Laws
¬(p∧q)≡¬p∨¬q ¬(p∨q)≡¬p∧¬q
De Morgan's Laws.
¬(p∧q)≡¬p∨¬q ¬(p∨q)≡¬p∧¬q
Double Negation Law
¬(¬p)≡p
Double negation law
¬(¬p)≡p
Inverse
¬p → ¬q, equivalent to the converse
Negation
¬p, "it is not the case that p", read "not p"
Modus tollens - Inference Rule
¬q p → q --------- ∴¬p
Translate: p unless q
¬q → p You will die unless you take your medicine. q is taking your medicine, p is dying. If you take your medicine you may still die. If you don't you will die.
Contrapositive
¬q → ¬p, equivalent to the original statement
Negation of quantified expression
¬∃xP(x) ∀x¬P(x) ¬∀xP(x) ∃x¬P(x) (De Morgan's laws for quantifiers)
RSA Steps
ϕ(p): totient function, denotes how many numbers are relatively prime to p. will be p-1 when p is prime Z^*_ϕ(pq): all numbers in Z_ϕ(pq) that are relatively prime to ϕ(pq) 1) Pick two large primes, p and q. n=pq 2) Pick relative prime to (p-1)(q-1). This is e. Find mod inverse of this prime in Z_(p-1)(q-1). This is d. ENCRYPTION: 1) Break up word into letters, assign numbers to each letter 2) Encrypt using function: M^e mod n DECRYPTION: N^d mod n