Exam 1

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/60

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:47 AM on 3/26/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

61 Terms

1
New cards

What is the formula for the sum of the first n natural numbers?

n(n + 1) / 2

2
New cards

What is the formula for the sum of the first n squares?

n(n + 1)(2n + 1) / 6

3
New cards

What is the formula for a geometric series?

a(1 - r^n) / (1 - r)

4
New cards

What is the formula for an infinite geometric series when |r| < 1?

a / (1 - r)

5
New cards

What is a triangular sum?

A sum of the form 1 + 2 + 3 + … + n OR n + (n-1) + (n-2)… + 1

6
New cards

What is the time complexity of a triangular loop?

O(n²)

7
New cards

When the inner loop depends on i (like j = 1 to i), what type of pattern is this?

A triangular loop

8
New cards

What is the total work of a triangular nested loop?

n(n + 1)/2 → Θ(n²)

9
New cards

When a nested loop has j running to i², what is the resulting complexity?

Θ(n³)

10
New cards

What is the first step when analyzing a loop where the inner loop depends on i?

Convert it into a summation over i

11
New cards

What is Big-O notation used for?

Describing the upper bound of a function’s growth rate

12
New cards

What does Big-O ignore?

Constants and lower-order terms

13
New cards

What is Big-O of 5n + 3?

O(n)

14
New cards

What is Big-O of n² + n?

O(n²)

15
New cards

What is Big-O of n log n + n²?

O(n²)

16
New cards

What is the dominant term rule in Big-O?

The fastest-growing term determines the complexity

17
New cards

What is the time complexity of a loop that runs n times?

O(n)

18
New cards

What is the time complexity of two nested loops each running n times?

O(n²)

19
New cards

What is the time complexity of three nested loops each running n times?

O(n³)

20
New cards

What is the time complexity of a loop where i *= 2 each iteration?

O(log n)

21
New cards

What is the time complexity of a loop where i /= 2 each iteration?

O(log n)

22
New cards

What is the time complexity of a loop where i += constant each iteration?

O(n)

23
New cards

What is the key idea behind a geometric loop pattern?

The loop variable changes by multiplication or division

24
New cards

What equation do you solve for loops with i *= 2?

2^k = n

25
New cards

What equation do you solve for loops with i /= 2?

n / 2^k = 1

26
New cards

What is the time complexity of a loop where k = n and k = k/3 each iteration?

O(log n)

27
New cards

What is the time complexity of a loop where k = n and k = k - 5 each iteration?

O(n)

28
New cards

What is the time complexity of a nested loop where inner loop runs log i times?

Θ(n log n)

29
New cards

What does ∑ log i simplify to?

Θ(n log n)

30
New cards

What is the correct growth rate order from slowest to fastest?

log n < √n < n < n log n < n² < 2^n < n!

31
New cards

Which grows faster: log n or n?

n

32
New cards

Which grows faster: √n or log n?

√n

33
New cards

Which grows faster: n log n or n²?

34
New cards

Which grows faster: polynomial or exponential functions?

Exponential functions

35
New cards

What is the structure of a proof by induction?

Base case → Hypothesis → Inductive step

36
New cards

What is the base case in induction?

Prove the statement is true for the starting value

37
New cards

What is the inductive hypothesis?

Assume the statement is true for n = k

38
New cards

What is the inductive step?

Prove the statement is true for n = k + 1

39
New cards

What is the goal of the inductive step?

Show that P(k) implies P(k + 1)

40
New cards

What is the most common mistake in induction proofs?

Not using the inductive hypothesis correctly

41
New cards

When expanding (k + 1)², what do you get?

k² + 2k + 1

42
New cards

When expanding (k + 1)³, what do you get?

k³ + 3k² + 3k + 1

43
New cards

What is the identity for 2^(k+1)?

2 · 2^k

44
New cards

What is the factorization of k² + k?

k(k + 1)

45
New cards

