Suppose you are given a smooth quartic surface $X$ in $\mathbb P^3$. I would like to find an upper bound for the number of lines on $X$ in the case that there is no plane intersecting the curves in four lines (so that the possible intersections of the surface and a plane are an irreducible quartic curve, a line and an irreducible cubic, or two lines and a smooth conic).
One possible way of finding such a bound is the following.
Suppose you are given a triangle-free graph $\Gamma$. Form the matrix $M_\Gamma = (m_{ij})$ in this way: set $m_{ii} = -2$, and $m_{ij} = 1$ or $0$ ($i \neq j$) if the vertices $v_i$ and $v_j$ are connected respectively not connected by an edge. In other words, $M_\Gamma$ is $A_\Gamma - 2I$, where $A_\Gamma$ is the adjacency matrix of the graph $\Gamma$. Note that they have the same eigenvalues shifted by two.
Of course, the vertices of the graph represent the lines on the surface and they are connected if and only if the lines intersect. Taking into account the Lefschetz bound on the Picard number, we can ask: if the rank of the matrix $M_\Gamma$ is lower than 20 (in the complex case) or 22 (in the positive characteristic case), how many vertices can the graph $\Gamma$ have?
The question without the "triangle-freeness" hypothesis seems also interesting to me.
Before plunging in the theory of algebraic graph theory, I would like to ask you whether this approach has already been pursued. Any reference to articles or books related to this problem (for example, on nice characterizations of graphs admitting the eigenvalue 2) will also be appreciated.