Skip to content

Conversation

@coraaked
Copy link
Contributor

@coraaked coraaked commented Dec 3, 2025

Code that identifies, given a symmetric digraph input, whether or not the given graph is a cograph or not. It implements the algorithm given in "Habib, M & Paul, C & Viennot (2005), A Simple Linear Time Recognition Algorithm for Cographs", which breaks down the vertices into a permutation, and then identifies whether or not this vertex set is a factorising permutation.

This code is quite verbose, and could be improved to work more efficiently with larger cographs, as there are a lot of internal functions used bound to slow it down. I would be interested to do some more work on this, or if somebody else wants to have a look, to see if there are methods of improvement before the function is properly implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant