SlideShare a Scribd company logo
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 ADITIHERBAL

A Health Behaviour in Schoolaged Children study found that .pdf
A Health Behaviour in Schoolaged Children study found that .pdfA Health Behaviour in Schoolaged Children study found that .pdf
A Health Behaviour in Schoolaged Children study found that .pdf
ADITIHERBAL
 
a Identify all NE throughout 3 you are only required to p.pdf
a Identify all NE throughout 3 you are only required to p.pdfa Identify all NE throughout 3 you are only required to p.pdf
a Identify all NE throughout 3 you are only required to p.pdf
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 
A formal often temporary partnership involving two or more.pdf
A formal often temporary partnership involving two or more.pdfA formal often temporary partnership involving two or more.pdf
A formal often temporary partnership involving two or more.pdf
ADITIHERBAL
 
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
ADITIHERBAL
 
A functional genomics experiment is carried out in E coli t.pdf
A functional genomics experiment is carried out in E coli t.pdfA functional genomics experiment is carried out in E coli t.pdf
A functional genomics experiment is carried out in E coli t.pdf
ADITIHERBAL
 
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
ADITIHERBAL
 
A frequency table of grades has five classes A B C D F.pdf
A frequency table of grades has five classes A B C D F.pdfA frequency table of grades has five classes A B C D F.pdf
A frequency table of grades has five classes A B C D F.pdf
ADITIHERBAL
 
A frequently heard complaint about merit raises is that they.pdf
A frequently heard complaint about merit raises is that they.pdfA frequently heard complaint about merit raises is that they.pdf
A frequently heard complaint about merit raises is that they.pdf
ADITIHERBAL
 
A factor favoring the success of disruptive innovation is th.pdf
A factor favoring the success of disruptive innovation is th.pdfA factor favoring the success of disruptive innovation is th.pdf
A factor favoring the success of disruptive innovation is th.pdf
ADITIHERBAL
 
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
ADITIHERBAL
 
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
ADITIHERBAL
 

More from ADITIHERBAL (20)

A Health Behaviour in Schoolaged Children study found that .pdf
A Health Behaviour in Schoolaged Children study found that .pdfA Health Behaviour in Schoolaged Children study found that .pdf
A Health Behaviour in Schoolaged Children study found that .pdf
 
a Identify all NE throughout 3 you are only required to p.pdf
a Identify all NE throughout 3 you are only required to p.pdfa Identify all NE throughout 3 you are only required to p.pdf
a Identify all NE throughout 3 you are only required to p.pdf
 
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 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 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 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 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 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 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 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 formal often temporary partnership involving two or more.pdf
A formal often temporary partnership involving two or more.pdfA formal often temporary partnership involving two or more.pdf
A formal often temporary partnership involving two or more.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 functional genomics experiment is carried out in E coli t.pdf
A functional genomics experiment is carried out in E coli t.pdfA functional genomics experiment is carried out in E coli t.pdf
A functional genomics experiment is carried out in E coli t.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 frequency table of grades has five classes A B C D F.pdf
A frequency table of grades has five classes A B C D F.pdfA frequency table of grades has five classes A B C D F.pdf
A frequency table of grades has five classes A B C D F.pdf
 
A frequently heard complaint about merit raises is that they.pdf
A frequently heard complaint about merit raises is that they.pdfA frequently heard complaint about merit raises is that they.pdf
A frequently heard complaint about merit raises is that they.pdf
 
A factor favoring the success of disruptive innovation is th.pdf
A factor favoring the success of disruptive innovation is th.pdfA factor favoring the success of disruptive innovation is th.pdf
A factor favoring the success of disruptive innovation is th.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
 
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
 

Recently uploaded

Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 

Recently uploaded (20)

Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 

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.