Counting invertible Schr\"odinger Operators over Finite Fields for Trees, Cycles and Complete Graphs

We count invertible Schr\"odinger operators (perturbations by diagonal matrices of the adjacency matrix) over finite fieldsfor trees, cycles and complete graphs.This is achieved for trees through the definition and use of local invariants (algebraic constructions of perhapsindependent interest).Cycles and complete graphs are treated by ad hoc methods.


Introduction
A Schrödinger operator on a simple (no multiple edges or loops) unoriented graph G is a matrix which coincides with the adjacency matrix of G outside the diagonal and is arbitrary on the diagonal. (It would in fact be more accurate to call such matrices opposites of Schrödinger operators. ) We consider the counting-function q −→ S(T )(q) enumerating invertible Schrödinger operators for a finite tree T over the finite field F q with q elements. We show that S(T ) is a monic polynomial which is palindromic, up to a sign depending on the parity of the number of vertices in T . Roots of S(T ) are either on the unit circle or on the negative halfline. The number of roots of S(T ) on the negative real halfline is at most equal to twice the number of vertices of degree at least 3 in T .
We describe also a general framework for similar invariants of trees and plane trees.
(E) Extending a rooted tree by gluing (an ordinary vertex of) an edge to the root-vertex and by marking the new leaf of this extended tree as the root.
(M ) Merging two rooted trees by gluing their root-vertices into the rootvertex of the resulting tree.
V has no argument, E operates on elements of R, the map M operates commutatively and associatively on pairs of elements in R and admits V as a two-sided identity.
Finally, the "forget" operator, (F ) Forgetting the root-structure by turning the root of a rooted tree into an ordinary vertex, yields a surjection from R onto T . We have the identity (for all A, B in R) encoding the fact that an ordinary tree with n vertices can be rooted at n different vertices.   corresponding to (1) for all A, B in E.

Local invariants of (rooted) trees
A trivial example with E = F = N is given by c = 0, e(x) = x + 1, m(x, y) = x + y and f (x) = x. It counts the number of edges (given by n − 1 for a tree with n vertices) of a tree. Replacing f with f 1 (x) = x + 1 we count vertices instead of edges.

Enumerating independent sets
A subset I of vertices in a graph G is independent if I contains no pair of adjacent (and distinct) elements. The polynomial j α j x j encoding the number α j of independent sets with j vertices in a finite tree can be computed as a local invariant using We leave the easy details to the reader. (Hint: The first coefficient a of (a, b) counts independent sets without the root of rooted trees, the second coefficient b counts independent sets containing the root-vertex.) For the tree underlying Figure 1 we get An independent set I of a tree T is maximal if every vertex of T is adjacent or equal to an element of I. Maximal independent sets can be enumerated (accordingly to their size) using the local invariant defined by (the coordinates b, c of (a, b, c) count maximal independent sets of a rooted tree R not involving the root for b and involving the root for c, the coordinate a counts independent sets not involving the root such that adjoining the root yields maximal independent sets). For the tree underlying Figure 1 we get

Enumerating matchings
A matching of a graph is a set of disjoint edges. The polynomial j α j x j with α j counting matchings involving j edges can be computed as the local invariant We leave the easy details to the reader. (Hint: The first coefficient a of (a, b) counts matchings of a rooted tree not involving the root, the second coefficient b counts matchings involving the root.) For the tree underlying Figure 1 we get A matching is maximal if every edge contains a vertex involved in an edge of the matching. Maximal matchings can be computed using the local invariant v = (0, 1, 0), For the tree underlying Figure 1 we get 7x 3 .

The characteristic polynomial of the adjacency matrix
We write (a, b) ∈ Z[x] if the characteristic polynomial of a rooted tree is given by −ax + b with ax corresponding to the contribution of the diagonal entry associated to the root. The characteristic polynomial det For the tree underlying Figure 1 we get computes the characteristic polynomial of the combinatorial Laplacian of a tree.
For the tree underlying Figure 1 we get

The main example: counting Schrödinger operators
We consider the local invariant S : The constant v is obviously an identity for m which is commutative and associative. Identity (1) amounts to the fact that is symmetric in its arguments (a, b) and (α, β). For the tree underlying Figure 1 we get (q − 1) 2 (q 2 − q + 1)(q 4 + 2q 3 + q 2 + 2q + 1) .
Remark 3.1 As a mnemotechnical device, the formula for m corresponds to the addition a b + α β = aβ+bα bβ with forbidden simplification and the formula for e is, up to simplification by b, given by the homography In the sequel we denote similarly by S(R) = (a, b) ∈ (Z[q]) 2 the pair of polynomials associated to a rooted tree R.  (ii) The polynomial S(T ) of a tree with n vertices is of the form q n − q n−1 + O(q n−2 ).
Assertion (ii) of Proposition 3.3 implies that S(T ) has always roots with a strictly positive real part. These roots are necessarily on the complex unit circle, see Theorem 3.4.
Assertion (ii) of Proposition 3.3 tells us that the number of invertible Schrödinger operators on a tree can be correctly estimated naively assuming that the determinant is a non-constant affine function of a fixed diagonal coefficient. Our next result describes the possible locations of roots: Theorem 3.4 All zeros of S(T ) are in the set given by the union of the complex unit circle with the real strictly negative halfline.
Remark 3.5 We put a complete order on pairs {x, 1/x} of inverse elements The proof of Theorem 3.4 shows in fact a stronger statement: If T ′ is a subtree (obtained by erasing edges) of a tree T , then the k-th largest pair of roots of S(T ′ ) is at most equal to the k-th largest pair of roots of S(T ) for k ≤ ⌊n/2⌋ where n is the number of vertices of T ′ . (Inequalities are strict except, perhaps, for multiple roots.) In particular, the number of negative real roots of S(T ′ ) cannot exceed the number of negative real roots of S(T ).
Our last result describes the maximal number of zeroes on the real negative halfline: Theorem 3.6 The number of real negative zeroes of S(T ) (counted with multiplicities) is at most equal to twice the number of vertices of degree at least 3 in T .

S-values for a few families
3.1.1 Lines (path-graphs, Dynkin-graphs of type A) We denote by R n the rooted tree given by n vertices forming a path of length n with the root at a leaf. Writing S r (R n ) = (a n , b n ), we have a n = q n−1 − (−1) n−1 q + 1 and b n = q n − (−1) n q + 1 by an easy induction using the identity (a n+1 , b n+1 ) = e(a n , b n ) = (b n , qa n + (q − 1)b n ). This yields for the tree T n underlying R n .

Dynkin diagrams of type D andD
A tree T is a Dynkin diagram of type T if and only if T contains a unique vertex of degree 3 adjacent to 2 leaves and no vertices of degree > 3. Such a tree is thus of the form , E(V )))) . . .)))) .
The value of S on such a tree with n vertices is given by Affine Dynkin diagrams of typeD are trees with two vertices of degree 3, both adjacent to 2 leaves and joined by a path of arbitrary length. The case of a path of length zero gives rise to central vertex of degree 4 surrounded by 4 leaves and is also counted as of typeD. The S-polynomial of such a tree with n vertices is given by (q − 1) 2 (q + 1)(q n−3 + (−1) n ) .

Dynkin diagrams of type E andẼ
A Dynkin diagram of type E is a tree with no vertices of degree > 3, a unique vertex of degree 3 surrounded by three legs of lengths 1, 2 and n − 4 for n = 6, 7, 8. The three corresponding polynomials are S(E 7 ) = (q 6 + q 3 + 1)(q − 1), An affine Dynkin diagram of typeẼ is a tree with no vertices of degree > 3, a unique vertex of degree 3 surrounded by three legs of length, each of length 2 forẼ 6 , one of lenght 1 and 2 of length 3 forẼ 7 , of lengths 1, 2 and 4 forẼ 8 . The corresponding polynomials are

Stars
We denote by R n the rooted graph consisting of a central root adjacent to n − 1 leaves. Writing again S r (R n ) = (a n , b n ) we have a n = (n − 1)(q − 1) n−2 and b n = (q − 1) n−1 as can be checked using We have thus for the non-rooted star T n underlying R n .

