Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

Probability for Computer Science - III

Mathematics
CS203

Lecture 1

1
Aim of the course
• To equip the students with tools of probability theory from
perspective of computer science.

• To cover necessary background of probability theory for


courses like Machine Learning, Randomized Complexity,
Randomized algorithms.

• Bigger aim: To make sure every student gets a glimpse of the


beautiful world of probability theory so that he/she becomes
a fan of probability theory.

2
A PARADOX

Chord and an equilateral triangle

3
Chord and an equilateral triangle
C

A B

• A chord is picked randomly.


• What is the probability that its length is more than the length of AB in the triangle?

4
 
=
Answer 1
C

A B

Fact 1: Length of a chord is uniquely defined by its two endpoints.

Pick the endpoints of the chord randomly


5
 
=
Answer 2
C

A B

Fact 2: Length of a chord is uniquely defined if we know the center of the chord.

Pick the center of the chord randomly.


6
 
=
Answer 3
C
Which answer is correct ?

A B

Fact 3: Length of a chord is uniquely defined if we know its distance from the center of circle.

Pick the distance of the chord from center randomly


7
A PROBLEM FROM JEE DAYS

3-dices

8
3-dices

Step 1: 3 dices are thrown.


Step 2: 3 dices are thrown again.

Question: What is the probability that both outcomes are identical


(1) If the dices are distinguishable.  𝟏
𝟐𝟏𝟔
(2) If the dices are in-distinguishable. 𝟖𝟑
 
𝟑𝟖𝟖𝟖
9
A NEW PROBLEM

Letters and envelopes

10
Letters and envelopes
 𝟏
•     =
𝟐
 𝟏
  =
𝟑

• There are letters  𝟑


  =
𝟖
• There are envelopes with distinct addresses written on them.
• Each letter is meant for a unique envelope.

Letters are assigned randomly uniformly to the envelopes, one by one.


Question:
What is the probability that no letter is delivered to its correct address ?

  Homework: Try to find solution for a generic .


11
A CONDITIONAL PROBABILITY PROBLEM

5-Coins

12
5-Coins
Ponder over these
• 2 normal coins
questions and answers
• 2 coins with HEAD on both sides with fresh mind .
• 1 coins with TAIL on both sides
A coin is picked randomly uniformly
The coin is tossed.
 𝟑
Question: What is probability that outcome of toss is HEAD ?
𝟓
The outcome is

The same coin is tossed again.


 𝟓
Question: What is probability that outcome of toss is HEAD ? 𝟔
The outcome is

The same coin is tossed again.


 𝟗 13
Question: What is probability that outcome of toss is HEAD ? 𝟏𝟎
A SURPRISING PROBLEM

Area of shadow

14
A convex body

Definition:
A 3-D body is said to be convex if for each pair of points on the body,
all the points lying on the line joining them also lie inside the body.

15
A convex body

Definition:
A 3-D body is said to be convex if for each pair of points on the body,
all the points lying on the line joining them also lie inside the body.

  Sphere surface area :


Does it hold true
for any convex
body as well ?   Ratio =

yes   Shadow surface area :

16
A convex body

•  
Definition:
A 3-D body is said to be convex if for each pair of points on the body,
all the points lying on the line joining them also lies inside the body.

Does this theorem have


anything to do with
probability theory ?
Theorem:
Consider any convex body of surface area .
It is always possible to orient it such that its shadow is of area at least .

Proof: based on elementary probability theory.


17
RECRUITMENT PROBLEM

Google USA visits IITK for recruitment …

18

• There

are applicants aspirant for the Google USA.
 They are arranged in a uniformly random permutation.
AIM of Google: To hire the best applicant

Constraints:
• Only by taking an interview, the applicant can be evaluated.
• Each applicant must be told the result (job offered/rejected)
immediately after the interview.

Assumption:
There is a total order on the suitability of the applicants for the job.

Design a strategy for the recruitment.


19

You might also like