Contents
CHAPTER1 Counting31
1.1 Basic Counting31
The Sum Principle31
Abstraction33
Summing Consecutive Integers33
The Product Principle34
Two-Element Subsets36
Important Concepts, Formulas, and Theorems37
Problems38
1.2 Counting Lists, Permutations, and Subsets40
Using the Sum and Product Principles40
Lists and Functions42
The Bijection Principle44
k-Element Permutations of a Set45
Counting Subsets of a Set46
Important Concepts, Formulas, and Theorems48
Problems50
1.3 Binomial Coeffiients52
Pascals Triangle52
A Proof Using the Sum Principle54
The Binomial Theorem56
Labeling and Trinomial Coefficient58
Important Concepts, Formulas, and Theorems59
Problems60
1.4 Relations62
What Is a Relation?62
Functions as Relations63
Properties of Relations63
Equivalence Relations66
Partial and Total Orders69
Important Concepts, Formulas, and Theorems71
Problems72
1.5 Using Equivalence Relationsin Counting73
The Symmetry Principle
Equivalence Relations75
The Quotient Principle76
Equivalence Class Counting76
Multisets78
The Bookcase Arrangement Problem80
The Number of k-Element Multisets of an n-Element Set81
Usingthe Quotient Principle to Explain a Quotient82
Important Concepts, Formulas, and Theorems83
Problems84
CHAPTER2 Cryptography and Number Theory89
2.1 Cryptography and Modular Arithmetic89
Introduction to Cryptography89
Private-Key Cryptography90
Public-Key Cryptosystems93
Arithmetic Modulo n95
Cryptography Using Addition mod n98
Cryptography Using Multiplication mod n99
Important Concepts, Formulas, and Theorems101
Problems 102
2.2 Inverses and Greatest Common Divisors105
Solutions to Equations and Inverses mod n105
Inverses mod n106
Converting Modular Equations to Normal Equations109
Greatest Common Divisors110
Euclids Division Theorem111
Euclids GCD Algorithm114
Extended GCD Algorithm115
Computing Inverses118
Important Concepts, Formulas, and Theorems119
Problems120
2.3 The RSA Cryptosystem123
Exponentiation mod n123
The Rules of Exponents123
Fermats Little Theorem126
The RSA Cryptosystem127
The Chinese Remainder Theorem131
Important Concepts, Formulas, and Theorems132
Problems134
2.4 Details of the RSA Cryptosystem136
Practical Aspects of Exponentiation mod n136
How Long Does It Take to Use the RSA Algorithm?139
How Hard Is Factoring?140
Finding Large Primes140
Important Concepts, Formulas, and Theorems143
Problems144
CHAPTER3 Reflectionon Logic and Proof147
3.1 Equivalence and Implication147
Equivalence of Statements147
Truth Tables150
DeMorgans Laws153
Implication155
If and Only If156
Important Concepts, Formulas, and Theorems159
Problems161
3.2Variables and Quantifier163
Variables and Universes163
Quantifier164
Standard Notation for Quantificatio166
Statements about Variables168
Rewriting Statements to Encompass Larger Universes168
Proving Quantifie Statements Trueor False169
Negation of Quantifie Statements170
Implicit Quantificatio173
Proof of Quantifie Statements174
Important Concepts, Formulas, and Theorems175
Problems177
3.3 Inference179
Direct Inference Modus Ponens and Proofs179
Rules of Inference for Direct Proofs181
Contrapositive Ruleof Inference183
Proof by Contradiction185
Important Concepts, Formulas, and Theorems188
Problems189
CHAPTER4 Induction, Recursion, and Recurrences191
4.1 Mathematical Induction 191
Smallest Counterexamples191
The Principle of Mathematical Induction195
Strong Induction199
Induction in General201
A Recursive Viewof Induction203
Structural Induction206
Important Concepts, Formulas, and Theorems208
Problems210
4.2 Recursion, Recurrences, and Induction213
Recursion213
Examples of First-Order Linear Recurrences215
Iteratinga Recurrence217
Geometric Series218
First-Order Linear Recurrences221
Important Concepts,