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

Implement IsBetweenCoverAndX for partial orders and lattices #714

Open
reiniscirpons opened this issue Nov 20, 2024 · 1 comment
Open

Implement IsBetweenCoverAndX for partial orders and lattices #714

reiniscirpons opened this issue Nov 20, 2024 · 1 comment
Labels
new-feature A label for new features.

Comments

@reiniscirpons
Copy link
Collaborator

reiniscirpons commented Nov 20, 2024

Computing all the edges of a partial order or lattice via DigraphReflexiveTransitiveClosure can be very time and memory intensive, especially for larger graphs. At the same time, many algorithms for lattices can be run quite efficiently even if some transitive edges are missing.

We should implement the functions

  • IsBetweenCoverAndPreorder - to check if a given digraph contains the cover relation of some preorder digraph, and is in turn contained in a preorder digraph.
  • IsBetweenCoverAndPartialOrder - the equivalent functionality for partial order
  • IsBetweenCoverAndLattice - for lattices.

One naive way to implement this would be to compute the reflexive transitive closure and then apply the appropriate filter, i.e. IsLatticeDigraph(DigraphReflexiveTransitiveClosure(D)); would compute IsBetweenCoverAndLattice. However as mentioned above, doing so is memory intensive on large graphs, see also #636 . So the idea would be to implement IsBetweenCoverAndLattice ideally without adding any extra edges to the given digraph.

See also #664 and #632 for related, but not quite same problems.

@reiniscirpons
Copy link
Collaborator Author

reiniscirpons commented Nov 20, 2024

@zljlzljlz this is a writeup of what we spoke about earlier. I think the name I initially suggested for the function wasn't all that good and we should instead call the functions IsBetweenCoverAndX for each of the classes X.

As you mentioned, IsBetweenCoverAndPreorder should just always return true since this will always be the case. For IsBetweenCoverAndPartialOrder(D) I spoke to @james-d-mitchell briefly and we thought that maybe this would just involve checking if D is acyclic. For lattices we weren't really sure how to proceed but we can have a brainstorm next week!

@james-d-mitchell james-d-mitchell added the new-feature A label for new features. label Nov 27, 2024
@reiniscirpons reiniscirpons changed the title Implement functions for detecting whether a digraph is inbetween the cover relation and relation for a class of relations Implement functions for detecting whether a digraph is between the cover relation and order for a class of orders Nov 27, 2024
@reiniscirpons reiniscirpons changed the title Implement functions for detecting whether a digraph is between the cover relation and order for a class of orders Implement IsBetweenCoverAndX for partial orders and lattices Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A label for new features.
Projects
None yet
Development

No branches or pull requests

2 participants