Suppose you are given the adjacency matrix representation M of a directed graph G = (V,E). Note
Fantastic news! We've Found the answer you've been seeking!
Question:
Suppose you are given the adjacency matrix representation M of a directed graph G = (V,E). Note that the size of M is Θ(n2). The goal here is to determine if there is a node of G with in-degree n−1 and out-degree 0 (that is, all other nodes point to it and it points to no other node). Give an algorithm to do this which runs in Θ(n) time, not Θ(n).
Related Book For
Discrete and Combinatorial Mathematics An Applied Introduction
ISBN: 978-0201726343
5th edition
Authors: Ralph P. Grimaldi
Posted Date: