1 Introduction

In a graph \(G=(V,E)\), a cut is a partition \(V=X\,\dot{\cup }\,Y\) of the vertex set into disjoint, non-empty sets X and Y, written (XY). The set of all edges in G having an endvertex in X and the other endvertex in Y, also written (XY), is called the edge cut of the cut (XY). A matching cut is an edge cut that is a (possibly empty) matching. Another way to define matching cuts is as follows [5, 9]. A partition \(V=X\,\dot{\cup }\,Y\) of the vertex set of the graph \(G=(V,E)\) into disjoint, non-empty sets X and Y, is a matching cut if and only if each vertex in X has at most one neighbor in Y and each vertex in Y has at most one neighbor in X.

Graham [9] studied matching cuts in graphs in connection to a number theory problem called cube-numbering. In [6], Farley and Proskurowski studied matching cuts in the context of network applications. Patrignani and Pizzonia [18] pointed out an application of matching cuts in graph drawing. Matching cuts have been used by Araújo et al. [1] in studying good edge-labellings in the context of WDM (Wavelength Division Multiplexing) networks.

Not every graph has a matching cut; the Matching Cut problem is the problem of deciding whether or not a given graph has a matching cut:

figure a

Observe that disconnected graphs and graphs having a bridge have a matching cut. In particular, Matching Cut is trivial for graphs with minimum degree at most one. It is known, however, that Matching Cut is \({\mathsf {NP}}\)-complete on (bipartite) graphs with minimum degree two and on (bipartite) graphs with minimum degree three (see [16]). This paper considers the computational complexity of, as well as algorithms for the Matching Cut problem in graphs of large minimum degree.

1.1 Previous Results

Graphs admitting a matching cut were first discussed by Graham in [9] under the name decomposable graphs. The first complexity and algorithmic results for Matching Cut have been obtained by Chvátal, who proved in [5] that Matching Cut is \({\mathsf {NP}}\)-complete, even when restricted to graphs of maximum degree four, and is solvable in polynomial time for graphs with maximum degree at most three. These results triggered a lot of research on the computational complexity of Matching Cut in graphs with additional structural assumptions; see [3, 4, 14, 16,17,18]. In particular, the \({\mathsf {NP}}\)-hardness of Matching Cut has been further strengthened for planar graphs of maximum degree four [3] and bipartite graphs of minimum degree three and maximum degree four [16]. Moreover, it follows from Bonsma’s result [3] and a simple reduction observed by Moshi [17] that Matching Cut remains \({\mathsf {NP}}\)-complete on bipartite planar graphs of minimum degree two and maximum degree eight. Recently, Le and Le [15] proved that Matching Cut is \({\mathsf {NP}}\)-complete on graphs of diameter d for any fixed integer \(d\ge 3\) and on bipartite graphs of diameter d for any fixed integer \(d\ge 4\).

On the positive side, some polynomially solvable cases have been identified: graphs of maximum degree 3 [5], graphs without chordless cycle of length at least five (including chordal and chordal bipartite graphs) [17], claw-free graphs (including line graphs) [3], graphs of diameter 2 [4, 15], bipartite graphs of diameter at most 3 [15]. In [14], the cases of graphs of maximum degree 3 and of claw-free graphs have been extended to a larger class in which Matching Cut is still solvable in polynomial time.

Parameterized and exact exponential-time algorithms for Matching Cut on graphs without any restriction have been considered in [2, 13, 14]. Kratsch and Le [14] provided the first exact branching algorithm for Matching Cut running in time \(O^*(1.4143^n)\)Footnote 1 and noted that Matching Cut cannot be solved in \(O^*(2^{o(n)})\) time for n-vertex graphs, assuming the Exponential Time Hypothesis (ETH) [11, 12] is true. Recently, the running time has been improved in [13] to \(O^*(1.3803^n)\). We note that the running time analysis of these branching algorithms highly depends on the minimum degree \(\ge 2\) of the input graphs. This fact was the main motivation of the present work.

Very recently, Gomes and Sau [8] considered a natural generalization of Matching Cut, the d-Cut problem: for an integer \(d\ge 1\), a d-cut is a bipartition of the vertex set of a graph into two non-empty sets A and B such that each vertex has at most d neighbors across the cut. (A d-cut is also called a symmetric \(K_{1,{d+1}}\)-free decomposition in [19].) Thus, Matching Cut and 1-Cut coincide. Among others, Gomes and Sau proved that d-Cut is \({\mathsf {NP}}\)-complete for any \(d\ge 1\), even in the class of \((2d+2)\)-regular graphs.

1.2 Our Contributions

We first prove the following hardness results:

  • For any constant \(c>1\), Matching Cut restricted on graphs with minimum degree c is \({\mathsf {NP}}\)-complete and, assuming the ETH, cannot be solved in \(O^*(2^{o(n)})\) time for n-vertex graphs.

  • For any fixed constant \(\epsilon >0\) and integer \(d\ge 1\), d-Cut remains \({\mathsf {NP}}\)-complete when restricted to n-vertex graphs of unbounded minimum degree at least \(n^{1-\epsilon }\). In case of Matching Cut, i.e., \(d=1\), the same result holds true even in the class of bipartite graphs. This hardness result is somehow surprising, as, intuitively, Matching Cut might be easy for very dense graphs, graphs with very large minimum degree.

We then show that the exact branching algorithms in [13, 14] solving Matching Cut can be simplified for graphs with large minimum degree \(\delta\), which results in a running time \(O^*(\lambda ^n)\), where \(\lambda\) is the positive root of the polynomial \(x^{\delta +1}-x^{\delta }-1\). For \(\delta \ge 4\), this running time is \(O^*(1.3248^n)\), improving upon the previous best known \(O^*(1.3803^n)\)-time algorithm.

It is quite interesting to note, as we will see, that \(\lambda \rightarrow 1\) as \(\delta \rightarrow \infty\). Thus, for any constant \(\epsilon >0\), a natural restriction of Matching Cut on graphs with (large) minimum degree \(\delta =\delta (\epsilon )\) can be solved in \(O^*((1+\epsilon )^n)\) time, although this restriction has no subexponential-time algorithm (assuming the ETH). For instance, for \(\delta \ge 469\), our exact algorithm solves Matching Cut on graphs with minimum degree \(\delta\) in time \(O^*(1.0099^n)\)! Despite the hardness results, this is a very fast exponential-time algorithm for an \({\mathsf {NP}}\)-hard problem and we are not aware of another natural \({\mathsf {NP}}\)-hard problem that has no subexponential-time algorithm (unless the ETH fails) but admits an exponential-time algorithm with running time near \(O^*(1.0099^n)\). We remark that the authors of [20] provided an \(O^*(1.02220^n)\)-time algorithm for an \({\mathsf {NP}}\)-hard problem (the Partition Into Triangles problem restricted on graphs of maximum degree 4) that cannot be solved in subexponential-time (assuming ETH), and ask for such rare \({\mathsf {NP}}\)-hard problems with very fast exponential-time algorithms. Our results add an infinite family of such natural problems into this list.

Finally, complementing our hardness results, we show that, for any two fixed constants \(1< c <4\) and \(c^{\prime }\ge 0\), Matching Cut is solvable in polynomial time for graphs with large minimum degree \(\delta \ge \frac{1}{c}n-c^{\prime }\).

1.3 Notation and Terminology

Let \(G=(V,E)\) be a graph with vertex set \(V(G)=V\) and edge set \(E(G)=E\). An independent set (a clique) in G is a set of pairwise non-adjacent (adjacent) vertices. The neighborhood of a vertex v in G, denoted \(N_G(v)\), is the set of all vertices in G adjacent to v; the closed neighborhood of v is \(N_G[v]=N_G(v)\cup \{v\}\). If the context is clear, we simply write N(v) and N[v]. Set \(\deg (v) = |N(v)|\), the degree of the vertex v, and \(\delta (G)=\min \{\deg (v)\mid v\in V(G)\}\), the minimum degree of G. For a subset \(W\subseteq V\), the W-neighbors of a vertex v are the vertices in \(N(v)\cap W\), G[W] is the subgraph of G induced by W, and \(G-W\) stands for \(G[V{\setminus } W]\). The complete graph and the path on n vertices are denoted by \(K_n\) and \(P_n\), respectively; \(K_3\) is also called a triangle. The complete bipartite graph with one color class of size p and the other of size q is denoted by \(K_{p,q}\).

Given a graph \(G=(V,E)\) and a partition \(V=X\,\dot{\cup }\, Y\), it can be decided in linear time if (XY) is a matching cut of G. This is because (XY) is a matching cut of G if and only if the bipartite subgraph \(B_G(X,Y)\) of G with the color classes X and Y and edge set (XY) is \(P_3\)-free. That is, (XY) is a matching cut of G if and only if the non-trivial connected components of the bipartite graph \(B_G(X,Y)\) are edges. We say that \(S\subset V\) is monochromatic if, for any matching cut (XY) of G (if any), \(S\subseteq X\) or else \(S\subseteq Y\). Observe that (the vertex set of) any \(K_n\) with \(n\ge 3\), and any \(K_{p,q}\) with \(p\ge 2, q\ge 3\), in G is monochromatic. A bridge in a graph is an edge whose deletion increases the number of the connected components. Since disconnected graphs and graphs having a bridge have a matching cut, we may assume that all graphs considered are connected and 2-edge connected.

When an algorithm branches on the current instance of size n into r subproblems of sizes at most \(n-t_1, n-t_2,\ldots , n-t_r\), then \((t_1,t_2,\ldots ,t_r)\) is called the branching vector of this branching, and the unique positive root of the characteristic polynomial \(x^n-x^{n-t_1} - x^{n-t_2} - \cdots - x^{n-t_r}\), denoted \(\tau (t_1,t_2,\ldots ,t_r)\), is called its branching number. The running time of a branching algorithm is \(O^*(\lambda ^n)\), where \(\lambda =\max _i \lambda _i\) and \(\lambda _i\) is the branching number of branching rule i, and the maximum is taken over all branching rules. We refer to [7] for more details on exact branching algorithms.

1.4 Structure of the Paper

The paper is organized as follows. In Sect. 2 we show that Matching Cut is \({\mathsf {NP}}\)-complete when restricted on graphs with minimum degree c, for any given constant \(c>1\), and that this restriction of Matching Cut has no subexponential-time algorithm unless the ETH fails. We then show that Matching Cut remains \({\mathsf {NP}}\)-complete when restricted to graphs with minimum degree \(\delta \ge n^{1-\epsilon }\), for any given constant \(\epsilon >0\). The same result holds also for bipartite graphs. In Sect. 3 we describe the fast exact branching algorithm solving Matching Cut for graphs with large minimum degree. In Sect. 4 we show that Matching Cut can be solved in polynomial time for graphs with very large minimum degree at least \(\frac{1}{c}n-c^{\prime }\) for any two fixed constants \(1<c<4, c^{\prime }\ge 0\). We conclude the paper with Sect. 5.

2 Hardness Results

Observe that if G has a vertex v with \(\deg (v)\le 1\), then \((\{v\}, V(G){\setminus }\{v\})\) is a matching cut of G. It is known that Matching Cut is \({\mathsf {NP}}\)-complete for graphs with minimum degree two, and that, assuming ETH, Matching Cut has no subexponential-time algorithm. We first strengthen these hardness results for graphs with given minimum degree \(c\ge 2\) in Theorem 1 below. As pointed out by a reviewer, Chvátal’s original hardness reduction [5] can be modified to show that Matching Cut is \({\mathsf {NP}}\)-complete for graphs with minimum degree c. However, to make the paper self-contained, we include our reduction here, which demands less technical details and is thus cleaner than discussing an adaptation of Chvátal’s proof.

Theorem 1

For any constant \(c\ge 2\), Matching Cut remains \({\mathsf {NP}}\)-complete when restricted on graphs with minimum degree c and still admits no subexponential-time algorithm in the number of vertices unless the ETH fails.

Proof

