Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the branching search using the current disagreement count as a bound.
This might try more solutions than needed, but makes the first, fully working solver and makes progress.
Required adding the majority graph to the solution graph so that it can
Required adding an edge lookup function to the Tarjan configuration, so it could work with the modified majority graph.
So. A couple of steps mixed in.
The majority graph in the solution graph... It might be better to invoke a callback in the solution graph on edge addition and removal, then use a third thing to stitch together the majority graph and solution graph --as the modified majority graph. Deferring that.
Decided to have the Davenport search call back when it finds a complete solution. It might call back with some less than optimal, but will converge to optimal in the callbacks. This was to keep the search out of the solution tracking business.
The test graphs that contain cycles are generating a lot of solutions because they are under-constrained. Did not validate every solution. Spot checked them and validated the last solution within the tests. Need to generate some majority graphs from actual preferences, for use in tests. Marking that as a to do. #6