1. Introduction
Throughout this paper, we consider connected simple graphs, i.e., connected undirected graphs without loops or multiple edges. Let G be a simple graph, and A be the adjacency matrix of G. Zeroes of polynomial are called the eigenvalues of G and comprise the spectrum of G. Since A is symmetric, the spectrum of G consists of only real numbers (not necessarily distinct).
The line graph of
G, denoted by
, is a graph whose vertex set corresponds to the edge set of
G, and two vertices of
are adjacent if the corresponding edges in
G share a common vertex (see [
1,
2,
3] for more details). The subdivision graph of
G, denoted by
, is a graph obtained from
G by inserting a vertex of degree two into each edge of
G.
A graph G is reflexive if its second-largest eigenvalue is not greater than 2. Since graph reflexivity is a hereditary property, research on reflexive graphs is usually centered on maximal reflexive graphs, i.e., those graphs that cannot be extended within the observed class (by adding vertices and/or edges) without violating reflexivity.
A graph
G is called
L-reflexive if its line graph
is reflexive. Similarly, a graph
G is called
S-reflexive if its subdivision graph
is reflexive. These two notions are actually equivalent, as shown in ([
4], Theorem 3).
Graph reflexivity has been investigated for various classes of graphs [
5], such as trees [
6,
7], unicyclic graphs [
8], bicyclic graphs [
9], and cactuses [
4,
10]. Reflexive graphs are also related to two classes of algebraic numbers, Salem and Pisot numbers. In [
11], a class of reflexive graphs (called Salem graphs) are associated with Salem numbers (called graph Salem numbers) whose limiting points are Pisot numbers. In the same paper, all reflexive trees that defined Salem numbers were described as well. In [
12], a procedure for finding Pisot numbers as limiting points of graph Salem numbers was given.
Describing L-reflexive graphs, i.e., graphs whose line graphs are reflexive, is a difficult problem. The first, natural approach in solving this problem is to consider its restricted version for trees. Even then, however, an elegant full characterization of reflexive line graphs of trees has proven to be quite formidable. More light on the structural composition of such trees was shed in [
4,
12], and we used these results as the basis for our considerations.
In this paper, we focus on an algorithm for generating all L-reflexive trees that are maximal in the sense that adding one edge to a pendant vertex of such an L-reflexive tree violates its reflexivity. In
Section 2, we define the problem that we considered, and provide some background results that were needed in
Section 3, where we describe an efficient algorithm for generating all maximal L-reflexive trees. In
Section 4, we present some computational experiments to test our algorithm, and in
Section 5, we close with some concluding remarks.
2. Preliminaries
In this section, we clearly define the problem with which we are dealing and provide some background results from [
4,
12] used in the paper.
In ([
12], Theorem 2.4), it was shown that the structure of an L-reflexive tree has the general form given in
Figure 1 apart from a few sporadic cases.
A nonsporadic L-reflexive tree contains a central vertex
v with different branches emanating from it whose shape is illustrated in
Figure 1. All
s and
p,
q values in the figure refer to the number of edges, whereas
k,
l, and
t values refer to the number of corresponding branches. Some of the
t-branches can also be unbounded, so their length is infinite.
The following criterion from ([
12], Theorem 3.1) determines whether a tree in
Figure 1 is L-reflexive.
Theorem 1. Let T be a tree as in Figure 1. For some s and , denote by the number of s equal to , and by denote the number of infinite s (i.e, the number of unbounded t-branches). Then, T is L-reflexive if and only ifwhere and . It is also argued in [
12] that we can simplify the left-hand side of Inequality (
1) by taking
and
, so Inequality (
1) is reduced to
Furthermore, from the discussion on the values of
p and
q in [
12], it basically follows that the right-hand side of Inequality (
2) can be taken to have discrete values, such as
. Thus, for one of these (fixed) discrete values of the right-hand side of Inequality (
2), without losing too much generality, we can regard L-reflexive trees as trees having the canonical structure given in
Figure 2.
To summarize, if
and
, then a canonical tree from
Figure 2 is L-reflexive if and only if
for some
, and some sequence
with each
, where
. Such an L-reflexive tree
T is also maximal if adding one edge to any finite branch of the tree
T makes its corresponding new sum
L strictly greater than
R.
The problem we are, therefore, interested in is: Given a fixed value
, generate all maximal L-reflexive trees with the canonical structure shown in
Figure 2 (the number of such trees is finite, as shown in [
4]).
Now, for
, consider number of nodes
at level
j of the canonical tree from
Figure 2. This is illustrated in
Figure 3.
The next lemma shows that sum
L for a canonical tree from
Figure 2 can be computed in a different way using
s instead of
s as coefficients.
Lemma 1. Letfor some and some sequence with each , . If andthen Proof. Since
telescoping gives
as claimed. □
Coefficients s can easily be recovered from coefficients s, as the next lemma shows.
Lemma 2. Letfor some and some sequence such that . If and for , then Proof. Similar telescoping technique. □
3. Algorithm
The basic idea of the algorithm for discovering a maximal L-reflexive tree (mlrt) having the structure given in
Figure 2 is to use Lemma 1 to incrementally compute its corresponding sum
L until it exceeds value
R. Assuming for the moment that a maximal L-reflexive tree is finite, starting from
nodes,
, at level 1, and going up level by level, at next level
j we add
nodes (and edges) so that their total contribution, i.e.,
, to already computed sum
L does not exceed
R. Clearly, if adding even one node at some level
j makes already computed sum
L greater than value
R, then the tree encoded by sequence
is maximally L-reflexive.
The search space for all (finite and infinite) maximal L-reflexive trees is the set of all canonical trees from
Figure 2. To facilitate systematic and efficient search, we modelled this space as an infinite tree with nodes representing subsets of all canonical trees from
Figure 2. More precisely, the root of the search-space tree represents the set of all canonical trees from
Figure 2, i.e., the set of such trees that have
nodes on level 1, denote it by
. Set
can be partitioned into mutually disjoint subsets
,
,…,
of canonical trees having
,
, …, 1, respectively, nodes on level 2. Similarly, each set of trees
on level 2, where
, can be further divided into mutually disjoint subsets
,
, …,
of canonical trees having
m,
, …, 1, respectively, nodes on level 3. Continuing this procedure in the same fashion, we can thus represent the search space for all maximal L-reflexive trees from
Figure 2 as a tree shown in
Figure 4.
Figure 4 shows that set
, where
, is represented by the subtree whose root is node
at level
j on the path that starts from node
on level 1. This path goes next to node
on level 2, then to node
on level 3, and so on. The path in this way ends with node
on level
j. We also slightly abused our notation by using
to denote both a set of trees and a node in
Figure 4 representing that set.
To each node
in
Figure 4, we assigned a value
and called it the node’s size, because
represents canonical trees that have
nodes on level
j. Different sizes of nodes are indicated in
Figure 4 by the scaled diameters of the corresponding circles.
The following lemma is an immediate consequence of the construction of the search-space tree.
Lemma 3. Let and be two canonical trees from Figure 2 and let and . Then is a subtree of if and only if and for each . We also assigned another value to each node
in
Figure 4, called the node’s load, representing partial sum
L accumulated when we follow the path going from the root to that node. In other words, node load
is computed recursively as
for
and
.
We can now establish criteria for detecting whether a node of the search-space tree from
Figure 4 represents a finite or infinite maximal L-reflexive tree. The first criterion for a finite maximal L-reflexive tree is obvious and stated here without proof.
Lemma 4. A node in Figure 4 represents a finite maximal L-reflexive tree encoded by sequence if and only if its load L is not greater than R, and the load of all of its children is (strictly) greater than R. On the other hand, whether a node of the tree from
Figure 4 represents an infinite maximal L-reflexive tree can be determined using the following lemma.
Lemma 5. Node in Figure 4 represents an infinite L-reflexive tree encoded by sequence if and only if its load L satisfies inequality Proof. Node
on level
j in
Figure 4 represents an infinite L-reflexive tree if and only if for every
This inequality can be rewritten as
or
Letting
in the last inequality we get
which is desired Inequality (
3). □
We can use Lemma 5 to discover an infinite maximal L-reflexive tree if Inequality (
3) is satisfied for the corresponding node in
Figure 4 on the lowest level.
To now find all maximal L-reflexive trees, we can apply depth-first search to explore the search-space tree from
Figure 4, computing the load of visited nodes along the way, and using Lemmas 4 and 5 to end a path from the root. However, we can actually do better by applying a kind of branch-and-bound technique to considerably cut the search space.
Namely, we first need to explore all children of a given node, but only those (if any) whose load does not exceed R. Clearly, the subtrees rooted at the children whose load already exceed R cannot possibly even contain L-reflexive trees, let alone maximal. The children whose load does not exceed R must be explored because the subtrees rooted in them each contain at least one maximal L-reflexive tree.
The second observation encompassed in the following lemma relates to nodes representing infinite maximal L-reflexive trees. Namely, Lemma 6 allows us to further cut the search space because, once a node representing an infinite maximal L-reflexive tree is found during depth-first search, all children nodes of its ancestors from the lemma can be ignored since they represent subtrees of the first-time-found infinite maximal L-reflexive tree.
Lemma 6. Let node in Figure 4 represent an infinite maximal L-reflexive tree, and for consider any ancestor of that node. Then, all children , , …, of ancestor also represent infinite L-reflexive trees. Proof. By Lemma 3, children , , …, of ancestor are subtrees of . □
Previous considerations are incorporated into recursive algorithm
mlrt given in
Figure 5. Therefore, the following theorem is straightforward.
Theorem 2. An initial call mlrtfor fixed and correctly generates all maximal L-reflexive trees from Figure 2.