Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

All graphs considered throughout this paper are simple (with no loops nor multiple edges), undirected and have order n.  V (G) = { 1, 2, , n} and E(G) denote, respectively, the vertex and the edge sets of G and ij represents the edge linking nodes i and j of V (G). If i ∈ V (G), then the vertex set denoted by \(N_{G}(i) = \left \{j \in V (G): ij \in E(G)\right \}\) is called neighbourhood of i. Additionally, N G [i] denotes the closed neighbourhood of vertex i (that is, \(N_{G}[i] = N_{G}(i) \cup \left \{i\right \}).\) Given a graph G and a set of vertices \(U \subset V (G),\) the subgraph of G induced by U, G[U], is such that V (G[U]) = U and \(E(G[U]) = \left \{ij: i,j \in U \wedge ij \in E(G)\right \}.\) A (κ,τ)-regular set of a graph is a vertex subset inducing a κ−regular subgraph such that every vertex not in the subset has τ neighbours in it, [2].

The adjacency matrix A G  = [a ij ] of G is the n × n symmetric matrix such that a ij  = 1 if ij ∈ E(G) and a ij  = 0 otherwise. The n eigenvalues of A G are usually called the eigenvalues of G and are ordered \(\lambda _{max}(G) =\lambda _{1}(G) \geq \ldots \geq \lambda _{n} =\lambda _{min}(G).\) These eigenvalues are all real because A G is symmetric. It is also known that, provided G has at least one edge, we have that \(\lambda _{min}(G) \leq -1\) and, furthermore, \(\lambda _{min}(G) = -1\) if and only if every connected component of G is complete, [4]. The multiplicity of \(\lambda _{i}\) as eigenvalue of G (and, consequently, as eigenvalue of A G ) is denoted by \(m(\lambda _{i})\). Throughout this paper, \(\sigma (G)\) will denote the spectrum of G, that is, the set of \(G^{{\prime}}\) s eigenvalues together with their multiplicities. The eigenspace associated to each eigenvalue \(\lambda\) of G is denoted by \(\mathcal{E}_{G}(\lambda ).\)

An eigenvalue of a graph G is main if its associated eigenpace is not orthogonal to the all-one vector j. The vector space spanned by such eigenvectors of G is denoted Main(G). The remaining (distinct) eigenvalues of G are referred to as non-main. The dimension of \(\mathcal{E}_{G}(\lambda _{i}),\) the eigenspace associated to each main eigenvalue \(\lambda _{i}\) of G, is equal to the multiplicity of \(\lambda _{i}.\) The index of G, its largest eigenvalue, is main. The concepts of main and non-main eigenvalue were introduced in [4]. An overview on the subject was published in [5].

Given a graph G, the line graph of G, which is denoted by L(G), is constructed by taking the edges of G as vertices of L(G) and joining two vertices in L(G) by an edge whenever the corresponding edges in G have a common vertex. The graph G is called the root graph of L(G). 

A stable set (or independent set) of G is a subset of vertices of V (G) whose elements are pairwise nonadjacent. The stability number (or independence number) of G is defined as the cardinality of a largest stable set and is usually denoted by α(G). A maximum stable set of G is a stable set with α(G) vertices. Given a nonnegative integer k, the problem of determining whether G has a stable set of size k is NP-complete and, therefore, the determination of α(G) is, in general, a hard problem.

A matching in a graph G is a subset of edges, \(M \subseteq E(G),\) no two of which have a common vertex. A matching with maximum cardinality is called a maximum matching. Furthermore, if for each vertex i ∈ V (G) there is one edge of the matching M incident with i, then M is called a perfect matching. It is obvious that every perfect matching is also a maximum matching. Notice that the determination of a maximum stable set of a line graph, L(G), is equivalent to the determination of a maximum matching of G. There are several polynomial-time algorithms for the determination of a maximum matching of a graph.

The present paper introduces an algorithm for the recognition of (0,2)-regular sets in graphs and the application of this algorithm is illustrated with the determination of maximum matchings through an approach involving (0,2)-regular sets.

2 Main Eigenvalues, Walk Matrix and (κ, τ)-Regular Sets

We begin this section recalling a few concepts and surveying some relevant results.

If G has p distinct main eigenvalues \(\mu _{1},\ldots,\mu _{p},\) the main characteristic polynomial of G is

$$\displaystyle{m_{G}(\lambda ) =\lambda ^{p} - c_{ o}\lambda ^{p-1} - c_{ 1}\lambda ^{p-2} -\ldots -c_{ p-2}\lambda - c_{p-1} =\prod _{ i=1}^{p}(\lambda -\mu _{ i}).}$$

Theorem 1 ([5])

If G is a graph with p main distinct eigenvalues \(\mu _{1},\ldots,\mu _{p},\) then the main characteristic polynomial of G, \(m_{G}(\lambda )\) , has integer coefficients.

Considering A G , the adjacency matrix of graph G, the entry a ij (k) of A k is the number of walks of length k from i to j. Therefore, the n × 1 vector A k j, gives the number of walks of length k starting in each vertex of G. Given a graph G of order n, the n × k walk matrix of G is the matrix \(W_{k} = (\mathbf{j},A\mathbf{j},A^{2}\mathbf{j},\ldots,A^{k-1}\mathbf{j}).\) If G has p distinct main eigenvalues, the n × p walk matrix

$$\displaystyle{W = W_{p} = (\mathbf{j},A\mathbf{j},A^{2}\mathbf{j},\ldots,A^{p-1}\mathbf{j})}$$

is referred to as the walk matrix of G. The vector space spanned by the columns of W is called Main(G) and it coincides with the vector space spanned by \(v_{1},\ldots,v_{p}\) with \(v_{i} \in \mathcal{E}_{G}(\mu _{i})\) and \(v_{i}^{t}\mathbf{j}\neq 0,i = 1,\ldots,p.\) The orthogonal complement of Main(G) is denoted, as expected, Main \((G)^{\perp }.\) Notice that both Main(G) and Main \((G)^{\perp }\) are invariant under A G . 

Taking into account that

$$\displaystyle{ m_{G}(A_{G}) = 0 \Leftrightarrow A_{G}^{p}\mathbf{j} - c_{ 0}A_{G}^{p-1}\mathbf{j} - c_{ 1}A_{G}^{p-2}\mathbf{j} -\ldots -c_{ p-2}A_{G}\mathbf{j} - c_{p-1}\mathbf{j} = 0, }$$
(1)

the following result holds.

Theorem 2 ([3])

If G has p main distinct eigenvalues, then

$$\displaystyle{W\left (\begin{array}{c} c_{p-1}\\ \vdots \\ c_{1} \\ c_{0} \end{array} \right ) = A^{p}\mathbf{j},}$$

where c j , with 0 ≤ j ≤ p − 1, are the coefficients of the main characteristic polynomial of G.

It follows from this theorem that the coefficients of the main characteristic polynomial of a graph can be determined solving the linear system

$$\displaystyle{Wx = A^{p}\mathbf{j}.}$$

Proposition 1 ([2])

A vertex subset S of a graph G with n vertices is (κ,τ)-regular if and only if its characteristic vector is a solution of the linear system

$$\displaystyle{ (A_{G} - (\kappa -\tau )I_{n})x =\tau \mathbf{j}. }$$
(2)

It follows from this result that if system (2) has a (0, 1)-solution, then such solution is the characteristic vector of a (κ, τ)-regular set. In fact, let us assume that x is a (0, 1)-solution of (2). Then, for all i ∈ V (G),

