JuliaGraphs / JuliaGraphs/Graphs.jl

[BUG] `random_configuration_model` never halt when degree sequence is not graphic

Open
#222 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Julia
Stars
538
Forks
128
Avg merge
10h 25m
Merged PRs (30d)
2

Description

random_configuration_model(3, [2, 0, 0]) never halt.

This is because our implementation of the random configuration model does not allow self loops and multi-edges. In itself, it is already an oddity because it does not respect the uniformity of sampling, but if we keep it this way, we should check that the degree sequence provided is graphic.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the definition of random_configuration_model and reproduce the non-terminating call with degree sequence [2, 0, 0]. Determine how the implementation currently handles self loops and multi-edges, then ensure a non-graphic sequence is checked before sampling so the call terminates; add or update coverage for this input if the repository has relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.