Docsity

CSCE 1030 Homework 3: Crossing the River Puzzle - Prof. Ryan M. Garlick, Assignments of Computer Science

Toggle sidebar
bg1
CSCE 1030 Homework 3 Due: Thurs, Mar 5 at the Start of class
Crossing the River:
Five people must cross this scary suspension bridge.
There are some rules:
The bridge will support at most 2 people at a
time
Each person or group of two must have a
flashlight with them when crossing the bridge (it
is at night)
There is only one flashlight to share
A group of two crosses the bridge at the speed
of the slowest person in the group.
There is a person who takes 1 minute to cross
There is a person who takes 2 minutes to cross
There is a person who takes 4 minutes to cross
There is a person who takes 8 minutes to cross
There is a person who takes 16 minutes to cross
Turn in: A written solution by the start of class on
the due date – no emails accepted. Your solution
should have the minimum amount of time required
to get everyone across the bridge, and the details of
each trip. Your solution could be similar in format to:
1 2 4 8 16
2 4 8 1 16 Time: 16
x x x x x Time: ?
etc.
Total Time: ?

Partial preview of the text

Download CSCE 1030 Homework 3: Crossing the River Puzzle - Prof. Ryan M. Garlick and more Assignments Computer Science in PDF only on Docsity!

CSCE 1030 Homework 3 Due: Thurs, Mar 5 at the Start of class

Crossing the River: Five people must cross this scary suspension bridge. There are some rules:  The bridge will support at most 2 people at a time  Each person or group of two must have a flashlight with them when crossing the bridge (it is at night)  There is only one flashlight to share  A group of two crosses the bridge at the speed of the slowest person in the group. There is a person who takes 1 minute to cross There is a person who takes 2 minutes to cross There is a person who takes 4 minutes to cross There is a person who takes 8 minutes to cross There is a person who takes 16 minutes to cross Turn in: A written solution by the start of class on the due date – no emails accepted. Your solution should have the minimum amount of time required to get everyone across the bridge, and the details of each trip. Your solution could be similar in format to: 1 2 4 8 16 2 4 8  1 16 Time: 16 x x x x  x Time:? etc. Total Time:?