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

โ–ถ
randomness in computing
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

1/22/2020

Randomness in Computing

LECTURE 2

Last time

  • Verifying polynomial identities
  • Probability amplification
  • Probability review

Discussions

  • Law of Total Probability
  • Bayesโ€™law

Today

  • More probability amplification
  • Verifying matrix multiplication

Sofya Raskhodnikova;Randomness in Computing

slide-2
SLIDE 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? A. Pr(๐น1) โ‹… Pr(๐น2|๐น1) โ‹… Pr(๐น3|๐น1 โˆฉ ๐น2) B. Pr(๐น1) โ‹… Pr(๐น2) โ‹… Pr(๐น3) C. Both A and B are correct. D. Neither A nor B is correct.

1/22/2020

Sofya Raskhodnikova; Randomness in Computing

slide-3
SLIDE 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? A. Pr(๐น1) โ‹… Pr(๐น2|๐น1) โ‹… Pr(๐น3|๐น1 โˆฉ ๐น2) B. Pr(๐น1) โ‹… Pr(๐น2) โ‹… Pr(๐น3) C. Both A and B are correct. D. Neither A nor B is correct.

1/22/2020

Sofya Raskhodnikova; Randomness in Computing

slide-4
SLIDE 4

Probability Amplification

  • Our algorithm for verifying polynomial identities accepts

incorrectly with probability โ‰ค

๐‘’ 100๐‘’ = 1 100

Idea: Repeat the algorithm and accept if all iterations accept.

1/23/2020

Sofya Raskhodnikova; Randomness in Computing

Pr error in all ๐‘™ iterations โ‰ค 1 100

๐‘™

slide-5
SLIDE 5

Sampling without replacement

  • Let ๐น๐‘— be the event that we choose a root in iteration ๐‘—
  • It is 0 if ๐‘™ > ๐‘’.
  • If ๐‘™ โ‰ค ๐‘’, then

1/22/2020

Sofya Raskhodnikova; Randomness in Computing

Pr ๐น

๐‘˜ ๐น1 โˆฉ โ‹ฏ โˆฉ ๐น ๐‘˜โˆ’1 =

๐‘’ โˆ’ (๐‘˜ โˆ’ 1) 100๐‘’ โˆ’ (๐‘˜ โˆ’ 1) Pr error in all ๐‘™ iterations = Pr ๐น1 โˆฉ โ‹ฏ โˆฉ ๐น๐‘™ = Pr ๐น1 โ‹… Pr ๐น2 ๐น1 โ‹… โ€ฆ โ‹… Pr[๐น๐‘™|๐น1 โˆฉ โ‹ฏ โˆฉ ๐น๐‘™โˆ’1] Pr error in all ๐‘™ iterations โ‰ค 1 100

๐‘™

slide-6
SLIDE 6

ยง1.3 (MU) Verifying Matrix Multiplication Task: Given three ๐‘œ ร— ๐‘œ matrices ๐ต, ๐ถ, ๐ท, verify if ๐ต โ‹… ๐ถ = ๐ท. Matrix multiplication algorithms:

  • Naรฏve

๐‘ƒ(๐‘œ3) time

  • Strassen

๐‘ƒ ๐‘œlog2 7 โ‰ˆ ๐‘ƒ(๐‘œ2.81) time

  • World record

๐‘ƒ(๐‘œ2.373โ€ฆ) time

[Coppersmith-Winograd `87, Vassilevska Williams `13, LeGall `14]

Verification:

  • Fastest known deterministic algorithm is as above.
  • Randomized algorithm [Freivalds `79]

๐‘ƒ(๐‘œ2) time

1/22/2020

Sofya Raskhodnikova; Randomness in Computing

slide-7
SLIDE 7

Task: Given three ๐‘œ ร— ๐‘œ matrices ๐ต, ๐ถ, ๐ท, verify if ๐ต โ‹… ๐ถ = ๐ท. Idea: Pick a random vector ๐’” and check if ๐ต โ‹… ๐ถ โ‹… ๐’” = ๐ท โ‹… ๐’”. Running time: Three matrix-vector multiplications: O ๐‘œ2 time. Correctness: If ๐ต โ‹… ๐ถ = ๐ท, the algorithm always accepts. Probability Amplification: With ๐‘™ repetitions, error probability โ‰ค 2โˆ’๐‘™

1/22/2020

Sofya Raskhodnikova; Randomness in Computing

O(๐’๐Ÿ‘) multiplications for each matrix-vector product

ยง1.3 (MU) Verifying Matrix Multiplication 1. Choose a random ๐‘œ-bit vector ๐‘  by making each bit ๐‘ 

๐‘—

independently 0 or 1 with probability 1/2 each. 2. ๐๐๐๐Ÿ๐ช๐ฎ if ๐ต โ‹… (๐ถ โ‹… ๐’”) = ๐ท โ‹… ๐’”; o. w. ๐ฌ๐Ÿ๐ค๐Ÿ๐๐ฎ.

(input: ๐‘œ ร— ๐‘œ matrices A, B, C) Algorithm Basic Frievalds

Theorem

If ๐ต โ‹… ๐ถ โ‰  ๐ท, Basic-Frievalds accepts with probability โ‰ค 1/2.

slide-8
SLIDE 8

Law of Total Probability

1/22/2020

Sofya Raskhodnikova; Randomness in Computing

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(๐น๐‘—) .