MathGroup Archive 2009

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

Search the Archive

Re: edge contraction for a graph (Combinatorica)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103391] Re: [mg103378] edge contraction for a graph (Combinatorica)
  • From: SebastiÃn A. Reyes <sareyes at gmail.com>
  • Date: Sat, 19 Sep 2009 05:28:12 -0400 (EDT)
  • References: <200909180939.FAA09227@smc.vnet.net>

This works fine when there is only one edge between the pair of
vertices that you want to contract. The problem comes when there is
more than one edge between the pair of vertices because Contract[]
deletes them ALL. I want to delete one particular edge and then
identify the corresponding vertices. (When there is more than one edge
between them this would result in self-loop(s) on the contracted
vertex.)
Thanks,
S.

2009/9/18 Patrick Scheibe <pscheibe at trm.uni-leipzig.de>:
> Hi,
>
> what about
>
> << Combinatorica`
> g = CompleteGraph[6];
> ShowGraph /@ {g, Contract[g, {1, 2}]}
>
> ?
>
> Cheers
> Patrick
>
> On Fri, 2009-09-18 at 05:39 -0400, Sebasti=C3=A1n A. Reyes wrote:
>> Hi,
>> =C2 I need a command or a simple way to perform an edge contraction in=
 a
>> graph as defined in http://mathworld.wolfram.com/EdgeContraction.html
>> (The Contraction command does a vertex contraction.) It seems like
>> something pretty obvious but I've been looking at the documentation
>> and I can't find anything that helps me.
>> =C2 Thank you.
>> S.
>>
>
>


  • Prev by Date: Re: Credit card balance transfer fee problem
  • Next by Date: Re: Generating best-fit line formula for arbitrary list
  • Previous by thread: Re: edge contraction for a graph (Combinatorica)
  • Next by thread: Re: edge contraction for a graph (Combinatorica)