MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Combinatorica, TransitiveClosure


Do I see well that both solutions are wrong?

<< Combinatorica`

ToAdjacencyMatrix[
  TransitiveClosure[
   FromOrderedPairs[{{1, 2}, {2, 3}, {3, 1}}]]] // MatrixForm

{{1, 2, 2}, {0, 1, 2}, {0, 0, 1}}

ToOrderedPairs[
 TransitiveClosure[FromOrderedPairs[{{1, 2}, {2, 3}, {3, 1}}]]]

{{1, 1}, {1, 2}, {1, 3}, {1, 2}, {2, 2}, {2, 3}, {1, 3}, {2, 3}, {3,
3}}

J=E1nos


  • Prev by Date: Re: different results for Standard vs Prefix forms
  • Next by Date: CreatePalette -> make palette inherit notebook's kernel
  • Previous by thread: Kernels dying on parallel code
  • Next by thread: CreatePalette -> make palette inherit notebook's kernel