Probabilistic Algorithms - PowerPoint PPT Presentation

About This Presentation
Title:

Probabilistic Algorithms

Description:

1 on Las Vegas for 8 queens. 1 lecture about emergant computation and ... ENIAC is all you've got. Buffon's Needle. 1707-1788, French. Invented binomial theorem ... – PowerPoint PPT presentation

Number of Views:472
Avg rating:3.0/5.0
Slides: 13
Provided by: mike437
Category:

less

Transcript and Presenter's Notes

Title: Probabilistic Algorithms


1
Probabilistic Algorithms
  • Lecture 32
  • CS 312

2
Schedule
  • Probabilistic algorithms for 4 lectures
  • today (introduction and Buffons needle)
  • 2 on Monte Carlo alg. to test primality
  • 1 on Las Vegas for 8 queens
  • 1 lecture about emergant computation and formal
    verification
  • 1 review lecture

3
Final Exam
  • In the testing center
  • Will include significant portion of multiple
    choice.
  • Some traditional multiple choice
  • samples will be given out.
  • Some work out the problem multiple choice
  • show work on separate paper for part. credit.

4
Objectives
  • Compare Las Vegas and Monte Carlo algorithms.
  • Justify the use of probabilistic algorithms.

5
Numerical Prob. Algs.
  • Have a confidence interval
  • 90 sure the answer lies between x and y.
  • Gets better if run longer

6
Monte Carlo Prob. Algs.
  • High probability of a correct answer
  • Low probability of incorrect answer
  • No warning when an incorrect answer is given.

7
Monte Carlo Gradebook
  • Suppose your grade is a 95.
  • If you repeatedly ask a 3/4-correct Monte Carlo
    algorithm
  • Whats my grade?
  • Youll (probably) get
  • 95, 95, 90, 95, 70, 95, 95, 95, 95, 100, 95 ...

8
Las Vegas Prob. Algs.
  • Never gives incorrect answers
  • Sometimes gives no answer

9
Las Vegas Gradebook
  • Suppose your grade is a 95.
  • If you repeatedly ask a 3/4-correct Las Vegas
    algorithm
  • Whats my grade?
  • Youll (probably) get
  • 95, dont know, 95, 95, dont know, 95, 95, 95,
    95, 95, dont know, 95

10
Why?
  • Suppose you really need to solve a problem.
  • fate of the free world rests on your shoulders.
  • Suppose the problem is really hard.
  • random neutron diffusion in fissile material
  • Suppose you dont have enough computing resources
    to solve the problem.
  • ENIAC is all youve got.

11
Buffons Needle
  • 1707-1788, French
  • Invented binomial theorem
  • Noted natural historian
  • Most famous for throwing needles
  • over his shoulder to estimate Pi.

12
Buffons Needle
  • A needle of length m thrown onto a floor with
    lines every 2m has a 1/pi chance of landing on a
    line.
  • So if n needles are thrown, and k hit a line,
    then n/k is an estimate for pi.
  • Numerical probabilistic algorithm
  • more needles give better estimate.
  • 100x more needles for another digit of precision.
Write a Comment
User Comments (0)
About PowerShow.com