Week 9 -probabilistic algorithms Flashcards

1
Q

E(aX + B)

A

a E(x) + b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

E(X + Y)

A

E(X) + E(Y)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to calculate expected termination time

A

Expectedterminationtime=numberofstepsperpath(weightedbyprobability)×probabilityofreachingthatpath

if you ahve multiple branches you just add the expected termination time of each branch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

summary of probabilistic turing machine

A

A probabilistic Turing machine makes choices based on probabilities during computation, which means the same input can produce different outputs when run through the same machine multiple times.

To handle this uncertainty and increase confidence in the result, we typically run the machine many times on the same input to minimize the chance of getting an incorrect answer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

markovs inequality

A

P(X≥t)≤ E(X) / t [ original form of markovs]

sub t = a * E(x) you get :

P(X≥ a⋅E(X))≤ 1 / a

.


.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Var(X)

A

E(X^2) - [E(x)]^2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

standard deviation

A

sqrt(Var(X))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 3 properties of a language solvable in bounded-error probabilistic polynomial time (BPP)?

A

Probabilistically “Sound”
Probabilistically “Complete”
Polynomial-Time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Question: Explain the “Probabilistically Sound” property in BPP.

A

If a word 𝑤 ∉ 𝐿 (not part of the language), the probabilistic machine 𝑀 should rarely accept it.

Formally:

Prob (𝑀(𝑤)=1) ≤ 1 / 3

This means the machine makes errors in rejecting invalid inputs, but the probability of error is bounded by
1/ 3


.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain the “Probabilistically Complete” property in BPP.

A

If a word 𝑤 ∈ 𝐿 (part of the language), the probabilistic machine 𝑀 should correctly accept it with high probability.
Formally:

Prob (𝑀(𝑤) = 1) ≥ 2 / 3

This ensures the machine reliably accepts valid inputs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain the “Polynomial-Time” property in BPP.

A

The probabilistic machine
𝑀
M must run in polynomial time.
Formally:

𝑇(𝑛) ∈ 𝑂(𝑛^𝑘) forsome 𝑘 > 0.

This guarantees the machine is efficient and its runtime grows polynomially with input size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the 3 properties of a language solvable in zero-error probabilistic polynomial time (ZPP)?

A

Sound
Complete
Expected Polynomial-Time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Explain the “Sound” property in ZPP.

A

If a word 𝑤 ∉ 𝐿 (not part of the language), the probabilistic machine 𝑀 will never accept it.

Formally:
Prob (𝑀(𝑤) = 1) =0.

This ensures that there are no false positives.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain the “Complete” property in ZPP.

A

If a word 𝑤 ∈ 𝐿 (part of the language), the probabilistic machine M will always accept it.
Formally: Prob (𝑀(𝑤) =1) =1.

This ensures that there are no false negatives

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Explain the “Expected Polynomial-Time” property in ZPP.

A

The probabilistic machine
𝑀
M must run in expected polynomial time.

Formally:
E[T(n)]∈O(n ^k )forsomek>0.

This ensures that the machine’s runtime, on average, grows polynomially with input size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

difference between BPP and ZPP

A

BPP: Efficiency (polynomial time) is prioritized over perfect accuracy (small errors allowed).

ZPP: Accuracy (zero errors) is prioritized over strict efficiency (expected polynomial time, not guaranteed for every case).

17
Q

: What is a Monte Carlo algorithm?

A

A randomized algorithm with deterministic runtime, meaning it always runs in polynomial time, but may return incorrect answers due to its probabilistic nature. This trade-off allows small probabilities of error.

18
Q

What is a Las Vegas algorithm?

A

A randomized algorithm that is always sound and complete, meaning it provides zero false answers (no false positives or negatives). However, its runtime may vary probabilistically, though it often has expected polynomial runtime.