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

ConnectedHypergraphQ #524

Open
daneelsan opened this issue Nov 9, 2020 · 0 comments
Open

ConnectedHypergraphQ #524

daneelsan opened this issue Nov 9, 2020 · 0 comments
Assignees
Labels
analysis Adds or changes evolution analysis tools, e.g., `WolframModelEvolutionObject` properties feature New functionality, or change in existing functionality wolfram language Requires Wolfram Language implementation

Comments

@daneelsan
Copy link
Collaborator

daneelsan commented Nov 9, 2020

The problem

Determine whether a hypergraph is connected.

Possible solution

WFR:

ConnectedHypergraphQ[edges : {__List}] := 
 ConnectedGraphQ[
  Graph[UndirectedEdge @@@ 
    Catenate[Partition[#, 2, 1, -1] & /@ edges]]]
In[] := ResourceFunction["ConnectedHypergraphQ"][{{1, 1, 2}, {2, 3, 4}}]
Out[] = True

In[] := ResourceFunction["ConnectedHypergraphQ"][{{1, 1, 2}, {2, 3, 4}, {5, 6, 7}}]
Out[] = False

Additional context

This might be used in the Connected -> True option of RandomHypergraph.

@daneelsan daneelsan added the feature New functionality, or change in existing functionality label Nov 9, 2020
@daneelsan daneelsan self-assigned this Nov 9, 2020
@daneelsan daneelsan added analysis Adds or changes evolution analysis tools, e.g., `WolframModelEvolutionObject` properties wolfram language Requires Wolfram Language implementation labels Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Adds or changes evolution analysis tools, e.g., `WolframModelEvolutionObject` properties feature New functionality, or change in existing functionality wolfram language Requires Wolfram Language implementation
Projects
None yet
Development

No branches or pull requests

1 participant