Ask Your Question
3

Graphs - vertex_connectivity - misleading behavior for parameter k [closed]

asked 0 years ago

Telijas gravatar image

updated 0 years ago

tmonteil gravatar image

Hello,

I have an issue in the graph theory library using vertex_connectivity(). In the documentation it is said for the parameter k (https://doc.sagemath.org/html/en/refe... ) “when specified, check if the vertex connectivity of the (di)graph is larger or equal to k.“ So, starting from k=1, k=2, …. it starts with true and then flips to false and stays false. (Right? Given a connected graph).

In this example I get for k=1 false and for k=2 true, which should not be possible.

from sage.all import *
from sage.graphs.connectivity import vertex_connectivity

s3 = graphs.SierpinskiGasketGraph(Integer(3))
print(vertex_connectivity(s3, k=1))
print(vertex_connectivity(s3, k=2))
print(vertex_connectivity(s3))
print("Done")

Resulting in

False
True
2
Done

Repeating the test with the Peterson graph shows correct behavior of vertex_connectivity. Can someone help me? Do I understand the documentation wrong?

OS: Ubuntu 23.10
Sage: 10.4

Preview: (hide)

Closed for the following reason the question is answered, right answer was accepted by Telijas
close date 2024-09-29 02:22:07.529304

1 Answer

Sort by » oldest newest most voted
3

answered 0 years ago

Looks like a bug to me. I think the logic is not complete in lines 1625–1627. Reported at https://github.com/sagemath/sage/issu....

Preview: (hide)
link

Question Tools

1 follower

Stats

Asked: 0 years ago

Seen: 225 times

Last updated: Sep 27 '24