SlideShare a Scribd company logo
1 of 1
Download to read offline
A group of n people were removed from the hotel. After a month, the kidnappers need to get rid of
these people, but they just don't want to let them go. They inform the hostages one evening that
the next morning they will be lined up one behind the other so that everyone sees those in front of
them but none behind. Then the captors will pass, starting with the last in line, and put a hat on
everyone's head, either red or black. Hats put down, the kidnappers will come back, always
starting at the end of the line, asking the simple question: what color hat do you have?. If the
person gives the correct color, they will be released. Otherwise, it will be executed instantly. The
only answer allowed (one that will not cause the responder to execute) is the color, black or red.
(a) How many people can be saved and how? Explain in detail (a formal proof but not necessary
at this time).
(b) Give (draw) an AFD that models the rescue protocol, with its interpretation. Pay attention to the
alphabet and the states.
2. Give a context-free grammar that generates the language L = {w {(,)} : w is parenthesis}. Prove
your answer.

More Related Content

More from adhityafashion

A hoverboard is a levitating board similar in shape and size.pdf
A hoverboard is a levitating board similar in shape and size.pdfA hoverboard is a levitating board similar in shape and size.pdf
A hoverboard is a levitating board similar in shape and size.pdfadhityafashion
 
A hypertonic solution is prepared by the addition of sucrose.pdf
A hypertonic solution is prepared by the addition of sucrose.pdfA hypertonic solution is prepared by the addition of sucrose.pdf
A hypertonic solution is prepared by the addition of sucrose.pdfadhityafashion
 
A hospital is trying to cut down on emergency room wait time.pdf
A hospital is trying to cut down on emergency room wait time.pdfA hospital is trying to cut down on emergency room wait time.pdf
A hospital is trying to cut down on emergency room wait time.pdfadhityafashion
 
A healthy female Labrador retriever was mated with two healt.pdf
A healthy female Labrador retriever was mated with two healt.pdfA healthy female Labrador retriever was mated with two healt.pdf
A healthy female Labrador retriever was mated with two healt.pdfadhityafashion
 
A football team consists of 19 each freshmen and sophomores .pdf
A football team consists of 19 each freshmen and sophomores .pdfA football team consists of 19 each freshmen and sophomores .pdf
A football team consists of 19 each freshmen and sophomores .pdfadhityafashion
 
A group of employees of Unique Services will be surveyed abo.pdf
A group of employees of Unique Services will be surveyed abo.pdfA group of employees of Unique Services will be surveyed abo.pdf
A group of employees of Unique Services will be surveyed abo.pdfadhityafashion
 
A group of college DJs surveyed students to find out what mu.pdf
A group of college DJs surveyed students to find out what mu.pdfA group of college DJs surveyed students to find out what mu.pdf
A group of college DJs surveyed students to find out what mu.pdfadhityafashion
 
a Given that XX1X2Xn represents a random sample of .pdf
a Given that XX1X2Xn represents a random sample of .pdfa Given that XX1X2Xn represents a random sample of .pdf
a Given that XX1X2Xn represents a random sample of .pdfadhityafashion
 
A Genler aras sekanslar insan genomunun gt60n oluturur.pdf
A Genler aras sekanslar insan genomunun gt60n oluturur.pdfA Genler aras sekanslar insan genomunun gt60n oluturur.pdf
A Genler aras sekanslar insan genomunun gt60n oluturur.pdfadhityafashion
 
A financial analyst is interested in estimating the proporti.pdf
A financial analyst is interested in estimating the proporti.pdfA financial analyst is interested in estimating the proporti.pdf
A financial analyst is interested in estimating the proporti.pdfadhityafashion
 
A genetic disorder shows cytoplasmic inheritance A heteropl.pdf
A genetic disorder shows cytoplasmic inheritance A heteropl.pdfA genetic disorder shows cytoplasmic inheritance A heteropl.pdf
A genetic disorder shows cytoplasmic inheritance A heteropl.pdfadhityafashion
 
A gene which is 1440 bp long codes for polypeptide that is 1.pdf
A gene which is 1440 bp long codes for polypeptide that is 1.pdfA gene which is 1440 bp long codes for polypeptide that is 1.pdf
A gene which is 1440 bp long codes for polypeptide that is 1.pdfadhityafashion
 
A generic queue is a general queue storage that can store an.pdf
A generic queue is a general queue storage that can store an.pdfA generic queue is a general queue storage that can store an.pdf
A generic queue is a general queue storage that can store an.pdfadhityafashion
 
A firm has the production function fxy60x45y15 The sl.pdf
A firm has the production function fxy60x45y15 The sl.pdfA firm has the production function fxy60x45y15 The sl.pdf
A firm has the production function fxy60x45y15 The sl.pdfadhityafashion
 
A Galup Roll released in December 2010 asked 2500 adults INi.pdf
A Galup Roll released in December 2010 asked 2500 adults INi.pdfA Galup Roll released in December 2010 asked 2500 adults INi.pdf
A Galup Roll released in December 2010 asked 2500 adults INi.pdfadhityafashion
 
a Find the CRC for data D 11101101 and G 10110 b Ver.pdf
a Find the CRC for data D  11101101 and G  10110  b Ver.pdfa Find the CRC for data D  11101101 and G  10110  b Ver.pdf
a Find the CRC for data D 11101101 and G 10110 b Ver.pdfadhityafashion
 
A firms base pricing strategy establishes the initial price.pdf
A firms base pricing strategy establishes the initial price.pdfA firms base pricing strategy establishes the initial price.pdf
A firms base pricing strategy establishes the initial price.pdfadhityafashion
 
A firm made a capital investment of 21 million depreciate.pdf
A firm made a capital investment of 21 million depreciate.pdfA firm made a capital investment of 21 million depreciate.pdf
A firm made a capital investment of 21 million depreciate.pdfadhityafashion
 
A financial intermediarys balance sheet is such that DA 5.pdf
A financial intermediarys balance sheet is such that DA 5.pdfA financial intermediarys balance sheet is such that DA 5.pdf
A financial intermediarys balance sheet is such that DA 5.pdfadhityafashion
 
A family with an interesting distribution of Leigh syndrome .pdf
A family with an interesting distribution of Leigh syndrome .pdfA family with an interesting distribution of Leigh syndrome .pdf
A family with an interesting distribution of Leigh syndrome .pdfadhityafashion
 

More from adhityafashion (20)

A hoverboard is a levitating board similar in shape and size.pdf
A hoverboard is a levitating board similar in shape and size.pdfA hoverboard is a levitating board similar in shape and size.pdf
A hoverboard is a levitating board similar in shape and size.pdf
 
A hypertonic solution is prepared by the addition of sucrose.pdf
A hypertonic solution is prepared by the addition of sucrose.pdfA hypertonic solution is prepared by the addition of sucrose.pdf
A hypertonic solution is prepared by the addition of sucrose.pdf
 
A hospital is trying to cut down on emergency room wait time.pdf
A hospital is trying to cut down on emergency room wait time.pdfA hospital is trying to cut down on emergency room wait time.pdf
A hospital is trying to cut down on emergency room wait time.pdf
 
A healthy female Labrador retriever was mated with two healt.pdf
A healthy female Labrador retriever was mated with two healt.pdfA healthy female Labrador retriever was mated with two healt.pdf
A healthy female Labrador retriever was mated with two healt.pdf
 
A football team consists of 19 each freshmen and sophomores .pdf
A football team consists of 19 each freshmen and sophomores .pdfA football team consists of 19 each freshmen and sophomores .pdf
A football team consists of 19 each freshmen and sophomores .pdf
 
A group of employees of Unique Services will be surveyed abo.pdf
A group of employees of Unique Services will be surveyed abo.pdfA group of employees of Unique Services will be surveyed abo.pdf
A group of employees of Unique Services will be surveyed abo.pdf
 
A group of college DJs surveyed students to find out what mu.pdf
A group of college DJs surveyed students to find out what mu.pdfA group of college DJs surveyed students to find out what mu.pdf
A group of college DJs surveyed students to find out what mu.pdf
 
a Given that XX1X2Xn represents a random sample of .pdf
a Given that XX1X2Xn represents a random sample of .pdfa Given that XX1X2Xn represents a random sample of .pdf
a Given that XX1X2Xn represents a random sample of .pdf
 
A Genler aras sekanslar insan genomunun gt60n oluturur.pdf
A Genler aras sekanslar insan genomunun gt60n oluturur.pdfA Genler aras sekanslar insan genomunun gt60n oluturur.pdf
A Genler aras sekanslar insan genomunun gt60n oluturur.pdf
 
A financial analyst is interested in estimating the proporti.pdf
A financial analyst is interested in estimating the proporti.pdfA financial analyst is interested in estimating the proporti.pdf
A financial analyst is interested in estimating the proporti.pdf
 
A genetic disorder shows cytoplasmic inheritance A heteropl.pdf
A genetic disorder shows cytoplasmic inheritance A heteropl.pdfA genetic disorder shows cytoplasmic inheritance A heteropl.pdf
A genetic disorder shows cytoplasmic inheritance A heteropl.pdf
 
A gene which is 1440 bp long codes for polypeptide that is 1.pdf
A gene which is 1440 bp long codes for polypeptide that is 1.pdfA gene which is 1440 bp long codes for polypeptide that is 1.pdf
A gene which is 1440 bp long codes for polypeptide that is 1.pdf
 
A generic queue is a general queue storage that can store an.pdf
A generic queue is a general queue storage that can store an.pdfA generic queue is a general queue storage that can store an.pdf
A generic queue is a general queue storage that can store an.pdf
 
A firm has the production function fxy60x45y15 The sl.pdf
A firm has the production function fxy60x45y15 The sl.pdfA firm has the production function fxy60x45y15 The sl.pdf
A firm has the production function fxy60x45y15 The sl.pdf
 
A Galup Roll released in December 2010 asked 2500 adults INi.pdf
A Galup Roll released in December 2010 asked 2500 adults INi.pdfA Galup Roll released in December 2010 asked 2500 adults INi.pdf
A Galup Roll released in December 2010 asked 2500 adults INi.pdf
 
a Find the CRC for data D 11101101 and G 10110 b Ver.pdf
a Find the CRC for data D  11101101 and G  10110  b Ver.pdfa Find the CRC for data D  11101101 and G  10110  b Ver.pdf
a Find the CRC for data D 11101101 and G 10110 b Ver.pdf
 
A firms base pricing strategy establishes the initial price.pdf
A firms base pricing strategy establishes the initial price.pdfA firms base pricing strategy establishes the initial price.pdf
A firms base pricing strategy establishes the initial price.pdf
 
A firm made a capital investment of 21 million depreciate.pdf
A firm made a capital investment of 21 million depreciate.pdfA firm made a capital investment of 21 million depreciate.pdf
A firm made a capital investment of 21 million depreciate.pdf
 
A financial intermediarys balance sheet is such that DA 5.pdf
A financial intermediarys balance sheet is such that DA 5.pdfA financial intermediarys balance sheet is such that DA 5.pdf
A financial intermediarys balance sheet is such that DA 5.pdf
 
A family with an interesting distribution of Leigh syndrome .pdf
A family with an interesting distribution of Leigh syndrome .pdfA family with an interesting distribution of Leigh syndrome .pdf
A family with an interesting distribution of Leigh syndrome .pdf
 

Recently uploaded

Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
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
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Recently uploaded (20)

Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
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...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 

A group of n people were removed from the hotel After a mon.pdf

  • 1. A group of n people were removed from the hotel. After a month, the kidnappers need to get rid of these people, but they just don't want to let them go. They inform the hostages one evening that the next morning they will be lined up one behind the other so that everyone sees those in front of them but none behind. Then the captors will pass, starting with the last in line, and put a hat on everyone's head, either red or black. Hats put down, the kidnappers will come back, always starting at the end of the line, asking the simple question: what color hat do you have?. If the person gives the correct color, they will be released. Otherwise, it will be executed instantly. The only answer allowed (one that will not cause the responder to execute) is the color, black or red. (a) How many people can be saved and how? Explain in detail (a formal proof but not necessary at this time). (b) Give (draw) an AFD that models the rescue protocol, with its interpretation. Pay attention to the alphabet and the states. 2. Give a context-free grammar that generates the language L = {w {(,)} : w is parenthesis}. Prove your answer.