Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Combinatorica, TransitiveClosure

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111420] Combinatorica, TransitiveClosure
  • From: janos <janostothmeister at gmail.com>
  • Date: Sat, 31 Jul 2010 02:43:08 -0400 (EDT)

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