I think the latter would be better, although either will do. On Sun, Sep 3, 2023 at 7:12 AM Dr. Arne Babenhauserheide <[email protected]> wrote:
> Hello, > > one topic that came up in the discussion about finishing topological > sorting is to provide a way to calculate the strongly connected > components. > > How should we represent these? > > To make the question concrete: > > A test built from the task in Rosetta Code for Kosarajus and Tarjans > algorithm (https://rosettacode.org/wiki/Kosaraju) could look like this: > > (test-equal > '(0 0 0 3 3 5 5 7) > (connected-components > (edgelist->graph '((0 1) > (1 2) > (2 0) > (3 1) (3 2) (3 4) > (4 3) (4 5) > (5 2) (5 6) > (6 5) > (7 4) (7 6) (7 7))))) > > What would you expect to see as output? > > Is '(0 0 0 3 3 5 5 7) understandable? > > Should we provide bags of elements instead? '(0 1 2)(3 4)(5 6)(7) > > Best wishes, > Arne > -- > Unpolitisch sein > heißt politisch sein, > ohne es zu merken. > draketo.de >
