SlideShare a Scribd company logo
1 of 1
Download to read offline
Consider a dinner table where n dining philosophers are seated. Each
philosopher has a plate of food; however, there is only a single eating-utensil placed
in the center of the table. Eating is done at discrete rounds. At the beginning of
each round, if a philosopher wishes to eat, she may attempt to obtain the utensil
from the center of the table. If the philosopher obtains the utensil, she eats for the
duration of the round (i.e., only one philosopher may eat during any given round)
and then places the utensil back at the table center at the end of the round. If
two or more philosophers attempt to obtain the utensil at the beginning of the
same round, then no philosopher will eat during that round (i.e., no one obtains the
utensil); thus, if all the philosophers try to access the utensil on every round, no
philosopher would ever eat.
One way to avoid the starvation of these philosophers is to use randomization. A
possible simple randomized algorithm is to have each philosopher attempt to obtain
the utensil at any given round with probability p > 0 (independently of the decisions
of the other philosophers).
a) What is the probability (in terms of p) that a philosopher is able to successfully
eat during any given single round?
b) What value of p maximizes this probability?
c) Using the probability from Part b, what is the probability that a philosopher
does not successfully obtain the utensil after k consecutive rounds?
Solution
a.) p*(1-p)^n b.) p = 1/n c.) [(1- 1/n)^n ]/n

More Related Content

More from alamodeindia1

Consider a family tree that consists of just you, your parents,their.pdf
Consider a family tree that consists of just you, your parents,their.pdfConsider a family tree that consists of just you, your parents,their.pdf
Consider a family tree that consists of just you, your parents,their.pdfalamodeindia1
 
Consider a discrete random variable X with moment generating functio.pdf
Consider a discrete random variable X with moment generating functio.pdfConsider a discrete random variable X with moment generating functio.pdf
Consider a discrete random variable X with moment generating functio.pdfalamodeindia1
 
Consider a $6500 piece of machinery , with a 5 year depreciable like.pdf
Consider a $6500 piece of machinery , with a 5 year depreciable like.pdfConsider a $6500 piece of machinery , with a 5 year depreciable like.pdf
Consider a $6500 piece of machinery , with a 5 year depreciable like.pdfalamodeindia1
 
Conduct a company review of Starbucks. What are their unique growth .pdf
Conduct a company review of Starbucks. What are their unique growth .pdfConduct a company review of Starbucks. What are their unique growth .pdf
Conduct a company review of Starbucks. What are their unique growth .pdfalamodeindia1
 
Components of computer systems often have dependencies--other co.pdf
Components of computer systems often have dependencies--other co.pdfComponents of computer systems often have dependencies--other co.pdf
Components of computer systems often have dependencies--other co.pdfalamodeindia1
 
Computer-Based Training (CBT) Methods Please respond to the foll.pdf
Computer-Based Training (CBT) Methods Please respond to the foll.pdfComputer-Based Training (CBT) Methods Please respond to the foll.pdf
Computer-Based Training (CBT) Methods Please respond to the foll.pdfalamodeindia1
 

More from alamodeindia1 (6)

Consider a family tree that consists of just you, your parents,their.pdf
Consider a family tree that consists of just you, your parents,their.pdfConsider a family tree that consists of just you, your parents,their.pdf
Consider a family tree that consists of just you, your parents,their.pdf
 
Consider a discrete random variable X with moment generating functio.pdf
Consider a discrete random variable X with moment generating functio.pdfConsider a discrete random variable X with moment generating functio.pdf
Consider a discrete random variable X with moment generating functio.pdf
 
Consider a $6500 piece of machinery , with a 5 year depreciable like.pdf
Consider a $6500 piece of machinery , with a 5 year depreciable like.pdfConsider a $6500 piece of machinery , with a 5 year depreciable like.pdf
Consider a $6500 piece of machinery , with a 5 year depreciable like.pdf
 
Conduct a company review of Starbucks. What are their unique growth .pdf
Conduct a company review of Starbucks. What are their unique growth .pdfConduct a company review of Starbucks. What are their unique growth .pdf
Conduct a company review of Starbucks. What are their unique growth .pdf
 
Components of computer systems often have dependencies--other co.pdf
Components of computer systems often have dependencies--other co.pdfComponents of computer systems often have dependencies--other co.pdf
Components of computer systems often have dependencies--other co.pdf
 
Computer-Based Training (CBT) Methods Please respond to the foll.pdf
Computer-Based Training (CBT) Methods Please respond to the foll.pdfComputer-Based Training (CBT) Methods Please respond to the foll.pdf
Computer-Based Training (CBT) Methods Please respond to the foll.pdf
 

Recently uploaded

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 

Recently uploaded (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 

Consider a dinner table where n dining philosophers are seated. Each.pdf

  • 1. Consider a dinner table where n dining philosophers are seated. Each philosopher has a plate of food; however, there is only a single eating-utensil placed in the center of the table. Eating is done at discrete rounds. At the beginning of each round, if a philosopher wishes to eat, she may attempt to obtain the utensil from the center of the table. If the philosopher obtains the utensil, she eats for the duration of the round (i.e., only one philosopher may eat during any given round) and then places the utensil back at the table center at the end of the round. If two or more philosophers attempt to obtain the utensil at the beginning of the same round, then no philosopher will eat during that round (i.e., no one obtains the utensil); thus, if all the philosophers try to access the utensil on every round, no philosopher would ever eat. One way to avoid the starvation of these philosophers is to use randomization. A possible simple randomized algorithm is to have each philosopher attempt to obtain the utensil at any given round with probability p > 0 (independently of the decisions of the other philosophers). a) What is the probability (in terms of p) that a philosopher is able to successfully eat during any given single round? b) What value of p maximizes this probability? c) Using the probability from Part b, what is the probability that a philosopher does not successfully obtain the utensil after k consecutive rounds? Solution a.) p*(1-p)^n b.) p = 1/n c.) [(1- 1/n)^n ]/n