Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] TRACEMIN-Fiedler solver for disconnected graphs #9

Open
keevindoherty opened this issue Oct 25, 2024 · 0 comments
Open

[feature] TRACEMIN-Fiedler solver for disconnected graphs #9

keevindoherty opened this issue Oct 25, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@keevindoherty
Copy link
Contributor

Summary

For now, the "disconnected graph" test for the Fiedler vector / value computation is skipped. The reason for this is that the TRACEMIN solver we use will fail in the event that the Laplacian is not full rank (after accounting for the all-ones vector). We'd like the solver to do the right thing in this case, i.e. return λ₂(L) = 0, along with an eigenvector v ⟂ 1 s.t. v ∈ ker(L).

The goal would be to fix this and re-enable the "disconnected graph" test in test_fiedler.py. Bonus: add a check on the Fiedler vectors.

Possible implementation

I think fixing this should be relatively straightforward - just add a custom TRACEMIN solver to better handle this. A naive solution would be to add some regularization to the anchored Laplacian that gets built inside the solver, e.g. as M = L + reg * I, then compute λ₂(L) = λ₂(M) - reg along with a corresponding eigenvector.

If λ₂(L) = 0, then we just have to return any eigenvector in {v | v ∈ ker(L), v ⟂ 1}. (This could occur, for example, if the corresponding graph had more than 2 connected components).

There are interesting potential performance considerations here, I think. It might be better to attempt to solve for the Fiedler value and vector without this regularization, then catch the internal linear system solver exception and fall back to the regularized version?

@keevindoherty keevindoherty added enhancement New feature or request help wanted Extra attention is needed labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant