I am having issues choosing the correct way to resolve this problem with an algorithm. I appreciate any thoughts on the problem. This is not homework, this is an application I am writing for personal use. This is not the exact problem but it is an example of the logic I am trying to use to find the best way to solve.
Example: Say you have three people. All three people can mow, trim bushes and weed. One task can be performed by one person. The people are rated from a scale of 1 - 10 on their ability to perform a task, 10 being better. Person 1 can mow = 8, trim = 4, weed = 6. Person 2 can mow = 5, trim 4, weed 7. person 3 can mow = 7, trim 8, weed = 8. How do I find which person to do each task using a looping statement? I will use the sum of the abilities as the metric to choose. Please keep in mind if person 1 mows, person 2 & 3 must either trim or weed. Only one person can perform a task.
I thought about creating a 2d array. Something like array[person,ability] and looping through it but I am having issue understanding how the looping logic should work. Any help or point in the right direction will be appreciated!
Thanks