Contents lists available atScienceDirect
Discrete Applied Mathematics
journal homepage:www.elsevier.com/locate/dam
On algorithmic complexity of double Roman domination
Abolfazl Poureidi
a,∗, Nader Jafari Rad
baFaculty of Mathematical Sciences, Shahrood University of Technology, Shahrood, Iran
bDepartment of Mathematics, Shahed University, Tehran, Iran
a r t i c l e i n f o
Article history:
Received 16 March 2019
Received in revised form 20 June 2020 Accepted 28 June 2020
Available online xxxx Keywords:
Dominating set
Double Roman dominating function Algorithm
3-SAT
Combinatorial problems
a b s t r a c t
A double Roman dominating function (DRDF) on a graphG = (V,E) is a function f : V −→ {0,1,2,3}such that every vertexv ∈V withf(v) =0 is either adjacent to a vertexuwithf(u)=3 or two distinct verticesxandywithf(x)=f(y)=2, and every vertexv∈V withf(v)=1 is adjacent to a vertexuwithf(u)≥2. The weight off is the sumf(V)=∑
v∈Vf(v). The minimum weight of a DRDF onGis the double Roman domination number ofG, denoted byγdR(G). A graphGis a double Roman Graph ifγdR(G)=3γ(G), whereγ(G) is the domination number ofG.
In this paper, we first show that the decision problem associated to double Roman domination is NP-complete even when restricted to planar graphs. Then, we study the complexity issue of a problem posed in [R.A. Beeler, T.W. Haynesa and S.T. Hedetniemi, Double Roman domination, Discrete Appl. Math. 211 (2016), 23–29], and show that the problem of deciding whether a given graph is double Roman is NP-hard even when restricted to bipartite or chordal graphs. Then, we give linear algorithms that compute the domination number and the double Roman domination number of a given unicyclic graph. Finally, we give a linear algorithm that decides whether a given unicyclic graph is double Roman.
©2020 Elsevier B.V. All rights reserved.
1. Introduction
For notation and terminology not given here we refer to [10]. LetG
=
(V,
E) be a graph with vertex setVof ordern and edge setE. Theopen neighborhoodof a vertexv ∈
V isN(v
)= {
u∈
V:
uv ∈
E}
and theclosed neighborhoodofv
is N[ v ] =
N(v
)∪ { v }
. Thedegreeofv
is deg(v
)= |
N(v
)|
. A vertex of degree one is referred as aleaf and its unique neighbor is called asupport vertex. A treeT of ordern≥
2 is called astarifn=
2 orn≥
3 andT contains exactly one vertex that is not leaf. Adouble staris a tree with precisely two vertices (as central vertices) that are not leaves. A path (respectively, cycle) of ordernis denoted byPn(respectively,Cn). Aunicyclicgraph is a graph obtained from a treeT of order at least three by joining precisely two non-adjacent vertices ofT. Aplanar graph is a graph that can be drawn on the plane in such a way that its edges intersect only at their endpoints.For a graph G
=
(V,
E), a setS⊆
V is called adominating set(DS) ofGif everyv ∈
V−
S is adjacent to at least one vertexu∈
S. Furthermore, ifS induces a connected subgraph ofG, thenS is aconnected dominating set (CDS) of G. Thedomination number(respectively,connected domination number) ofG, denoted byγ
(G) (respectively,γ
c(G)), is the minimum cardinality of a dominating set (respectively, connected dominating set) ofG. A DS ofGof minimum cardinality is referred as aγ
(G)-set. A connected DS ofGof minimum cardinality is referred as aγ
c(G)-set.∗ Corresponding author.
E-mail addresses: [email protected](A. Poureidi),[email protected](N. Jafari Rad).
https://doi.org/10.1016/j.dam.2020.06.023 0166-218X/©2020 Elsevier B.V. All rights reserved.
A functionf
:
V−→ {
0,
1,
2}
is aRoman dominating function(RDF) ofGif every vertexuwithf(u)=
0 is adjacent to at least one vertexv
withf(v
)=
2. Theweightof an RDFf, denoted byw
(f), is the sumf(V)=
∑v∈Vf(
v
). The mathematical concept of Roman domination, defined and discussed by Stewart [16], and ReVelle and Rosing [15], and subsequently developed by Cockayne et al. [8]. The results on Roman domination and its variations up to now, have recently been collected in two book chapters and three surveys, (See [3–7]). One of the new variants of Roman domination is introduced by Beeler et al. [2]. Adouble Roman dominating function(DRDF)f:
V−→ {
0,
1,
2,
3}
ofGhas the property that for every vertexv ∈
V withf(v
)=
0 either there isu∈
N(v
) with f(u)=
3 or there arex,
y∈
N(v
) withf(x)=
f(y)=
2 and for every vertexv ∈
V withf(v
)=
1 there isu∈
N(v
) withf(u)≥
2. The weight of a DRDF f onG is the sum f(V)=
∑v∈Vf(
v
) and the minimum weight of a DRDFf is thedouble Roman domination numberofG, denoted byγ
dR(G).A
γ
dR(G)-function is a DRDFf onGwithw
(f)= γ
dR(G). A graphGis calleddouble Romanifγ
dR(G)=
3γ
(G). The concept of double Roman domination was further studied, see for example [1,12,14,18].Problem 1(Beeler et al. [2]).Characterize the double Roman graphs.
For a DRDFf onG, we denote byVi (orVif to refer tof) the set of all the vertices ofGwith labeliunderf. Thus a DRDFf can be represented by (V0
,
V1,
V2,
V3), and we can use the notationf=
(V0,
V1,
V2,
V3).Corollary 1(Beeler et al. [2]).For any graph G, there is a
γ
dR(G)-function f=
(V0,
V1,
V2,
V3)with V1= ∅
.Ahangar et al. [1] and Jafari Rad et al. [12] showed that the associated decision problem for double Roman domination is NP-complete, even for bipartite or chordal graphs. Zhang et al. [18] proposed a linear algorithm that computes the double Roman domination number of trees. Yue et al. [17] showed a linear algorithm that computes the double Roman domination number of cographs. Henning et al. [11] characterized the double Roman trees. In this paper we study the complexity issue of the double Roman domination and prove its NP-hardness in planar graphs. We also study the complexity issue ofProblem 1and study it in trees and unicyclic graphs.
The organization of the paper is as follows. We proceed as follows. In Section3we show that the associated decision problem for double Roman domination is NP-complete even when restricted to planar graphs. Then, we prove that the decision problem related toProblem 1is NP-hard even when restricted to bipartite and chordal graphs. In Section4, we give a linear algorithm that compute the double Roman domination number of a given unicyclic graph. In Section5, we give a linear algorithm that compute the domination number of a given unicyclic graph. Finally, we give a linear algorithm that decides whether a given unicyclic graph is double Roman.
2. Preliminary
Consider the following family of graphs related toProblem 1:
•
FamilyFdR3: the family of all graphsGwithγ
dR(G)=
3γ
(G).•
FamilyFdR33c: the family of all graphsGwithγ
dR(G)=
3γ
(G)=
3γ
c(G).Note thatFdR33cis an infinite family even when restricted to chordal and bipartite graphs, since for any positive integer n, ifTnis a tree obtained fromPnby adding five new leaves to any vertex ofPn, then it can be seen thatTn
∈
FdR33c. The following is obvious.Corollary 2. FdR33c
⊆
FdR3.Thus, to prove the NP-hardness of problem of whether a given graph belongs toFdR3 we only need to prove the NP-hardness of problem of whether a given graph belongs toFdR33c. To this end, we introduce a reduction from the 3-SAT problem. Recall that 3-SAT is the problem of deciding whether a given boolean formula in 3-conjunctive normal form is satisfiable. It is well-known that 3-SAT problem is NP-complete [9]. Let Φ
= {
C,
X}
be an instance in 3-SAT Problem, that is,Φis a boolean formula in 3-conjunctive normal form. LetC= {
c1,
c2, . . . ,
cl}
be a set ofl≥
1 clauses over a setX= {
x1, . . . ,
xk}
ofk≥
3 variables. For each 1≤
j≤
l, the clausecj(consisting of exactly three literals) is of the formcj= {
y1j,
y2j,
y3j}
, where each ofy1j,y2jandy3jis either a variable or the negative of a variable inX.3. NP-hardness results
Consider the following decision problems.
Double Roman Domination (DRD) Problem:
Instance:A graphGand a positive integerm.
Question:Does there exist a DRDFf onGwith
w
(f)≤
m?Double Roman Graph (DRG) Problem:
Instance:A graphG.
Fig. 1. Illustration of replacing clause-vertexcjbyzjfor eachj∈ {1,3,4}, variable-vertexxibyHi, clause-edgexic3by edgesu2iz3, clause-edgexic4
by edgeu5iz4and clause-edgexic1by edgesu7iz1for whichl=4,NH(xi)= {c3,c4,c1},xi∈c3,xi∈c4and¬xi∈c1.
Question:IsG
∈
FdR3?Double Roman 3Connected-Domination (DR3CD) Problem:
Instance:A graphG.
Question:IsG
∈
FdR33c?We first introduce a polynomial time reduction from PLANAR 3-SAT Problem to DRD Problem to show that DRD Problem is NP-complete even when restricted to planar graphs. A natural graph associated to 3-SAT Problem is the bipartite graphG{C,X}that hasC
∪
X as its vertex set and has an edge between the verticesxi andcjifcjcontains either xi or¬
xi, where¬
xi refers to thenegationofxi. PLANAR 3-SAT is 3-SAT restricted to those instances{
C,
X}
for which G{C,X}is planar. It is well-known that PLANAR 3-SAT Problem is NP-complete [9,13]. We introduce two polynomial time reductions from 3-SAT Problem to DR3CD Problem to show that the problem of deciding whether a given graph belongs to FdR33cis NP-hard even when restricted to bipartite and chordal graphs. We construct graphsHΦ,GΦandIΦcorresponding toΦas follows.3.1. The first reduction: HΦ
LetΦ
= {
C,
X}
be an instance of 3-SAT Problem such that the associated graphG{C,X}toΦis planar. Assume thatHis a planar embedding ofG{C,X}. We replace each variable-vertexxiofH, where 1≤
i≤
k, by a graphHi as variable gadget, whereHi is obtained from a cycle of order 3lwith verticesu1i, . . . ,
u3li such that each of verticesu3ji −2,
u3ji −1is adjacent to new verticesv
3j−2,i, v
3j′−2,i, v
3j′′−2,ifor each 1≤
j≤
l. We replace each clause-vertexcjofH, where 1≤
j≤
l, by a new vertexzj. In the rest we fix indicesiandj, where 1≤
i≤
kand 1≤
j≤
l. Assume thatci1,
ci2, . . . ,
cim, where 1≤
m≤
l, is the sequence of all clause-vertices adjacent toxi inHin clockwise direction starting from an arbitrary clause-vertex inNH(xi), that is,xicj′ is an edge ofHfor eachj′∈ {
i1,
i2, . . . ,
im}
. Ifxi∈
cir (respectively,¬
xi∈
cir), where 1≤
r≤
m, then we replacexicir by new edgeu3ri −1zir (respectively,u3ri −2zir). LetHΦ be the resulting graph. SeeFig. 1. It is easy to see thatHΦ is a planar graph.Lemma 1. The boolean formulaΦis satisfiable if and only if there is a DRDF f on HΦ with
w
(f)≤
3kl.Proof. Assume thatΦis satisfiable. Lett be an assignment of truth values for the variables ofX for whichΦevaluates totrue. We construct a setV3on the vertex set ofHΦ as follows. Ift assigns the valuetrue(respectively, the valuefalse) toxi, then we add all verticesu2i
,
u5i, . . . ,
u3li−1 (respectively, all vertices u1i,
u4i, . . . ,
u3li −2) toV3. It is easy to see that f=
(V(HΦ)−
V3, ∅ , ∅ ,
V3) is a DRDF onHΦ withw
(f)=
3kl.Assume that there is a DRDF f
=
(V0,
V1,
V2,
V3) on HΦ withw
(f)≤
3kl. Consider values f(v
3j−2,i),
f(v
′3j−2,i),
f(v
3j′′−2,i),
f(u3ji −2),
f(u3ji −1) for each 1≤
i≤
k and 1≤
j≤
l. Since all verticesv
3j−2,i, v
′3j−2,i, v
3j′′−2,i are only adjacent to verticesu3ji −2andu3ji −1, we find thatSij=
f(v
3j−2,i)+
f(v
3j′−2,i)+
f(v
3j′′−2,i)+
f(u3ji−2)+
f(u3ji −1)≥
3 for each 1≤
i≤
k and 1≤
j≤
l. So,w
(f)≥
∑i∈{1,...,k},j∈{1,...,l}Sij
≥
3kl. Sincew
(f)≤
3kl, we haveSij=
3 andf(zj)=
f(u3ji )=
0 for each 1≤
i≤
kand 1≤
j≤
l. Sincef(zj)=
0 for each 1≤
j≤
l, iff(v
3j−2,i)+
f(v
′3j−2,i)+
f(v
3j′′−2,i)̸=
0 for some 1≤
i≤
kand 1≤
j≤
l, thenSij>
3, a contradiction. So,f(v
3j−2,i)+
f(v
3j′−2,i)+
f(v
′′3j−2,i)=
0 for each 1≤
i≤
kand 1≤
j≤
l. Thus, either bothf(u3ji −2)=
0 andf(u3ji −1)=
3 or bothf(u3ji −2)=
3 andf(u3ji −1)=
0 for each 1≤
i≤
kand 1≤
j≤
l.Claim 1.
|
V3∪ {
u3ji −2,
u3ji +2}| ≤
1, for each1≤
i≤
k and1≤
j≤
l, where the addition is in modulo3l.Fig. 2. IllustratingGΦcorresponding toΦ= {{c1,c2},{x1,x2,x3}}, wherec1= {¬x1,¬x2,x3}andc2= {x1,¬x2,x3}.
Proof. Suppose for a contradiction that
|
V3∪ {
u3ji −2,
u3ji+2}| =
2. So, both u3ji−1,
u3ji +1∈
V0 and so f(u3ji )̸=
0, a contradiction. □Claim 2.
|
V3∪ {
u3ji −1,
u3ji+1}| ≤
1, for each1≤
i≤
k and1≤
j≤
l, where the addition is in modulo3l.Proof. Suppose for a contradiction that
|
V3∪ {
u3ji −1,
u3ji +1}| =
2. Sincef(u3ji +1)=
3, byClaim 1we havef(u3ji+5)=
0 and sof(u3ji +4)=
3. Similarly, we find thatu3ji+7,
u3ji+10, . . . ,
u3ji+3l−2(=
u3ji −2)∈
V3, that is, bothu3ji−1,
u3ji−2∈
V3, a contradiction. □ByClaims 1and2eitheru1i
,
u4i, . . . ,
u3li−2∈
V0andu2i,
u5i, . . . ,
u3li−1∈
V3oru1i,
u4i, . . . ,
u3li −2∈
V3andu2i,
u5i, . . . ,
u3li −1∈
V0 for each 1≤
i≤
k. We fix indicesiand j, where 1≤
i≤
k and 1≤
j≤
l. Ifu1i,
u4i, . . . ,
u3li −2∈
V0 and u2i,
u5i, . . . ,
u3li −1∈
V3 (respectively, u1i,
u4i, . . . ,
u3li −2∈
V3 and u2i,
u5i, . . . ,
u3li−1∈
V0), then we assign the value true (respectively, the valuefalse) to the variablexi. We claim thatΦis satisfiable for this assignment.Assume without loss of generality thatcj
= {
x1, ¬
x2,
x6}
. Since f(zj)=
0, we havef(u3j′−1
1 )
=
3, f(u3j′′−2
2 )
=
3 or f(u4j′′′−1
6 )
=
1 for somej′,
j′′,
j′′′∈ {
1,
2, . . . ,
l}
. Assume without loss of generality thatf(u3j′−1
1 )
=
3. So,x1has the value true. It causes to satisfy the clausecj, that is, the boolean formulaΦis satisfiable. This completes the proof. □Clearly, we can compute HΦ in polynomial time and the DRD Problem belongs to NP. By Lemma 1 we have the following.
Theorem 1. The DRD Problem is NP-complete even when restricted to planar graphs.
3.2. The second reduction: GΦ
LetΦ
= {
C,
X}
be an instance of 3-SAT Problem. For each variablexi, where 1≤
i≤
k, we construct a graphGi as variable gadget, whereGiis obtained from a path graph of order 2 with verticesu1i,
u2i such that each of verticesu1i,
u2i is adjacent to new vertexv
isfor eachs∈ {
1,
2,
3}
. For each clausecj= {
y1j,
y2j,
y3j}
, where 1≤
j≤
l, we add a new vertex zjsuch thatzjis adjacent to five new leaves. Fors=
1,
2,
3, ifysj=
xi, for some 1≤
i≤
k, then we add edgeu2izjand if ysj= ¬
xi, for some 1≤
i≤
k, then we add edgesu1izj. We add a new vertexosuch that is adjacent to five new leaves and add edgesou1i andou2i for each 1≤
i≤
k. Finally add all edgesabfor eacha∈ {
u1i,
u2i}
andb∈ {
u1j,
u2j}
and for all 1≤
i<
j≤
k. LetGΦ be the resulting graph. SeeFig. 2. It is easy to see thatGΦ is a chordal graph.Lemma 2.
γ
(GΦ)=
k+
l+
1.Proof. LetSbe a
γ
(GΦ)-set. Since each of verticesoandzj, where 1≤
j≤
l, is adjacent to five leaves, botho,
zj∈
S.Since all vertices
v
i1, v
i2, v
3i, where 1≤
i≤
k, are only adjacent to verticesu1i,
u2i, at least one of verticesu1i,
u2i belongs to S. So,γ
(GΦ)= |
S| ≥
k+
l+
1.LetS
= {
o,
zj,
u1i|
1≤
i≤
k,
1≤
j≤
l}
. Clearly,S is a DS onGΦ with|
S| =
k+
l+
1. So,γ
(GΦ)≤
k+
l+
1. This completes the proof. □Lemma 3.
γ
dR(GΦ)=
3(k+
l+
1).Proof. Let f be a
γ
dR(GΦ)-function. Since each of vertices oand zj, where 1≤
j≤
l, is adjacent to five leaves, we havef(o)=
f(zj)=
3. Since all verticesv
1i, v
2i, v
3i, where 1≤
i≤
k, are only adjacent to verticesu1i,
u2i, we find that∑2
s=1f(usi)
+
∑3s=1f(
v
si)≥
3. So,γ
dR(GΦ)= w
(f)≥
3(k+
l+
1).LetV3
= {
o,
zj,
u1i|
1≤
i≤
k,
1≤
j≤
l}
. Clearly,f=
(V(GΦ)−
V3, ∅ , ∅ ,
V3) is a DRDF onGΦ withw
(f)=
3(k+
l+
1).So,
γ
dR(GΦ)≤
3(k+
l+
1). This completes the proof. □Lemma 4. The boolean formulaΦis satisfiable if and only if GΦ
∈
FdR33c.Proof. Assume thatΦis satisfiable. Lettbe an assignment of truth values for the variables ofXfor whichΦevaluates to true. We construct a setSon the vertex set ofGΦ as follows. InitializeSto be
{
o,
zj:
1≤
j≤
l}
. Ift assigns the valuetrue (respectively, the valuefalse) toxi, then we add vertexu2i (respectively, vertexu1i) toS. It is easy to see thatSis a CDS on GΦ with|
S| =
k+
l+
1. So,γ
c(GΦ)≤
k+
l+
1. ByLemma 2we haveγ
(GΦ)=
k+
l+
1. By the factγ
(G)≤ γ
c(G) for any graphG, it obtains thatγ
c(GΦ)=
k+
l+
1. ByLemma 3we haveγ
dR(GΦ)=
3(k+
l+
1). So,γ
dR(GΦ)=
3γ
c(GΦ)=
3γ
(GΦ), that is,GΦ∈
FdR33c.LetGΦ
∈
FdR33c. ByLemma 2we haveγ
(GΦ)=
k+
l+
1. LetSbe a CDS onGΦ. So,|
S| =
k+
l+
1. Clearly, bothoand zj, where 1≤
j≤
l, belong toS. SinceSis a connected dominating set andobelongs toS, at least one of verticesu1i and u2i belongs toSfor each 1≤
i≤
k. If bothu1i,
u2i∈
Sfor some 1≤
i≤
k, then|
S| >
k+
l+
1, a contradiction. So, either bothu1i∈
S andu2i∈ /
Sor bothu1i∈ /
Sandu2i∈
S for each 1≤
i≤
k.We fix indicesiandj, where 1
≤
i≤
kand 1≤
j≤
l. Recall that either bothu1i∈
Sandu2i∈ /
S or bothu1i∈ /
Sand u2i∈
S. Ifu1i∈ /
Sandu2i∈
S(respectively,u1i∈
Sandu2i∈ /
S), then we assign the valuetrue(respectively, the valuefalse) to the variablexi. We claim thatΦis satisfiable for this assignment.Assume without loss of generality that cj
= {
x1, ¬
x2,
x6}
. Sincezj∈
S, we have u21∈
S,u12∈
S oru26∈
S. Assume without loss of generality that u21∈
S. So,x1has the value true. It causes to satisfy the clausecj, that is, the boolean formulaΦis satisfiable. This completes the proof. □Note that we can computeGΦ in polynomial time. Thus byLemma 4and the fact thatGΦ is a chordal graph we have the following.
Theorem 2. The DR3CD Problem is NP-hard even when restricted to chordal graphs.
ByCorollary 2andTheorem 2we have the following.
Corollary 3. The DRG Problem is NP-hard even when restricted to chordal graphs.
3.3. The third reduction: IΦ
Let Φ
= {
C,
X}
be an instance of 3-SAT Problem. For each variable xi, where 1≤
i≤
k, we construct a graph Ii as variable gadget, whereIi is obtained from a path graph of order 3 with verticesu1i,
u2i,
u3i such thatu2i is not a leaf, u2i is adjacent to new five leaves and both vertices u1i and u3i are adjacent tov
si for eachs∈ {
1,
2,
3}
. For each clause cj= {
y1j,
y2j,
y3j}
, where 1≤
j≤
l, we add a new vertexzjsuch thatzjis adjacent to five new leaves. Fors=
1,
2,
3, if ysj=
xi, for some 1≤
i≤
k, then we add edgeu3izjand ifysj= ¬
xi, for some 1≤
i≤
k, then we add edgesu1izj. We add a new vertexosuch that is adjacent to five new leaves and add edgesou1i andou2i for each 1≤
i≤
k. LetIΦ be the resulting graph. SeeFig. 3. It is easy to see thatIΦ is a bipartite graph.Lemma 5.
γ
(IΦ)=
2k+
l+
1.Proof. LetSbe a
γ
(IΦ)-set. Since each of verticeso,u2i andzj, where 1≤
i≤
kand 1≤
j≤
l, is adjacent to five leaves, we haveo,
u2i,
zj∈
S. Since all verticesv
i1, v
i2, v
i3, where 1≤
i≤
k, are only adjacent to verticesu1i,
u3i, at least one of verticesu1i,
u3i belongs toS. So,γ
(IΦ)= |
S| ≥
2k+
l+
1.LetS
= {
o,
zj,
u1i,
u2i|
1≤
i≤
k,
1≤
j≤
l}
. Clearly,Sis a DS onIΦ with|
S| =
2k+
l+
1. So,γ
(IΦ)≤
2k+
l+
1. This completes the proof. □Lemma 6.
γ
dR(IΦ)=
6k+
3l+
3.Proof. Letf be a
γ
dR(IΦ)-function. Since each of verticeso,u2i andzj, where 1≤
i≤
kand 1≤
j≤
l, is adjacent to five leaves, we havef(o)=
f(u2i)=
f(zj)=
3. Since all verticesv
i1, v
2i, v
3i, where 1≤
i≤
k, are only adjacent to verticesu1i,
u2i, we find thatf(u1i)+
f(u3i)+
∑3s=1f(
v
is)≥
3. So,γ
dR(IΦ)= w
(f)≥
6k+
3l+
3.LetV3
= {
o,
zj,
u1i,
u2i|
1≤
i≤
k,
1≤
j≤
l}
. Clearly,f=
(V(IΦ)−
V3, ∅ , ∅ ,
V3) is a DRDF onIΦwithw
(f)=
6k+
3l+
3.So,
γ
dR(IΦ)≤
6k+
3l+
3. This completes the proof. □Fig. 3. IllustratingIΦ corresponding toΦ= {{c1,c2},{x1,x2,x3}}, wherec1= {¬x1,¬x2,x3}andc2= {x1,¬x2,x3}.
Lemma 7. The boolean formulaΦis satisfiable if and only if IΦ
∈
FdR33c.Proof. Assume thatΦis satisfiable. Lett be an assignment of truth values for the variables ofX for whichΦevaluates totrue. We construct setSon the vertex set ofIΦ as follows. InitializeSto be
{
o,
zj,
u2i:
1≤
i≤
k,
1≤
j≤
l}
. Iftassigns the valuetrue(respectively, the valuefalse) toxi, then we add vertexu3i (respectively, vertexu1i) toS. It is easy to see thatSis a CDS onIΦ with|
S| =
2k+
l+
1. So,γ
c(IΦ)≤
2k+
l+
1. ByLemma 5we haveγ
(IΦ)=
2k+
l+
1. By the factγ
(G)≤ γ
c(G) for any graphG, it obtains thatγ
c(IΦ)=
2k+
l+
1. ByLemma 6we haveγ
dR(IΦ)=
3(k+
l+
1). So,γ
dR(IΦ)=
3γ
c(IΦ)=
3γ
(IΦ), that is,IΦ∈
FdR33c.LetIΦ
∈
FdR33c. ByLemma 5we haveγ
(IΦ)=
2k+
l+
1. LetSbe a CDS onIΦ. So,|
S| =
2k+
l+
1. Clearly, all vertices o,u2i andzj, where 1≤
i≤
kand 1≤
j≤
l, belong toS. SinceSis a connected dominating set andobelongs toS, at least one of verticesu1i andu3i belongs toSfor each 1≤
i≤
k. If bothu1i,
u3i∈
S for some 1≤
i≤
k, then|
S| >
2k+
l+
1, a contradiction. So, either bothu1i∈
Sandu3i∈ /
Sor bothu1i∈ /
Sandu3i∈
Sfor each 1≤
i≤
k.We fix indicesiandj, where 1
≤
i≤
kand 1≤
j≤
l. Recall that either bothu1i∈
S andu3i∈ /
Sor bothu1i∈ /
S and u3i∈
S. Ifu1i∈ /
Sandu3i∈
S(respectively,u1i∈
Sandu3i∈ /
S), then we assign the valuetrue(respectively, the valuefalse) to the variablexi. We claim thatΦis satisfiable for this assignment.Assume without loss of generality thatcj
= {
x1, ¬
x2,
x6}
. Sincezj∈
S, we haveu31∈
S,u12∈
S oru36∈
S. Assume without loss of generality thatu31∈
S. So,x1 has the value true. It causes to satisfy the clausecj, that is, the boolean formulaΦis satisfiable. This completes the proof. □We can computeIΦin polynomial time. Thus byLemma 7and the fact thatIΦis a bipartite graph we have the following.
Theorem 3. The DR3CD Problem is NP-hard even when restricted to bipartite graphs.
ByCorollary 2andTheorem 3we have the following.
Corollary 4. The DRG Problem is NP-hard even when restricted to bipartite graphs.
4. Computing double Roman domination number of unicyclic graphs
In this section, we give a linear algorithm that computes the double Roman domination number of unicyclic graphs.
LetG
=
(V,
E) be a graph, letu∈
V, letv
be a vertex not inVand leta∈ {
0,
1,
2,
3}
. We define the following.• γ
dR(G,
u=
a)=
min{ w
(f)|
f is a DRDF onGwithf(u)=
a}
,• γ
dR(G,
u, v
)=
min{ w
(f)|
f is a DRDF onG+
uv
withf(u)=
0 andf(v
)=
2}
.A
γ
dR(G,
u=
a)-function (respectively,γ
dR(G,
u, v
)-function) is a DRDFf onGwithw
(f)= γ
dR(G,
u=
a) andf(u)=
a (respectively,w
(f)= γ
dR(G,
u, v
),f(u)=
0 andf(v
)=
2).Lemma 8. Let H1
=
(V1,
E1)and H2=
(V2,
E2)be two graphs with V1∩
V2= ∅
such that u∈
V1,v ∈
V2and a vertexw / ∈
V1∪
V2. Let G=
(V1∪
V2,
E1∪
E2∪ {
uv }
). Then, we have the following.(i)
γ
dR(G,
u=
0)=
min{ γ
dR(H1,
u=
0)+ γ
dR(H2, v =
0), γ
dR(H1,
u, w
)+ γ
dR(H2, v =
2)−
2, γ
dR(H1−
u)+ γ
dR(H2, v =
3)}
, (ii)γ
dR(G,
u=
2)= γ
dR(H1,
u=
2)+
min{ γ
dR(H2, v, w
)−
2, γ
dR(H2, v =
2), γ
dR(H2, v =
3)}
,(iii)
γ
dR(G,
u=
3)= γ
dR(H1,
u=
3)+
min{ γ
dR(H2− v
), γ
dR(H2, v =
2), γ
dR(H2, v =
3)}
, (iv)γ
dR(G−
u)= γ
dR(H1−
u)+
min{ γ
dR(H2, v =
0), γ
dR(H2, v =
2), γ
dR(H2, v =
3)}
,(v)
γ
dR(G,
u, w
)=
min{ γ
dR(H1,
u, w
)+ γ
dR(H2, v =
0), γ
dR(H1−
u)+ γ
dR(H2, v =
2)+
2, γ
dR(H1−
u)+ γ
dR(H2, v =
3)+
2}
. Proof. Let f be aγ
dR(G)-function. ByCorollary 1, we can assume thatf(u),
f(v
)∈ {
0,
2,
3}
. Clearly,f(u)=
a, where a∈ {
0,
2,
3}
if and only if bothf(u)=
aandf(v
)=
0, bothf(u)=
aandf(v
)=
2 or bothf(u)=
aandf(v
)=
3.Let f1,f2,f1u and f2v be restrictions off toH1,H2, H1
−
u and H2− v
, respectively. Let g1a,g2a,g1′, g2′,g1u and g2v be aγ
dR(H1,
u=
a)-function,γ
dR(H2, v =
a)-function,γ
dR(H1,
u, w
)-function,γ
dR(H2, v, w
)-function,γ
dR(H1−
u)-function andγ
dR(H2− v
)-function, respectively, wherea∈ {
0,
2,
3}
and letgu(u)=
gv(v
)=
0 andgw(w
)=
2.Letf(u)
=
0 andγ
dR=
min{ γ
dR(H1,
u=
0)+ γ
dR(H2, v =
0), γ
dR(H1,
u, w
)+ γ
dR(H2, v =
2)−
2, γ
dR(H1−
u)+ γ
dR(H2, v =
3)}
. So,f1is a DRDF onH1withf1(u)=
0 andf2is a DRDF onH2withf2(v
)=
0, functionh=
f1∪
gwis a DRDF onH1+
uw
with bothh(u)=
0 andh(w
)=
2 andf2is a DRDF onH2 withf2(v
)=
2 orf1u is a DRDF onH1−
uandf2is a DRDF onH2 withf2(v
)=
3. Hence,γ
dR≤ γ
dR(G,
u=
0). Functiong1=
g10∪
g20is a DRDF onGwithg1(u)=
0, the restriction of g2=
g1′∪
g22 toG is a DRDF onG withg2(u)=
0 andg3=
g1u∪
g23∪
gu is a DRDF onGwithg3(u)=
0. Hence,γ
dR(G,
u=
0)≤ γ
dR. This completes the proof of part (i).Let f(u)
=
2 andγ
dR=
min{ γ
dR(H1,
u=
2)+ γ
dR(H2, v, w
)−
2, γ
dR(H1,
u=
2)+ γ
dR(H2, v =
2), γ
dR(H1,
u=
2)+ γ
dR(H2, v =
3)}
. So,f1 is a DRDF on H1 withf1(u)=
2 andh=
f2∪
gw is a DRDF on H2+ vw
withh(v
)=
0 andh(w
)=
2, functionf1 is a DRDF onH1 withf1(u)=
2 andf2 is a DRDF onH2withf2(v
)=
2 orf1is a DRDF onH1 withf1(u)=
2 andf2is a DRDF onH2withf2(v
)=
3. Hence,γ
dR≤ γ
dR(G,
u=
2). The restriction ofg1=
g12∪
g2′ toGis a DRDF onGwithg1(u)=
2, functiong2=
g12∪
g22a DRDF onGwithg2(u)=
2 andg3=
g1<