Multiple roots of S(T )
A vertex of degree k of a tree T can be considered as the result of gluing k trees rooted at a leaf along their root-leaves. This construction is linked to some multiple roots of S(T ) as follows: Given a leaf-rooted tree R, let v 1 , . . . , v n be all vertices of T involving R (ie. at least one of the rooted trees attached to the root v i by a single edge is isomorphic to R). Given such a vertex v i , we denote by r i + 1 ≥ 1 the multiplicity of the tree R at v i . Let S r (R) = (a, b) ∈ Z[q] 2 be the corresponding local invariant of the rooted tree R. We have then the following result: Proof Gluing k i + 1 copies of R together along their root gives a rooted tree with invariant ((k i + 1)ab k i , b k i +1 ). Linearity and bilinearity of the formulae for e, f and m imply now the result. ✷ Proposition 3.7 explains the factor q 2 − q + 1 and one of the factors q − 1 of the polynomial S(T ) = (q − 1) 2 (q 2 − q + 1)(q 4 + 2q 3 + q 2 + 2q + 1) with T given by Figure 1. Since S(T ) is palindromic, the factor q − 1 divides S(T ) with even multiplicity. All cyclotomic factors in this examples have thus easy explanations.

Proofs
A matrix M with rows and columns indexed by vertices of a simple graph G is a G-matrix if a non-diagonal coefficient m s,t of M is zero if and only if {s, t} is not an edge of G. Diagonal entries of a G-matrix are arbitrary. Equivalently, a G-matrix is a matrix whose non-diagonal support (set of nonzero coefficients) encodes the edge-set of G. A G-matrix has a symmetric support but is not necessarily symmetric. We have: Theorem 3.8 The number of invertible T -matrices over F q of a finite tree T having n vertices is given by (q − 1) 2n−2 S(T ) with S(T ) defined at the beginning of this Section.
Proof of Theorem 3.2 Follows from the obvious action on T -matrices of the abelian group F * q n × F * q n of pairs of invertible diagonal matrices (with coefficients in F q ) by left and right multiplication. ✷ Proof of Theorem 3.8 An R-matrix for a rooted tree R ∈ R is a T -matrix for the underlying unrooted tree T with an unknown x on the diagonal corresponding to the root of R. The determinant of a R-matrix for R ∈ R over a finite field F q is thus an affine function of the form ax We consider now a fixed rooted tree R. Given two subsets A, B of F q we denote by N (A, B) the number of R-matrices of determinant ax + b with (a, b) ∈ A×B. We encode the natural integers N (0, 0), .
Since right and left multiplications by invertible diagonal matrices preserve the set of R-matrices, we have N (λa, µb) = N (a, b) for invertible elements λ and µ. Elementary linear algebra shows now that the operators V, E, M, F correspond to the operators We can neglect the values N (0, 0) and lump together N (F * q , 0) and N (F * q , F * q ). This leads to the formulae for S(T ) except for an extra factor of (q − 1) 2 for every edge of T . ✷ The following result will be used in the proof of Proposition 3.3: 2 be the pair of polynomials associated to a rooted tree R with n vertices and a root of degree d. The polynomial a has then degree n − 2 and is of the form dq n−2 + O(q n−3 ). The polynomial b has degree n − 1 and is of the form q n−1 − dq n−2 + O(q n−3 ).
The proof of Proposition 3.9 is an easy induction based on the formulae for v, e and m. We leave the details to the reader. ✷ Proof of Proposition 3.3 An easy induction on the number n of vertices shows that the polynomials a and b of a rooted trees are palindromic, up to signs (given by (−1) n−2 and (−1) n−1 ). The polynomial b is moreover always monic by Proposition 3.9. This implies assertion(i).
Assertion (ii) follows from Proposition 3.9 and the easy computation for (a, b) = S(R) with R obtained from T by choosing a root-vertex (of degree d) among the vertices of T . ✷ A pair (P, Q) of real relatively prime polynomials of degrees n − 1 and n are interlacing on an interval I of real numbers, if P and Q have strictly positive coefficients of largest degree and if P , respectively Q, has n − 1 distinct roots ρ ′ 1 , . . . , ρ ′ n−1 in I, respectively n distinct roots ρ 1 , . . . , ρ n in I such that with all roots in I and with a strictly positive coefficient of largest degree and if (P, Q) are I-interlacing we call (RP, RQ) also I-interlacing.
In the sequel, we will generally no longer mention I which is always the closed real interval (−∞, 2]. Interlacing polynomials will always be interlacing polynomials on (−∞, 2]. We say that a polynomial P in C[q] of degree n is sign-degree-palindromic if (−q) n P (1/q) = P (q). Sign-degree-palindromic polynomials of odd degree are always divisible by q − 1.
We say that a pair (a, b) ∈ R[q] of sign-degree-palindromic polynomials has the interlacing property if a is of degree n − 1, the second polynomial b is of degree n and the pair (A, B) with A, B defined by Lemma 3.10 The polynomial qa + (q − 1)b has all its roots on the union of the unit circle with the strictly negative real half-line if the sign-degreepalindromic pair (a, b) has the interlacing property.
The proof is straightforward and left to the reader. ✷ Proposition 3.11 The pair (a, b) of polynomials associated to a rooted tree has the interlacing property.
has the interlacing property, then so does Proof Since common divisors of a and b can be handled easily, we suppose henceforth a and b coprime for simplicity. We consider the interlacing pair (A, B) ∈ Z[X] associated by formula (2) to (a, b).
We consider first the case where a is of even degree n − 1 and b of odd degree n. We have The polynomial B has degree (n + 1)/2 and zeros The interlacing property of (A, B) implies that the (n − 1)/2 simple zeros ρ ′ 1 , . . . , ρ ′ (n−1)/2 of A satisfy The polynomials A and B have opposite signs on the interval (−∞, ρ 1 ) and on the (n − 1)/2 intervals (ρ ′ i , ρ i+1 ). Boundary values and growth-properties imply that A + B has least one root in each of these (n + 1)/2 open intervals. Since A + B is of degree (n + 1)/2 all these roots are simple and there are no others. This establishes the interlacing property for (Ã,B) in the case where n is odd.
In the case where a is of odd degree n − 1 and b of even degree n we get where we have used a = (q − 1)q (n−2)/2 A(q + 1/q), b = q n/2 B(q + 1/q) and a = q n/2Ã (q + 1/q), (q − 1)b = q (n+2)/2)B (q + 1/q). We get thus The polynomial B has degree n/2 and we have where ρ i are the zeros of B and ρ ′ i are the zeros of A. Arguments as above imply again the interlacing property for (ã,b) = (b, qa + (q − 1)b). ✷ Lemma 3.13 If (a 1 , b 1 ) and (a 2 , b 2 ) have the interlacing property, then so Remark 3.14 Lemmata 3.12 and 3.13 can be strenghtened to the statement , have the interlacing property for all α, β > 0. The proofs remain (essentially) the same.
Proof of Lemma 3.13 We can again suppose, without loss of generality, that a i , b i are coprime for i = 1, 2. We denote by n i the degree of b i and we define the two interlacing pairs (A 1 , B 1 ) and (A 2 , B 2 ) with B i in the obvious way.
We consider first the case where n 1 and n 2 are both odd. We have then Observe that both B 1 (X) and B 2 (X) have a root at X = 2.