$$\displaystyle{\left (A_{G}\right )_{i}x = \left \vert N_{G}(i) \cap S\right \vert = \left \{\begin{array}{cc} \kappa &\text{if }i \in S\\ \tau & \text{if } i\notin S \end{array} \right..}$$

Next, we will associate to each graph G and each pair of nonnegative numbers, (κ, τ), the following parametric vector, [3]:

$$\displaystyle{ \mathbf{g}_{G}(\kappa,\tau ) =\sum _{ j=0}^{p-1}\alpha _{ j}A_{G}^{j}\mathbf{j}, }$$
(3)

where p is the number of distinct main eigenvalues of G and \(\alpha _{0},\ldots,\alpha _{p-1}\) is a solution of the linear system:

$$\displaystyle{ \left (\begin{array}{ccccc} \kappa -\tau & 0 &\ldots & 0 & - c_{p-1} \\ - 1& \kappa -\tau &\ldots & 0 & - c_{p-2} \\ 0 & - 1&\ldots & 0 & - c_{p-3}\\ \vdots & \vdots & \vdots & \vdots & \vdots \\ 0 & 0 &\ldots & - 1& \kappa -\tau -c_{0} \end{array} \right )\left (\begin{array}{c} \alpha _{0}\\ \alpha _{ 1}\\ \vdots\\ \alpha _{p-2} \\ \alpha _{p-1} \end{array} \right ) = -\tau \left (\begin{array}{c} 1\\ 0\\ \vdots \\ 0\\ 0 \end{array} \right ). }$$
(4)

The following theorem is a slight variation of a result proven in [3].

Theorem 3 ([3])

Let G be a graph with p distinct main eigenvalues \(\mu _{1},\ldots,\mu _{p}.\) A vertex subset \(S \subset V (G)\) is (κ,τ)-regular if and only if its characteristic vector x(S) is such that

$$\displaystyle{x(S) = \mathbf{g} + \mathbf{q},}$$

with

$$\displaystyle{\mathbf{g} =\sum _{ j=0}^{p-1}\alpha _{ j}A^{j}\mathbf{j},}$$

\((\alpha _{0},\ldots,\alpha _{p-1})\) is the unique solution of the linear system  (4) and if \((\kappa -\tau )\notin \sigma (G)\) then q = 0 else \(\mathbf{q} \in \mathcal{E}_{G}(\kappa -\tau )\) and κ −τ is non-main.

3 Main Results

An algorithm for the recognition of (0, 2)-regular sets in general graphs is introduced in this section. Such algorithm is not polynomial in general and its complexity depends on the multiplicity of − 2 as an eigenvalue of the adjacency matrix of A G . Particular cases for which the application of the algorithm is polynomial are presented.

Theorem 4

If a graph G has a (0,2)-regular set S, then \(\left \vert S\right \vert = \mathbf{j}^{T}\mathbf{g}_{G}(0,2).\)

Proof

Supposing that \(S \subset V (G)\) is a (0, 2)-regular set, according to Theorem 3, its characteristic vector x S verifies

$$\displaystyle{x_{S} = \mathbf{g}_{G}(0,2) + \mathbf{q}.}$$

Therefore,

$$\displaystyle{\left \vert S\right \vert = \mathbf{j}^{T}x_{ S} = \mathbf{j}^{T}\mathbf{g}_{ G}(0,2) + \mathbf{j}^{T}\mathbf{q}.}$$

Since q = 0 or \(\mathbf{q} \in \mathcal{E}_{G}(\kappa -\tau )\) with κτ non-main, the conclusion follows. □ 

The following corollary provides a condition to decide when there are no (0, 2)-regular sets in G. 

Corollary 1

If j T g G (0,2) is not a natural number, then G has no (0,2)-regular set.

Now let us consider the particular case of graphs where m(−2) = 0. 

Theorem 5

If G is a graph such that m(−2) = 0, then G has a (0,2)-regular set if and only if \(\mathbf{g}_{G}(0,2) \in \left \{0,1\right \}^{n}.\)

Proof

According to Theorem 3, since − 2 is not an eigenvalue of G, there is a (0, 2)-regular set \(S \subset V (G)\) if and only if x S  = g. □ 

Considering a m × n matrix M and a vertex subset \(I \subset V (G),\ M^{I}\) denotes the submatrix of M whose rows correspond to the indices in I. 

Theorem 6

Let G be a graph of order n such that m(−2) > 0 and let U be the n × m matrix whose columns are the eigenvectors of a basis of \(\mathcal{E}_{G}(-2).\) If there is v ∈ V (G) such that U N (where \(N = N_{G}[v] = \left \{v,v_{1},\ldots,v_{k}\right \}\) ) has maximum rank, then it is possible to determine, in polynomial time, if G has a (0,2)-regular set.

Proof

According to the necessary and sufficient condition for the existence of a (κ, τ)-regular set presented in Theorem 3, a vertex subset \(S \subset V (G)\) is (0, 2)-regular if and only if its characteristic vector x S is of the form

$$\displaystyle{x_{S} = \mathbf{g}_{G}(0,2) + \mathbf{q},}$$

where g is defined by (3) and (4). Setting q = U β, where β is an m-tuple of scalars, such scalars may be determined solving the linear subsystem of x S  = g + q: 

$$\displaystyle{x_{S}^{N} = \mathbf{g}^{N} + \mathbf{U}^{N}\beta,}$$

for each of the following possible instances of x S : 

  • (x S ) v  = 1 and then \((x_{S})_{v_{i}} = 0,\forall i = 1,\ldots,k;\)

  • (x S ) v  = 0 and then one of the following holds:

    • \((x_{S})_{v_{1}} = (x_{S})_{v_{2}} = 1\) and \((x_{S})_{v_{i}} = 0,\forall v_{i} \in N_{G}\left [v\right ]\setminus \{v_{1},v_{2}\};\)

    • \((x_{S})_{v_{1}} = (x_{S})_{v_{3}} = 1\) and \((x_{S})_{v_{i}} = 0,\forall v_{i} \in N_{G}\left [v\right ]\setminus \{v_{1},v_{3}\};\)

    • \((x_{S})_{v_{1}} = (x_{S})_{v_{k}} = 1\) and \((x_{S})_{v_{i}} = 0,\forall v_{i} \in N_{G}\left [v\right ]\setminus \{v_{1},v_{k}\};\)

    • \((x_{S})_{v_{2}} = (x_{S})_{v_{3}} = 1\) and \((x_{S})_{v_{i}} = 0,\forall v_{i} \in N_{G}\left [v\right ]\setminus \{v_{2},v_{3}\};\)

    • \((x_{S})_{v_{2}} = (x_{S})_{v_{4}} = 1\) and \((x_{S})_{v_{i}} = 0,\forall v_{i} \in N_{G}\left [v\right ]\setminus \{v_{2},v_{4}\};\)

    • \((x_{S})_{v_{2}} = (x_{S})_{v_{k}} = 1\) and \((x_{S})_{v_{i}} = 0,\forall v_{i} \in N_{G}\left [v\right ]\setminus \{v_{2},v_{k}\};\)

    • \((x_{S})_{v_{k-1}} = (x_{S})_{v_{k}} = 1\) and \((x_{S})_{v_{i}} = 0,\forall v_{i} \in N_{G}\left [v\right ]\setminus \{v_{k-1},v_{k}\};\)

If for any of the cases described above the solution β is such that the obtained entries of vector x S are 0 − 1, then such x S is the characteristic vector of a (0, 2)-regular set. If none of the above instances generates a 0 − 1 vector x S , then we may conclude that the graph G has no (0, 2)-regular set. Notice that each of the (at most) \(1 +{ k\choose 2}\) linear systems under consideration can be solved in polynomial time, therefore it is possible to determine in polynomial time if G has a (0, 2)-regular set. □ 

In order to generalize the procedure for the determination of (0, 2)-regular sets to arbitrary graphs, it is worth to introduce some terminology. Let G be a graph with vertex set \(V = \left \{1,\ldots,n\right \}\) and consider \(I \subset V (G) = \left \{i_{1},\ldots,i_{m}\right \}.\) The m-tuple \(x^{I} = (x_{i_{1}},\ldots,x_{i_{m}}) \in \left \{0,1\right \}^{m}\) is \(\left (0,2\right )\)-feasible if it can be seen as a subvector of a characteristic vector x ∈ { 0, 1}n of a \(\left (0,2\right )\)-regular set in G. From this definition the following conditions hold:

  1. (1)

    \(\exists i_{r} \in I: x_{i_{r}} = 1 \Rightarrow \left \{\begin{array}{l} \forall i_{j} \in N_{G}(i_{r}) \cap I,\ x_{i_{j}} = 0\quad \text{and} \\ \forall j \in N_{G}(i_{r}),\ \sum _{k\in N_{G}(j)\setminus \left \{i_{r}\right \}}x_{k} = 1;\end{array} \right.\)

  2. (2)

    \(\exists i_{s} \in I: x_{i_{s}} = 0 \wedge N_{G}(i_{s}) \subseteq I \Rightarrow \sum _{j\in N_{G}[i_{s}]}x_{j} = 2.\)

Using the \(\left (0,2\right )\)-feasible concept and consequently the above conditions, we are able to present an algorithm to determine a (0, 2)-regular set in an arbitrary graph or to decide that no such set exists.

Algorithm 1 To determine a (0, 2)-regular set or decide that no such set exists

Input: (Graph G of order n,  m = m(−2) and matrix Q whose columns are the eigenvectors of a basis of \(\mathcal{E}_{G}(-2)\)).

Output: ((0, 2)-regular set of G or the conclusion that no such set exists).

1. If \(\mathbf{j}^{T}g_{G}(0,2)\notin \mathbb{N}\) then STOP (there is no solution) End If;

2. If m = 0, then STOP (x S  = g G (0, 2)) End If;

3. If \(\exists v \in V (G): rank(Q^{N}) \leq d_{G}(v) + 1(N = N_{G}[v])\) then STOP (the output is a consequence of the low multiplicity results) End If;

4. Determine \(I = \left \{i_{1},\ldots,i_{m}\right \} \subset V (G): rank(Q^{I}) = m\) and set g: = g G (0, 2); 

5. Set NoSolution: = TRUE;

6. Set \(X:= \left \{(x_{i_{1}},\ldots,x_{i_{m}})\right.\) which is (0, 2)-feasible for \(\left.G\right \};\)

7. While \(NoSolution \wedge X\neq \emptyset\) do

8. Choose \((x_{i_{1}},\ldots,x_{i_{m}}) \in X\) and Set \(x^{I}:= (x_{i_{1}},\ldots,x_{i_{m}})^{T};\)

9. Set \(X:= X\setminus \left \{x^{I}\right \}\) and determine \(\beta: x^{I} = \mathbf{g}^{I} + Q^{I}\beta;\)

10. If \(\mathbf{g} + Q\beta \in \left \{0,1\right \}^{n}\) then NoSolution: = FALSE End If;

11. End While

12. If NoSolution = FALSE then \(x:= \mathbf{g} + Q\beta \in \left \{0,1\right \}^{n}\) else return NoSolution; 

13. End If.

14. End.

In the worst cases, steps 7–11 are executed 2m times and, therefore, the execution of the algorithm is not polynomial. There is, however, a large number of graphs for which the described procedure is able to decide, in polynomial time, if there is a (0, 2)-regular set and to determine it in the cases where it exists.

Example 1

Consider the graph G depicted in Fig. 1.

Fig. 1
figure 1

Graph G

We will apply Algorithm 1 to determine a (0, 2)-regular set in G, a graph for which m = m(−2) = 3. 

Since

  • \(rank(\begin{array}{c} \mathbf{j}\end{array} ) = 1,\)

  • \(rank(\begin{array}{cc} \mathbf{j}&A_{G}\mathbf{j}\end{array} ) = 2,\)

  • \(rank(\begin{array}{ccc} \mathbf{j}&A_{G}\mathbf{j}&(A_{G})^{2}\mathbf{j}\end{array} ) = 2,\)

we have p = 2 distinct main eigenvalues of G. 

$$\displaystyle{W = (\begin{array}{cc} \mathbf{j}&A_{G}\mathbf{j} \end{array} ) = \left (\begin{array}{cc} 1&2\\ 1 &3 \\ 1&3\\ 1 &4 \\ 1&4\\ 1 &4 \\ 1&4\\ 1 &3 \\ 1&3\\ 1 &2 \end{array} \right ).}$$

The solution of the linear system Wx = (A G )2 j is \(C = \left (\begin{array}{c} - 2\\ 4 \end{array} \right ),\) so the coefficients of the main characteristic polynomial of G are c 0 = 4, c 1 = −2. 

Next, the coefficients of vector g ∈ Main(G) will be determined.

Since

$$\displaystyle{(\kappa -\tau )\alpha _{0} = -\tau +\alpha _{p-1}c_{p-1}}$$

and

$$\displaystyle{(\kappa -\tau )\alpha _{1} =\alpha _{0} +\alpha _{p-1}c_{p-2},}$$

we have \(\alpha _{0} = \frac{6} {7},\alpha _{1} = -\frac{1} {7},\) hence

$$\displaystyle{\mathbf{g} =\alpha _{0}\mathbf{j}+\alpha _{1}A_{G}\mathbf{j} = \left (\begin{array}{l} 0.2857\\ 0.4286 \\ 0.2857\\ 0.2857 \\ 0.4286\\ 0.5714 \\ 0.4286\\ 0.2857 \\ 0.4286\\ 0.5714\\ \end{array} \right ).}$$

Considering matrix Q whose columns q 1, q 2, q 3 form a basis for the eigenspace associated to eigenvalue − 2, we will proceed, searching for a vertex v for which the submatrix of Q corresponding to N G [v] has full rank.

$$\displaystyle{Q = \left (\begin{array}{ccc} 0.4962 & 0.0345 & - 0.1431\\ - 0.4962 & - 0.0345 & 0.1431 \\ - 0.4962& - 0.0345& 0.1431\\ 0.2335 & - 0.1035 & - 0.5878 \\ 0.2626 & 0.1380 & 0.4446\\ 0.2626 & 0.1380 & 0.4446 \\ - 0.2626& 0.3795 & - 0.4446\\ 0 & - 0.5175 & 0 \\ 0 & - 0.5175& 0\\ 0 & 0.5175 & 0\\ \end{array} \right ).}$$

The obtained results are summarized in the following table.

$$\displaystyle{\begin{array}{|l|l|c|}\hline v&N_{G}(v) &\mathrm{Rank}(Q^{N_{G}[v]}) \\\hline 1 &2,3 & 1 \\\hline 2 &1,4,5 & 2 \\\hline 3 &1,4,6 & 2 \\\hline 4 &2,3,5,6& 2 \\\hline 5 &2,4,7,8& 3 \\\hline \end{array}.}$$

It is obvious that the submatrix of Q corresponding to lines 2, 4, 5, 7 and 8, the closed neighbourhood of vertex 5, has full rank, so we will consider the subvector of g and the submatrix of Q corresponding to \(I = N_{G}[5] = \left \{2,4,5,7,8\right \}.\)

$$\displaystyle{\mathbf{g}^{I} = \left (\begin{array}{l} 0.4286\\ 0.2857 \\ 0.2857\\ 0.2857 \\ 0.4286 \end{array} \right ),Q^{I} = \left (\begin{array}{ccc} - 0.4962& - 0.0345& 0.1431\\ 0.2335 & - 0.1035 & - 0.5878 \\ 0.2626 & 0.1380 & 0.4446\\ - 0.2626 & 0.3795 & - 0.4446 \\ 0 & - 0.5175& 0 \end{array} \right ).}$$

Supposing that G has a (0, 2)-regular set S, there are two possibilities to be considered: whether 5 ∈ S or \(5\notin S\) and there are 1+\({4\choose 2}\) possible instances (1) − (7) for the entries of x S that correspond to N G [5] (see next table).

$$\displaystyle{\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|}\hline \mathrm{Inst.}&(x_{S})_{1} & (x_{S})_{2} & (x_{S})_{3} & (x_{S})_{4} & (x_{S})_{5} & (x_{S})_{6} & (x_{S})_{7} & (x_{S})_{8} & (x_{S})_{9} & (x_{S})_{10} \\\hline (1) & {\ast} & 0 & {\ast} & 0 & 1 & {\ast} & 0 & 0 & {\ast} & {\ast} \\\hline (2) & {\ast} & 1 & {\ast} & 1 & 0 & {\ast} & 0 & 0 & {\ast} & {\ast} \\\hline (3) & {\ast} & 1 & {\ast} & 0 & 0 & {\ast} & 1 & 0 & {\ast} & {\ast} \\\hline (4) & {\ast} & 1 & {\ast} & 0 & 0 & {\ast} & 0 & 1 & {\ast} & {\ast} \\\hline (5) & {\ast} & 0 & {\ast} & 1 & 0 & {\ast} & 1 & 0 & {\ast} & {\ast} \\\hline (6) & {\ast} & 0 & {\ast} & 1 & 0 & {\ast} & 0 & 1 & {\ast} & {\ast} \\\hline (7) & {\ast} & 0 & {\ast} & 0 & 0 & {\ast} & 1 & 1 & {\ast} & {\ast} \\\hline \end{array}.}$$

Supposing that 5 ∈ S, the entries of x S corresponding to \(I = \left \{2,4,5,7,8\right \}\) are

$$\displaystyle{x_{S}^{I} = \left (\begin{array}{l} 0\\ 0 \\ 1\\ 0 \\ 0 \end{array} \right )}$$

and the solution of the subsystem

$$\displaystyle{x_{S}^{I} = g^{I} +\beta _{ 1}(q^{I})_{ 1} +\beta _{2}(q^{I})_{ 2} +\beta _{3}(q^{I})_{ 3}}$$

is β 1 = 1. 0215, β 2 = 0. 8281, β 3 = 0. 7461. 

Solving the complete system and calculating g +β 1 q 1 +β 2 q 2 +β 3 q 3 for the evaluated values of β 1, β 2 and β 3, the following result is obtained

$$\displaystyle{x_{S} = \mathbf{g}+\beta _{1}q_{1}+\beta _{2}q_{2}+\beta _{3}q_{3} = \left (\begin{array}{l} 1\\ 0 \\ 0\\ 0 \\ 1\\ 1 \\ 0\\ 0 \\ 0\\ 1\\ \end{array} \right )}$$

and \(S = \left \{1,5,6,10\right \}\) is a (0, 2)-regular set of G. 

4 Application: Determination of Maximum Matchings

In this section, Algorithm 1 is combined with the procedure for maximum matchings described in [1], to provide a strategy for the determination of maximum matchings in arbitrary graphs. Such strategy is based on the determination of (0, 2)-regular sets in the correspondent line graphs, in the cases where they occur, or on the addition of extra vertices to the original graphs, in the situations where the line graphs under consideration have no (0, 2)-regular sets.

Considering the graph described in Example 1 and the (0, 2)-regular set determined by Algorithm 1, it is easily checkable that it corresponds to a maximum matching in graph G whose line graph is L(G). Both graphs are depicted in Fig. 2.

Fig. 2
figure 2

Graphs L(G) and G

It should be noticed that, according to Theorem 7 in [1], a graph G which is not a star neither a triangle has a perfect matching if and only if its line graph has a (0, 2)-regular set.

We will now determine a maximum matching in a graph whose line graph does not have a(0, 2)-regular set, which is equivalent to say that the root graph has no perfect matchings, following the algorithmic strategy proposed in [1].

Example 2

Consider graphs G 1 and L(G 1) both depicted in Fig. 3.

Fig. 3
figure 3

Graphs G 1 and L(G 1)

Since − 2 is not an eigenvalue of L(G 1), we will determine the parametric vector \(\mathbf{g}_{L(G_{1})}(0,2)\) in order to find out if its coordinates are 0 − 1.  L(G 1) has two main eigenvalues and its walk matrix is

$$\displaystyle{W = \left (\begin{array}{cc} 1&1\\ 1 &2 \\ 1&2\\ 1 &1 \end{array} \right ).}$$

The coefficients of the main characteristic polynomial of L(G 1), that are the solutions of system \(Wx = A_{L(G_{1})}\mathbf{j},\) are c 0 = c 1 = 1. The corresponding solutions of system (4), that is, the coefficients of \(\mathbf{g}_{L(G_{1})}(0,2),\) are \(\alpha _{0} = \frac{6} {5}\) and \(\alpha _{1} = -\frac{2} {5}.\) Therefore,

$$\displaystyle{\mathbf{g}_{L(G_{1})}(0,2) =\alpha _{0}\mathbf{j}+\alpha _{1}A_{L(G_{1})}\mathbf{j} = \left (\begin{array}{c} 0.8\\ 0.4 \\ 0.4\\ 0.8 \end{array} \right )}$$

and it can be concluded that the graph L(G 1) has no (0, 2)-regular sets. In order to determine a maximum matching in G 1, we will proceed as it is proposed in [1]. Since G 1 has an odd number of vertices, a single vertex will be added to G 1 and connected to all its vertices. The graph G 2 and its line graph L(G 2), depicted in Fig. 4, are obtained.

Fig. 4
figure 4

Graphs G 2 and L(G 2)

Repeating the procedure described in Algorithm 1 (now applied to L(G 2)), we have that m(−2) = 3 and p = 4. It is also easy to verify that c 0 = 5, c 1 = 1, c 2 = −6 and c 3 = 0 are the coefficients of the main characteristic polynomial of L(G 2). The solution of system (4) is \(\alpha _{0} = 1,\alpha _{1} = -\frac{13} {20},\alpha _{2} = \frac{7} {20},\alpha _{3} = -\frac{1} {20}\) and the corresponding parametric vector \(\mathbf{g}_{L(G_{2})}(0,2)\) is

$$\displaystyle{\mathbf{g}_{L(G_{2})}(0,2) =\alpha _{0}\mathbf{j}+\alpha _{1}A_{L(G_{2})}\mathbf{j}+\alpha _{2}(A_{L(G_{2})})^{2}\mathbf{j}+\alpha _{ 3}(A_{L(G_{2})})^{3}\mathbf{j} = \left (\begin{array}{c} 0.6\\ 0.4 \\ 0.4\\ 0.4 \\ 0.2\\ 0.6 \\ 0.4\\ 0 \\ 0\end{array} \right ).}$$

We will now consider matrix Q, whose columns form a basis for the eigenspace associated to the eigenvalue − 2 of L(G 2). 

$$\displaystyle{Q = \left (\begin{array}{llllllllllll} 0.2241 &0.4458 &0.2260\\ - 0.2241 & - 0.4458 & - 0.2260 \\ 0.3176 & - 0.4525& - 0.3072\\ - 0.4115 &0.3651 & - 0.3121 \\ 0.0939 &0.0875 &0.6193\\ - 0.1302 & - 0.3583 &0.3933 \\ 0.1302 &0.3583 & - 0.3933\\ - 0.5416 &0.0068 &0.0812 \\ 0.5416 & - 0.0068& - 0.0812\\ \end{array} \right ).}$$

Searching for a vertex of degree ≥ 2 in L(G 2) whose closed neighbourhood corresponds to a submatrix of Q with maximum rank, the following table is obtained.

$$\displaystyle{\begin{array}{|l|l|c|}\hline v&N_{L(G_{2})}(v) &\mathrm{rank}(Q^{N_{L(G_{2})}[v]}) \\\hline 1 &2,3,8 & 2 \\\hline 2 &1,5,7,8,9 & 3 \\\hline 3 &1,4,5,8 & 3 \\\hline 4 &3,5,6,9 & 3 \\\hline 5 &2,3,4,7,8,9& 3 \\\hline 6 &4,7,9 & 2 \\\hline 7 &2,5,6,8,9 & 3 \\\hline 8 &1,2,3,5,7,9& 3 \\\hline 9 &2,4,5,6,7,8& 3 \\\hline \end{array}.}$$

It is evident that the closed neighbourhood of vertex 2 verifies the mentioned requirements and we will proceed considering the subvector of g and the submatrix of Q whose lines are the elements of \(N_{L(G_{2})}\left [2\right ].\)

$$\displaystyle{\mathbf{g}^{I} = \left (\begin{array}{c} 0.6\\ 0.4 \\ 0.2\\ 0.4 \\ 0\\ 0\end{array} \right ),Q^{I} = \left (\begin{array}{ccc} 0.2241 & 0.4458 & 0.2260\\ - 0.2241 & - 0.4458 & - 0.2260 \\ 0.0939 & 0.0875 & 0.6193\\ 0.1302 & 0.3583 & - 0.3933 \\ - 0.5416& 0.0068 & 0.0812\\ 0.5416 & - 0.0068 & - 0.0812 \end{array} \right ).}$$

Supposing that L(G 2) contains a (0, 2)-regular set, there are 1+\({5\choose 2}\) possible instances for the entries of x S that correspond to \(N_{G_{2}}[2].\) One of them is

$$\displaystyle{\begin{array}{|l|l|l|l|l|l|l|l|l|l|l|}\hline (x_{S})_{1} & (x_{S})_{2} & (x_{S})_{3} & (x_{S})_{4} & (x_{S})_{5} & (x_{S})_{6} & (x_{S})_{7} & (x_{S})_{8} & (x_{S})_{9} \\\hline 0 &1 &{\ast} &{\ast} &0 &{\ast} &0 &0 &0\\\hline \end{array}.}$$

Assuming that 2 ∈ S, the entries 1, 2, 5, 7, 8, 9 of x S must be of the form

$$\displaystyle{x_{S}^{I} = \left (\begin{array}{l} 0\\ 1 \\ 0\\ 0 \\ 0\\ 0 \end{array} \right )}$$

and the solution of the subsystem

$$\displaystyle{x_{S}^{I} = \mathbf{g}^{I} +\beta _{ 1}(q^{I})_{ 1} +\beta _{2}(q^{I})_{ 2} +\beta _{3}(q^{I})_{ 3}}$$

is \(\beta _{1} = -0.0367,\beta _{2} = -1.2566,\beta _{3} = -0.1399.\)

Solving the complete system x S  = g +β 1 q 1 +β 2 q 2 +β 3 q 3 and computing g +β 1 q 1 +β 2 q 2 +β 3 q 3, we obtain

$$\displaystyle{x_{S} = \mathbf{g}+\beta _{1}q_{1}+\beta _{2}q_{2}+\beta _{3}q_{3} = \left (\begin{array}{l} 0\\ 1 \\ 1\\ 0 \\ 0\\ 1 \\ 0\\ 0 \\ 0 \end{array} \right )}$$

and \(S = \left \{2,3,6\right \}\) is a (0, 2)-regular set of L(G 2). The resulting (0, 2)-regular set S corresponds to the perfect matching of G 2: \(M^{{\ast}} = \left \{\left \{1,4\right \},\left \{2,5\right \},\left \{3,6\right \}\right \}.\) Therefore, intersecting the edges of M with the edge set of the root graph G 1, a maximum matching of G 1

$$\displaystyle{M = \left \{\left \{1,4\right \},\left \{2,5\right \}\right \},}$$

is determined.

5 Final Remarks

The aim of this paper is the introduction of an algorithm for the determination of (0, 2)-regular sets in arbitrary graphs. In Sect. 2, an overview of the most relevant results about the determination of (κ, τ)-regular sets using the main eigenspace of a given graph is presented. Such results were introduced [3]. In Sect. 3, several results that lead to the determination of (0, 2)-regular sets are introduced and a new algorithm that determines a (0, 2)-regular set in an arbitrary graph or concludes that no such set exists is also described. Section 4 is devoted to the application of the introduced algorithm to the determination of maximum matchings.

Despite the interest of the introduced techniques for the determination of (0, 2)-regular sets in general graphs, their particular application to the determination of maximum matchings is not efficient in many cases. The use of these techniques in this context is for illustrating the application of the algorithm. It remains as an open problem, to obtain additional results for improving the determination of (0, 2)-regular sets in line graphs.