Add IsParadoxical and IsKParadoxical for tournaments - #947
Open
William-Kenyon wants to merge 1 commit into
Open
William-Kenyon wants to merge 1 commit into
William-Kenyon wants to merge 1 commit into
Conversation
…xical and k-paradoxical
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #942, for checking if a tournament is paradoxical (every vertex has an in-neighbour), or more generally if it is k-paradoxical (every set of
kvertices has a common in-neighbor).Notes:
IsKParadoxical(D, k)is brute-force: it checks every subset of sizekfor a common in-neighbour using list intersection, which has complexityO((n choose k) * k * n)wherenis the number of vertices ofD.Dhas no vertices, then regardless ofk, it is not paradoxical, though I don't have any reason for/against the convention.Dhas vertices butkis 0, then it is considered paradoxical, to not break the pattern that beingk-paradoxical implies being(k-1)-, (k-2)-,...-paradoxical.I made
IsParadoxical(D)a property andIsKParadoxical(D, k)an operation, but am wondering if both should be operations,IsParadoxicalshould be removed, or is there a better option?A possible follow-up is to add Paley digraphs, which give a way to construct k-paradoxical tournaments (Graham, R. H., Spencer, J. H., "A Constructive Solution to a Tournament Problem").