Randomized Algorithms Randomized Algorithms CS648 Lecture 3 Two fundamental problems Balls into bins Randomized Quick Sort Random Variable and Expected.

Slides:



Advertisements
Similar presentations
Occupancy Problems m balls being randomly assigned to one of n bins. (Independently and uniformly) The questions: - what is the maximum number of balls.
Advertisements

Lecture 4A: Probability Theory Review Advanced Artificial Intelligence.
CS433: Modeling and Simulation
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 6.
2 Discrete Random Variable. Independence (module 1) A and B are independent iff the knowledge that B has occurred does not change the probability that.
STATISTIK LECTURE: AL MUIZZUDDIN F., SE., ME.. Key Concept In this section we present three different approaches to finding the probability of an event.
Randomized Algorithms Randomized Algorithms CS648 Lecture 2 Randomized Algorithm for Approximate Median Elementary Probability theory Lecture 2 Randomized.
Probability, Part III.
Chapter 4 Probability and Probability Distributions
Data Structures and Algorithms (AT70.02) Comp. Sc. and Inf. Mgmt. Asian Institute of Technology Instructor: Dr. Sumanta Guha Slide Sources: CLRS “Intro.
Mathematics in Today's World
Chapter 18 Sampling Distribution Models
Probability Dr. Deshi Ye Outline  Introduction  Sample space and events  Probability  Elementary Theorem.
Probabilistic Analysis and Randomized Algorithm. Worst case analysis Probabilistic analysis  Need the knowledge of the distribution of the inputs Indicator.
Probability and Statistics Dr. Saeid Moloudzadeh Sample Space and Events 1 Contents Descriptive Statistics Axioms of Probability Combinatorial.
Randomized Algorithms Randomized Algorithms CS648 Lecture 6 Reviewing the last 3 lectures Application of Fingerprinting Techniques 1-dimensional Pattern.
Randomized Algorithms Randomized Algorithms CS648 Lecture 8 Tools for bounding deviation of a random variable Markov’s Inequality Chernoff Bound Lecture.
Analysis of Algorithms CS 477/677 Randomizing Quicksort Instructor: George Bebis (Appendix C.2, Appendix C.3) (Chapter 5, Chapter 7)
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu.
UNR, MATH/STAT 352, Spring Random variable (rv) – central concept of probability theory Numerical description of experiment.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 17: 10/24.
1 Discrete Probability Hsin-Lung Wu Assistant Professor Advanced Algorithms 2008 Fall.
Engineering Probability and Statistics - SE-205 -Chap 2 By S. O. Duffuaa.
Probability Review Part I Design and Analysis of Algorithms I.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
Aim: Final Review Session 3 Probability
1 9/8/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Chapter 6 Random Variables. Make a Sample Space for Tossing a Fair Coin 3 times.
1 9/23/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Chapter 8 Probability Section R Review. 2 Barnett/Ziegler/Byleen Finite Mathematics 12e Review for Chapter 8 Important Terms, Symbols, Concepts  8.1.
Simple Mathematical Facts for Lecture 1. Conditional Probabilities Given an event has occurred, the conditional probability that another event occurs.
Discrete Mathematical Structures (Counting Principles)
Probability Theory 1.Basic concepts 2.Probability 3.Permutations 4.Combinations.
Random Variables. A random variable X is a real valued function defined on the sample space, X : S  R. The set { s  S : X ( s )  [ a, b ] is an event}.
The Basics of Probability Theory MATH 102 Contemporary Math S. Rook.
COMP 170 L2 L17: Random Variables and Expectation Page 1.
Wednesday, Nov. 9, 2011 You will need Math book (pg. 210) whiteboard/marker/eraser Folder/notebook Bell Ringer A. List as many properties of parallelogram.
Order Statistics David Kauchak cs302 Spring 2012.
ENM 503 Block 1 Algebraic Systems Lesson 3 – Modeling with Sets Sets - Why do we care? The Application of Sets – a look ahead 1 Narrator: Charles Ebeling.
What is Probability?. The Mathematics of Chance How many possible outcomes are there with a single 6-sided die? What are your “chances” of rolling a 6?
Class 2 Probability Theory Discrete Random Variables Expectations.
Probability Definition : The probability of a given event is an expression of likelihood of occurrence of an event.A probability isa number which ranges.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 7.
Sixth lecture Concepts of Probabilities. Random Experiment Can be repeated (theoretically) an infinite number of times Has a well-defined set of possible.
1 ECE310 – Lecture 22 Random Signal Analysis 04/25/01.
ICS 353: Design and Analysis of Algorithms
Great Theoretical Ideas in Computer Science for Some.
Master Method (4. 3) Recurrent formula T(n) = a  T(n/b) + f(n) 1) if for some  > 0 then 2) if then 3) if for some  > 0 and a  f(n/b)  c  f(n) for.
Probability Distributions and Expected Value
CS2420: Lecture 12 Vladimir Kulyukin Computer Science Department Utah State University.
3.4 Elements of Probability. Probability helps us to figure out the liklihood of something happening. The “something happening” is called and event. The.
7 th Grade Math Vocabulary Word, Definition, Model Emery Unit 5.
2-6 Probability Theoretical & Experimental. Probability – how likely it is that something will happen – Has a range from 0 – 1 – 0 means it definitely.
Probability What is the probability of rolling “snake eyes” in one roll? What is the probability of rolling “yahtzee” in one roll?
Great Theoretical Ideas in Computer Science.
Theory of Computational Complexity Yusuke FURUKAWA Iwama Ito lab M1.
Conditional Probability 423/what-is-your-favorite-data-analysis-cartoon 1.
“some thoughts on probability”
Business Statistics Topic 4
Algorithms CSCI 235, Fall 2017 Lecture 12 Midterm I Review
Lecture 11 Sections 5.1 – 5.2 Objectives: Probability
Master Method (4. 3) Recurrent formula T(n) = aT(n/b) + f(n)
Randomized Algorithms CS648
Multi-Stage Events and Applications of Probability
CSE 321 Discrete Structures
Algorithms CSCI 235, Spring 2019 Lecture 12 Midterm I Review
Quicksort and Randomized Algs
Chapter 11 Probability.
Sets, Combinatorics, Probability, and Number Theory
Presentation transcript:

