Week 9 -probabilistic algorithms Flashcards
E(aX + B)
a E(x) + b
E(X + Y)
E(X) + E(Y)
How to calculate expected termination time
Expectedterminationtime=numberofstepsperpath(weightedbyprobability)×probabilityofreachingthatpath
if you ahve multiple branches you just add the expected termination time of each branch
summary of probabilistic turing machine
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.
markovs inequality
P(X≥t)≤ E(X) / t [ original form of markovs]
sub t = a * E(x) you get :
P(X≥ a⋅E(X))≤ 1 / a
.
.
Var(X)
E(X^2) - [E(x)]^2
standard deviation
sqrt(Var(X))
What are the 3 properties of a language solvable in bounded-error probabilistic polynomial time (BPP)?
Probabilistically “Sound”
Probabilistically “Complete”
Polynomial-Time
Question: Explain the “Probabilistically Sound” property in BPP.
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
.
Explain the “Probabilistically Complete” property in BPP.
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.
Explain the “Polynomial-Time” property in BPP.
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.
What are the 3 properties of a language solvable in zero-error probabilistic polynomial time (ZPP)?
Sound
Complete
Expected Polynomial-Time
Explain the “Sound” property in ZPP.
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.
Explain the “Complete” property in ZPP.
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
Explain the “Expected Polynomial-Time” property in ZPP.
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.