Traveling problems - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Traveling problems

blackout9000blackout9000 Posts: 4Member
[size=3]The problem:
'There are N countries and K travel guides (N>=K). Each guide has a number of tourists from each country (that number is >=0). Travel guides are incorectly informed because each of them should have only tourists from one country and each country only one guide. The task is to distribute as less as possible tourists from one giude to another so that they can begin their tours (Some travel guides may not have any tourists).'

So, we have an KxN matrix filled with numbers of tourists.

I think the idea is to pick a number from each row (but no two of picked numbers are from same column - country) so the sum of the rest is minimal. I just don't have any idea how to do that. Please help!
If you have any better ideas please post! Thanks![/size]
Sign In or Register to comment.