Analogous computations show
in all remaining cases, ie. if at least one of b 1 , b 2 is of even degree.
It is now enough to show that (Ã,B) are interlacing in order to finish the proof. We set F i =Ã ĩ  open interval defined by two distinct consecutive zeroes ofB contains a zero of the meromorphic function F = F 1 + F 2 . Indeed, common zeros of B 1 , B 2 other than X = 2 (with X = 2 occuring as a common zero only in the case where n 1 and n 2 are both odd) give rise to a zero ofÃ and can thus be neglected.
Consecutive zeroes ofB correspond to consecutive poles of F . Since F 1 , F 2 are quotients of interlacing polynomials, we have F i (x) ≥ 0 if and only if the largest pole π ≤ x of F i is larger than the largest zero ρ ≤ x of F i . The set of poles and zeroes of F i defines thus 2n i open intervals of R with F i having alternating signs (starting with a negative sign at the smallest unbounded interval and ending with a positive sign at the final largest unbounded interval) on these intervals.
We consider first two consecutive poles π, π ′ of F which belong both, say to F 1 . This implies that F 1 restricted to I defines a surjection onto R and boundedness of F 2 restricted to I shows that I contains a zero of F = F 1 + F 2 (the case where π or π ′ is also a pole of F 2 can be handled similarly by remarking that such a double pole gives rise to a common root ofÃ andB).
We are now left with the case of two distinct consecutive poles π 1 < π 2 of F with π i a pole of F i (the case π 2 < π 1 is of course analogous). This case splits into four subcases according to the possible presence of zeros of F 1 , F 2 in the interval I. If I contains no zero of F 1 and of F 2 , the function F 1 is positive on I, has a pole at π 1 and has a finite limit at π 2 while F 2 is negative on I, has a finite limit at π 1 and a pole at π 2 . This implies again the F restricted to I is continouos and surjective onto R. The interval I contains thus a zero of F .
If the interval I contains exactly one zero ρ of F 1 F 2 , the function F has a zero in (π 1 , ρ) if F 1 (ρ) = 0 and F has a zero in (ρ, π 2 ) otherwise.
If I contains two distinct zeros ρ, ρ ′ of F 1 F 2 , they cannot be zeroes of, say, only the first factor F 1 by the fact that (A 1 , B 1 ) are interlacing. A similar analysis as above shows then that F changes sign on the interval J = (ρ, ρ ′ ) and continuity of F on J implies the existence of a root for F . The case of a common zero ρ of F 1 and F 2 is even simpler since it gives directly rise to a zero of F .
A counting argument (together with a discussion of common zeros of B 1 , B 2 ) shows now that (Ã,B) is interlacing. ✷ Proof of Proposition 3.11 Follows by induction from Lemma 3.12 and Lemma 3.13. ✷ Proof of Theorem 3.4 Follows from Proposition 3.11 and Lemma 3.10.✷ The main ingredient for proving Theorem 3.6 is the following result: Proposition 3.15 The numbers of real negative zeroes of the polynomials a, b associated by S(R) = (a, b) to a rooted tree R are at most equal to twice the number of non-root vertices of degree at least 3 in R.
Proof of Theorem 3.6 We turn a given tree T into a rooted tree R by choosing one of the leaves of T as its root. We have then S(E(R)) = (b, qa + (q − 1)b) = (b, S(T )). Proposition 3.15 ends the proof. ✷ Proof of Proposition 3.15 Let R be a rooted tree. If the root vertex v * of R is not a leaf, then S(R) = (A, B) = (aβ + bα, bβ) where (a, b) and (α, β) are associated to smaller non-trivial rooted trees R 1 , R 2 such that R = M (R 1 , R 2 ). The result holds thus by induction on the number of vertices for B = bβ and it holds for A by the interlacing property of (A, B). If the root vertex v * is a leaf, the result holds by Section 3.1.1 if R is a rooted path, ie. a Dynkin diagram of type A. Otherwise, the tree R contains a vertex w of degree at least 3. Working with the rooted tree R w corresponding to T rooted at w, we see that a w , b w with S(R w ) = (a w , b w ) have at most 2(k − 1) real negative zeroes where k is the number of vertices of degree at least 3 in T . This implies that S(T ) has at most 2+2(k−1) = 2k real negative zeroes. Since S(T ) has at least as many real negative zeroes as b involved in S(R) = (a, b) and since (a, b) has the interlacing property, the polynomials a, b have both at most 2k real zeroes. ✷

Digression
Partial attempts to prove Theorem 3.6 yielded the following results which are perhaps of some independent interest:

S-cyclotomic trees
We call a tree T an S-cyclotomic tree if S(T ) is a product of cyclotomic polynomials, ie. if all roots of S(T ) are on the unit circle S 1 .

Theorem 3.18 A tree T is S-cyclotomic if and only if T is contained in an affine Dynkin diagram of typeD orẼ.
Moreover, the polynomial S(T ) of an S-cyclotomic tree is divisible by (q + 1) 2 if and only if T is an affine Dynkin diagram. Otherwise, T is an ordinary simply laced root system (of type A, D or E) and q + 1 does not divide S(T ).

Sketch of proof
The examples computed in Section 3.1 show that Spolynomials of (Dynkin graphs of) affine root-systems of typeD orẼ have a double root at −1. By Remark 3.5, we have S(T )(ρ) = 0 for some real root ρ < −1 if T is a tree containing such an affine root system strictly. Such a tree T is thus not cyclotomic. The union of all affine or ordinary simply laced root systems of type A, D,D, E,Ẽ given by trees (affine Dynkin diagrams of typeÃ are cycles) is closed by taking connected subtrees. This shows the first part of Theorem 3.18. The second part follows from the observation that S-polynomials of ordinary simply laced root-systems are non-zero at x = −1. ✷ Remark 3.19 A conceptual (less computational) proof of Theorem 3.18 would be interesting since it would perhaps point to a connection between S-polynomials and simply laced (affine) root systems.

Salem numbers
A Salem number is a real algebraic integer ρ of absolute value > 1 having all its conjugates in the closed complex unit disc and having at least one conjugate on the unit circle. We denote by ζ a complex conjugate on the unit circle of ρ. Since the complex conjugate ζ = 1/ζ of ζ belongs also to the unit circle, a minimal polynomial of a Salem number is palindromic. It has thus exactly two real conjugates ρ and 1/ρ. The remaining conjugates are all on the complex unit circle.
A generalized star is a tree having at most one vertex of degree > 2. We show in this Section that most generalized stars define Salem numbers. In the case where T is S-cyclotomic, there is of course no Salem-factor and T is a Dynkin diagram of type A, D, E or an affine Dynkin diagram of typeD,Ẽ. Proof of Theorem 3.20 Follows from Theorem 3.6 and Theorem 3.18. ✷

The smallest Salem number
Intriguingly, the Salem number −1.176 . . . of smallest absolute value is a root of S(T ) = q 10 − q 9 + q 7 − q 6 + q 5 − q 4 + q 3 − q + 1 , E(E(V )))))))))) is the generalized star having a vertex of degree 3 surrounded by three paths of length 1, 2 and 6. Observe that T is the unique generalized star not containing anyD norD 6 orD 7 . It is thus canonically associated toẼ 8 (or E 8 ) emphasizing the special role played by the exceptional root lattice E 8 .

Experimental properties of edge-subdivisions
Subdividing an edge into more edges by insertion of intermediary vertices of degree 2 adds only vertices of degree 2. Theorem 3.6 implies thus that this can only moderately increase the number of real negative roots of the polynomial S associated to a sequence of subdivisions of a given edge into more and more edges. Moreover, real negative roots do seemingly converge to some algebraic "limit-roots" in a sequence of graphs with a larger and larger number of subdivisions of an edge. Subdividing all edges by insertion of more and more intermediary vertices around a given vertex of degree α + 1 ≥ 3 leads to limit-roots −α, −1/α. This can be done at several vertices. In particular, subdivision of all edges by insertion of more and more intermediate vertices leads seemingly to real limit-roots −α 1 , . . . , −α k , −1/α 1 , . . . , −1/α k where α 1 + 1, . . . , α k + 1 are the degrees of all vertices of degree at least 3. It would be interesting to understand the behaviour of roots on the unitcircle under larger and larger edge-subdivisions. The number of these roots increases and the simplest possible behaviour would be convergency of the relative root density on the unit-circle to some continuous limit given, up to a constant, by the Lebesgue measure.

Trees with coloured vertices
A rooted tree with non-rooted vertices coloured (not necessarily properly, ie. adjacent vertices have not necessarily distinct colours) by a set C can be constructed using the construction-operators V (creation of a root-vertex), M (merging of two rooted trees along their root) and replacing E by operators E c (for c ∈ C) depending on the final colour of the initial root-vertex. For ordinary trees, one replaces F by operators F c indexed by all possible colours of the last vertex.
Identity (1) is replaced by for all s, t ∈ C and A, B ∈ R.
Denoting by E b , E w and F b , F w the coloured operators for trees with black and white vertices, the black-white coloured tree underlying Figure 1 is given by Local invariants for coloured trees are now defined in the obvious way. A somewhat trivial method for creating coloured local invariants is given by chosing colour-constants V c ∈ E and by replacing e with e c (A) = e(m(A, V c )) and f with f c (A) = f (m(A, V c )). These invariants amount to attachements of "virtual trees" depending on the colour at all vertices of a tree.
A coloured variation of the characteristic polynomial of the adjacency matrix is given by computing the determinant of the matrix coinciding with the adjacency matrix outside the diagonal and with diagonal coefficients −x or −y according to the bipartite class of the corresponding vertex. The resulting determinant is well-defined in Z[x, y] up to exchanging x with y and can be computed as a local invariant. This construction works of course also for the combinatorial Laplacian of a tree.

