SlideShare a Scribd company logo
Randomized Algorithms
CS648

Lecture 14
Expected duration of a randomized experiment
Part II
1
REVISITING
SOME DISCRETE MATHEMATICS

2
Recurrence 1

3
Recurrence 2

4
DISTRIBUTED CLIENT-SERVER PROBLEM

5
Distributed Client-Server Problem

6
Distributed Client-Server Problem
Randomized protocol (one round)
• Each client sends a request to a server selected randomly uniformly and
independently.
• Each server which receives one or more requests, accepts only one
request and finishes the corresponding job.
• Each client, whose job is finished, leaves the system.
• The remaining clients repeat the same procedure in next round.
Question: what is the expected number of rounds to finish all jobs?
7
Distributed Client-Server problem
Randomized protocol
1

2

3

4

5

6

7

8

7

8

Clients

It can be framed as our familiar
ball-bin problem.


Servers
1

2

3

4

5

6

8
Distributed Client-Server problem
Randomized protocol
1

2

1

2

3

4

5

6

7

8

6

7

8

Balls

Bins
3

4

5

9
Distributed Client-Server problem
Randomized protocol
Round 1
1

2

1

2

3

3

4

4

5

5

6

7

8

6

7

8

10
Distributed Client-Server problem
Randomized protocol
3

1

2

3

4

4

7

5

6

8

7

8

11
Distributed Client-Server problem
Randomized protocol
Round 2
3

1

2

3

4

4

7

5

6

8

7

8

12
Distributed Client-Server problem
Randomized protocol
Round 3
8

1

2

3

4

5

6

7

8

13
CALCULATING EXPECTED NO. OF ROUNDS
FIRST APPROACH

14
Round 1
1

Distributed Client-Server problem
Randomized protocol
2

3

Not so easy to find

15
Round 1
1

Distributed Client-Server problem
Randomized protocol
2

3

Is there any relation between
no. of empty bins and
no. of balls leaving the system in round 1 ?

16
Distributed Client-Server problem
Randomized protocol
1

2

17
Distributed Client-Server problem
Randomized protocol

Round

0

No. of balls in the system

Fraction of balls in the system

1

1
2
This table gives the intuition for the expected no. of rounds but it directly does
not help us to calculate the expected no. of rounds ? It also does not directly
help to get a high prob. Bound. Convince yourself before proceeding further.

18
Distributed Client-Server problem
Randomized protocol

Use Markov’s
Inequality

Use
Recurrence 2
Each round is good independent
of other rounds.
19
Distributed Client-Server problem
Randomized protocol

This bound is very loose.
Can you see why ?

20
An important insight that we missed
Question: What is the cause of multiple rounds for a ball ?
Answer: presence of other competing balls
INSIGHT
As the algorithm proceeds:
• The number of these competing balls reduce
• but the number of bins remain unchanged

Chances of a ball to leave the system increases as the algorithm proceeds.

21
CALCULATING EXPECTED NO. OF ROUNDS
WITH NEW INSIGHT

22
Distributed Client-Server problem
Randomized protocol

Stage 1

Stage 2

23
CALCULATING EXPECTED NO. OF ROUNDS
IN STAGE 2

24
Distributed Client-Server problem
Randomized protocol
1

2

We need a reasonably good upper bound for this
expression
25
Distributed Client-Server problem
Randomized protocol
1

2

26
Distributed Client-Server problem
Randomized protocol

Use Markov’s
Inequality

Use
Recurrence 2

27
Distributed Client-Server problem
Randomized protocol

28
Distributed Client-Server problem
Randomized protocol

29
RUMOR SPREADING

30
Rumor Spreading

31
Rumor Spreading

Number of people knowing
the rumor can only double
in a day.

32
Rumor Spreading

33
Rumor Spreading

34
Rumor Spreading

Stage 1

Stage 2
35
EXPECTED NO. OF DAYS IN
STAGE 2

36
Rumor Spreading

37
EXPECTED NO. OF DAYS IN
STAGE 1

38
It is left as a home work to be
discussed in some future class.
I shall be happy to see a correct
solution by some of you in the next
class.

39

More Related Content

PPTX
Lecture 14-cs648-2013
PPTX
Reactive Performance Testing
PDF
SFScon 21 - Matteo Camilli - Performance assessment of microservices with str...
PDF
management of distributed transactions
PDF
Continuous Performance Testing
PDF
Resilience testing! Why should you
PDF
Microservices Testing Strategies: The Good, the Bad, and the Reality
PPTX
Reactive by example (DevOpsDaysTLV 2019)
Lecture 14-cs648-2013
Reactive Performance Testing
SFScon 21 - Matteo Camilli - Performance assessment of microservices with str...
management of distributed transactions
Continuous Performance Testing
Resilience testing! Why should you
Microservices Testing Strategies: The Good, the Bad, and the Reality
Reactive by example (DevOpsDaysTLV 2019)

Viewers also liked (20)

PPTX
Lecture 5-cs648
PDF
Jee advanced-2014-paper-1-code-9-english
PDF
شهر رجب والإسراء والمعراج الخطب الإلهامية
PPTX
Lecture 9-cs648-2013
PPTX
Petrol pricing
PDF
الحب والجنس فى الإسلام للشيخ فوزى محمد أبوزيد
PPTX
Interactive powerpoint
PPTX
Evaluation questionmedia
PPTX
Dignity presentation
PPTX
Tribe powerpoint
PDF
Республика Цвета - портфолио 2010 г
PDF
موازين الصادقين لفضيلة الشيخ فوزى محمد أبوزيد
PPTX
Sanusia1
PDF
DOCX
Doc1
PDF
Республика Цвета
PDF
Procedura
DOC
Dialogues of Modern Man
DOC
[Ttvd] ke hoach toan bo chuong trinh 25 6
PPTX
Lecture 5-cs648
Jee advanced-2014-paper-1-code-9-english
شهر رجب والإسراء والمعراج الخطب الإلهامية
Lecture 9-cs648-2013
Petrol pricing
الحب والجنس فى الإسلام للشيخ فوزى محمد أبوزيد
Interactive powerpoint
Evaluation questionmedia
Dignity presentation
Tribe powerpoint
Республика Цвета - портфолио 2010 г
موازين الصادقين لفضيلة الشيخ فوزى محمد أبوزيد
Sanusia1
Doc1
Республика Цвета
Procedura
Dialogues of Modern Man
[Ttvd] ke hoach toan bo chuong trinh 25 6
Ad

Similar to Lecture 14-2013 (20)

PPTX
Lecture 14-cs648-2013
PDF
BlueHat v18 || Hardening hyper-v through offensive security research
PDF
Cocktail of Environments. How to Mix Test and Development Environments and St...
PDF
Why is My Stream Processing Job Slow? with Xavier Leaute
PDF
Resilient Predictive Data Pipelines (GOTO Chicago 2016)
PDF
Reaching reliable agreement in an unreliable world
PDF
Firebase introduction
PDF
Multi-tenant Data Pipeline Orchestration
PPTX
Apache Kafka Bay Area Sep Meetup - 24/7 Customer, Inc.
PDF
PraveenBOUT++
PDF
How to mutate your immutable log | Andrey Falko, Stripe
PDF
adhoc and wireless sensor network nptel assignment answers (1).pdf
PDF
adhoc and wireless sensor network nptel assignment answers (1).pdf
PPTX
Reduce Redundant Producers from Partitioned Producer - Pulsar Summit NA 2021
PDF
Lecture 5- Process Synchonization_revised.pdf
PDF
Cruise Control: Effortless management of Kafka clusters
PDF
Zerostack reliable openstack
PPTX
Fault-tolerance Quantum computation and Quantum Error Correction
PPTX
synchronization in operating system structure
PPSX
MQTC V2.0.1.3 - WMQ & TCP Buffers – Size DOES Matter! (pps)
Lecture 14-cs648-2013
BlueHat v18 || Hardening hyper-v through offensive security research
Cocktail of Environments. How to Mix Test and Development Environments and St...
Why is My Stream Processing Job Slow? with Xavier Leaute
Resilient Predictive Data Pipelines (GOTO Chicago 2016)
Reaching reliable agreement in an unreliable world
Firebase introduction
Multi-tenant Data Pipeline Orchestration
Apache Kafka Bay Area Sep Meetup - 24/7 Customer, Inc.
PraveenBOUT++
How to mutate your immutable log | Andrey Falko, Stripe
adhoc and wireless sensor network nptel assignment answers (1).pdf
adhoc and wireless sensor network nptel assignment answers (1).pdf
Reduce Redundant Producers from Partitioned Producer - Pulsar Summit NA 2021
Lecture 5- Process Synchonization_revised.pdf
Cruise Control: Effortless management of Kafka clusters
Zerostack reliable openstack
Fault-tolerance Quantum computation and Quantum Error Correction
synchronization in operating system structure
MQTC V2.0.1.3 - WMQ & TCP Buffers – Size DOES Matter! (pps)
Ad

More from Rajiv Omar (20)

PPTX
Lecture 6-cs345-2014
PPTX
Lecture 7-cs345-2014
ODP
Lecture 2-cs648
PPTX
Lecture 15
PPTX
Lecture 16
PPTX
Lecture 13-cs648
PPTX
Lecture 17-cs648
PPTX
Lecture 18-cs648
PPTX
Lecture 19-cs648
PPTX
Lecture 20-cs648
PPTX
Lecture 22-cs648
PPTX
Lecture 3-cs648
PPTX
Lecture 4-cs648
PPTX
Lecture 6-cs648
PPTX
Lecture 7-cs648
PPTX
Lecture 8-cs648-2013
PPTX
Lecture 1-cs648
PPTX
Lecture 10-cs648=2013
PPTX
Lecture 11-cs648-2013
PPTX
Lecture 12-cs648-2013
Lecture 6-cs345-2014
Lecture 7-cs345-2014
Lecture 2-cs648
Lecture 15
Lecture 16
Lecture 13-cs648
Lecture 17-cs648
Lecture 18-cs648
Lecture 19-cs648
Lecture 20-cs648
Lecture 22-cs648
Lecture 3-cs648
Lecture 4-cs648
Lecture 6-cs648
Lecture 7-cs648
Lecture 8-cs648-2013
Lecture 1-cs648
Lecture 10-cs648=2013
Lecture 11-cs648-2013
Lecture 12-cs648-2013

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
KodekX | Application Modernization Development
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Weekly Chronicles - August'25 Week I
sap open course for s4hana steps from ECC to s4
Unlocking AI with Model Context Protocol (MCP)
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KodekX | Application Modernization Development
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Network Security Unit 5.pdf for BCA BBA.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
Understanding_Digital_Forensics_Presentation.pptx
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Lecture 14-2013