Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

19. Quentin, Alice, and the other Brakebills Physical Kids are planning an excursion through the Neitherlands to Fillory. The Neitherlands is a vast, deserted

image

19. Quentin, Alice, and the other Brakebills Physical Kids are planning an excursion through the Neitherlands to Fillory. The Neitherlands is a vast, deserted city composed of several plazas, each containing a single fountain that can magically transport people to a different world. Adjacent plazas are connected by gates, which have been cursed by the Beast. The gates between plazas are open only for five minutes every hour, all simultaneously-from 12:00 to 12:05, then from 1:00 to 1:05, and so on-and are otherwise locked. During those five minutes, if more than one person passes through any single gate, the Beast will detect their presence.5 Moreover, anyone attempting to open a locked gate, or attempting to pass through more than one gate within the same five-minute period will turn into a niffin.16 However, any number of people can safely pass through different gates at the same time and/or pass through the same gate at different times. You are given a map of the Neitherlands, which is a graph G with a vertex for each fountain and an edge for each gate, with the fountains to Earth and Fillory clearly marked. (a) Suppose you are also given a positive integer h. Describe and analyze an algorithm to compute the maximum number of people that can walk from the Earth fountain to the Fillory fountain in at most h hours-that is, after the gates have opened at most h times-without anyone alerting the Beast or turning into a niffin. The running time of your algorithm should depend on h. [Hint: Build a different graph.]

Step by Step Solution

3.37 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

Answer and step by step explanation Algorithm 1 Construct a new graph G with a vertex for ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions