# Optimal Control of a Delay-Varying Computer Virus Propagation Model

Authors: Jianguo Ren; Yonghong Xu; Chunming Zhang
Journal: Discrete Dynamics in Nature and Society
 (2013)

---

## Abstract

By incorporating the objective of keeping a low number of infected nodes and a high number of recovered nodes at a lower cost into a known computer virus model (the delay-varying SIRC model) extended by introducing quarantine, a novel model is described by means of the optimal control strategy and theoretically analyzed. Through the comparison of simulation results, it is shown that the propagation of computer virus with varying latency period can be suppressed effectively by the optimal control strategy.


---

## Body

## 1. Introduction

With the advance of computer software and hardware technology and communication technology, the number and sort of computer viruses have increased dramatically, which causes huge losses to the human society. Therefore, establishing reasonable computer virus propagation models by considering the characteristics of computer virus, by model analysis, and by understanding the spread law of the virus over the network is a currently hot topic of research.Learning from the epidemic models, the classical SIR (susceptible-infected-recovered) computer virus propagation model [1, 2], as well as its extensions [3–15], is extended to explore the behavior of computer virus propagation in network. For example, by considering the computer virus fixed latent period,  Mishra  et al. [6, 7] proposed delayed SIRS, SEIR computer virus models with a fixed period of temporary immunity, which accounts for the temporary recovery from the infection of virus. Very recently, Ren  and Xu  [16] introduced an interesting virus propagation model, known as the SIRC model, by considering the fact that when the virus enters into the susceptible computers, their latency periods vary and investigated the dynamics of the model. Once the rule of the virus spread is revealed, it comes to be a major issue how to control the virus spread effectively [17–19].In this paper, by incorporating the objective of keeping a low number of infected nodes and a high number of recovered nodes at the lower cost into a delay-varying computer virus propagation model (SIRC model) extended by introducing the new compartment quarantine, a novel model is described by means of the optimal control strategies associated with measures of quarantine and installing antivirus programs and firewalls and theoretically analyzed. It is comparatively showed that optimal control strategy is much more effective for controlling virus with varying latency period in network.The remaining materials of this paper are organized this way: Section2 introduces the mathematical model to be discussed; Section 3 studies the controlled system theoretically. In Section 4, we solve the controlled system numerically using the Runge-Kutta procedure and make numerical comparisons with control and without control. We end the paper with a brief conclusion in Section 5.


## 2. Mathematical Model

Consider a delay-varying computer virus model recently proposed in [16]
(1)dSdt=b-β∫-∞tS(τ)K(t-τ)dτI(t)-μS(t),dIdt=β∫-∞tS(τ)K(t-τ)dτI(t)-(μ+γ)I(t),dRdt=γI(t)-μR(t).
Here, it is assumed that all the computers connected to the network in concern are classified into three categories: susceptible, infected, and recovered computers. Let S(t), I(t), and R(t) denote their corresponding numbers at timet. This model involves some positive parameters: b denotes the rate at which external computers are connected to the network,γdenotes the recovery rate of infected computers due to the antivirus ability of the network,μ  denotes the rate at which one computer is removed from the network, andβ denotes the rate at which, when having connection to one infected computer, one susceptible computer can become infected. By appropriate assumptions and extensions in [16], model (1) can be written as
(2)dSdt=b-βC(t)I(t)-μS(t),dIdt=βC(t)I(t)-(μ+γ)I(t),dRdt=γI(t)-μR(t),dCdt=1σS(t)-1σC(t),
where C(t) denotes the effect of past infection information in the susceptible computers at time t,σis a positive delay parameter with the initial conditionsS(0)≥0, I(0)≥0, C(0)≥0, and the positively invariant set
(3)Ω={(S,I,C)∈R+3,S+I≤bμ,C≤bμ}.Recently, more research attention has been paid to the combination of virus propagation models and antivirus countermeasures to investigate the prevalence of virus. As an elementary measure, quarantine [20, 21] is used to restrain the spread of computer virus. Extending the previous SIRC, a new compartment quarantine has been introduced under which the susceptible, infected computers exhibited suspicious behavior and, consequently, have been quarantined. The model with quarantine can be written as
(4)dSdt=b-βC(t)I(t)-αS(t)-μS(t),dIdt=βC(t)I(t)-(μ+γ)I(t)-εI(t),dRdt=γI(t)-μR(t),dQdt=εI(t)+αS(t)-μQ(t),dCdt=1σS(t)-1σC(t),
where parameter  α  denotes the rate at which the susceptible computers are quarantined,εdenotes the rate at which the infected computers are quarantined.For our purpose, first, we introduce two Lebesgue square integrable control functions.(1)
u1(t) denotes the cost for installing effective antivirus programs and firewalls on the susceptible computers and infected computers at time t.(2)
u2(t) denotes the cost for quarantining the susceptible and infected computers at time t.Both of the control functions are normalized to fall between 0 and 1, and the admissible set of control functions is given by(5)Uad={u1(t),u2(t)∈L2:0≤u1(t)≤1,0≤u2(t)≤1,t∈[0,tf]}.To obtain the controlled model, the following assumptions are made.(1)
At timet, there arepu1(t)I(t) infected computers that would become recovered, whereas there are(1-p)u1(t)I(t)that would be quarantined, wherep∈[0,1].(2)
At timet, by installing antivirus programs and firewalls, there are qu2(t)S(t) susceptible computers that would directly become recovered, whereas there are (1-q)u2(t)S(t) that would be quarantined, whereq∈[0,1].Taking into account the assumptions made above, the model (7) can become the following computer virus propagation model:
(6)dSdt=b-βC(t)I(t)-αS(t)-μS(t)-u2S(t),dIdt=βC(t)I(t)-(μ+γ)I(t)-εI-u1I(t),dRdt=γI(t)-μR(t)+pu1I(t)+qu2S(t),dQdt=εI(t)+αS(t)+(1-p)u1I(t)+(1-q)u2S(t)-μQ(t),dCdt=1σS(t)-1σC(t),
with the given initial conditions and the positively invariant set.


