randomness in computing
play

Randomness in Computing L ECTURE 2 Last time Verifying polynomial - PowerPoint PPT Presentation

Randomness in Computing L ECTURE 2 Last time Verifying polynomial identities Probability amplification Probability review Discussions Law of Total Probability Bayeslaw Today More probability amplification Verifying


  1. Randomness in Computing L ECTURE 2 Last time • Verifying polynomial identities • Probability amplification • Probability review Discussions • Law of Total Probability • Bayes’law Today • More probability amplification • Verifying matrix multiplication 1/22/2020 Sofya Raskhodnikova;Randomness in Computing

  2. Review question Toss a fair coin three times. Let 𝐹 𝑗 be the event that the 𝑗 -th toss is HEADS. Let 𝐹 = 𝐹 1 ∩ 𝐹 2 ∩ 𝐹 3 . What is the probability of E? Pr(𝐹 1 ) ⋅ Pr(𝐹 2 |𝐹 1 ) ⋅ Pr(𝐹 3 |𝐹 1 ∩ 𝐹 2 ) A. Pr(𝐹 1 ) ⋅ Pr(𝐹 2 ) ⋅ Pr(𝐹 3 ) B. C. Both A and B are correct. D. Neither A nor B is correct. Sofya Raskhodnikova; Randomness in Computing 1/22/2020

  3. Review question Toss a coin that is biased with heads probability 𝑞 three times. Let 𝐹 𝑗 be the event that the 𝑗 -th toss is HEADS. Let 𝐹 = 𝐹 1 ∩ 𝐹 2 ∩ 𝐹 3 . What is the probability of E? Pr(𝐹 1 ) ⋅ Pr(𝐹 2 |𝐹 1 ) ⋅ Pr(𝐹 3 |𝐹 1 ∩ 𝐹 2 ) A. Pr(𝐹 1 ) ⋅ Pr(𝐹 2 ) ⋅ Pr(𝐹 3 ) B. C. Both A and B are correct. D. Neither A nor B is correct. Sofya Raskhodnikova; Randomness in Computing 1/22/2020

  4. Probability Amplification • Our algorithm for verifying polynomial identities accepts 𝑒 1 incorrectly with probability ≤ 100𝑒 = 100 Idea: Repeat the algorithm and accept if all iterations accept. Pr error in all 𝑙 iterations 𝑙 1 ≤ 100 Sofya Raskhodnikova; Randomness in Computing 1/23/2020

  5. Sampling without replacement • Let 𝐹 𝑗 be the event that we choose a root in iteration 𝑗 Pr error in all 𝑙 iterations = Pr 𝐹 1 ∩ ⋯ ∩ 𝐹 𝑙 = Pr 𝐹 1 ⋅ Pr 𝐹 2 𝐹 1 ⋅ … ⋅ Pr[𝐹 𝑙 |𝐹 1 ∩ ⋯ ∩ 𝐹 𝑙−1 ] • It is 0 if 𝑙 > 𝑒. 𝑒 − (𝑘 − 1) • If 𝑙 ≤ 𝑒 , then Pr 𝐹 𝑘 𝐹 1 ∩ ⋯ ∩ 𝐹 𝑘−1 = 100𝑒 − (𝑘 − 1) 𝑙 1 Pr error in all 𝑙 iterations ≤ 100 Sofya Raskhodnikova; Randomness in Computing 1/22/2020

  6. § 1.3 (MU) Verifying Matrix Multiplication Task: Given three 𝑜 × 𝑜 matrices 𝐵, 𝐶, 𝐷, verify if 𝐵 ⋅ 𝐶 = 𝐷. Matrix multiplication algorithms: 𝑃(𝑜 3 ) time • Naïve 𝑃 𝑜 log 2 7 ≈ 𝑃(𝑜 2.81 ) time • Strassen 𝑃(𝑜 2.373… ) time • World record [Coppersmith-Winograd `87, Vassilevska Williams `13, LeGall `14] Verification: • Fastest known deterministic algorithm is as above. 𝑃(𝑜 2 ) time • Randomized algorithm [Freivalds `79] Sofya Raskhodnikova; Randomness in Computing 1/22/2020

  7. § 1.3 (MU) Verifying Matrix Multiplication Task: Given three 𝑜 × 𝑜 matrices 𝐵, 𝐶, 𝐷, verify if 𝐵 ⋅ 𝐶 = 𝐷. Idea: Pick a random vector 𝒔 and check if 𝐵 ⋅ 𝐶 ⋅ 𝒔 = 𝐷 ⋅ 𝒔. (input: 𝑜 × 𝑜 matrices A, B, C ) Algorithm Basic Frievalds Choose a random 𝑜 -bit vector 𝑠 by making each bit 𝑠 1. 𝑗 independently 0 or 1 with probability 1/2 each. 𝐁𝐝𝐝𝐟𝐪𝐮 if 𝐵 ⋅ (𝐶 ⋅ 𝒔) = 𝐷 ⋅ 𝒔; o. w. 𝐬𝐟𝐤𝐟𝐝𝐮. 2. O( 𝒐 𝟑 ) multiplications for each matrix-vector product Running time: Three matrix-vector multiplications: O 𝑜 2 time. Correctness: If 𝐵 ⋅ 𝐶 = 𝐷, the algorithm always accepts. Theorem If 𝐵 ⋅ 𝐶 ≠ 𝐷, Basic-Frievalds accepts with probability ≤ 1/2. Probability Amplification: With 𝑙 repetitions, error probability ≤ 2 −𝑙 Sofya Raskhodnikova; Randomness in Computing 1/22/2020

  8. Law of Total Probability For any two events 𝐵 and 𝐹, Pr 𝐵 = Pr(𝐵 ∩ 𝐹) + Pr(𝐵 ∩ 𝐹) = Pr(𝐵|𝐹) ⋅ Pr 𝐹 + Pr(𝐵|𝐹) ⋅ Pr 𝐹 Let A be an event and let 𝐹 1 , … , 𝐹 𝑜 be mutually disjoint events whose union is Ω . Pr(𝐵) = Pr(𝐵 ∩ 𝐹 𝑗 ) = Pr(𝐵 ∣ 𝐹 𝑗 ) ⋅ Pr(𝐹 𝑗 ) . 𝑗∈ 𝑜 𝑗∈ 𝑜 Sofya Raskhodnikova; Randomness in Computing 1/22/2020

Recommend


More recommend