Hi I saw the answer: �If the graph has n nodes and is represented by an adjacency matrix, you can square the matrix (log_2 n)+1 times. Then you can multiply the matrix element-wise by its transpose. �
I�m a PhD student working on my research and I need to check for cycles in a directed graph to make sure it is a DAG. The answer given is extremely useful but I need the theorem statement, or a reference. Do you have a book where this is stated or a paper? Thanks! Daniela. [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.