lgwillmore
BAN USERI think you could improve this by only starting a walk on the lowest characters in the matrix. You then only progress each of these walks if its next valid lowest step is as low as the lowest from all other of these walks. You progress each walk in lock step with each other and trim the losers at every step. You will never progress any walk further then it matches the real lowest walk.
- lgwillmore January 07, 2015I like this answer - I was working on the lines of a graph G with vertices of dogs and cats, and edges of votes (either a cat lover vote or a dog lover vote). Then:
1) identify each independent sub-graph of vertices that are connected
2) for each independent sub-graph count the dog votes and cat votes, and for whichever has the most votes in that sub-graph you would eliminate the other types of pets. Add this max value of votes to the total of satisfied votes.
Not sure if this is maximal though...
- lgwillmore February 10, 2015