2121function s_bandwidth (L:: AbstractMatrix{<:Integer} , S:: Tuple{Vararg{Integer}} )
2222 _assert_matrix_is_undirected_laplacian (L)
2323
24+ S = _sort_tuple (S)
2425 spec = laplacian_s_spectra (L, S)
2526
2627 if ! spec. s_diagonalizable
@@ -39,12 +40,12 @@ function s_bandwidth(L::AbstractMatrix{<:Integer}, S::Tuple{Vararg{Integer}})
3940
4041 # Using results from Johnston and Plosker (2025, pp. 319–323)
4142 if classify_laplacian (L) isa CompleteGraphLaplacian
42- if S == (- 1 , 0 , 1 )
43- if 2 < n <= 20 && n % 4 != 0 # Proven subcase of Conjecture 2 applies
44- k = 2
45- end
46- elseif n % 4 == 2 # And, of course, `S = (-1, 1)`; here Theorem 1 applies
43+ if S == (- 1 , 0 , 1 ) && 2 < n <= 20 && n % 4 != 0 # Subcase of Conjecture 2
44+ k = 2
45+ elseif S == (- 1 , 1 ) && n % 4 == 2 # Theorem 1
4746 k = n - 1
47+ else # Back to the general case
48+ k = 1
4849 end
4950 else
5051 k = 1
@@ -91,6 +92,7 @@ function has_s_bandwidth_at_most_k(
9192)
9293 _assert_matrix_is_undirected_laplacian (L)
9394
95+ S = _sort_tuple (S)
9496 spec = laplacian_s_spectra (L, S)
9597 L_copy = copy (spec. matrix)
9698
@@ -107,11 +109,9 @@ function has_s_bandwidth_at_most_k(
107109
108110 # Using results from Johnston and Plosker (2025, pp. 319–323)
109111 if classify_laplacian (L_copy) isa CompleteGraphLaplacian
110- if S == (- 1 , 0 , 1 )
111- if k == 1 && 2 < n <= 20 && n % 4 != 0 # Proven subcase of Conjecture 2 applies
112- return SBandRecognitionResult (L_copy, S, nothing , k, false )
113- end
114- elseif n % 4 == 2 # And, of course, `S = (-1, 1)`; here Theorem 1 applies
112+ if S == (- 1 , 0 , 1 ) && k == 1 && 2 < n <= 20 && n % 4 != 0 # Subcase of Conjecture 2
113+ return SBandRecognitionResult (L_copy, S, nothing , k, false )
114+ elseif S == (- 1 , 1 ) && n % 4 == 2 # Theorem 1
115115 if k < n - 1
116116 res = SBandRecognitionResult (L_copy, S, nothing , k, false )
117117 else
177177function is_s_diagonalizable (L:: AbstractMatrix{<:Integer} , S:: Tuple{Vararg{Integer}} )
178178 _assert_matrix_is_undirected_laplacian (L)
179179
180+ S = _sort_tuple (S)
180181 spec = laplacian_s_spectra (L, S)
181182 L_copy = copy (spec. matrix)
182183
0 commit comments