SlideShare a Scribd company logo
1 of 1
Download to read offline
While exploring an ancient temple, Prof. Jones comes across a locked door. In front of
this door are two pedestals, and n blocks each labeled with its positive integer weight.
The sum of the weights of the blocks is W. In order to open the door, Prof. Jones needs
to put every block on one of the two pedestals. However, if the difference in the sum of
the weights of the blocks on each pedestal is too large, the door will not open.
Devise an algorithm that Prof. Jones can use to divide the blocks into two piles
whose total weights are as close as possible. To avoid a boulder rolling quickly
toward him, Prof. Jones needs your algorithm to run in pseudo-polynomial time.

More Related Content

More from solutions6

Which statement best describes the Ecological Perspective A.pdf
Which statement best describes the Ecological Perspective A.pdfWhich statement best describes the Ecological Perspective A.pdf
Which statement best describes the Ecological Perspective A.pdf
solutions6
 

More from solutions6 (20)

Which statement regarding extinction on Earth is true a Ma.pdf
Which statement regarding extinction on Earth is true a Ma.pdfWhich statement regarding extinction on Earth is true a Ma.pdf
Which statement regarding extinction on Earth is true a Ma.pdf
 
Which statement is true about the Healthy Reople initiative.pdf
Which statement is true about the Healthy Reople initiative.pdfWhich statement is true about the Healthy Reople initiative.pdf
Which statement is true about the Healthy Reople initiative.pdf
 
Which statement is true regarding the heart The apex of the.pdf
Which statement is true regarding the heart The apex of the.pdfWhich statement is true regarding the heart The apex of the.pdf
Which statement is true regarding the heart The apex of the.pdf
 
Which statements are true about audiovisual training Selec.pdf
Which statements are true about audiovisual training Selec.pdfWhich statements are true about audiovisual training Selec.pdf
Which statements are true about audiovisual training Selec.pdf
 
Which statement is not TRUE regarding MS Office macro 1 M.pdf
Which statement is not TRUE regarding MS Office macro  1 M.pdfWhich statement is not TRUE regarding MS Office macro  1 M.pdf
Which statement is not TRUE regarding MS Office macro 1 M.pdf
 
Which statement below about gene expression is TRUE The gen.pdf
Which statement below about gene expression is TRUE The gen.pdfWhich statement below about gene expression is TRUE The gen.pdf
Which statement below about gene expression is TRUE The gen.pdf
 
Which statement best describes the Ecological Perspective A.pdf
Which statement best describes the Ecological Perspective A.pdfWhich statement best describes the Ecological Perspective A.pdf
Which statement best describes the Ecological Perspective A.pdf
 
Which statement is correct regarding the dorsal horn of the .pdf
Which statement is correct regarding the dorsal horn of the .pdfWhich statement is correct regarding the dorsal horn of the .pdf
Which statement is correct regarding the dorsal horn of the .pdf
 
Which species of bacteria produced the enzyme urease Pseudo.pdf
Which species of bacteria produced the enzyme urease Pseudo.pdfWhich species of bacteria produced the enzyme urease Pseudo.pdf
Which species of bacteria produced the enzyme urease Pseudo.pdf
 
Which properties seemed to make the largest craters Find s.pdf
Which properties seemed to make the largest craters  Find s.pdfWhich properties seemed to make the largest craters  Find s.pdf
Which properties seemed to make the largest craters Find s.pdf
 
Which sediments and rocks do I add to these tables Choices .pdf
Which sediments and rocks do I add to these tables Choices .pdfWhich sediments and rocks do I add to these tables Choices .pdf
Which sediments and rocks do I add to these tables Choices .pdf
 
Which phase of the simplified system development process is .pdf
Which phase of the simplified system development process is .pdfWhich phase of the simplified system development process is .pdf
Which phase of the simplified system development process is .pdf
 
Which part of gene M codes for polypeptide M Promoter Intro.pdf
Which part of gene M codes for polypeptide M Promoter Intro.pdfWhich part of gene M codes for polypeptide M Promoter Intro.pdf
Which part of gene M codes for polypeptide M Promoter Intro.pdf
 
Which of the following will result in a movement along China.pdf
Which of the following will result in a movement along China.pdfWhich of the following will result in a movement along China.pdf
Which of the following will result in a movement along China.pdf
 
Which one of the following is not a business driver for an i.pdf
Which one of the following is not a business driver for an i.pdfWhich one of the following is not a business driver for an i.pdf
Which one of the following is not a business driver for an i.pdf
 
Which one of the following is a nonuse value of an environm.pdf
Which one of the following is a nonuse value of an environm.pdfWhich one of the following is a nonuse value of an environm.pdf
Which one of the following is a nonuse value of an environm.pdf
 
Which one is true about Logic Bomb a It is a program downl.pdf
Which one is true about Logic Bomb a It is a program downl.pdfWhich one is true about Logic Bomb a It is a program downl.pdf
Which one is true about Logic Bomb a It is a program downl.pdf
 
Which one is correct about RSA a RSA can also be used to h.pdf
Which one is correct about RSA a RSA can also be used to h.pdfWhich one is correct about RSA a RSA can also be used to h.pdf
Which one is correct about RSA a RSA can also be used to h.pdf
 
Which of these statements does not explain the slower onset .pdf
Which of these statements does not explain the slower onset .pdfWhich of these statements does not explain the slower onset .pdf
Which of these statements does not explain the slower onset .pdf
 
Which one is correct about RSA a RSA is a transposition ci.pdf
Which one is correct about RSA a RSA is a transposition ci.pdfWhich one is correct about RSA a RSA is a transposition ci.pdf
Which one is correct about RSA a RSA is a transposition ci.pdf
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 

While exploring an ancient temple Prof Jones comes across .pdf

  • 1. While exploring an ancient temple, Prof. Jones comes across a locked door. In front of this door are two pedestals, and n blocks each labeled with its positive integer weight. The sum of the weights of the blocks is W. In order to open the door, Prof. Jones needs to put every block on one of the two pedestals. However, if the difference in the sum of the weights of the blocks on each pedestal is too large, the door will not open. Devise an algorithm that Prof. Jones can use to divide the blocks into two piles whose total weights are as close as possible. To avoid a boulder rolling quickly toward him, Prof. Jones needs your algorithm to run in pseudo-polynomial time.