Scilab function

circuit - finds a circuit or the rank function in a directed graph

Calling Sequence

[p,r] = circuit(g)

Parameters

Description

circuit tries to find a circuit for the directed graph g. It returns the circuit p as a row vector of the corresponding arc numbers if it exists and it returns the empty vector [] otherwise. If the graph has no circuit, the rank function is returned in r, otherwise its value is the empty vector [].

Examples