Coloured Schrödinger operators
The enumeration of Schrödinger operators according to coloured diagonal zeros leads to a local invariant of coloured trees. It takes its values in Z[q, C] with the coefficient (in Z[q]) of a monomial j c e j j ∈ C * counting the number of Schrödinger operators with e j zero terms on diagonal elements associated to vertices of colour c j .

A few examples of colourings for trees
Since trees are bipartite graphs, they have a unique proper colouring (up to colour permutation) with two colours, see Figure 1 for An improper canonical colouring of trees with 3 colours appears in [3] and [1]. We describe it following [2]: Call a subset S of vertices of a tree a vertex cover if S intersects every edge. Minimal vertex covers have a minimal number of elements. Colour a vertex in green if it is contained in every minimal vertex cover, in orange if it is contained in some minimal vertex cover and in red if it is contained in no minimal vertex cover. See the references cited above for more properties of this colouring.
Trees with an odd number of vertices have a canonical orientation of edges: Removal of an edge e joining two vertices s and t in such a tree T determines two subtrees T s , respectively T t , containing s, respectively t. We orient e from s to t if the subtree T s contains an even number of vertices. This leads to a proper Z-colouring of T , well defined up to addition of a constant, by the requirement c(t) = c(s) + 1 if s and t are as above. This colouring is compatible with reduction modulo N for any natural integer N . Reduction modulo 2 gives the proper bipartite colouring.
In the case of a tree T with an even number of vertices, we get a partition of the edges of T into two classes E and O according to the parity of the number of vertices in the two subtrees T s and T t . This leads to a proper "dihedral" Z-colouring of T , well defined up to the action of the infinite dihedral group: c(t) = c(s) + (−1) c(s) if the edge joining s to t is in E and c(t) = c(s) − (−1) c(s) otherwise. The dihedral colouring is compatible with reduction modulo N for any even natural number N . The case N = 2 corresponds to the bipartite colouring.
One can also consider colourings where the colours of two adjacent vertices s, t depend not only on the parities of the two subtrees obtained by removing the edge {s, t} but also on their sizes (and perhaps also on the degrees of s and t). More generally, a vertex v of a tree T with n vertices determines a partition of n − 1 by considering the number of vertices in connected components of the forest obtained by removing v from T . We can now colour v with the (colour of the) corresponding partition.

Plane trees
A plane tree is a tree embedded in the oriented plane, up to orientationpreserving homeomorphisms. Plane trees are abstract trees together with cyclic orders on edge sets incident at a common vertex.
A rooted plane tree is a rooted plane tree together with a refinement into a linear order of the cyclic order on edges incident at the root.
Rooted plane trees can be constructed using the operators V, E, M already considered, except that M is no longer commutative (but remains of course associative). When dealing with ordinary plane trees, we need moreover the operator F together with the identity F (M (A, B)) = F (M (B, A)).  with the same underlying abstract tree.