What is the factorization of k² + 3k + 2?

(k + 1)(k + 2)

46
New cards

What is the key step in proving ∑ i = n(n+1)/2 using induction?

k(k+1)/2 + (k+1) = (k+1)(k+2)/2

47
New cards

What is the sum of the first n odd numbers?

48
New cards

What does it mean to prove O(n²)?

Show f(n) ≤ c·n² for n ≥ n₀

49
New cards

What does it mean to prove Ω(n²)?

Show f(n) ≥ c·n² for n ≥ n₀

50
New cards

What does it mean to prove Θ(n)?

Show both upper and lower bounds

51
New cards

What pattern does T(n) = T(n−1) + n follow?

Triangular sum → Θ(n²)

52
New cards

What pattern does T(n) = T(n/2) + 1 follow?

Logarithmic → Θ(log n)

53
New cards

What pattern does T(n) = T(n/2) + n follow?

Linear work with shrinking input → Θ(n)

54
New cards

What pattern does T(n) = 2T(n/2) + n follow?

Divide and conquer → Θ(n log n)

55
New cards

What pattern does T(n) = 2T(n/2) + n² follow?

Dominated by n² → Θ(n²)

56
New cards

What pattern does T(n) = 3T(n/3) + n follow?

Balanced recursion → Θ(n log n)

57
New cards

What is the Master Theorem used for?

Solving recurrences of the form T(n) = aT(n/b) + O(n^d)

58
New cards

What do you compare in the Master Theorem?

a and b^d

59
New cards

When does Case 1 of the Master Theorem apply?

When a = b^d

60
New cards

When does Case 2 of the Master Theorem apply?

When a < b^d

61
New cards

When does Case 3 of the Master Theorem apply?

When a > b^d

Explore top notes

note
Chapter 14- Metals
Updated 1279d ago
0.0(0)
note
DCMP 5D Assignment
Updated 1227d ago
0.0(0)
note
Chapter 24: Lipid Metabolism
Updated 1266d ago
0.0(0)
note
Terms
Updated 1059d ago
0.0(0)
note
Nullification Crisis
Updated 467d ago
0.0(0)
note
Chapter 5 Vocab
Updated 1246d ago
0.0(0)
note
Science 1-1 Notes
Updated 1294d ago
0.0(0)
note
Rindfuss and Brauner-Otto 2008
Updated 1164d ago
0.0(0)
note
Chapter 14- Metals
Updated 1279d ago
0.0(0)
note
DCMP 5D Assignment
Updated 1227d ago
0.0(0)
note
Chapter 24: Lipid Metabolism
Updated 1266d ago
0.0(0)
note
Terms
Updated 1059d ago
0.0(0)
note
Nullification Crisis
Updated 467d ago
0.0(0)
note
Chapter 5 Vocab
Updated 1246d ago
0.0(0)
note
Science 1-1 Notes
Updated 1294d ago
0.0(0)
note
Rindfuss and Brauner-Otto 2008
Updated 1164d ago
0.0(0)

Explore top flashcards

flashcards
English - Visiting Hour
22
Updated 1113d ago
0.0(0)
flashcards
Module 7: Learning
68
Updated 599d ago
0.0(0)
flashcards
trying to tip the untippable!
137
Updated 112d ago
0.0(0)
flashcards
Sadleir Oxford Unit 1
60
Updated 1226d ago
0.0(0)
flashcards
Spanish Midterm Review Day 2
36
Updated 1169d ago
0.0(0)
flashcards
English - Visiting Hour
22
Updated 1113d ago
0.0(0)
flashcards
Module 7: Learning
68
Updated 599d ago
0.0(0)
flashcards
trying to tip the untippable!
137
Updated 112d ago
0.0(0)
flashcards
Sadleir Oxford Unit 1
60
Updated 1226d ago
0.0(0)
flashcards
Spanish Midterm Review Day 2
36
Updated 1169d ago
0.0(0)