algorithm - A special case of grouping coordinates -


i'm trying write program place students in cars carpooling event. have addresses each student, , can geocode each address coordinates (the addresses close enough can use euclidean distances between coordinates.) of students have cars , can drives others. how can efficiently group students in cars? know grouping done using algorithms k-mean, can find algorithms group n points m arbitrary-sized groups. groups of specific size , positioning. can start? greedy algorithm ensure first cars assigned have minimum pick-up distance, average high, imagine.

say trying minimize total distance traveled. traveling salesman problem special instance of problem problem np-hard. puts in heuristics/approximation algorithms domain.

the problem needs more specification, example howmany students can fit in given car. lets say, many want.

how solve minimum spanning tree rooted @ final destination. each student car is responsible collecting children nodes. total distance traveled in @ 2x total length of spanning tree 2x bound right there. of course ridiculous 'coz nodes next root driving mega bus instead of car in case.

so start playing packing game try fill cars greedily.

i know not solution, might specify problem better.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -