Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strengthen lower bound #8

Merged
merged 11 commits into from
May 10, 2019
Merged

Strengthen lower bound #8

merged 11 commits into from
May 10, 2019

Conversation

wbreeze
Copy link
Owner

@wbreeze wbreeze commented May 7, 2019

First add some utilities for generating representative majority graphs from preferences.

Add some tests with representative majority graphs that have cycles.

By "representative" we mean a majority graph that has a corresponding expression as a list of
rankings. Not all graphs represent majority graphs. Not even all that have only one edge between
any two nodes.

The majority graph of test_davenport_compute_preference_net_1 in test/test_davenport_prefs.c, derived from the preference graph of set_preference_net_1 of test/test_helper_pref_nets.c is excellent. It isn't under-constrained like some of the earlier tests, yet contains many cycles. The five alternatives bind together in the majority graph into one component. There are (I think) four cycles of length three and many longer cyclic traversals.

The algorithm produces only one best solution for this graph, with two disagreements. It produces that solution 14,808 times. That number will be the factorial of the number of edges minus alternative edge selections eliminated by transitive closures (where selecting an edge implies other edges).

I'm actually worried that strengthening the lower bound through use of the preflow-push network will slow the algorithm down. The greedy heuristic already drills-in on the lower valued solutions quite rapidly. This seems worth exploring.

This adds a component callback to the Tarjan algorithm. The Davenport algorithm uses this callback to make the lower bound computation on each component using the preflow push network.

@wbreeze wbreeze self-assigned this May 7, 2019
@wbreeze wbreeze merged commit 6d4f6e5 into master May 10, 2019
@wbreeze wbreeze deleted the prefs branch May 10, 2019 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant