Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

strongly connected components are not strongly connected? #348

@arekfu

Description

@arekfu

I generate strongly connected components of random graphs and subsequently check if they are strongly connected. The result is systematically false. Am I missing something?

import LightGraphs: strongly_connected_components, is_strongly_connected,
                    induced_subgraph, erdos_renyi

function scc_ok(graph)
  scc = strongly_connected_components(graph)
  scc_as_subgraphs = map(i -> induced_subgraph(graph, i), scc)
  return all(is_strongly_connected, scc_as_subgraphs)
end

println(all(scc_ok, [erdos_renyi(400, 0.01, is_directed=true) for i in 1:100]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmed bug producing incorrect results

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions