Computing The Degree of Some Matchings in A Graph: American Journal of Combinatorics
Computing The Degree of Some Matchings in A Graph: American Journal of Combinatorics
Abstract
Let G be a connected graph. A matching M in G is a set of edges of G without two of
them adjacent (having a common vertex). The graph whose vertices are the matchings
in G and two matchings M and N are adjacent if and only if (M \ N ) ∪ (N \ M ) is
the edge set of a path or a cycle, is denoted by G(M(G)) and called the skeleton of
the matching polytope of G. The degree of a matching M in G is the degree of the
vertex M in G(M(G)). In the literature some authors have studied the degree of some
matchings, in particular when G is a tree. In this paper we continue this study and we
present some formulas to compute the degree of a matching M in a graph with cycles.
More explicitly, we focus on the matchings having 1 or 2 edges and on the matchings
of more than two edges with some constraints.
1 Introduction
Let G = (V (G), E(G)) be a simple and connected graph with vertex set V (G) = {v1 , v2 , . . . , vn }
and edge set E(G) = {e1 , e2 , . . . , em }. For each k, with 1 ≤ k ≤ m, the edge ek = {vi , vj },
edge incident to vertices vi and vj of G, is simply denoted by vi vj . The degree of the vertex
v ∈ V (G) in the graph G is denoted by dG (v) and the set of neighbors of v in G (vertices
adjacent to v) is denoted by NG (v). A path with n ≥ 2 vertices, denoted by Pn , is a tree
with n − 2 vertices having degree 2 and the others having degree 1. A cycle with n ≥ 3
vertices, denoted by Cn , is a connected graph with all vertices of degree 2. Thus, a cycle
Cn is obtained from the path Pn by adding the edge incident to the vertices of degree 1
in Pn . We denote a path by its sequence of edges, ei1 , ei2 , . . . , eij , where eip is adjacent
to eip+1 , for 1 ≤ p ≤ j − 1, and a cycle obtained from this path is denoted by its edges,
ei1 , ei2 , . . . , eij , eij+1 , where eij+1 is adjacent to ei1 and eij . We say that Pn has length n − 1
and Cn has length n. A vertex v ∈ V (G) is a pendant vertex of G if dG (v) = 1 and an edge
e ∈ E(G) is a pendant edge of G if it is incident to a pendant vertex of G. A matching in G
is a subset M ⊆ E(G) without two edges adjacent in G, that is, having a common vertex.
MSC2020: 05C07, 05C70; Keywords: Matching, Degree of a vertex, Skeleton, Polytope
©
Received Jun 23, 2024; Revised Oct 3, 2024; Accepted Oct 4, 2024; Published Oct 6, 2024
The author(s). Released under the CC BY 4.0 International License
22
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
In general, we identify each subset of edges of G with its respective incidence vector. The
matching polytope of G, M(G), is the convex hull of the incidence vectors of the matchings
in G. For more definitions and notations of polytopes, see [7].
In [4], the authors studied the polytope M(G) when G is a tree. However, the definition
of a graph obtained from this polytope, called the skeleton, and the notion of degree of a
matching appeared in [1]. It is worth mentioning that this definition was connected only
with trees. In [6] we have an algorithm to compute the degree of a matching when the graph
is a tree. Lately, in [2], the authors started the generalization of the study of the degree of a
vertex, that is a matching in a graph, in the mentioned graph called skeleton. In this paper,
we continue this study.
The skeleton of M(G) is the graph G(M(G)) whose vertices and edges are, respectively,
vertices and edges of M(G). Consequently, the vertex set of G(M(G)) is the set of matchings
in G. The next result characterizes when two distinct matchings in G are adjacent in
G(M(G)).
Theorem 1.1. [9] Let G be a graph. Two distinct matchings M and N in G are adjacent
in the matching polytope M(G) if and only if M ∆N is a path or a cycle in G.
Note that the path (respectively, cycle) mentioned in Theorem 1.1 is an M -alternating
path (respectively, cycle).
Using the last result we get that the empty matching in a graph is adjacent to matchings
with a single edge. Moreover, if a matching has more than one edge, then it is not adjacent to
the empty matching. Therefore, the degree of the empty matching in a graph is the number
of edges of the graph. This result appears in [1] when the graph G is a tree and in [2] for
any graph G.
In the next example we see the skeleton of the matching polytope of a graph with a cycle.
23
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
v1 v2
u u
u u
v3 v4
Note that the matching M2 is not adjacent to the matching M5 because M2 ∆M5 =
{v1 v2 , v3 v4 } is not a path nor a cycle.
We denote by degG (M ) the degree of the matching M in the graph G(M(G)). The focus
of [1, 6] was the degree of a matching in the graph G(M(T )), where T was a tree. In [6], we
have an algorithm to compute this degree. In [2], the authors characterized the matchings
having minimum degree in G(M(G)), for any graph G. In this paper we obtain formulas to
compute the degree of some matching in graphs having cycles.
In Section 2 we present some results obtained previously about the degree of a matching.
In Section 3 we remove some vertices of the initial graph to divide the calculation of the
degree of a matching M in a sum of degree of submatchings of M . In this section we introduce
the operation of elimination on a graph with a matching. The Section 4 is dedicated to the
degree of a matching with a single edge and in Section 5 we continue this study but in a
matching with two edges. In Section 5 we describe another operation on the graph with a
matching, the withdraw/choose. A formula to compute the degree of a matching with more
than two edges and some constraints is the objective of Section 6. We conclude this paper
with some final remarks and open questions in Section 7.
2 Preliminaries
Let G be a graph and M be a matching in G. We say that an M -alternating path, P, is
an M -good path if each vertex of P of degree 1 in P is in V (G) \ S(M ) or the edge of P
incident to it belongs to M .
Remark 2.1. Let M and N be two distinct matchings in G such that N is adjacent to M
in G(M(G)). Then M ∆N is an M -good path or an M -alternating cycle. Consequently, all
vertices of M ∆N belong to NG (S(M )).
24
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
(3) P is an oc-M -path if one of its pendant edges belongs to M and one of its pendant
vertices is M -unsaturated.
In [1, 6, 2], the definition of M -good path and its subdivisions was important to prove
which matchings are adjacent to a given matching, see Theorem 1.1. However, when the
graph G has cycles, by Theorem 1.1, the symmetric difference of the two adjacent matchings
can be a cycle. In this case, we obtain an M -alternating cycle with all vertices M -saturated.
The next result shows us a way to obtain matchings not adjacent to a given matching.
Throughout this paper, if the matching is a matching in a tree, we use the algorithm
described in [6] to compute its degree.
3 Elimination
The first operation on G with respect to the matching M , called the elimination, consists
of the elimination of the vertices of V (G) \ NG (S(M )) from G. In some cases, with this
operation on G we obtain subgraphs of G where the matching restriction of M to each one
of these subgraphs has fewer edges than the matching M .
Proposition 3.1. Let G be a connected graph and M be a matching in G. Let G(1) , . . . , G(r)
be the connected components of the subgraph of G induced by the vertex set NG (S(M )) and
M (i) = M ∩ E(G(i) ), for 1 ≤ i ≤ r. Let H = (V (H), E(H)) be the subgraph of G induced
by the vertex set V (G) \ NG (S(M )). Then
r
X
degG (M ) = degG(i) (M (i) ) + |E(H)|.
i=1
M = N ∩ (E(G) \ E(H)).
25
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
G(1) G(2)
v1 v2 v3 v4 v6 v7 v8
u u u u u u u
@
@
@
@u
v11
So, by Proposition 3.1
degG (M ) = degG(1) (M (1) ) + degG(2) (M (2) ) + |E(H)|
= degG(1) (M (1) ) + degG(2) (M (2) ) + 1,
where M (1) = M ∩ E(G(1) ) = {v2 v3 } and M (2) = M ∩ E(G(2) ) = {v7 v8 }.
As G(1) is a tree, using the algorithm described in [6] we get
degG(1) (M (1) ) = 4.
So,
degG (M ) = 4 + degG(2) (M (2) ) + 1 = degG(2) (M (2) ) + 5.
Note that, in the last example, we started with a matching having two edges and with the
operation elimination on the graph, described in this section, we finished with a matching
having only one edge (see Remark 2.1).
26
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
unique edge of the matching belongs to one or more cycles, the duplication operation is not
easy because we need to duplicate vertices and edges that do not belong to the matching.
However, the next theorem shows the degree of this kind of matchings. This theorem is a
particular case of Theorem 2.6 in [2]. The proof of this is different from that given in [2].
Theorem 4.1. Let G be a connected graph and u and v be two vertices of G. Let M = {uv}
be a matching in G. Then
Proof. We can assume that V (G) \ NG (S(M )) = ∅. If not, first we use Proposition 3.1. Let
N be a matching in G adjacent to M , in the matching polytope M(G). By Theorem 1.1
we conclude that M ∆N is an M -good path or an M -alternating cycle in G. Since |M | = 1,
M ∆N is not a cycle. As V (G) \ NG (S(M )) = ∅, by Proposition 2.2, N is in one of the
following cases:
(i) N has two edges one of them incident to u and the other incident to v or one of them
is uv and the other is an edge not adjacent to uv.
(ii) N has only one edge which is adjacent to uv.
(iii) N is the empty matching.
So, there are (dG (u) − 1)(dG (v) − 1) − |NG (u) ∩ NG (v)| + s matchings in case (i) (note that
in N the edges do not have a common vertex), there are dG (u) − 1 + dG (v) − 1 matchings in
case (ii) and there are only one matching in case (iii). Consequently, the result follows.
Example 4.2. Consider the graph of Example 3.2. As G(2) is the cycle C4 we have
where M (2) has a unique edge of C4 . As all vertices of C4 have degree 2 and there is not
cycles of length 3 in C4 , by Theorem 4.1, we get degC4 (M (2) ) = 2 × 2 − 0 + 1 (note that there
is an edge in C4 not adjacent to the edge of M (2) ). Consequently,
The next result is a generalization of Theorem 4.2 in [6] when M is a matching in a tree
T having a single edge that is a pendant edge (see also Corollary 3.2 in [6]).
Corollary 4.3. Let G be a connected graph and u and v be two vertices of G such that v is
a pendant vertex. Let M = {uv} be a matching in G. Then
degG (M ) = dG (u) + s,
Proof. Since dG (v) = 1 and |NG (u) ∩ NG (v)| = 0, the result follows from Theorem 4.1.
27
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
1. If |N | = 1, then
(a) N = {v1 v2 } or
(b) N = {v3 v4 } or
(c) the unique edge of N is adjacent to v1 v2 and to v3 v4 .
2. If |N | = 2, then
28
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
(c) N has an edge e adjacent to v1 v2 and to v3 v4 and the other edge of N is not
adjacent to e but it is adjacent to one of the edges of M .
3. If |N | = 3, then
(a) v1 v2 ∈ N and the other two edges of N are not adjacent to each other nor v1 v2
but they are adjacent to v3 v4 or
(b) v3 v4 ∈ N and the other two edges of N are not adjacent to each other nor v3 v4
but they are adjacent to v1 v2 or
(c) {v1 v2 , v3 v4 } ⊂ N and the other edge of N is not adjacent to v1 v2 nor v3 v4 or
(d) N has an edge e adjacent to v1 v2 and to v3 v4 and the other two edges of N are
not adjacent to each other nor to e but they are adjacent to the edges of M .
So, there are
2 X
X 4
2+ aih
i=1 h=3
matchings, in case 3.
Consequently,
2 X
X 4
degG (M ) = k + 2 + aih +
i=1 h=3
29
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
u v3 u u u
v9 @ v4 v10
@
@
@u
v11
30
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
degG (M ) =
We finish this section with the degree of a matching with two edges in C4 .
degC4 (M ) = 5.
Proof. Let v1 , v2 , v3 , v4 be the four vertices of C4 and M = {v1 v2 , v3 v4 }. Note that C4 has a
unique cycle, the connected component of the subgraph of C4 induced by the two vertices
incident in an edge of M is P2 and the restriction of M to this subgraph has only the edge
of P2 . Moreover, all vertices of P2 has degree 1 and there are not edges in C4 not adjacent
to the both edges of M . Consequently, using Theorem 5.1 we get
2 X
X 4
1 2
degC4 (M ) = degP2 (M ) + degP2 (M ) + 1 + aih = 1 + 1 + 1 + 2 = 5.
i=1 h=3
31
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
Theorem 6.1. Let G be a connected graph having at least one cycle. Let uv and zw be two
different edges of the matching M in G such that there is no path P in G contained uv and
zw with V (P ) ∩ S(M ) = V (P ). If V (G) \ NG (S(M )) = ∅, then
degG (M ) =
Proof. Let N be a matching in G adjacent to M in the matching polytope M(G). Then the
matching N verifies one of the following cases:
(i) the edge uv is in N
(ii) the edge zw is in N
(iii) neither the edge uv nor the edge zw are in N .
Then, we get
(1) N is a matching, in G, adjacent to M and verifies case (i) if and only if N \ {uv} is a
matching in G({u,v}) adjacent to M \ {uv} = M ({u,v}) ,
(2) N is a matching, in G, adjacent to M and verifies case (ii) if and only if N \ {zw} is
a matching in G({z,w}) adjacent to M \ {zw} = M ({z,w}) .
If the matching N have both edges, uv and zw, then N is a matching that verifies cases (i)
and (ii). So, if N contains both edges, uv and zw, and it is adjacent to M , then N \ {uv, zw}
is a matching in G({u,v,z,w}) adjacent to M \ {uv, zw} = M ({u,v,z,w}) . Moreover, the converse
is true.
By Theorem 1.1, M ∆N is an M -good path or an M -alternating cycle in G. If N is
a matching and verifies case (iii), then uv and zw are edges of M ∆N . This implies that
there is a path P in G contained uv and zw with V (P ) ∩ S(M ) = V (P ), contradicting the
hypothesis. Thus, there is no matching N in G adjacent to M and verifying the case (iii).
Therefore, the result follows.
Remark 6.2. The last result transforms the degree of a matching with some constraints in
a sum of degree of matchings having fewer edges than the initial one.
32
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
7 Conclusions
In this paper we consider graphs having cycles and we presented formulas to compute the
degree of a matching using some operations on the initial graph. More precisely, firstly we
focus on matchings with vertices that are not in the neighbor of the saturated vertices by the
matching. Then our goal was the matchings with one and two edges. And in Section 6 we
show a formula to obtain the degree of a matching with some constraints. We also defined
two operations on the graph with a matching, the elimination and the withdraw/choose.
An open question is how to compute the degree of a matching without the constraints
present in Theorem 6.1.
Acknowledgments
This work is funded by national funds through the FCT – Fundação para a Ciência e a
Tecnologia, I.P., under the scope of the projects UIDB/00297/2020 and UIDP/00297/2020
(https://doi.org/10.54499/UIDB/00297/2020 and https://doi.org/10.54499/UIDP/00297/2020)
(Center for Mathematics and Applications).
The author would like to thank the referees for the valuable comments that helped
improving the first version of this paper.
References
[1] N. Abreu, L. Costa, G. Dahl, E.A. Martins, The skeleton of acyclic Birkhoff polytopes
Linear Algebra Appl. 457 (2014) 29–48.
[2] N. Abreu, L. Costa, C.H. do Nascimento, L. Patuzzi, On the vertex degrees of the
skeleton of the matching polytope of a graph. Arxiv (2017).
https://arxiv.org/abs/1701.06210
[4] L. Costa, C. M. da Fonseca, E. A. Martins, The diameter of the acyclic Birkhoff polytope,
Linear Algebra Appl. 428 (2008) 1524–1537.
[6] R. Fernandes, Computing the degree of a vertex in the skeleton of acyclic Birkhoff
polytopes, Linear Algebra Appl. 475 (2015) 119–133.
[8] L. Lovasz, M.D. Plumer, Matching theory, Ann. Discrete Math. 29, 121, North-Holland,
Amsterdam (1986).
33
Fernandes/ American Journal of Combinatorics 3 (2024) 22–34
Contact Information
Rosário Fernandes Center for Mathematics and Applications (NOVA Math)
[email protected] and Department of Mathematics, NOVA FCT
Faculdade de Ciências e Tecnologia
2829-516 Caparica, Portugal
https://orcid.org/0000-0003-2695-9079
34