An example of a local invariant for plane trees coming from 2-coloured edges
A 2−colouring into black and red of all edges in a plane tree T is admissible if two red edges are never cyclically consecutive (ie. all letters b in the cyclic word in {b, r} * encoding the colours around a vertex are isolated). We want to compute the polynomial α j x j counting the number a j of admissible colourings with j red edges of a plane tree.
We consider six coefficients a 1 , . . . , a 6 ∈ N[x]: where v = (1, 0, 0, 0, 0, 0) and a 1 = 0 whenever R is not a trivial rooted tree, a 2 counts situations with neither first nor last (not necessarily distinct) red edge issued from the root, a 3 first edge red but not last, a 4 last edge red but not first, a 5 first and last edge both red and distinct, a 6 root is the leaf of a red edge. We resume this information in the table We have v = (1, 0, 0, 0, 0, 0), e(a 1 , a 2 , a 3 , a 4 , a 5 , a 6 ) = (0, a 1 + a 2 + a 3 + a 4 + a 5 + a 6 , 0, 0, 0, x(a 1 + a 2 )), where and f (a 1 , a 2 , a 3 , a 4 , a 5 , a 6 ) = a 1 + a 2 + a 3 + a 4 + a 6 . For the plane rooted tree underlying Figure 1, we get the polynomial 7x 3 + 13x 2 + 7x + 1 enumerating also matchings. This is not surprising since all solutions for plane trees involving only vertices of degree ≤ 3 correspond to matchings of the underlying tree.

Generalizing the 2-edge-coloured example
The previous example just discussed has of course many variations giving rise to similar formulae. The next simple example is perhaps given by edgecolourings with three colours such that two cyclically consecutive edges have nether the same colour (weighting such colourings with x α y β z γ where α, β, γ are the multiplicities of the colours (identified with) x, y, z, we get a symmetric polynomial in x, y, z). A set of values E of the corresponding local invariant can be chosen as given by elements (a, a x , a y , a z , a xx , a xy , a xz , a yx , a yy , a yz , a zx , a zy , a zz ) of N[x, y, z] 13 with a = 1 if R is an isolated vertex and a = 0 otherwise, with a u = 0 except if the root of R is a leaf attached to an edge of colour u, and with a u,v counting the number of admissible colourings as above where the root has a first edge of colour u and a distinct last edge of colour v.

Another family of examples
We consider a (multiplicative) group Γ together with a (generally nonsymmetric) generating set S. We consider edge-colourings with colours in Γ of trees such that α −1 β is always in S for an edge of colour α followed cyclically (say in the trigonometric sense) around a non-leaf by an edge of colour β. The first interesting example is given by Γ = Z/3Z with S = {0, 1}. Colours of cyclically consecutive edges remain either the same or increase only by 1.

Vertex-colourings
The previous examples can be modified to deal with suitable (perhaps improper) vertex-colourings. An element of L can always be considered as a construction of a plane rooted tree. Reduced words are in bijection with plane rooted trees decorated by splittings of non-root vertices of (total) degree at least 4 into vertices of degree 3. The root vertex is either of degree at most 2 or is splitted into a root vertex of degree 2 and remaining vertices of degree 3. The number of such splittings at a vertex is given by Catalan numbers: A non-root vertex of degree d ≥ 3 can be splitted in c d−2 different ways with c n = 1 n+1 2n n (and a root vertex of degree d ≥ 2 can be split in c d−1 different ways).

A definition of local operators reminiscent of operads
Rooted trees can also be constructed using the local operators V and M k , k ≥ 1 where M k : R k −→ R is symmetric in its arguments. It takes k rooted trees, attaches an additional edge at each root, glues the k new trees together at the new root corresponding to the k recently attached leaves. The operators M k are defined recursively as M 1 = E and Except for the absence of an identity, the operators M k form an operade.
When working with plane trees, the operators M k are no longer symmetric and we have to add invariance of cyclic permutations of the arguments for F • M k .
Local invariants are defined in an obvious way in this context.

Arbitrary graphs
It is of course possible to define Schrödinger operators for arbitrary (perhaps oriented) simple graphs and to count invertible Schrödinger operators over finite fields. I ignore if there is an efficient way for computing the corresponding numbers. In a few very small examples, the resulting functions seem also to be polynomial in q. I ignore if this holds in general.
There are two variations on this theme: One can count all invertible matrices with off-diagonal support defining the corresponding graph (diagonal elements are arbitrary). In the case of unoriented graphs, one can moreover require symmetry of all matrices.
Polynomiality gets lost for non-simple graphs: Doubling every edge of a tree we get Schrödinger operators which are diagonal matrices in characteristic 2 and which are, up to a factor 2, Schrödinger operators of the underlying simple trees otherwise. Since S(T )(2) is in general different from 1, the number of such Schrödinger operators over F q is no longer polynomial in q.