WISEMAN STUDY SERIES
WGU C960
DISCRETE MATHEMATICS II
Comprehensive Study Guide
Algorithms • Number Theory • Cryptography • Recursion • Counting
• Probability • Modeling Computation
Exam-focused coverage
Core concepts, essential formulas, worked examples, common mistakes, and an
OA readiness checklist.
2026 EDITION | EDUCATIONAL STUDY SUPPORT
,WGU C960 | DISCRETE MATHEMATICS II
How to Use This Guide
WGU describes C960 as covering searching and sorting algorithms, Big-O estimates, number theory and
cryptography, recursion and induction, counting, discrete probability, and modeling computation. C959 is the
prerequisite.
Study each section actively: reproduce the worked calculations without looking, explain every algorithm in
your own words, and use the final checklist to identify weak areas.
Contents
• 1. Algorithms and Big-O Analysis
• 2. Number Theory
• 3. Modular Arithmetic
• 4. Cryptography
• 5. Sequences, Recurrence Relations, and Recursion
• 6. Mathematical Induction
• 7. Counting Principles
• 8. Discrete Probability
• 9. Modeling Computation
• 10. Essential Formula Sheet
• 11. Common C960 Mistakes
• 12. OA Preparation Checklist
Comprehensive Study Guide Page 2
,WGU C960 | DISCRETE MATHEMATICS II
1. Algorithms and Big-O Analysis
1.1 What is an algorithm?
An algorithm is a finite sequence of unambiguous steps that solves a problem. It should have clearly defined
inputs and outputs, precise steps, a finite stopping point, and correct results for valid inputs.
1.2 Time complexity
Time complexity estimates how an algorithm’s running time grows as input size n increases.
Complexity Name Typical example
O(1) Constant Accessing an array element
O(log n) Logarithmic Binary search
O(n) Linear Linear search
O(n log n) Linearithmic Merge sort
O(n²) Quadratic Two nested loops
O(n³) Cubic Three nested loops
O(2■) Exponential Subset enumeration
O(n!) Factorial Testing all permutations
Big-O normally describes an upper bound and is commonly used for worst-case growth.
1.3 Simplifying Big-O expressions
Keep only the fastest-growing term and remove constants.
5n^2 + 7n + 4 = O(n^2) 3n log n + 20n = O(n log n) 6(2^n) + n^4 = O(2^n)
1.4 Loop analysis
• Single loop running n times: O(n).
• Independent consecutive loops: n + n = 2n = O(n). Do not multiply independent loops.
• Two fully nested n-loops: n × n = n² = O(n²).
• A loop that repeatedly doubles or halves its control value: O(log n).
• Triangular nested loop: 1 + 2 + ... + n = n(n+1)/2, so O(n²).
1.5 Best, average, and worst cases
• Best case: minimum work required.
• Average case: expected work over typical inputs.
• Worst case: maximum work required.
Linear search has best case O(1) and average/worst case O(n). Binary search has best case O(1) and worst
case O(log n).
Comprehensive Study Guide Page 3
, WGU C960 | DISCRETE MATHEMATICS II
1.6 Searching algorithms
Linear search checks elements sequentially. It does not require sorted input and has worst-case complexity
O(n). Binary search repeatedly divides a sorted list in half. It requires sorted input and has worst-case
complexity O(log n).
For 64 sorted items: log2(64) = 6 comparisons approximately.
1.7 Sorting algorithms
Algorithm Best Average Worst Stable?
Bubble sort O(n)* O(n²) O(n²) Yes
Selection sort O(n²) O(n²) O(n²) Usually no
Insertion sort O(n) O(n²) O(n²) Yes
Merge sort O(n log n) O(n log n) O(n log n) Yes
Quick sort O(n log n) O(n log n) O(n²) Usually no
*Optimized bubble sort with early termination. Bubble sort swaps adjacent items; selection sort chooses the smallest remaining
item; insertion sort inserts into a sorted prefix; merge sort divides and merges; quick sort partitions around a pivot.
Comprehensive Study Guide Page 4
WGU C960
DISCRETE MATHEMATICS II
Comprehensive Study Guide
Algorithms • Number Theory • Cryptography • Recursion • Counting
• Probability • Modeling Computation
Exam-focused coverage
Core concepts, essential formulas, worked examples, common mistakes, and an
OA readiness checklist.
2026 EDITION | EDUCATIONAL STUDY SUPPORT
,WGU C960 | DISCRETE MATHEMATICS II
How to Use This Guide
WGU describes C960 as covering searching and sorting algorithms, Big-O estimates, number theory and
cryptography, recursion and induction, counting, discrete probability, and modeling computation. C959 is the
prerequisite.
Study each section actively: reproduce the worked calculations without looking, explain every algorithm in
your own words, and use the final checklist to identify weak areas.
Contents
• 1. Algorithms and Big-O Analysis
• 2. Number Theory
• 3. Modular Arithmetic
• 4. Cryptography
• 5. Sequences, Recurrence Relations, and Recursion
• 6. Mathematical Induction
• 7. Counting Principles
• 8. Discrete Probability
• 9. Modeling Computation
• 10. Essential Formula Sheet
• 11. Common C960 Mistakes
• 12. OA Preparation Checklist
Comprehensive Study Guide Page 2
,WGU C960 | DISCRETE MATHEMATICS II
1. Algorithms and Big-O Analysis
1.1 What is an algorithm?
An algorithm is a finite sequence of unambiguous steps that solves a problem. It should have clearly defined
inputs and outputs, precise steps, a finite stopping point, and correct results for valid inputs.
1.2 Time complexity
Time complexity estimates how an algorithm’s running time grows as input size n increases.
Complexity Name Typical example
O(1) Constant Accessing an array element
O(log n) Logarithmic Binary search
O(n) Linear Linear search
O(n log n) Linearithmic Merge sort
O(n²) Quadratic Two nested loops
O(n³) Cubic Three nested loops
O(2■) Exponential Subset enumeration
O(n!) Factorial Testing all permutations
Big-O normally describes an upper bound and is commonly used for worst-case growth.
1.3 Simplifying Big-O expressions
Keep only the fastest-growing term and remove constants.
5n^2 + 7n + 4 = O(n^2) 3n log n + 20n = O(n log n) 6(2^n) + n^4 = O(2^n)
1.4 Loop analysis
• Single loop running n times: O(n).
• Independent consecutive loops: n + n = 2n = O(n). Do not multiply independent loops.
• Two fully nested n-loops: n × n = n² = O(n²).
• A loop that repeatedly doubles or halves its control value: O(log n).
• Triangular nested loop: 1 + 2 + ... + n = n(n+1)/2, so O(n²).
1.5 Best, average, and worst cases
• Best case: minimum work required.
• Average case: expected work over typical inputs.
• Worst case: maximum work required.
Linear search has best case O(1) and average/worst case O(n). Binary search has best case O(1) and worst
case O(log n).
Comprehensive Study Guide Page 3
, WGU C960 | DISCRETE MATHEMATICS II
1.6 Searching algorithms
Linear search checks elements sequentially. It does not require sorted input and has worst-case complexity
O(n). Binary search repeatedly divides a sorted list in half. It requires sorted input and has worst-case
complexity O(log n).
For 64 sorted items: log2(64) = 6 comparisons approximately.
1.7 Sorting algorithms
Algorithm Best Average Worst Stable?
Bubble sort O(n)* O(n²) O(n²) Yes
Selection sort O(n²) O(n²) O(n²) Usually no
Insertion sort O(n) O(n²) O(n²) Yes
Merge sort O(n log n) O(n log n) O(n log n) Yes
Quick sort O(n log n) O(n log n) O(n²) Usually no
*Optimized bubble sort with early termination. Bubble sort swaps adjacent items; selection sort chooses the smallest remaining
item; insertion sort inserts into a sorted prefix; merge sort divides and merges; quick sort partitions around a pivot.
Comprehensive Study Guide Page 4