JuliaGraphs / JuliaGraphs/Graphs.jl
[BUG] `random_configuration_model` never halt when degree sequence is not graphic
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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