Skip Menu |

This queue is for tickets about the Graph CPAN distribution.

Report information
The Basics
Id: 20021
Status: resolved
Priority: 0/
Queue: Graph

People
Owner: Nobody in particular
Requestors: bcomisky [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.75
Fixed in: (no value)



Subject: bridges() sometimes returns empty list when isolated vertices present
#!/usr/bin/perl # The bridges call should return 1 bridge for this graph, but # if there are isolated vertices, then sometimes it returns empty. # The frequency of this happening goes up with the number of isolated # vertices. # # Multiple calls within the same script always give the same result, # but multiple runs of the script will produce different results. # Problem maybe dependent on returned hash key order somewhere? # # #run multiple times like: =pod run this script multiple times like: $ for i in $(seq 1 10); do ./bridge_test.pl; done 0000000000 0000000000 1111111111 1111111111 0000000000 1111111111 0000000000 1111111111 1111111111 0000000000 =cut # b1-a1 - a2 - b2 # \ / \ / # c1 c2 use Graph; $g = new Graph::Undirected; $g->add_edges(qw(a1 b1 b1 c1 c1 a1 a2 b2 b2 c2 c2 a2 a1 a2)); $g->add_vertices(1..5); foreach (1..10) { print scalar($g->bridges); } print "\n";
On Wed Jun 21 01:25:38 2006, guest wrote: Show quoted text
> # b1-a1 - a2 - b2 > # \ / \ / > # c1 c2
my picture of the graph (minus any isolated vertices) doesn't translate well on the non-monospaced page.. looks ok in the plain text download. bill
From: bcomisky [...] pobox.com
Show quoted text
> > $ for i in $(seq 1 10); do ./bridge_test.pl; done > 0000000000 > 0000000000 > 1111111111 > 1111111111 > 0000000000 > 1111111111 > 0000000000 > 1111111111 > 1111111111 > 0000000000
ok, turns out that these results were for Graph .67 (I had more than one instance installed). For Graph .75, with graphs including isolated vertices I either get zeros, or the script will hang and return nothing. For graphs without isolated vertices I get ones. The symptoms sound like the same/similar issue with the articulation_points() bug. Bill
Graph 0.76 should have a fix for this.
Subject: Re: [rt.cpan.org #20021] bridges() sometimes returns empty list when isolated vertices present
Date: Wed, 28 Jun 2006 22:44:24 +0300
To: bug-Graph [...] rt.cpan.org
From: Jarkko Hietaniemi <jhi [...] iki.fi>
Guest via RT wrote: Show quoted text
> Queue: Graph > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=20021 > > >
>> $ for i in $(seq 1 10); do ./bridge_test.pl; done >> 0000000000 >> 0000000000 >> 1111111111 >> 1111111111 >> 0000000000 >> 1111111111 >> 0000000000 >> 1111111111 >> 1111111111 >> 0000000000
> > ok, turns out that these results were for Graph .67 (I had more than one > instance installed). > > For Graph .75, with graphs including isolated vertices I either get > zeros, or the script will hang and return nothing. For graphs without > isolated vertices I get ones. > > The symptoms sound like the same/similar issue with the > articulation_points() bug.
Please try with Graph 0.76. Show quoted text
> Bill >
On Wed Jun 28 15:44:59 2006, jhi@iki.fi wrote: Show quoted text
> Guest via RT wrote:
> > Queue: Graph > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=20021 > > > > >
> >> $ for i in $(seq 1 10); do ./bridge_test.pl; done > >> 0000000000 > >> 0000000000 > >> 1111111111 > >> 1111111111 > >> 0000000000 > >> 1111111111 > >> 0000000000 > >> 1111111111 > >> 1111111111 > >> 0000000000
> > > > ok, turns out that these results were for Graph .67 (I had more than one > > instance installed). > > > > For Graph .75, with graphs including isolated vertices I either get > > zeros, or the script will hang and return nothing. For graphs without > > isolated vertices I get ones. > > > > The symptoms sound like the same/similar issue with the > > articulation_points() bug.
> > Please try with Graph 0.76. >
> > Bill > >
>
Graph 0.76 produces the correct output for this test case. thanks! Bill