1
Logi Lo gica call Opera Operato tors rs p
∨ q
(1)
is False when Both p and q are False; True otherwise
p
∧ q
(2)
is True when Both p and q are True; False otherwise
p
⊕ q
(3)
is True when exactly one is True; False otherwise
p
→ q
(4)
Can be read as ”p only if q”
• is False when p is True and q is False; True otherwise • True when both p and q are True • True when p is False (q doesn’t matter) matter) • is False when p is True and q is False • if ¬ p is False, then q must be True q unless ¬ p and p → q have the same truth value Assume
p Converse q
→ q
(5)
→p
Contrapositive
¬q → ¬ p
• Same truth value as p → q • False only when ¬ p is False and ¬ q is True Inverse ¬ p → ¬q p
↔ q
• True when p and q have same truth value 1
(6)
• True when p → q is True and q → p is True; False otherwise Tautology is a proposition that is always True Contradiction is a proposition that is always False
2
Logic Log ical al Equi Equiv valenc alencie iess Identity Laws Domination Laws Idempotent Commutative Associative Distribution Absorption Negation (Complement)
2.1
∧T≡p ∨F≡p ∨T≡T ∧F≡F ∧ p ≡ p ∨ p ≡ p ∨ q ≡ q ∨ p ∧ q ≡ q ∧ p ∨ q ) ∨ r ≡ p ∨ (q ∨ r) ∧ q ) ∧ r ≡ p ∧ (q ∧ r) ∨ (q ∧ r) ≡ ( p ∨ q ) ∧ ( p ∨ r) ∧ (q ∨ r) ≡ ( p ∧ q ) ∨ ( p ∧ r) ∨ ( p ∧ q ) ≡ p ∧ ( p ∨ q ) ≡ p ∨ ¬ p ≡ T ∧ ¬ p ≡ F
Logical Logical Equiv Equivalenci alencies es With With Conditio Conditional nal Statemen Statements ts
( p ( p ( p ( p
2.2
p p p p p p p p ( p ( p p p p p p p
→ → → →
p q p q p q q p p q p q p q p q p q p q ( p p q q ) ( p q ) p q q ) ( p r) p (q r ) r) (q r) ( p q ) r q ) ( p r) p (q r ) r) (q r) ( p q ) r
→ ≡¬ ∨ → ≡ ¬ →¬ ¬ → ≡ ∨ →¬ ≡ ¬ ∨¬ ∨ ≡¬ → ∧ ≡ ¬ →¬ ¬ → ≡ ∧¬ ∧ → ≡ → ∧ → ≡ ∨ ∨ → ≡ → ∨ → ≡ ∧
∧ → ∨ →
Logical Logical Equiv Equivalenci alencies es with with Biconditio Biconditionals nals
↔ q ≡ ( p → q ) ∧ (q → p) p ↔ q ≡ ¬ p ↔ ¬q p ↔ q ≡ ( p ∧ q ) ∨ (¬ p ∧ ¬q ) ¬( p ↔ q ) ≡ ( p ↔ ¬q ) p
2
2.3 2.3
De-M De-Mor orga gan’ n’ss Laws Laws
¬( p ∧ q ) ≡ ¬ p ∨ ¬q ¬( p ∨ q ) ≡ ¬ p ∧ ¬q 3
Quan Quanti tifie fiers rs
3.1
Unive Universa rsall Quantifi Quantifier er
∀
(7)
• It is read as ”For all”. So ∀x means ”For all x” • The statement ∀xP ( xP (x) is the same as the conjunction P ( P (x ) ∧ P ( P (x ) ∧ · · · ∧ P ( P (x ). • Can be distributed over a conjunction (∧), but can not be distributed over a disjunction(∨). – Meaning ∀x(P ( P (x) ∧ Q(x)) ≡ ∀xP ( xP (x) ∧ ∀xQ xQ((x)) 1
2
n
3.2
Existe Existent ntial ial Quantifi Quantifier er
∃ (8) • It is read as ”There exists”. So ∃x means ”There exists an x” • Similarly the statement ∃xP ( xP (x) is the same as the disjunction P ( P (x ) ∨ P ( P (x ) ∨ · · · ∨ P ( P (x ) • Can be distributed over a disjunction(∨), but can not be distributed over a conjunction(∧). – Meaning ∃x(P ( P (x) ∨ Q(x)) ≡ ∃xP ( xP (x) ∨ ∃xQ xQ((x)) 1
n
2
Statement xP ( xP (x) xP ( xP (x)
When is it True? P(x) is True for all x Ther Theree is an x for whic which h P(x P(x) is True rue
∀ ∃
4 4.1
When is it False There is an x for which P(x) is False P(x) P(x) is False alse for for every ery x
Othe Other r Quan Quanti tifie fiers rs Unique Uniqueness ness Quantifi Quantifier er
∃! ∃
Denoted by ! or P(x) is true.”
(9)
∃ . ∃!xP ( xP (x) states that ”There exists a unique x such that 1
3
4.2
Negati Negating ng Quan Quantifi tified ed Expres Expressio sions ns
Nega Negati tion on
¬∃xP ( xP (x) ¬∀xP ( xP (x) 5
De Morgans’s Laws for Quantifiers Equi Equiv valen alentt Stat Statem emen entt When When is Nega Negati tion on True? rue? x P ( P (x) For every x, P(x) is Fals alse
∀¬ ∃x¬P ( P (x)
Rules ules of Infe Infere renc nce e Rule of Inference p p q ∴ q q p q ∴ p p q q r ∴ p q p q p ∴ q p q ∴ p p q ∴ p q p q p r ∴ q r
→ ¬ → ¬ → → → ∨ ¬ ∧
∧ ∨ ¬ ∨ ∨
6
There is an x for which P(x) is False
When When False alse?? The There is an an x for for whic which P(x) is True P(x) is True for every x.
Tautology ( p ( p q )) ))
∧ →
→ q
¬ ∧ → q )))) → ¬ p
( q ( p
(( p
→ q ) ∧ (q → r)) → ( p → r) (( p
∨ q ) ∧ ¬ p) p) → q
∧ q ) → p (( p) )) → ( p ∧ q ) p) ∧ (q )) ( p
(( p
∨ q ) ∧ (¬ p ∨ r)) → (q ∨ r)
Rules Rules of Infer Inferenc ence e for Quan Quantified tified Stat Stateme emen nts
Universal Instantiation is the rule of inference used to conclude that P ( P (c)
is true where c is a particular member of the domain, given the premise xP ( xP (x).
∀
Universal Generalization is the rule of inference that states that
∀xP ( xP (x) is
true, given the premise that P ( P (c) is true for all elements c in the domain. It is used when we show that xP ( xP (x) is true by taking an arbitrary element c from the domain and showing that P ( P (c) is true. The element c that we select must be an arbitrary, and not a specific, element of the domain.
∀
4
Existential Instantiation is the rule that allows us to conclude that there is
∃
an element c in the domain for which P ( P (c) is true if we know that xP ( xP (x) is true. We cannot select an arbitrary arbitrary value value of c here, but it must be a c for which P ( P (c) is true. Existential Generalization is the rule of inference that is used to conclude
that xP ( xP (x) is true when a particular element c with P ( P (c) true is known. That is if we know one element c in the domain for which P ( P (c) is true, then we know that xP ( xP (x) is true.
∃
∃
Rule of Inference xP ( xP (x) ∴ P ( P (c) P ( P (c) for an arbitrary c ∴ P ( P (x) xP ( xP (x) ∴ P ( P (c) for some element c P ( P (c) for some element c ∴ xP ( xP (x)
Name Universal Instantiation
∀ ∃
Universal Generalization
∀
Existential Instantiation Existential Generalization
∃
7
Pro ofs
Common terminology Theorem a statement that can be shown to be true Proposition ”less important” theorem. Proof a valid argument that establishes the truth of a theorem. Axioms statements that are used in a proof. They are assumed to be true. Lemma ”less important” theorem that is helpful in the proof of other results.
7.1 7.1
Types ypes of Proo Proofs fs
Direct Proof of a conditional statement p
→ q
• First step is the assumption that p is true. • Then use the rules of infrence to get to q must also be true. • With most direct proofs you will see that they are straightforward, using a fairly obvious sequence of steps to get to the conclusion.
¬q → ¬ p • They use the fact that p → q is equivalent to its contrapositive ¬q → ¬ p • So the hypothesis is that ¬q is true
Proof by Contraposition Prove
5
• Then get to the conclusion that ¬ p is true as well using axioms, definitions, initions, and previously proven proven theorems theorems with the rules of inference inference
¬ → q
Proofs by Contradiction Prove p
• Suppose you want to prove the statement p is true, and 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.
• Since r ∧ ¬r is a contradi contradiction, ction, we can prove that p is true if we can show that ¬ p → (r ∧ ¬r) is true from some proposition r 8
Sets Sets,, Fun Funct ctio ions ns,, Sequen Sequence ces, s, and and Sums Sums
8.1
Set s Notes
• A set is an unordered collection of objects. • The objects in a set are called the elements or members of the set. • Normally lower case letters are used to denote the elements of a set. • The order in which the elements of a set are listed doesn’t matter. • A special set that has no elements is called the Empty Set and is denoted by ∅ • A set with one elements is called a Singleton Set • A common error is to confuse the empty set, ∅ with the singleton singleton set, {∅} – The single element of the set {∅} is the empty set itself. • When we wish to emphasize that a set A is a subset of the set B but that A = B, we write A ⊂ B and say that A is a proper set of B. For A ⊂ B to be true, it must be the case that A ⊆ B and there must exist an element x of B that is not an element of A.
• A way to show that two sets have the same elements is to show that each set is a ubset of the other. So if we can show that if A and B are sets with A ⊆ B and B ⊆ A then A = B . • The Power Set of a set S , has as its members all the subsets of S . • If a set has n elements then it’s power set has 2 elements • The order of elements in a collection is often important, since sets are n
unorded, a dfferent structure is needed to represent ordered collections. This is proveded by ordered n- tuples. 6
• Two ordered n-tuples are equal if and only if each corresponding pair of
their elements is equal. So (a ( a1 , a2 , . . . , an ) = (b1 , b2 , . . . , bn ) if and only if ai = bi
Definitions
• Two sets are equal if and only if they have the same elements. That is if A and B are sets, then A and B are equal if and only if ∀x(x ∈ A ↔ x ∈ B ) we write A = B if A and B are equal sets.
• The set A is said to be a subset of B if and only if every element of A is also an element of B . This is writt written en by: by: A ⊆ B .This s true only when ∀x(x ∈ A → x ∈ B) is true. • Every nonempty set S is guaranteed to have at least two subsets, the empty set and the set S itself. For every set S the following following is always always true:
∅ ⊆ S – S ⊆ S –
• A is the proper subset of B (A ⊂ B) if: ∀x(x ∈ A → x ∈ B) ∧ ∃x(x ∈ B∧x∈ / A) • Let S be a set. set. If there there are exac exactl tly y n distinct elements in S where n is a nonnegative integer we say that S is a finite set and that n is the cardinality of S . The cardinality of S is denoted by |S | • Given a set S , the Power Set of S is the set of all subsets of the set S . The power set of S is denoted by P ( P (S )
• the ordered n-tuple (a , a , . . . , a ) is the ordered collection collection that has a 1
n
2
1
as its first element and a2 as its second element, . . . , and an as its nth element.
• 2-tuples are called ordered pairs. • Let A and B be sets sets.. The The Cartesian Cartesian Product Product of A and B . denote denoted d A × B is the set of all ordered pairs (a, ( a, b), where a ∈ A and b ∈ B . Hence, A × B = {(a, b)|a ∈ A ∧ b ∈ B } • A subset R of the Cartesian Cartesian product A × B is called a relation from the set A to the set B . The element elementss of R are ordered pairs, where the first element belongs to A and the second to B .
• Given a predicate P and a domian D, we define the Truth Set of P to be the set of elements x in D for which P ( P (x) is true, and is denoted by {x ∈ D|P ( P (x)} 7
Set Notation with Quantifiers If we restrict the domain of a quantified
∀ ∈
statement explicitly by making use of a particular notion, for example x S (P ( P (x)) denotes the universal quantification of P ( P (x) over all elements in the set S , which is short hand for x(x S P ( P (x)). Similarly x S (P ( P (x)) denotes the existential quantification of P ( P (x) over all elements in S . Whic Which h is short short hand for x(x S P ( P (x))
∀
∃
8.2 8.2
∈ →
∃ ∈
∈ ∧
Set Set Operat Operatio ions ns Notes
• An element x belongs to the union of the sets A and B if and only if x belongs to A or x belongs to B .
• An element x belongs to the difference of A and B if and only if x ∈ A and x ∈ / B. • An element belongs to A if and only if x ∈/ A • Set identities can be proved using Membership Tables. We consid consider er each combination of sets that an element can belong to and verify that elements in the same combination of sets belong to beth the sets in the identity identity.. To indicate indicate that an element element is in a set use the number 1, and the number 0 when it is not a member.
• We can extend the notation we have for unions and intersections to other families of sets. Using the notation A ∪ A ∪ · · · ∪ A = A to denote ∞
1
n
2
i
i=1
the union of the sets A1 , A2 , . . . , An , . . . . . . .
∞
For the intersection of theses sets: A1 A1 , A2 , . . . , An , . . . . . .
8
∩A ∩ · · · ∩A 2
n
=
A for the sets i
i=1
Definitions
• Let A and B be sets. The Union of the sets A and B, denoted by A ∪ B , is the set that contains those elements that are either in A or in B , or in both. Which is written by: A ∪ B = {x|x ∈ A ∨ x ∈ B } • Let A and B be sets. The Intersection of the sets A and B, denoted by A ∩ B , is the set that conatins those elements that are in both A and B . Which is written by: {x|x ∈ A ∧ x ∈ B } • Two sets are called disjoint if their intersection is the empty set. • the Principle of inclusion-exclusion is the generalization of |A ∪ B| = |A| + |B| − |A ∩ B | to unions of an arbitrary number of sets. • Let A and B be sets. The Difference of the A and B, denoted by A − B ,
is the set containing those elements that are in A but not in B . The difference of A of A and B is also called the Complement of B with respect to A. This tells us that A B = x x A x / B
−
{| ∈ ∧ ∈ }
• Once the universal set U has been specified specified the complement of a set can be defined by the following:
– Let U be the universal set. The Complement of the set A, denoted by A is the Compliment of A with respect to U . U . In other other words words,,
the compliment of the set A is U
−A – This is written by: A = {x|x ∈ / A} • The Union of a collection of sets is the set that contains those elements that are members of at least one set in the collection. The notation: n
∪ ∪···∪ A
A1 A2
n
=
A is denoting the union of the sets A , A , . . . , A . i
1
2
n
i=1
• the Intersection
of a collection of sets is the set that contains those elements that are member of all the sets in the collection. And is denoted n
by: A1
∩ A ∩ · ·· ∩ A 2
A1 , A2 , . . . , An .
n
A =
i
is denoting the intersection of the sets
i=1
9
Set Identities
Set Identities Name Identity A =A Identity Laws A U = A A U = U Domination Laws A = A A=A Idempotent A A=A Comple Complemen mentat tation ion law law (A) = A A B=B A Commutative A B=B A A (B C ) = (A Associative A (B C ) = (A A (B C ) = (A Distribution A (B C ) = (A A BA B De Morgan’s Laws A B=A B A (A B ) = A Absorption A (A B ) = A A A = U Complement A A=
∪∅ ∩ ∪ ∩∅ ∅ ∪ ∩ ∪ ∩ ∪ ∩ ∩ ∪ ∪ ∩ ∪ ∩ ∪ ∩
8.3 8.3
∪ ∩ ∪ ∩
∪ ∩
∩
∩ ∪
∪ B ) ∪ C ∩ B ) ∩ C ∩ B ) ∪ (A ∩ C ) ∪ B ) ∩ (A ∪ C )
∪
∅
Funct unctio ions ns Notes
• If we assign to each element of a set a particular element of a second set, it is called a Function.
• Functions are sometimes called Mappings or Transformations. • A relation from A to B is just a subset of A × B. A relation relation from from A to B that contains one, and only one, ordered pair ( a, b) for every element a ∈ A defines a function f from A to B . This functi function on is defined defined by the assignment f ( f (a) = b where (a, (a, b) is the unique ordered pair in the relation that has a as its first element.
• When we define a function we specify its domain, its codomain, and the mapping of elements of the domain to elements in the codomain.
• Two functions are equal when they have the same domain, codomain, and map elements of their common domain to the same elements in their common codomain.
• The notation f (S ) for the image of the set
S under the function f is potentially potentially ambiguous ambiguous.. Here, f ( f (S ) denotes a set, and not the values of the function f for the set S . 10
• Some functions functions never never assign the same value to two two different different elements. elements. These functions are said to be One-to-one.
• A function f is one-to-one if and only if f ( f (a) = f ( f (b) whenever a = b. This way of expressing that f is one-to-one is obtained by taking the contrapositive of the implication in the definition.
• We can express that f is one-to-one using quantifiers as ∀a∀b(f ( f (a) = f ( f (b) → a = b) • A function f is increasing if ∀x∀y(x < y → f (x) ≤ f ( f (y)), strictly increasing if ∀x∀y (x < y → f ( f (x) < f ( f (y )), decreasing if ∀x∀y (x < y → f ( f (x) ≥ f ( f (y )) and strictly decreasing if ∀x∀y (x < y → f ( f (x) > f (y )) • A function that is either strictly increasing or strictly decreasing must be one-to-one. Howeve Howeverr a function function that is increasing increasing,, but not strictly, strictly, decreasing, but not strictly, is not necessarily one-to-one.
• For some function functionss the range range and codomain codomain are equal. equal.
That That is, every every member of the codomain is the image of some element of the domain. Functions with this property are called onto functions.
• A function f is onto if ∀y∃x(f ( f (x) = y), where the domain of x is the domain of the function and the domain for y is the codomain of the function.
• Consider Consider a one-to-one correspondence f from the set A to the set B . Because f is an onto function, every element of B is the image of some element in A. Also Also since since f is also a one-to-one function, every element of B is the image of a unique element of A. Consequently, we can define a new function from B to A that reverses the correspondence given by f . f . −1
• Do not confuse the function f
with the function 1/f 1/f ,, which is the function that assigns to each x in the domain the value 1/f 1/f (x). The latt latter er makes sense only when f ( f (x) is a non-zero real number.
• If a function f is not a one-to-one correspondence, we can’t define an inverse function of f . f .
• A one-to-one correspondence is called invertible because we can define an inverse of this function.
• A function is not invertible it if is not a one-to-one correspondence, because the inverse of such a function does not exist.
• Sometimes we can restrict the domain or the codomain of a function, or both, to obtain an invertible function.
• f ◦ g is the function that assigns to the element a of A of A the element assigned by f to g (a). That is to find (f ( f ◦ g )(a )(a) we first apply the function g to a to obtain g (a) and then we apply the function f to result g(a). 11
• The composition f ◦ g can’t be defined unless the range of g is a subset of the domain of f . f .
• The commutative law does not hold for the composition of functions. • We can associate a set of pairs in A × B to each function from A to B . This set of pairs is called the graph of the function and is often displayed pictorially to aid in understand the behavior of the function.
• from the definition, the graph of a function f from A to B is the subset of A × B containing the ordered paris with the second entry equal to the element of B assigned by f to the first entry.
• Let x be a real number. The floor function rounds x down to the closes integer less that or equal to x.
• Let x be a real number. The ceiling function rounds x up to the closes integer great than or equal to x.
• The floor function is often also called the greatest integer function. and is often denoted by: [x]
Definitions
• Let A and B be nonempty sets. A Function f from A to B is an assign-
ment of exactly one element of B to each element of A. We write f ( f (a) = b if b is the unique element of B assigned assigned by the function function f to the element a of A. If f is a function from A to B we write f : A B.
→
• If f is a function from A to B, we say that A is the domain of f and B
is the codomain of f . f . If f ( f (a) = b, we say that b is the image of a and a is a preimage if b. The Range of f is the set of all images of elements of A. Also, if f is a function from A to B , we say that f maps A to B .
• Let f
and f 2 be functions from A to R. Then f 1 + f 2 and f 1 f 2 are also functions from A to R defined by: (f 1 + f 2 )(x )(x) = f 1 (x) + f 2 (x) (f 1 f 2 )(x )(x) = f 1 (x)f 2 (x) 1
• Let f
and f 2 be functions from A to the set B and let S be a subset of A. The Image of S under the function of f is the subset of B that consists of the images of the elements of S . We denote the image of S by f ( f (S ), ), so: f (S ) = t s S (t = f ( f (s)) The short hand is written: f ( f (s) s S 1
{ |∃ ∈ { | ∈ }
}
• A function f is said to be one-to-one or injective if and only if f ( f (a) =
f ( f (b) implies that a = b for all a and b in the domain of f . f . A functi function on is said to be an injection if it is one-to-one.
12
.
• A function f whose domain and codomain are subsets of the set of real number is called increasing if f ( f (x) ≤ f (y ) and strictly increasing if f ( f (x) < f (y ), whenever x < y and x and y are in the domain of f . f .
• A function f whose domain and codomain are subsets of the set of real number is called decreasing if f ( f (x) ≥ f ( f (y) and strictly decreasing if f ( f (x) > f (y ), whenever x > y and x and y are in the domain of f . f .
• A function f from A to B is called onto or surjective, if and only if for every element b ∈ B there is an element a ∈ A with f ( f (a) = b. A function f is called surjection if it is onto.
• The function f is a one-to-one correspondence or a bijection, if it is both one-to-one and onto.
• Let f be a one-to-one correspondence from the set A to the set B .
inverse function of f is the function that assigns to an element b The inverse belonging to B the unique element of a in A such that f (a) = b. The inverse function of f is denoted by f 1 . Hence f 1 (b) = a when f ( f (a) = b −
−
• Let g be a function from the set A to the set B and let f be a function from the set B to the set C . The composition of the functions f and g , denoted by f ◦ g is defined by (f ◦ g )(a )(a) = f ( f (g (a)) • Let f be a function from the set A to the set B. The graph of the function f is the set of ordered pairs {(a, b)|a ∈ A and f ( f (a) = b} • The floor function function assigns to the real number x the largest integer that is less than or equal to x. The value of the floor function at x is denoted by: x • The ceiling function assigns to the real number x the smallest integer that is greater than or equal to x. The value of the ceiling function at x is denoted by: x
13
Properties of the Floor and Ceiling Functions
• x = n if and only if n ≤ x < n + 1 • x = n if and only if n − 1 < x ≤ n • x = n if and only if x − 1 < n ≤ x • x = n if and only if x ≤ n < x + 1 • x − 1 < x ≤ x ≤ x < x + 1 • −x = −x • −x = −x • x + n = x + n • x + n = x + n 8.4
Sequenc Sequences es and Summat Summation ionss Notes
• When the elements of a set can be listed, the set is called countable. • A sequence is a discrete structure used to represent an ordered list. • The notation {a } is used to describe a sequence. • a represents an individual term of the sequence {a } • A geometric progression is a discrete analogue of the exponential funcn
n
n
tion f ( f (x) = arx.
• A arithmetic progression is a discrete analogue of the linear function f ( f (x) = dx + a
• Finite sequences sequences are also called strings. They are denoted by a a . . . a • The length of the string S is the number of therms in the string. • The empty string denoted by λ is the string that has no terms, and has 1
2
n
length zero.
• An infinite set is countable if and only if it is possible to list the ele-
ments of the set in a swquence. The reason for this is that a one-to-one correspondence f from the set of positive integers to a set S can be expressed in terms of a sequence a1 , a2 , . . . , an , . . . where a1 = f (1) f (1),, a2 = f (2) f (2),, . . . an = f ( f (n), . . .
14
Definitions
• A sequence is a function from a subset of the set of integers (Usually either the set {0, 1, 2, . . . } or the set {1, 2, 3, . . . }) to a set S . We use the
notation an to denote the image of the integer n. We call call an a term of the sequence. 2
n
• A geometric progression is a sequence of the form: a,ar,ar , . . . , a r , . . . . Where the initial term a and the common ratio r are real numbers.
• An arithmetic progression is a sequence of the form:
a, a + d, a+2d +2 d , . . . , a+ a+n d , . . . . Where the initial term a and the common
difference d are real numbers.
• If a and r are real numbers and r = 0 then: n
ar = j
j =0
+1
n
ar
a
r =1 r =1
if r 1 (n + 1)a 1)a if −
−
• Solving for S shows that if r = 1 then, S =
ar
+1
n
a
−
r−1
• The sets A and B have the same cardinality if and only if there is a oneto-one correspondence from A to B .
• A set that is either finite or has the same cardinality as the set of pos-
itive integers is called countable . A set that is not count countabl ablee is called called uncountable. When When an infinite infinite set set S is countable, we donote the cardinality of S by 0 . We write write S = 0 and say that S has cardinality ”aleph null.”
ℵ
|| ℵ
15
9
Inte Intege gers rs and and div divis isio ion n Notes
• a|b can be expressed expressed using quantifier quantifierss by ∃c(ac = b) Definitions
• If a and b are integers with a = 0 we say that a divides b if there is an integer c such that b = ac. ac. When a divides b we say that a is a factor of b and that b is a multiple of a. The notation a|b denotes that a divides b. We write a b b when a doesn’t not divide b.
• In the equality given in the division algorithm,
d is called the divisor a is called the dividend, q is called the quotient and r is called the remainder. This notation notation is used to express the quotient quotient and remainder. remainder. q = a div d, r = amod d.
• If a and b are integers and m is a positive integer, then a is Congruent to b modulo m if m divides a − b. The nota notatio tion n a ≡ b (mod m) to indicate that a is congruent to b modulo m. If a and b are not congruent b (mod m) modulo m, we write a ≡ Theorems
• The Division Algorithm: Let a be an integer and d be a positive integer. Then there are unique integers q and r with 0 ≤ r < d such that a = dq + dq + r • Let a, b, and c be integers. Then: – if a|b and a|c then a|(b + c); – if a|b then a|bc for all integers c; – if a|b and b|c then a|c; • Let a and b be integers and let m be a positive integer. Then a ≡ b (mod m) if and only if a mod m = b mod m.
• Let m be a positive positive integer. integer.
The integers integers a and b are congruent modulo m if and only if there is an integer k such that a = b + km. km.
• Let m be a positive integer, If a ≡ b (mod m) and c ≡ d (mod m) then: a + c ≡ b + d (mod m) and ac ≡ bd (mod m) Corollaries
• If a, b and c are integers such that a|b and a|c, then a|mb + nc whenever m and n are integers
• Let m be a positive integer and let a and b be integers. Then:
(a + b) mod m = ((a ((a mod m) + (b mod m)) mod m and ab mod m = ((a ((a mod m)(b )(b mod m)) mod m) 16
10
Prime Primess and and Great Greates estt Commo Common n Divi Diviso sors rs Definitions
• A positive integer p greater than 1 is called prime if the only positive
factors of p are 1 and p. A positiv positivee integ integer er that is greate greaterr than than 1 and is not prime is called composite.
• Let a and b be integers, integers, not both zero. The largest integer integer d such that d|a and d|b is called the greatest common divisor of a and b. The greatest common divisor of a and b is denoted by gcd(a gcd(a, b)
• The integers a and b are relatively prime if their greatest common divisor is 1.
• The integers a , a , . . . , a 1
2
are pairwise relatively prime if gcd(a gcd(ai , aj ) = 1 whenever 1 i < j n. n
≤
≤
• The Least common common multipl multiple e of the positive integers a and b is the
smallest smallest positiv p ositivee integer integer that is divisoble divisoble by both a and b. The The lea least st common multiple of a and b is denote by lmc(a, lmc( a, b).
Theorems
• The fundamental theorem of arithmetic says that every positive integer greater than 1 can be written uniquely as a prime or as the product or 2 or more primes where the prime factors are written in order of nondecreasing size.
• If n√ is a composite integer, then n has a prime divisor less than or equal to
n
• There are infinitely many primes • Prime Number theorem states that the ratio of the numbers of primes not exceeding x and x/lnx /lnx approaches 1 as x grows without bound.
• Let a and b be positive integers. Then
·
ab = gcd(a, gcd(a, b) lmc(a, lmc(a, b).
Notes
• The integer n is composite if and only if there exists an integer a such that a|n and 1 < a < n
17
11
Integ Integers ers and and Algor Algorit ithm hmss Definitions
• Base Conversion Conversion The algorithm for constructing the base b expansion on an integer n is given by first dividing n by b to obtain a quotient and remainder, n = bq 0 + a0 , 0 ao < b. b. The remainder a0 is the rightmost digit in the base b expansion of n of n. Next, divide q 0 by b to get q 0 = bq 1 + a1 , 0 a1 < b We see that a1 is the second digit from the right in the base b expansion of n. Continu Continuee this process, successively successively dividing the quotient quotientss by b, obtaining additional base b digits as the remainders. The process terminates when we obtain a quotient equal to 0.
≤
≤
Theorems
• Let b be a positive integer greater than 1. Then if n is a positive integer, it can be expressed uniquely in the form n=n b +a b +···+a b+a where k is a nonnegative integer, a , a , . . . , a are nonnegative integers 0. less than b, and a = k
k
k−1 0
k−1 1
1
0
k
k
This is called the base b expansion of n
Lemmas
• Let a = bq + bq + r, where a,b,q and a,b,q and r are integers. integers. Then gcd(a, gcd(a, b) = gcd(b, gcd(b, r ) Notes
• Choosing 2 as the base gives binary expansions of integers. • The base 16 expansion on an integer is called its hexadecimal expansion.
Usua Usually lly the the hexa hexade deci cima mall digi digits ts used used are: are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. Where the letters A through F represent the digits corresponding corresponding to the numbers 10 through through 15.
• Conversion between binary and hexadecimal expansions is easy because each hexadecimal digits corresponds to a block of 4 binary digits.
18
.
11.1 11.1
Applic Applicati ations ons of Num Number ber Theo Theory ry Definitions
• A congruence of the form ax ≡ b (mod m). where m is a positive integer, a and b are integers, and x is a variable, is called a linear congruence.
• Let b be a posit positiv ivee integ integer er.. If n is a com composi posite te positiv positivee integ integer, er, and b ≡ 1 (mod n), then n is called pseudoprime to the base b • A composite integer n that satisfies the congruence b ≡ 1 (mod n) for n−1
n−1
all positive integers b with gcd(b, gcd(b, n) = 1 is called a Carmichael number.
Theorems
• If a If a and b are positive integers, then there exist integers s and t such that gcd(a gcd(a,b) = sa + tb where s and t are integers. integers. In other words, gcd(a gcd(a,b) can be expressed as a linear combination with integer coefficients of a and b.
• Let m be a positive integer and let a, b and c be inte intege gers rs.. If ac ≡ bc mod(m mod(m) = 1, then a ≡ b mod(m mod(m). • If a and m are relatively prime integers and m > 1, then an inverse of a
modulo m exists. exists. This inverse inverse is unique modulo m. (Tha (Thatt is, there there is a unique positive integer a less than m that is an inverse of a modulo m and every other inverse of a modulo m is congruent to a modulo m).
• the Chinese Remainder Theorem says: says:
Let m1 , m2 , . . . , mn be pairwise relatively prime positive integers and a1 , a2 , . . . , an arbitrary integers then the system. x a1 (mod m1 ) x a2 (mod m2 ) .. .
≡ ≡
≡
x an (mod mn ) has a unique solution modulo m = m1 m2 . . . mn . (That (That is, there there is a solution x with 0 x < m, m , and all other solutions are congruent modulo m to this solution.)
≤
• Fermat’s Little Theorem states: states: If p is prime and a is an integer not divisible by p, then ≡ 1 (mod p) a Furthermore, for every integer a we have a ≡ a (mod p) p−1
p
Lemmas
• If a,b, and c are positive integers such that gcd(a,b) = a and a|bc then a|c. • If p is a prime and p|a a . . . a where each a in an integer, then p|a for 1
2
n
i
some i.
19
i
11.2 11 .2
Indu Induct ctio ion n Notes
• In general, general, mathemat mathematical ical induction can be used to prove prove statements statements that assert that P ( P (n) is true for all positive integers n, where P ( P (n) is a propositional function.
• A proof by induction has two parts: A basis step, where we show that P (1) P (1) is true and an inductive step where we show that for all positive integers k, if P ( P (k) is true, then P ( P (k + 1) is also true.
• The assumption that P ( P (k) is true is called the inductive hypothesis. 11.3 11 .3
Stro Strong ng Indu Induct ctio ion n Theorems
• A simple polygon with n sides, where n is an integer with n ≥ 3, can be triangulated into n − 2 triangles. Lemma
• Every Every simply polygon has an interior interior diagonal. Notes
• Strong Induction is often used when we cannot easily prove a result using regular induction.
• The basis step of a proof by strong induction is the same as a proof of the same result result using using regula regularr induct induction ion.. That That is, in a strong strong inductio induction n proof that P ( P (n) is true for all positive integers n, the basis step shows that P (1) P (1) is true. – However, the inductive step in theses two proof methods are different. In a regular induction, the inductive step shows that if the inductive hypothesis P ( P (k) is true, then P ( P (k + 1) is also true. – In a proof by strong induction, the inductive step shows that if
P ( P ( j) j ) is true for all positive positive integers not exceeding exceeding k, then P ( P (k + 1) is is true. true. That That is, for the inductive hypothesis we assume that P ( P ( j) j ) is true for j = 1, 1 , 2, . . . , k. k.
• Steps for Strong Induction. To prove that that P ( P (n) is true for all positive integers n, where P ( P (n) is a propositional function, we complete two steps: – Basis Basis Step. We verify that the proposition P (1) P (1) is true. – Inductive Inductive Step. We show that the conditional statement
∧
[P (1) P (1) P (2) P (2) is true for all positive integers k .
20
∧ · · · ∧ P ( P (k)] → P ( P (k + 1)
• The validity of both the principle of mathematical induction and strong
induction follows from a fundamental axiom of the set of integers, the wellordering property. It states that every every nonempty nonempty set of nonnegativ nonnegativee integ integers ers has a least least elemen element. t. It can be shown shown that the well-ordering property, the principle of mathemati mathematical cal induction, and strong strong induction induction are all equivalent.
• The well-ordering property states: Every nonempty set of nonnegative integers has a least element.
• The W.O.P can often be used directly in proofs. 11.4 11 .4
Coun Counti ting ng Definitions
• The Product Rule. Suppose that a procedure can be broken down into
a sequence sequence of two tasks. tasks. THe there are n1 ways to do the first task and for each of these ways of doing the first task, there are n2 ways to do the second task, then there are n1 n2 ways to do the procedure.
• The Sum Rule. If a task can be done either in one of n
ways or in one of n2 ways, where none of the set of n1 ways is the same as any of the set of n2 ways, then there are n1 + n2 ways to do the task. 1
Notes
• Many counting problems can’t be solved using just the sum or just the
product product rule. But many complica complicated ted countin countingg proble problems ms can be solve solved d using both of these rules in combination.
• If a task can be done in n
1 or n2 ways, but some of the set n1 is also in n2 , then adding the ways leads to an over count. So to correctly count the number of ways you add the number of ways to do it in one way( n1 ) to the number of ways to do it the second way ( n2 ), and then subtract the number of ways to do the task in a way that is in both sets ( n1 and n2 ). This is called the principle of inclusion-exclusion .
21
11.5 11.5
Pigeon Pigeonhol hole e Princi Principle ple Theorems
• Pigeonhole Principle. If k If k is a positive integer and k +1 or more object are placed in k boxes, then there is at least one box containing two or more objects.
• The Generaliz Generalized ed Pigeonho Pigeonhole le Principle Principle If N objects are placed into k boxes, then there is at least one box containing at least N/k objects. Corollary
• A function f from a set with k + 1 or more elements to a set with
k
elements is NOT one-to-one.
11.6 11.6
Perm Permuta utatio tions ns and Com Combin binati ations ons Definitions
• A Combinatorial Combinatorial proof of an identity is a proof that uses counting arguments to prove that both sides of the identity count the same objects but in different ways.
Theorems
• If n is a positive integer and r is an integer with 1 ≤ r ≤ n then there are P ( P (n, r) = n(n − 1)(n 1)(n − 2) . . . (n − r + 1) r-permautations of a set with n distinct elements.
• The number of r-combinations of a set with n elements, where n is a nonnonnegative integer and r is an integer with 0 ≤ r ≤ n equals n! C (n, r) = r!(n !(n − r )! Corollaries n! • If n and r are integers with 0 ≤ r ≤ n then P ( P (n, r) = (n − r)! • Let n and r be nonnegative integers with n ≤ n. Then C (n, r) = C (n, n − r)
22
11.7 11.7
Binomi Binomial al Coefficie Coefficient ntss Theorems
• The Binomial Theorem. Let x and y be variables, and let n be a nonnegative integer. Then
n
(s + y)
n = x
n−j j
n
j =0
=
n n n
0
x +
1
n−1
x
y+
n 2
n−2
x
y
k
2
y +
··· +
n n
xy
−1
n−1
+
n n
yn
• Pascal’s Identity. Let nand kbe positive positiv inte gers n eintegers with n ≥ k Then n+1 n = + . k k−1 k • Vandermonde’s Identity Identity. Letm, Letm, n and r be nonnegative integers with r not exceeding either m or n, then m+n = r
r
m n
−k k • Let n and r be nonnegative integers with r ≤n,then r
k=0
n+1 r+1
n
=
j
r
j =r
Corollaries
• Let n be a nonnegative integer. Then n
n = 2
k=0
n
k
• Let n be a postive integer. Then n
(−1) n = 0 k
k
k=0
• Let n be a nonnegative integer. Then n
2 n = 3 k
k=0
• If n is a nonnegativeinteger, then 2n = n
n
k=0
n
23
n
k
n
−k
n
n n = k
k=0
k
2