Given constant \(c>1\), we reduce Matching Cut to Matching Cut restricted on graphs with minimum degree c in polynomial time as follows. Given a graph \(G=(V,E)\) with n vertices and m edges, let \(G^{\prime }\) be obtained from G and n cliques \(Q_v\), \(v\in V\), each of size c by joining edges between v and all vertices in \(Q_v\). Then, \(G^{\prime }\) has \(n^{\prime }=(c+1)n\) vertices, \(m'=m+\frac{1}{2}c^2(c-1)n\) edges and minimum degree c. Moreover, G has a matching cut if and only if \(G^{\prime }\) has a matching cut (this is because the cliques \(Q_v\cup \{v\}\), \(v\in V\), are monochromatic). Thus, Matching Cut remains \({\mathsf {NP}}\)-complete when restricted on graphs with minimum degree c.

Now, suppose Matching Cut restricted on graphs with minimum degree c can be solved in subexponential time; that is, there is an algorithm with running time \(O^*(2^{\epsilon ^{\prime }\cdot n^{\prime }})\) on \(G^{\prime }\) for all constants \(\epsilon ^{\prime }>0\). Then such an algorithm with \(\epsilon ^{\prime }=\epsilon /(c+1)\) would imply, by the polynomial-time reduction above, an algorithm for Matching Cut on G with running time \(O^*(2^{\epsilon \cdot n})\) for all \(\epsilon >0\). However, assuming ETH, no such algorithm for Matching Cut exists.\(\square\)

The question arises what happens when considering Matching Cut restricted on graphs with unbounded minimum degree. In such a very dense graph G having a matching cut (XY), almost all edges are within X or else within Y. Thus, G consists of two disjoint very dense induced subgraphs, between which there are very few edges, namely a matching. Because of this highly restricted structure one might expect that it would be easy to check if a very dense graph has a matching cut. This is true for Dirac and Ore graphs, for example (cf. Corollary 1 and Theorem 6). But in general it is not the case as we will see below that Matching Cut remains \({\mathsf {NP}}\)-complete on graphs with unbounded minimum degree (Theorem 2 with \(d=1\)), even on such bipartite graphs (Theorem 3).

Theorem 2

Let \(\epsilon >0\). For every integer \(d\ge 1\), d-Cut remains \({\mathsf {NP}}\)-complete on n-vertex graphs with minimum degree at least \(n^{1-\epsilon }\).

Proof

Let \(\epsilon >0\) and integer \(d\ge 1\) be two constants. Let \(G=(E,V)\) be an instance for d-Cut with n vertices and \(\delta =\delta (G)\ge 2\). We are going to construct, in polynomial time, a graph \(G^{\prime }=(V^{\prime },E^{\prime })\) with \(n^{\prime }\) vertices and minimum degree \(\delta ^{\prime }\ge (n^{\prime })^{1-\epsilon }\) such that G has a d-cut if and only if \(G^{\prime }\) has a d-cut. Since d-Cut is \({\mathsf {NP}}\)-complete [8], we then obtain Theorem 2.

Let \(G^{\prime }\) be obtained from \(t=\lceil n^{\frac{1-\epsilon }{\epsilon }}\rceil\) copies of G by making all t copies of any vertex \(v\in V\) to a clique. More precisely, writing \(V=\{v_1,\ldots , v_n\}\) we have; see also Fig. 1.

  • \(V^{\prime }=V^1\cup \ldots \cup V^t\), where

    • \(V^s=\{v_1^s,\ldots ,v_n^s\}\) is the sth copy of the vertex set V, \(1\le s\le t\).

  • \(E^{\prime }=E^1\cup \ldots \cup E^t\cup F_1\cup \ldots \cup F_n\), where

    • \(E^s=\{v_i^sv_j^s\mid 1\le i,j\le n, v_iv_j\in E\}\) is the sth copy of the edge set E, \(1\le s\le t\), and

    • \(F_i=\{v_i^sv_i^{s^{\prime }}\mid 1\le s,s^{\prime }\le t, s\not =s^{\prime }\}\), \(1\le i\le n\).

Fig. 1
figure 1

The graphs G and \(G^{\prime }\)

Thus, \(G^{\prime }[V^s]=(V^s,E^s)\), \(1\le s\le t\), are the t copies of G and for each \(1\le i\le n\), the set \(Q_i=\{v_i^1,\ldots , v_i^t\}\) of the t copies of \(v_i\in V\) induces a clique in \(G^{\prime }\) (with the edge set \(F_i\)). Note that, given constants \(\epsilon\) and d, we may assume that G has \(n\ge (2d+1)^{\epsilon /(1-\epsilon )}\) vertices (otherwise, G has bounded size). Then the number t of G-copies is at least \(n^{(1-\epsilon )/\epsilon }\ge 2d+1\), ensuring that the cliques \(Q_i\) in \(G^{\prime }\) are monochromatic whenever \(G^{\prime }\) has a d-cut.

Clearly, given \(\epsilon >0\) and G, \(G^{\prime }\) can be constructed in polynomial time \(t\cdot O(nt^2)=O(n^{3\frac{1-\epsilon }{\epsilon }+1})\). Moreover, G has a d-cut if and only if \(G^{\prime }\) has a d-cut: first, if (XY) is a d-cut of G, then \((X^{\prime },Y^{\prime })\) with

$$\begin{aligned} X^{\prime }=\bigcup _{1\le i\le n\,:\, v_i\in X}\!\!\! Q_i \quad \text { and}\quad Y^{\prime } =\bigcup _{1\le i\le n\,:\, v_i\in Y}\!\!\! Q_i \end{aligned}$$

is, by definition of \(G^{\prime }\), a d-cut of \(G^{\prime }\). Second, if \((X^{\prime },Y^{\prime })\) is a d-cut of \(G^{\prime }\), then for each \(1\le i\le n\), the clique \(Q_i\) is contained in \(X^{\prime }\) or else in \(Y^{\prime }\) (as \(Q_i\) is monochromatic). Hence, (XY) with

$$\begin{aligned} X=\{v_i\mid 1\le i\le n, Q_i\subseteq X^{\prime }\} \text { and } Y=\{v_i\mid 1\le i\le n, Q_i\subseteq Y^{\prime }\} \end{aligned}$$

is a d-cut of G.

Now, \(G^{\prime }\) has \(n^{\prime }=tn\) vertices. Hence \(t\ge n^{\frac{1-\epsilon }{\epsilon }}=\left( n^{\prime }/t\right) ^{\frac{1-\epsilon }{\epsilon }}\), implying \(t\ge (n^{\prime })^{1-\epsilon }\). Therefore, \(G^{\prime }\) has minimum degree \(\delta ^{\prime }=\delta +t-1> t \ge (n^{\prime })^{1-\epsilon }\). \(\square\)

We remark that in the proof of Theorem 2 if G is \(\delta\)-regular, then \(G^{\prime }\) is \(\delta ^{\prime }\)-regular. Since d-Cut remains \({\mathsf {NP}}\)-complete in the class of \((2d+2)\)-regular graphs, we conclude that d-Cut remains \({\mathsf {NP}}\)-complete when restricted on regular graphs of unbounded degree.

We now modify the proof of Theorem 2 to show that Matching Cut remains \({\mathsf {NP}}\)-complete on bipartite graphs with unbounded minimum degree. Recall that Matching Cut is \({\mathsf {NP}}\)-complete in the class of bipartite graphs.

Theorem 3

Let \(\epsilon >0\). Matching Cut remains \({\mathsf {NP}}\)-complete on n-vertex bipartite graphs with minimum degree at least \(n^{1-\epsilon }\).

Proof

Let \(\epsilon >0\) and let \(G=(V,E)\) be a bipartite graph with bipartition \(V=U\cup W\) and minimum degree \(\delta =\delta (G)\ge 2\). The construction in the proof of Theorem 2 can be modified to obtain a desired bipartite graph \(G^{\prime }=(U^{\prime }\cup W^{\prime }, E^{\prime })\) consisting of 2t copies of G as follows; see also Fig. 2. Write \(U=\{u_1,\ldots , u_p\}, W=\{w_1,\ldots , w_q\}\). Thus, \(n=p+q\) is the vertex number of G.

  • Let \(t=\lceil (2n)^{\frac{1-\epsilon }{\epsilon }}\rceil\).

  • \(U^{\prime }=U^1\cup \ldots \cup U^t\cup W^{t+1}\cup \ldots \cup W^{2t}\), and

  • \(W^{\prime }=W^1\cup \ldots \cup W^{t}\cup U^{t+1}\cup \ldots \cup U^{2t}\), where

    • \(U^s=\{u_1^s,\ldots ,u_p^s\}\) is the sth copy of the color class U, \(1\le s\le 2t\),

    • \(W^s=\{w_1^s,\ldots ,w_q^s\}\) is the sth copy of the color class W, \(1\le s\le 2t\).

  • \(E^{\prime }=E^1\cup \ldots \cup E^{2t}\cup F_1^U\cup \ldots \cup F_p^U\cup F_1^W\cup \ldots \cup F_q^W\), where

    • \(E^s=\{u_i^sw_j^s\mid 1\le i\le p, 1\le j\le q, u_iw_j\in E\}\) is the sth copy of the edge set E, \(1\le s\le 2t\),

    • \(F_i^U=\{u_i^su_i^{s^{\prime }}\mid 1\le s\le t, t+1\le s^{\prime }\le 2t\}\), \(1\le i\le p\), and

    • \(F_j^W=\{w_j^sw_j^{s^{\prime }}\mid 1\le s\le t, t+1\le s^{\prime }\le 2t\}\), \(1\le j\le q\).

Fig. 2
figure 2

The bipartite graphs G and \(G^{\prime }\). The bicliques \(Q_i^U\) and \(Q_j^W\), \(1\le i\le p\), \(1\le j\le q\), are drawn in blue and red, respectively (Color figure online)

Thus, \(G^{\prime }[U^s\cup W^s]=(U^s\cup W^s, E^s)\), \(1\le s\le 2t\), are the 2t copies of G and for each \(1\le i\le p\), the set \(Q_i^U=\{u_i^1,\ldots , u_i^t\}\cup \{u_i^{t+1},\ldots , u_i^{2t}\}\) of the 2t copies of \(u_i\in U\) induces a complete bipartite subgraph, i.e., a biclique, in \(G^{\prime }\) (with the edge set \(F_i^U\)) and for each \(1\le j\le q\), the set \(Q_j^W=\{w_j^1,\ldots , w_j^t\}\cup \{w_j^{t+1},\ldots , w_j^{2t}\}\) of the 2t copies of \(w_j\in W\) induces a biclique in \(G^{\prime }\) (with the edge set \(F_j^W\)).

Similarly to the proof of Theorem 2, it can be seen that G has a matching cut if and only if \(G^{\prime }\) has a matching cut: first, if (XY) is a matching cut of G, then \((X^{\prime },Y^{\prime })\) with

$$\begin{aligned} X^{\prime }&=\bigcup _{1\le i\le p\,:\, u_i\in X}\!\!\! Q_i^U \quad \cup \bigcup _{1\le j\le q\,:\, w_j\in X}\!\!\! Q_j^W,\\ Y^{\prime }&=\bigcup _{1\le i\le p\,:\, u_i\in Y}\!\!\! Q_i^U \quad \cup \bigcup _{1\le j\le q\,:\, w_j\in Y}\!\!\! Q_j^W, \end{aligned}$$

is, by definition of \(G^{\prime }\), a matching cut of \(G^{\prime }\). Second, if \((X^{\prime },Y^{\prime })\) is a matching cut of \(G^{\prime }\), then for each \(1\le i\le p\) and \(1\le j\le q\), each of the bicliques \(Q_i^U\) and \(Q_j^W\) is contained in \(X^{\prime }\) or else in \(Y^{\prime }\) (as \(Q_i^U\) and \(Q_j^W\) are monochromatic.) Hence, (XY) with

$$\begin{aligned} X&=\{u_i\mid 1\le i\le p, Q_i^U\subseteq X^{\prime }\} \cup \{w_j\mid 1\le j\le q, Q_j^W\subseteq X^{\prime }\},\\ Y&=\{u_i\mid 1\le i\le p, Q_i^U\subseteq Y^{\prime }\} \cup \{w_j\mid 1\le j\le q, Q_j^W\subseteq Y^{\prime }\} \end{aligned}$$

is a matching cut of G.

The obtained bipartite graph \(G^{\prime }\) has \(n^{\prime }=2tn\) vertices and minimum degree \(\delta ^{\prime }=\delta +t > t\ge (2n)^{\frac{1-\epsilon }{\epsilon }} \ge (n^{\prime })^{1-\epsilon }\).\(\square\)

Observe that the construction in the proof of Theorem 3 can be slightly modified for d-Cut in the class of bipartite graphs. Hence, assuming d-Cut is \({\mathsf {NP}}\)-complete on bipartite graphs, Theorem 3 also holds true for d-Cut. However, to our knowledge, for \(d\ge 2\), the complexity of d-Cut restricted on bipartite graphs is unknown so far.

3 A Very Fast Exact Exponential-Time Algorithm for Graphs with Large Minimum Degree

In [14], the first exact algorithm solving Matching Cut for n-vertex graphs has the running time \(O^*(1.4143^n)\). This branching algorithm has been improved to \(O^*(1.3803^n)\) in [13]. We remark that the branching steps, hence the time complexity of the proposed algorithms, strongly depend on the minimum degree \(\delta \ge 2\) of the input graphs. In this section, we observe that the algorithms proposed in [13, 14] can be simplified for input graphs with minimum degree \(\delta \ge 3\) that results in an exact algorithm with running time \(O^*(\lambda ^n)\), where \(\lambda\) is the positive root of the polynomial \(x^{\delta +1}-x^{\delta }-1\). For graphs with minimum degree \(\delta \ge 4\), this running time is \(O^*(1.3248^n)\), improved upon the mentioned \(O^*(1.3803)\)-time algorithm. For graphs with large minimum degree \(\delta \ge 469\), the running time is \(O^*(1.0099^n)\); see also the Table 1. It is perhaps important to recall that, by Theorem 1, for arbitrary large constant c, Matching Cut restricted on graphs with minimum degree \(\delta \ge c\) has no subexponential-time algorithm (assuming the ETH).

Table 1 Roots \(\lambda\) (rounded up) of \(x^{\delta +1}-x^{\delta }-1=0\) for some concrete minimum degree \(\delta\)

Before describing the algorithm, we show in Fact 1 below that \(\lambda \rightarrow 1\) as \(\delta \rightarrow \infty\).

Fact 1

As \(\delta\) tends to infinity, root \(\lambda\) of \(x^{\delta +1}-x^{\delta }-1\) tends to one.

Proof

Let \(\lambda _{\delta }\) be the positive root of \(x^{\delta +1}-x^{\delta }-1\). That is, \(\lambda _{\delta }\) is the branching number \(\tau (\delta +1,1)\). It is well-known (see, e.g., [7, Lemma 2.2]) that, for any integer \(\delta \ge 1\),

$$\begin{aligned} 1<\lambda _{\delta +1} < \lambda _{\delta }. \end{aligned}$$
(1)

Thus, \(\lambda _{\delta }\) is (strictly) decreasing in \(\delta\) and is bounded from below. Hence, the limit \(\lambda ^*:=\lim _{\delta \rightarrow \infty } \lambda _{\delta }\) exists. We are going to show that \(\lambda ^*=1\).

Note first that, by (1), for any integer \(\delta \ge 1\),

$$\begin{aligned} 1\le \lambda ^* \le \lambda _{\delta }. \end{aligned}$$
(2)

Moreover, it follows from \((\lambda _{\delta })^{\delta +1}-(\lambda _{\delta })^{\delta }-1=0\) that \(\lambda _{\delta }-1=\left( \frac{1}{\lambda _{\delta }}\right) ^{\delta }\), and with (2),

$$\begin{aligned} 0\le \lambda ^*-1\le \lambda _{\delta }-1 = \left( \frac{1}{\lambda _{\delta }}\right) ^{\delta }\le \left( \frac{1}{\lambda ^*}\right) ^{\delta }. \end{aligned}$$
(3)

Now, if \(\lambda ^*>1\), then the right most term in (3) would tend to zero as \(\delta\) tends to infinity, and this would imply \(\lambda ^*-1=0\), a contradiction. Therefore \(\lambda ^*=1\), as claimed. \(\square\)

Thus, for arbitrary small \(\epsilon >0\), we can solve Matching Cut restricted on graphs with (large) minimum degree \(\delta =\delta (\epsilon )\) in \(O^*((1+\epsilon )^n)\) time, although it does not admit an \(O^*(2^{o(n)})\)-time algorithm.

The idea of our algorithm is as follows [14]. If the input graph \(G=(V,E)\) has a matching cut (XY), then some vertex a is contained in X and some vertex b is contained in Y. The algorithm is a branching algorithm and will be executed for all possible pairs \(a,b\in V\), hence \(O(n^2)\) times. To do this set \(A:=\{a\}\), \(B:=\{b\}\), and \(F:=V{\setminus } \{a,b\}\) and call the branching algorithm. At each stage of the algorithm, A and/or B will be extended or it will be determined that there is no matching cut separating A and B, that is a matching cut (XY) with \(A\subseteq X\) and \(B\subseteq Y\). We describe our algorithm by a list of reduction and branching rules given in preference order, i.e., in an execution of the algorithm on any instance of a subproblem one always applies the first rule applicable to the instance, which could be a reduction or a branching rule. A reduction rule produces one instance/subproblem while a branching rule results in at least two instances/subproblems, with different extensions of A and B. Note that G has a matching cut that separates A from B if and only if in at least one recursive branch, extensions \(A^{\prime }\) of A and \(B^{\prime }\) of B are obtained such that G has a matching cut that separates \(A^{\prime }\) from \(B^{\prime }\). Typically a rule assigns one or more free vertices, vertices of F, either to A or to B and removes them from F, that is, we always have \(F:= V{\setminus } (A\cup B)\).

The algorithm first applies Reduction Rules (R1) – (R4) given in [14].

(R1):

If a vertex in A has two B-neighbors, or a vertex in B has two A-neighbors then STOP: “G has no matching cut separating A, B”. If \(v\in F\), \(|N(v)\cap A|\ge 2\) and \(|N(v)\cap B|\ge 2\) then STOP: “G has no matching cut separating A, B”. If there is an edge xy in G such that \(x\in A\) and \(y\in B\) and \(N(x) \cap N(y) \cap F \ne \emptyset\) then STOP: “G has no matching cut separating A, B”.

(R2):

If \(v\in F\) and \(|N(v)\cap A|\ge 2\) then \(A:=A\cup \{v\}\). If \(v\in F\) and \(|N(v)\cap B|\ge 2\) then \(B:=B\cup \{v\}\).

(R3):

If \(v\in A\) has two adjacent F-neighbors \(w_1,w_2\) then \(A:=A\cup \{w_1,w_2\}\). If \(v\in B\) has two adjacent F-neighbors \(w_3,w_4\) then \(B:=B\cup \{w_3,w_4\}\).

(R4):

If there is an edge xy in G such that \(x\in A\) and \(y\in B\) then add \(N(x) \cap F\) to A (if \(N(x) \cap F\not =\emptyset\)), and add \(N(y)\cap F\) to B (if \(N(y) \cap F\not =\emptyset\)).

If none of these reduction rules can be applied then

  • the AB-edges of G form a matching cut in \(G[A\cup B]=G-F\) due to (R1),

  • every vertex in F is adjacent to at most one vertex in A and at most one vertex in B due to (R2),

  • the neighbors in F of any vertex in A and the neighbors in F of any vertex in B form an independent set due to (R3), and

  • every vertex in A adjacent to a vertex in B has no neighbor in F and every vertex in B adjacent to a vertex in A has no neighbor in F.

In contrast to the previous two algorithms in [13, 14], our algorithm consists of only two branching rules, which are based on the following fact. See also Fig. 3.

Fig. 3
figure 3

When the branching rules (B1) and (B2) are applicable

Lemma 1

Let \(a\in A\) be a vertex with two (non-adjacent) neighbors u and v in F. Then

(B1):

G has a matching cut separating A and B if and only if G has a matching cut separating \(A\cup \{u\}\) and \(B\cup (N[v]\cap F)\) or a matching cut separating \(A\cup \{v\}\) and B.

(B2):

If \(N(v)\cap B\not =\emptyset\), then G has a matching cut separating A and B if and only if G has a matching cut separating \(A\cup \{u\}\) and \(B\cup (N[v]\cap F)\) or a matching cut separating \(A\cup (N[v]\cap F)\) and B.

Proof

(B1): Let (XY) be a matching cut of G such that \(A\subseteq X\) and \(B\subseteq Y\). If \(v\in X\), then (XY) separates \(A\cup \{v\}\) and B. If \(v\in Y\), then, as v is adjacent to \(a\in A\subseteq X\), u must belong to X and \(N[v]\cap F\) must belong to Y. Thus, (XY) is a matching cut separating \(A\cup \{u\}\) and \(B\cup (N[v]\cap F)\). Conversely, it is clear that any matching cut separating \(A\cup \{u\}\) and \(B\cup (N[v]\cap F)\), or \(A\cup \{v\}\) and B is particularly a matching cut separating A and B.

(B2): Assume \(N(v)\cap B\not =\emptyset\), and let (XY) be a matching cut of G such that \(A\subseteq X\) and \(B\subseteq Y\). By (B1), it remains to consider the case where \(v\in X\). In this case, as v has a neighbor in \(B\subseteq Y\), \(N[v]\cap F\) must belong to X. Thus, (XY) is a matching cut separating \(A\cup \{u\}\) and \(B\cup (N[v]\cap F)\) or separating \(A\cup (N[v]\cap F)\) and B.\(\square\)

To determine the branching vectors which correspond to our branching rules, we set the size of an instance (GAB) as its number of free vertices, i.e., \(|V(G)|-|A|-|B|\).

Let \(a\in A\) with \(|N(a)\cap F|\ge 2\), and choose two neighbors \(u\not =v\) in F of a. Due to Reduction Rule (R3), u and v are non-adjacent. Due to Reduction Rule (R2), \(N(v)\cap A=\{a\}\).

  • If \(N(v)\cap B=\emptyset\), we branch into two subproblems according to (B1): First, add u to A and add \(N[v]\cap F=N[v]{\setminus }\{a\}\) to B. Second, add v to A. Hence the branching vector is \((\delta +1, 1)\).

  • If \(N(v)\cap B\not =\emptyset\), we branch into two subproblems according to (B2): First, add u to A and add \(N[v]\cap F\) to B. Second, add \(N[v]\cap F\) to A. Due to Reduction Rule (R2), we have \(|N(v)\cap B|=1\), hence the branching vector is \((\delta , \delta -1)\).

Note that, for \(\delta \ge 3\), the branching number of the branching vector \((\delta , \delta -1)\) is smaller than the branching number of the branching vector \((\delta +1,1)\); see also Table 2 and Claim 1 below.

Table 2 Branching numbers (rounded up) due to branching rule (B1) and (B2) for some concrete minimum degree \(\delta\)

Claim 1

For \(\delta \ge 3\), the branching number of the branching vector \((\delta , \delta -1)\) is smaller than the branching number of the branching vector \((\delta +1,1)\).

Proof

The branching number of the branching vector \((\delta , \delta -1)\) is the positive root of the polynomial \(x^{\delta }-x-1\). The branching number of the branching vector \((\delta +1, 1)\) is the positive root of the polynomial \(x^{\delta +1}-x^{\delta }-1\). Let \(f_{\delta }(x) = x^{\delta +1}-x^{\delta }-1\) and \(\lambda _{f, \delta }^*\) be the positive root of \(f_{\delta }(x)\). Let \(g_{\delta }(x) = x^{\delta }-x-1\) and \(\lambda _{g, \delta }^*\) be the positive root of \(g_{\delta }(x)\). Both functions \(f_{\delta }(x)\) and \(g_{\delta }(x)\) are increasing in \(x>1\) for \(\delta >1\). We show that \(g_{\delta }(\lambda _{f, \delta }^*)\ge 0\). Since \(f_{\delta }(\lambda _{f, \delta }^*)=0\), we have \(g_{\delta }(\lambda _{f, \delta }^*)=(\lambda _{f, \delta }^*)^{\delta }-1/(\lambda _{f, \delta }^*)^{\delta }-2\). Solving \(x-1/x-2=0\), the roots are \(-0.4142\) and 2.4142. We have \(x-1/x-2\ge 0\) for \(x \ge 2.4142\). Let

$$\begin{aligned} \lambda _\delta = \left\{ \begin{array}{ll} \root \delta \of {\lambda _{1}}, &{} \delta > 1; \\ 2.4142, &{} \delta = 1. \end{array} \right. \end{aligned}$$

Since \(f_{\delta }(\lambda _\delta )=\lambda _\delta ^{\delta +1}-\lambda _\delta ^{\delta }-1\) is decreasing in \(\delta >1\) and \(f_{3}(\lambda _3)\le 0\), we have \(\lambda _{f, \delta }^*\ge \lambda _\delta\) for \(\delta \ge 3\). Since \(x-1/x-2\ge 0\) for \(x \ge 2.4142\) and \((\lambda _{f, \delta }^*)^{\delta }\ge \lambda _\delta ^{\delta }=2.4142\) for \(\delta \ge 3\), we have \(g_{\delta }(\lambda _{f, \delta }^*)\ge 0\) for \(\delta \ge 3\) which implies \(\lambda _{f, \delta }^*\ge \lambda _{g, \delta }^*\) for \(\delta \ge 3\).\(\square\)

Consequently, the running time of our algorithm for n-vertex graphs with minimum degree \(\delta \ge 3\) is \(O^*(\lambda ^{n})\), where \(\lambda\) is the branching number of the branching vector \((\delta +1,1)\), that is, \(\lambda\) is the positive root of \(x^{\delta +1}-x^{\delta }-1=0\).

It remains to show that if none of the reduction rules and none of the branching rules is applicable to an instance (GAB) then the graph G has a matching cut (XY) such that \(A\subseteq X\) and \(B\subseteq Y\).

In fact, in this case, \((A,V(G){\setminus } A)\) is a matching cut of G: First, every vertex in \(V(G){\setminus } A\) has at most one neighbor in A; this is clear because none of Reduction Rules (R1) – (R4) is applicable. Second, if some vertex \(a\in A\) has at least two neighbors outside A, then no such neighbor is in B (as Reduction Rule (R4) is not applicable). So, a has two non-adjacent neighbors in \(F=V(G){\setminus } (A\cup B)\), and Branching Rule (B1) or (B2) is applicable, a contradiction. Thus, every vertex in A has at most one neighbor outside A. Therefore, \((A,V(G){\setminus } A)\) is a matching cut of G as claimed.

To conclude, we obtain the following result:

Theorem 4

Matching Cut can be solved in time \(O^*(\lambda ^n)\) for n-vertex graphs with minimum degree \(\delta \ge 3\), where \(\lambda\) is the positive root of the polynomial \(x^{\delta +1}-x^{\delta }-1\).

Perhaps, it is important to note that our algorithm labels the vertices of the input graph G by either A or B but never changes the graph G. Hence, the minimum degree \(\delta\) of G remains unchanged in all subproblems. This is not the case by other minimum degree-based branching algorithms, like those computing a minimum independent set; cf. [7].

4 Polynomial-Time Solvable Cases: Graphs with Very Large Minimum Degree

In this section, we show that Matching Cut can be solved in polynomial time on graphs with large enough minimum degree. By Theorem 2, one can hope for polynomial-time results in terms of minimum degree \(\delta\) only for graphs with \(\delta \ge \frac{1}{c}n\) for some fixed constant \(c>1\). Examples of such dense graphs include Dirac graphs and Ore graphs. Graphs G with n vertices and \(\delta (G)\ge \frac{1}{2}n\) are called Dirac graphs. Ore graphs are those graphs such that, for any two non-adjacent vertices x and y, \(\deg (x)+\deg (y)\ge n\). In particular, Dirac graphs are a proper subclass of Ore graphs. Dirac and Ore graphs are well-studied classical graph classes, especially in the longest path and cycle community.

Our polynomial-time result is the following theorem.

Theorem 5

Let \(0< c_1<2\) and \(c_2\ge 0\) be two arbitrary fixed constants. Matching Cut is solvable in polynomial time for n-vertex graphs, in which any two non-adjacent vertices x and y satisfy \(\deg (x)+\deg (y)\ge \frac{1}{c_1}n-c_2\).

Proof

Our strategy is to decide in polynomial time, given two disjoint vertex subsets A and B of the input graph G, if G admits a matching cut separating A and B, i.e., A is in one part and B is in the other part of the matching cut.

First our algorithm applies Reduction Rules (R1) – (R4) mentioned in Sect. 3 to the current instance (in the order of the rules). In addition, we need one new reduction rule; recall from Sect. 3 that \(F=V(G){\setminus }(A\cup B)\).

(R5):

If there are vertices \(u,v\in F\) with a common neighbor in A and \(|N(u)\cap N(v)\cap F|\ge 2\), then \(A:=A\cup \{u, v\}\cup (N(u)\cap N(v)\cap F)\).

Reduction Rule (R5) is safe: Assume that (XY) is a matching cut of G with \(A\subseteq X\) and \(B\subseteq Y\). Since \(|N(u)\cap N(v)\cap F|\ge 2\), \(u, v, N(u)\cap N(v)\cap F\) and the common neighbor \(a\in A\) of u and v are contained in a monochromatic \(K_{2,q}\) for some \(q\ge 3\). Hence \(u, v, N(u)\cap N(v)\cap F\) all must belong to X as \(a\in A\subseteq X\). Thus, (XY) is a matching cut separating \(A\cup \{u, v\}\cup (N(u)\cap N(v)\cap F)\) and B. The other direction is obvious: any matching cut of G separating \(A\cup \{u, v\}\cup (N(u)\cap N(v)\cap F)\) and B separates A and B, too. We have seen that Reduction Rule (R5) is correct.

Now, let \(G=(V,E)\) be an n-vertex graph satisfying the condition in the theorem, and recall that we may assume that G is 2-edge connected. Hence every matching cut (XY) of G, if any, must contain at least two edges. Our algorithm will check, for each choice of two edges \(a_1b_1, a_2b_2\in E\), if G has a matching cut containing \(a_1b_1\) and \(a_2b_2\). To do this we start with \(A:=\{a_1,a_2\}\), \(B:=\{b_1,b_2\}\) and apply rules (R1) – (R5) exhaustively. If (R1) is applicable, then G has no matching cut containing \(a_1b_1\) and \(a_2b_2\). So let us assume that (R1) was never applied and none of (R2), (R3), (R4) and (R5) is applicable.

Then, as (R1) was never applied, \(b_1\) is the only neighbor in B of \(a_1\) and \(a_2\) is the only neighbor in A of \(b_2\). As (R4) is not applicable, \(|A|\ge |N[a_1]{\setminus }\{b_1\}|=\deg (a_1)\) and \(|B|\ge |N[b_2]{\setminus }\{a_2\}|=\deg (b_2)\). Since \(a_1\) and \(b_2\) are non-adjacent, we therefore have

$$\begin{aligned} |A|+|B|\ge \frac{1}{c_1}n-c_2. \end{aligned}$$
(4)

It follows from \(|F|=n-|A|-|B|\) and (4) that

$$\begin{aligned} |F|\le \left( 1-\frac{1}{c_1}\right) n+c_2. \end{aligned}$$
(5)

Now, as (R2) is not applicable, every vertex in F has at most one neighbor in A (and at most one neighbor in B). So, if every vertex in A has at most one neighbor in F, then \((A,B\cup F)\) is a matching cut of G separating A and B.

Thus, it remains the case that some vertex \(v\in A\) has two neighbors xy in F. Then x and y are non-adjacent as (R3) is not applicable. Recall that v is the only neighbor in A of x and of y, and each of x and y has at most one neighbor in B. Now, as (R5) is not applicable, \(|N(x)\cap N(y)\cap F|\le 1\), and so we have \(|F|\ge |N[x]|+|N[y]|-4=\deg (x)+\deg (y)-2\). Hence

$$\begin{aligned} |F|\ge \frac{1}{c_1}n+c_2-2. \end{aligned}$$
(6)

By (5) and (6), \(\frac{1}{c_1}n+c_2-2\le \left( 1-\frac{1}{c_1}\right) n+c_2\). Since \(0< c_1<2\), we therefore have \(n\le \frac{2c_1}{2-c_1}\). Thus, G has bounded size. Hence, we can determine if G has a matching cut or not in constant time.

Observe that rule (R1) can be applied in constant time and applies at most once. Each of the other rules applies at most n times because it removes at least one vertex from F. Thus, the running time for the application of the rules is roughly \(n\cdot O(m)=O(nm)\). Since we have at most \(O(m^2)\) many choices for the edges \(a_1b_1, a_2b_2\), we conclude that it can be decided in time \(O(n\!\cdot \!m^3)\) if G has a matching cut.\(\square\)

Consider a graph G with minimum degree \(\delta \ge \frac{1}{c}n-c^{\prime }\), where \(1< c<4\) and \(c^{\prime }\ge 0\) are given constants. Then, for every two vertices x and y in G, \(\deg (x)+\deg (y)\ge 2\delta \ge \frac{1}{c_1}n-c_2\) with \(c_1=c/2<2\) and \(c_2=2c^{\prime }\ge 0\). Hence Theorem 5 leads to the following result.

Corollary 1

Let \(1< c<4\) and \(c^{\prime }\ge 0\) be two fixed constants. Matching Cut is solvable in polynomial time for n-vertex graphs with minimum degree at least \(\frac{1}{c}n-c^{\prime }\).

4.1 Dirac and Ore Graphs

In this subsection, we show that there is a good characterization for Dirac graphs and Ore graphs having a matching cut. It turns out that Ore graphs having a matching cut are particularly \(\frac{1}{2}n\)-regular Dirac graphs. Ore graphs having a matching cut can be characterized as follows.

Theorem 6

An Ore graph G has a matching cut if and only if G is a co-bipartite graph with a bipartition into cliques A and B such that every vertex in A is adjacent to exactly one vertex in B and vice versa.

Proof

For the non-trivial direction, let (AB) be a matching cut of G. Observe first that, for each vertex \(a\in A\),

$$\begin{aligned} |A|\ge \deg (a), \text { with equality if and only if }\,|N(a)\cap B|=1. \end{aligned}$$

This is because \(|A|\ge |N[a]|-1\), as any vertex \(a\in A\) has at most one neighbor in B. Similarly, for each vertex \(b\in B\),

$$\begin{aligned} |B|\ge \deg (b), \text { with equality if and only if }\,|N(b)\cap A|=1. \end{aligned}$$

Thus, for every vertex \(a\in A\), \(|N(a)\cap B|=1\): if some \(a\in A\) has no neighbor in B, then, as G is an Ore graph, we would have the contradiction \(n=|A|+|B|>\deg (a)+\deg (b)\ge n\), where \(b\in B\) is an arbitrary vertex. Similarly, for every vertex \(b\in B\), \(|N(b)\cap A|=1\).

That is, as (AB) is a matching cut, and every vertex in A has exactly one neighbor in B, every vertex in B has exactly one neighbor in A. Therefore \(|A|=|B|\), and \(\deg (a)=|A|\) for any \(a\in A\) and \(\deg (b)=|B|\) for any \(b\in B\). In particular, A and B are cliques.\(\square\)

Since co-bipartite graphs can be recognized in quadratic time, Theorem 6 implies the following result.

Corollary 2

Matching Cut can be solved in quadratic time on Ore graphs.

5 Conclusion

We showed that, for any constant \(c>1\), Matching Cut restricted on graphs with minimum degree c is \({\mathsf {NP}}\)-complete and cannot be solved by a subexponential-time algorithm unless the Exponential-Time Hypothesis fails. We also showed that Matching Cut remains \({\mathsf {NP}}\)-complete for graphs with unbounded minimum degree, even for n-vertex bipartite graphs with minimum degree at least \(n^{1-\epsilon }\), where \(\epsilon >0\) is any given constant. It would be interesting to clear the complexity of Matching Cut for other special classes of graphs with minimum degree at least \(n^{1-\epsilon }\) such as graphs with bounded diameter or graphs with large girth.

For n-vertex graphs with minimum degree \(\delta \ge 3\), however, we provided an exact branching algorithm to solve Matching Cut in \(O^*(\lambda ^n)\) time, where \(\lambda\) is the positive root of the polynomial \(x^{\delta +1}-x^{\delta }-1\). For large minimum degree \(\delta \ge 469\), the running time is \(O^*(1.0099^n)\), and for \(\delta \ge 7747\), the running time is \(O^*(1.0009^n)\). In fact, as \(\lambda \rightarrow 1\) when \(\delta \rightarrow \infty\), we have that Matching Cut is solvable in \(O^*((1+\epsilon )^n)\) time for graphs with large minimum degree \(\delta =\delta (\epsilon )\) for arbitrary small constant \(\epsilon >0\). This is a very fast exponential-time algorithm for a natural \({\mathsf {NP}}\)-hard problem that cannot be solved in subexponential time (assuming the ETH). So, an interesting question arises whether or not Matching Cut restricted on graphs with unbounded minimum degree \(\delta\), say \(\delta =O(\log n)\), can be solved in subexponential time.

For graphs with very large minimum degree, Matching Cut becomes easier. We showed that, for any fixed constants \(1<c<4\) and \(c^{\prime }\ge 0\), Matching Cut is solvable in polynomial time for graphs with minimum degree at least \(\frac{1}{c}n-c^{\prime }\). We leave the question open if Matching Cut can be solved in polynomial time for graphs with minimum degree at least \(\frac{1}{c}n-c^{\prime }\), where \(c\ge 4\) and \(c^{\prime }\ge 0\) are given constants.

Finally, another interesting open question is whether there is any analogous result of Theorem 5 or Corollary 1 for d-Cut.