gamblers problem cs320

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

23 Terms

1
New cards

What is the probability that two specific elements zi and zj are compared in Quicksort?

2 / (j - i + 1)

2
New cards

What is the average number of comparisons in Quicksort related to the harmonic series?

O(log n)

3
New cards

What is the expected number of clauses to re-evaluate in MAX-3SAT when flipping one variable?

A constant number, O(1)

4
New cards

How many times does each variable appear in MAX-3SAT (4N clauses, 3 variables per clause)?

Each appears in 12 clauses

5
New cards

What is the average case work to evaluate all variables in MAX-3SAT?

O(1) per variable, O(n) total worst case

6
New cards

What is a random walk?

A value sequence that moves up/down/stays the same over time steps

7
New cards

What makes a random walk "unbiased"?

Equal probability of going up or down

8
New cards

What is Gambler’s Ruin?

A gambler makes 1-dollar bets until reaching a target profit or going broke

9
New cards

What is T in Gambler’s Ruin?

T = starting capital + target winnings

10
New cards

In roulette, what is the probability of winning on a color bet?

18 / 38 ≈ 0.47

11
New cards

What are the absorbing states in the Gambler’s Ruin problem?

$0 (broke) and target capital (e.g., $600)

12
New cards

Is the Gambler’s Ruin process a martingale?

Yes, because outcomes are independent of past events

13
New cards

What is the approximate chance of winning $100 starting from $500 in roulette?

Less than 1 in 37,000

14
New cards

What happens in the doubling betting strategy?

You win 100 with 71.91% chance but lose 300 with 28.09% chance

15
New cards

What is the birthday paradox?

Probability that at least 2 people share a birthday in a group

16
New cards

How many people are needed for >50% chance of a shared birthday?

23 people

17
New cards

What’s the probability of at least one shared birthday with 50 people?

96.53%

18
New cards

How is the number of pairs of people calculated?

n(n-1)/2

19
New cards

In the randomized ONEMAX problem, how long to find one 'A' in a string of n bits?

O(n)

20
New cards

What’s the average time to convert all A’s to G’s in ONEMAX?

O(n log n)

21
New cards

How is progress in ONEMAX often modeled?

Using harmonic series

22
New cards

What is the sum of the harmonic series Hn?

O(log n)

23
New cards