Vertex connecitivity incomplete (pun intended)
I am no graph theory expert, but the textbook I am learning from, and the Wikipedia article "Connecitivy (graph theory)" (which doesn't use my book as a reference, i.e., there are at least 2 books saying this) both say the vertex connectivity of a complete graph on n vertices is n-1. But, if you try to do graphs.CompleteGraph(whatever).vertex_connectivity(), it says
"There can be no vertex cut in a complete graph."
I looked at the code, and the fix is simple: Take
if g.is_clique():
raise ValueError("There can be no vertex cut in a complete graph.")
and make it
if g.is_clique():
return g.order()-1
But, I don't know how this fixing stuff works.
Second question, why does it return answers in the form 1.0 when the only possible values of this are integers?
Thirdly, there are a couple typos in the commenting of the code:
In a grid, the vertex connectivity is equal to the
minimum degree, in which case one of the two sets it
of cardinality 1
::
should be "two sets IS of"
For directed graphs, the strong connexity is tested through the dedicated function::
I believe should be "strong vertex connectivity". Maybe connexity is okay but I am guessing it's a typo.
Fourthly, can we make "graph theory" a tag?
I retagged according to your last sentence - if you don't like it you can change it back. Currently there are "graph", "graphs" and "graph_theory" tags - perhaps they should all be merged.
@ parzan I'm a moron. Yea, thanks for doing that. They probably shouldn't be merged. If I think graph, there's the calculus meaning and the graph theory meaning. If my problem has to do with graph theory, I'd probably use graph theory. If I'm talking about the graph of some function, I'd probably use graph.
Oops, I am a moron for thinking that "graph" is only the combinatorist's graph :)
Maybe neither of us are morons :) Just little mistakes.