linear-algebra


networkx can't calculate algebraic connectivity


I can compute the algebraic connectivity of the complete graph on 20 vertices in fraction of a second using
import networkx
D = {}
for i in range(20):
D[i] = [j for j in range(20)]
G = networkx.Graph(D)
networkx.algebraic_connectivity(G)
However, in a process I generate a graph (on 20 nodes) that I ask networkx to compute its algebraic connectivity, and it keeps running for ever with no errors. Here is the graph:
import networkx
D = {0: [32, 33, 19, 5, 21, 37, 6, 38, 39, 41, 26, 42, 11, 43, 28, 44, 15, 31], 5: [32, 0, 33, 19, 37, 21, 6, 22, 38, 39, 41, 26, 42, 11, 43, 44, 28, 15, 31], 6: [0, 32, 33, 19, 5, 37, 21, 22, 38, 39, 41, 26, 42, 11, 43, 28, 44, 15, 31], 11: [32, 0, 33, 19, 21, 37, 5, 6, 22, 38, 39, 41, 26, 42, 43, 28, 44, 15, 31], 15: [0, 32, 33, 19, 5, 21, 37, 6, 22, 38, 39, 41, 26, 42, 11, 43, 28, 44, 31], 19: [0, 32, 33, 5, 21, 37, 6, 22, 38, 39, 41, 26, 42, 11, 43, 28, 44, 15, 31], 21: [32, 0, 33, 19, 37, 5, 6, 22, 38, 39, 41, 26, 42, 11, 43, 28, 44, 15, 31], 22: [32, 33, 19, 5, 21, 37, 6, 38, 39, 41, 26, 42, 11, 43, 28, 44, 15, 31], 26: [0, 32, 33, 19, 5, 21, 37, 6, 22, 38, 39, 41, 42, 11, 43, 28, 44, 15, 31], 28: [32, 0, 33, 19, 21, 37, 5, 6, 22, 38, 39, 41, 26, 42, 11, 43, 44, 15, 31], 31: [32, 0, 33, 19, 5, 21, 37, 6, 22, 38, 39, 41, 26, 42, 11, 43, 28, 44, 15], 32: [0, 33, 19, 5, 21, 37, 6, 22, 38, 39, 41, 26, 42, 11, 43, 28, 44, 31, 15], 33: [0, 32, 19, 5, 21, 37, 6, 22, 38, 39, 41, 26, 42, 11, 43, 28, 44, 15, 31], 37: [32, 0, 33, 19, 5, 21, 6, 22, 38, 39, 41, 26, 42, 11, 43, 28, 44, 31, 15], 38: [32, 0, 33, 19, 21, 37, 5, 6, 22, 39, 41, 26, 42, 11, 43, 28, 44, 15, 31], 39: [0, 32, 33, 19, 5, 21, 37, 6, 22, 38, 41, 26, 42, 11, 43, 28, 44, 15, 31], 41: [32, 0, 33, 19, 21, 37, 5, 38, 6, 22, 39, 26, 42, 11, 43, 28, 44, 15, 31], 42: [32, 0, 33, 19, 21, 37, 5, 6, 22, 38, 39, 41, 26, 11, 43, 28, 44, 15, 31], 43: [32, 0, 33, 19, 21, 37, 5, 6, 22, 38, 39, 41, 26, 42, 11, 28, 44, 15, 31], 44: [32, 0, 33, 19, 5, 21, 37, 38, 6, 22, 39, 41, 42, 26, 11, 43, 28, 15, 31]}
G = networkx.Graph(D)
networkx.algebraic_connectivity(G)
Any reasons why it is so, and how to fix it?
There seems to be a bug in the tracemin method that is the default with networkx.algebraic_connectivity(). Try using
networkx.algebraic_connectivity(G, method='lanczos')

Related Links

Matrix Division
How to represent a bus ride in linear programming?
Matlab : How do I ensure that the covariance matrix is positive definite when using Kalman Filter
Computing singular values vs eigenvalues when you have the choice
Solving of a linear system with parameters
Upper Division Linear Algebra
positive solutions to a homogeneous linear system
Use LispLab within AutoCAD
Eigenvalues of large symmetric matrices
Eigen - directly compute log determinant of huge sparse matrix
Calculating the coefficients of a separable state
When to use eigen and when to use Blas
Numerical Economic Computability Algorithm
Index of a maximum element in TensorFlow tensor
Efficiently multiplying matrix with transpose using cuBlas
Linear Algebra Derivation in Gertler-Karadi (2015) AEJ

Categories

HOME
beautifulsoup
embedded
azure-stream-analytics
merge
wakanda
rsa
toolbox
square
mapbox
jquery-ui
google-admin-sdk
data-visualization
banner
modal-dialog
bing-maps
teechart
commonjs
heap
datastage
jxl
frequency-distribution
plink
magnetic-cards
poedit
kendo-mobile
systemtime
postscript
joptionpane
qliksense
comparator
draft-js-plugins
mount
subclass
scrollview
xbox
powershell-ise
cognos-bi
mailkit
card.io
hard-drive
indy10
fiware-cygnus
navigator
roblox
apiary.io
hivemq
dm-script
gdata
jvmti
news
tasm
attributeerror
sharp-snmp
smoothstate.js
outputcache
photos
x++
trojan
pdf-conversion
d3-force-directed
cpu-cache
trigger.io
baidu
autosar
redbeard-ios
envi
macaulay2
pre-build-event
gcloud-ruby
ikiwiki
halcon
exim4
java-money
liquid-layout
linked-tables
umlgraph
build-script
ray
qscrollarea
away3d
script#
poker
pclzip
dopostback
os.system
dajaxice
fusefabric
azman
predicatebuilder
box2d-iphone
entity-attribute-value
update-statement
ruby-1.8
uideviceorientation
zen
blender-2.49
cuda.net
technical-debt

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App