## 3. Optimal Control Problem

During the time period[0,tf], under the above assumptions and extensions, our objective is given by the following.(1)
Minimize the number of infected computers (I) and maximize the number of recovered computers (R).(2)
Minimize the total cost to quarantine the susceptible and infected computers.(3)
Minimize the total cost for installing the antivirus programs and firewalls in the susceptible and infected computers.Thus, our optimal control problem is to minimize the objective functional:(7)J(u)=∫0tf[I(t)+ηC(t)+12τ1u2(t)+12τ2u22(t)]dt,
where parameterηdenotes the weight constants of effect of latent virus, τ1, τ2 are trade-off factors.To find an optimal solution to (4), consider the Lagrangian
(8)L(I,C,u)=I(t)+ηC(t)+12τ1u2(t)+12τ2u22(t).Define the HamiltonianH for the control problem as
(9)H(I,C,u,λ1,λ2,λ3,λ4,λ5)=L(I,C,u)+λ1(t)dSdt+λ2(t)dIdt+λ3(t)dRdt+λ4(t)dQdt+λ5(t)dCdt=I(t)+ηC(t)+12τ1u2(t)+12τ2u22(t)+λ1(t){b-βC(t)I(t)-αS(t)-μS(t)-u2S(t)}+λ2(t){βC(t)I(t)-(μ+γ+ε)×I(t)-u1I(t)}+λ3(t){γI(t)-μR(t)+pu1I(t)+qu2S(t)}+λ4(t){u2εI(t)+αS(t)-μQ(t)+(1-p)u1×I(t)+(1-q)u2S(t)}+λ5(t){1σ(S-C)},
with the transversality conditions (or boundary conditions)λi(tf)=0,  i=1,2,3,4,5.Theorem 1.
There exist control functionsu1*, u2* so thatJ(u1*,u2*)=minu1,u2∈UadJ(u1,u2)subject to the controlled system (6) with initial condition.Proof.
We use the results in [22, 23]. It is clear that the set of control and corresponding state variables are nonnegative values and the set Uad is convex and closed.L(I,C,u)=I(t)+ηC(t)+(1/2)τ1u2(t)+(1/2)τ2u22(t)is convex on Uad. Meanwhile, the optimal system (4) is bounded by a linear function in the state variables. Also, there exist a constant ς>1 and two positive numbers σ1 and σ2 so that L(I,C,u)≥σ1+σ1(|u1|+|u2|)ς/2.In the following, we use Pontryagin’s maximum principle [24] to obtain a necessary condition for the optimal control solution to the system (4).Theorem 2.
Consider the optimal control problem (7) subject to (6). Let S*(t), I*(t), R*(t), Q*(t),andC*(t)form the optimal state solution with associated optimal control variablesu1*(t), u2*(t). Then, there exist adjoint variablesλ1(t), λ2(t), λ3(t), λ4(t), andλ5(t)that satisfy
(10)dλ1(t)dt=λ1(μ+α+u2)-λ3qu2-λ4(1-q)u2-λ51σ,dλ2(t)dt=-λ1βC-λ2(βC-γ-μ-ε-u1)-λ3(γ+pu1)-λ4{ε+(1-p)u1}-1,dλ3(t)dt=λ3μ,dλ4(t)dt=λ4μ,dλ5(t)dt=λ1βI-λ2βI+λ51σ-η,
with transversality conditionsλi(tf)=0,  i=1,2,3,4,5.Proof.
By the adjoint equations and optimality conditions, we have(11)dλ1(t)dt=-∂H∂S=λ1(μ+α+u2)-λ3qu2-λ4(1-q)u2-λ51σ,dλ2(t)dt=-∂H∂I=-λ1βC-λ2(βC-γ-μ-ε-u1)-λ3(γ+pu1)-λ4{ε+(1-p)u1}-1,dλ3(t)dt=-∂H∂R=λ3μ,dλ4(t)dt=-∂H∂Q=λ4μ,dλ5(t)dt=-∂H∂C=λ1βI-λ2βI+λ51σ-η,τu1*(t)-λ2(t)I*+λ3(t)pI*+λ4(t)(1-p)I*=0,τu2*(t)-λ1(t)S*+λ3(t)qS*+λ4(t)(1-q)S*=0,
which can be obtained from∂H/∂u1=0, ∂H/∂u2=0, respectively.
Noting a fact that0≤u1(t)≤1, 0≤u2(t)≤1, we obtain that
(12)u1*(t)=max{(λ2(t)-λ3(t)p-λ4(t)(1-p))I*τ1min{(λ2(t)-λ3(t)p-λ4(t)(1-p))I*τ1,(λ2(t)-λ3(t)p-λ4(t)(1-p))I*τ11},0}u2*(t)=max{(λ1(t)-λ3(t)q-λ4(t)(1-q))S*τ2min{(λ1(t)-λ3(t)q-λ4(t)(1-q))S*τ2,(λ1(t)-λ3(t)q-λ4(t)(1-q))S*τ21},0}.
From the previous analysis, to get the optimal point, we have to solve the system(13)dS*dt=b-βC*I*-μS*-αS*-u2S*,dI*dt=βC*I*-(μ+γ)I*-εI*-u1*I*,dR*dt=γI*-μR*+pu1*I*+qu2*S*,dQ*dt=αS*+εI*+(1-p)u1*I*+(1-q)u2*S*-μQ*,dC*dt=1σ(S*-C*),
with the Hamiltonian
(14)H*(I*,C*,u*,λ1,λ2,λ3,λ4,λ5)=I*+ηC*+τ2u1*(t)2+τ2u2*(t)2+λ1(t)×{b-βC*I*-αS*-μS*-u2*(t)S*}+λ2(t)×{βC*I*-(μ+γ-ε)×I*-u1*(t)I*}+λ3(t){γI*-μR*+pu1*(t)I*+qu2*(t)S*}+λ4(t){γI*+αS*-μQ*+(1-p)u1*(t)I*+(1-q)u2*×(t)S*}+λ5(t){1σ(S*-C*)}.


