MathGroup Archive 2012

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

Search the Archive

subgraph error


Hello everyone,
I have a graph with 5 vertex:

gr=Graph[{1->2,1->3,4->1,5->1,1->1}]

so the first vertex has a loop,
when I call the subgraph with all the vertex departing from 1:

Subgraph[gr, 1 -> _ ]

I obtain an error:
DeleteDuplicates::list: List expected at position 1 in
DeleteDuplicates[Join[1,{1,2},{1,3}]]

Moreover if you try copy and paste the code I wrote here, probably you
won't see this error, but if you try
building this graph step by step one edge at time with  EdgeAdd
command, then I see the error....

I need to manage subgraphs in this way...
Any help?



  • Prev by Date: Re: Find common elements in a list of sublists
  • Next by Date: Re: Find common elements in a list of sublists
  • Previous by thread: Re: 3D Rotations
  • Next by thread: subgraph error (errata)