Randomized Algorithms Randomized Algorithms CS648 Lecture 3 Two fundamental problems Balls into bins Randomized Quick Sort Random Variable and Expected value Lecture 3 Two fundamental problems Balls into bins Randomized Quick Sort Random Variable and Expected value 1

BALLS INTO BINS CALCULATING PROBABILITY OF SOME INTERESTING EVENTS 2

Balls into Bins … i … n … m-1 m

Balls into Bins Question : What is the probability that there is at least one empty bin ? … i … n … m-1 m

Balls into Bins … i … n … m-1 m

Balls into Bins … i … n … j … m-1 m disjoint Independent

Balls into Bins … i … n … j … m-1 m

Balls into Bins … i … n … j … m-1 m

Balls into Bins 9 Express the event as union of some events …

Balls into Bins 10

Balls into Bins 11

RANDOMIZED QUICK SORT WHAT IS PROBABILITY OF TWO SPECIFIC ELEMENTS GETTING COMPARED ? 12

Randomized Quick Sort 13

Randomized Quick Sort 14 Not a feasible way to calculate the probability

15 Go through the next few slides slowly and patiently, pondering at each step. Never accept anything until and unless you can see the underlying truth yourself.

16 Elements of A arranged in Increasing order of values

17

18

19

ALTERNATE SOLUTION USING ANALOGY TO ANOTHER RANDOM EXPERIMENT Remember we took a similar approach earlier too: we used a coin toss experiment to analyze failure probability of Rand- Approx-Median algorithm. 20

A Random Experiment: A Story of two friends 21

Viewing the entire experiment from perspective of A and B … n-1 n AB

Viewing the entire experiment from perspective of A and B … n-1 n AB

Viewing the entire experiment from perspective of A and B 24 AB

Viewing the entire experiment from perspective of A and B 25 AB

Viewing the entire experiment from perspective of A and B 26 AB

Viewing the entire experiment from perspective of A and B 27 AB

PROBABILITY THEORY (RANDOM VARIABLE AND EXPECTED VALUE) 28

Random variable 29 Randomized- Quick-Sort on array of size n Number of HEADS in 5 tosses Sum of numbers in 4 throws Number of comparisons

Random variable 30

Many Random Variables for the same Probability space Random Experiment: Throwing a dice two times X : the largest number seen Y : sum of the two numbers seen 31

Expected Value of a random variable (average value) 32 Ω X= a X= b X= c

Examples 33

Can we solve these problems ? 34 Spend at least half an hour to solve these two problems using the tools you know. This will help you appreciate the very important concept we shall discuss in the next class.