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

adding UndirectedGraphs module and tests #100

Merged
merged 1 commit into from
Feb 27, 2024
Merged

adding UndirectedGraphs module and tests #100

merged 1 commit into from
Feb 27, 2024

Conversation

muenchnerkindl
Copy link
Contributor

I suggest adding a variant of the Graphs module for undirected graphs, in which edges are represented as unordered pairs {a,b} of nodes, thus enforcing symmetry. The module contains a union-find based operator for computing connected components of an undirected graph.

@lemmy lemmy added the enhancement New feature or request label Feb 26, 2024
(****************************************************************************)
ConnectedComponents(G) ==
LET base == {{n} : n \in G.node}
choice(E) == CHOOSE e \in E : TRUE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR but choice(E) == ... should perhaps be added as an auxiliary definition in Folds.tla.

Copy link
Member

@lemmy lemmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lemmy lemmy merged commit 2cee5a3 into master Feb 27, 2024
2 checks passed
@lemmy lemmy deleted the ugraph branch February 27, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants