[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

carpinteyrogls

9/4/2013 2:07:00 PM


Journey planningIf you have the full bus schedule for a country, how can you find out the maximum number of people that can be carried between between two specified stops in 1 day?I assume a bus schedule gives you the full list of leaving and arriving times for every bus stop and also the capacity of each bus. You are given the start and end stop in the question.You could determine a sequence of buses that gives the shortest time to the destination and fill up all the buses that leave from the start going along this path and then when each bus arrives at a stop, just transfer as many passengers as possible to [url=http://www.camfalconara.it/...]stivali ugg italia[/url] the next bus that is leaving. There is no reason why this should have maximal capacity however.What is the fastest [url=http://www.camfalconara.it/piumi...]piumini moncler[/url] this problem can be solved? For example, suppose that for M cities I'm given a total of N records; route record R contains a number <a href="http://www.camfalconara.it/woolr..."&g... parka</a> K, a capacity C, and lists [url=http://www.ideatrade.it/woolr...]woolrich outlet bologna online[/url] of K city numbers, K arrival <a href="http://www.libreria-apogeo.it/abercrom...">a... fitch</a> times, and K departure times. (The first arrival time and the last departure time in R are irrelevant.) Can <a href="http://www.camfalconara.it/...">stivali ugg italia</a> a breadthfirst search program solve the question in O(MN) time?This isn't a weird puzzle; it's an <a href="http://www.camfalconara.it/piumi...">piumini moncler</a> algorithms question. One way to solve this [url=http://www.libreria-apogeo.it/abercrom...]abercrombie fitch[/url] is to make a directed graph with a node for every (location, arrival time) and (location, departure time). Each arrival node has an infinite capacity arc to all departures at the same location that aren't earlier. Each departure node has an arc [url=http://www.camfalconara.it/woolr...]woolrich parka[/url] to each of the appropriate arrival nodes <a href="http://www.ideatrade.it/woolr...">woolrich outlet bologna online</a> (per the bus schedule), weighted with the capacity of the bus. Then you can use your favorite algorithm to find the maximum flow from your source to your sink.Your source node should be an arrival node at time zero at your start location, your sink node should be a departure node at the ending time at your ending location.



[url=http://sevenb.ru/user/carpi...]And The Wedding Source[/url]
[url=http://12libr.ru/user/pl...]A contrast to the gravitydefying high heels of the previous year[/url]
[url=http://forum.gayplezier.nl/viewtopic.php?f=7&a...]Reduction of Donor Exposures in Premature Infants by the Use of Designated AdenineSaline Preserved Split Red Blood Cell Packs[/url]
[url=http://www.clichegames.com/forum/memberlist.php?mode=viewprofile&a...]10 things to ask in advance of when preparing a small business youtube channel[/url]
[url=http://dongking.net/board.php...]What can i do with wal[/url]