## 4. Numerical Simulations

In this section, to find out the optimal control solution, we numerically solve system (13) with (14) by a Runge-Kutta procedure and make numerical comparisons. Figures 1–5 plot the numbers of susceptible, infected, recovered, and quarantined computers as well as the effect of past infection information in the susceptible computers with and without control, with the parameters  shown in Table 1 and the initial conditions shown in Table 2.Table 1
Parameters
b
β
γ
α
ε
μ
σ
p
q
η
τ
1
τ
2
Values
20
0.05
0.25
0.5
0.2
0.5
0.5
0.3
0.4
0.8
30
50Table 2
Initial state variable
S
(
0
)
I
(
0
)
R
(
0
)
Q
(
0
)
C
(
0
)
Values
0
5
4.5
13
8Figure 1
Susceptible computers (with and without control) versus timet.Figure 2
Infected computers (with and without control) versus timet.Figure 3
Recovered computers (with and without control) versus timet.Figure 4
Quarantined computers (with and without control) versus timet.Figure 5
Effect of past infection information in susceptible computers (with and without control) versus timet.The number of computers under control is marked by solid line, whereas the number of remaining computers is marked by dashed line. One can see that, under control, the number of susceptible computers is sharply low, which is the same as the effect of past infection information in Figure5. In Figure 2, we can see that the number of infected computers under control is lower than that without control. In Figure 3, the number of recovered computers is very small without control  and more recovered computers increase more rapidly.  Although the number of quarantined computers with control would slightly grow in Figure 4, we mainly consider   tradeoff between the cost and effect  of the quarantine. Figures 6 and 7 plot the control variables u1, u2versus time t with associated weight factorτ1∈{30,50,70,90} andτ2∈{10,15,25,35}, respectively.Figure 6
The control variableu1(t) versus time t for different weight factors.Figure 7
The control variableu2(t) versus time t for different weight factors.


## 5. Conclusions

By incorporating the objective of keeping a low number of infected nodes and a high number of recovered nodes at the lower cost into a known computer virus model (the delay-varying SIRC model) extended by introducing quarantine, a novel model is described by means of the optimal control strategy and theoretically analyzed. A comparison between optimal control and without control is presented, which demonstrates the effectiveness of our method. The results obtained in the present paper can help understand and control the spread of computer virus over a computer network.



---

*Source: 210291-2013-09-01.xml*