Optimal Decisions and Pricing in Mail Service Systems Subject to Virus Attacks

We consider an optimal decision problem of the service providers in public mail service systems subject to virus attacks. Two scenarios, i.e., free service systems and payment systems, are investigated in the paper. We first formulate the considered system as a partially observable M/G/1 queue with Bernoulli vacations, and by the supplementary variable method, we obtain some performance measures of the system. In the case of free service systems, the service provider aims to maximize the expected social welfare. Correspondingly, we obtain a joint optimum value of scan rate and scan probability from the viewpoint of social welfare maximization and carry out a sensitivity analysis of the joint optimum value on some input parameters. In the case of payment systems, senders are assumed to be boundedly rational, and we obtain a three-dimensional (3D) optimal strategy by combining the Stackelberg game approach and the logit choice model. Our results provide managerial insight and are helpful for service providers to optimally select parameters of the system and make optimal pricing decisions in various situations.


Introduction
We consider an antivirus mail service system subject to virus attacks. Senders send their e-mails to a mail service system by mobile facilities such as mobile phones, laptops, or PADs. e system transmits these messages to the corresponding recipients. To make the mail server work smoothly, the manager of the system needs to scan virus at a certain rate. Frequent scans will hamper the system performance, whereas, if the scan rate is small, the system may be affected by virus attacks. A so-called stochastic scan is proposed in this paper, namely, after each service completion, the system will perform a scan with a certain probability that is called scan probability throughout the paper. A natural question is whether the most appropriate rate exists to perform virus scanning? In addition, the system's security also depends on the scan level. Compared with the deep scanning, rapid scanning may not be able to detect the virus completely. To capture the degree of scanning, a so-called scan rate, which is an indicator reflecting the speed of the scan, is also proposed in this paper. If the scan rate is large, the system will perform a fast but a low-level scan. So, a second question is how to determine the optimal scan rate if it does exist? e above two questions are both worthy of studying. In this paper, we consider a public mail service system, in which the service provider wants to maximize the social welfare. At the same time, the service provider has to take into account the service fees. Although a public mail service system is not profitable, it is necessary to impose a certain service fee on each customer for maintaining the systems. is is a trade-off, and the service provider has to balance the social welfare maximization issue against the imposition of service fees.
In the literature, mail service systems usually are modeled as various queueing systems. Liu and Wang [1] modeled a mail service system using an M/M/1 queue with Bernoulli vacations. ey investigated customers' equilibrium strategies under different levels of information of the system. Zhu and Wang [2] extended the work of [1] by assuming that the service time follows a general distribution. ey obtained the individually as well as the socially optimal decisions. In this paper, a mail service system subject to virus attacks is considered as an almost unobservable M/G/1 queuing system with Bernoulli vacations, in which the information, about whether the system is busy (i.e., handling a mail), is available to customers, but the number of mails waiting for service in the system is not available. With this setting, we study the performance measures of the system, the optimal decisions, and the optimal pricing strategies.
In this paper, we focus on a public mail service system in which the service provider wants to maximize the social welfare by optimizing the scan rate and the scan probability. In recent years, a large amount of literature studied the social optimization problem of queueing systems. e related literature includes Economou and Kanta [3], Shi and Lian [4], and Guo and Hassin [5] among others. In these studies, several methods solving various queueing problems have been widely adopted, including the generating function method, the supplementary variable method, the pure probability method, and the QBD method, as well as other matrix analytic methods. Interested readers can refer to Gray et al. [6], Mitrany and Avi-Itzhak [7], Economou and Manou [8], Caldentey and Wein [9], and Wang et al. [10], among others. In this paper, we combine the supplementary variable method and the partial generating function method to obtain the performance measures of the mail service system at first. Based on these characteristics, the optimal decisions and the optimal pricing strategies are studies and established.
In practice, it is hard for the service provider to operate and maintain the service system taking into account only the social welfare. at is, the service provider needs to impose a certain service fee on the customers: the social welfare and the service fees both are necessary to run the system. Obviously, there exists a trade-off between social welfare maximization and profit maximization. At the same time, to capture the limited cognitive ability of customers in evaluating some unknown measures such as wait time, we assume that senders are boundedly rational in this paper (see, for example, Huang et al. [11], Li et al. [12], and Li et al. [13]), and we use the logit choice model to describe senders' choices. By the logit choice model, a Stackelberg game is formulated and used to obtain a 3D optimal decision including the optimal scan rate, the scan probability, and the optimal pricing. e details about Stackelberg game can be found in the work of Gibbons [14]. Interested readers can refer to Li et al. [15], Do et al. [16], and Tran et al. [17] for the Stackelberg game applications in different queueing systems.
To summarize, the main contributions of this paper are listed as follows: (i) We built a rather general model for mail service systems subject to virus attacks. Our model generalizes the work of Zhu and Wang [2], in which the strategic sensitivity of users to different system state information was ignored. We derive the partial generating functions of the joint distribution of the server state and the queue length and obtain the formulas of some important performance measures of mail service systems.
(ii) We provide two different models for free mail service systems: basic social welfare model and extended social welfare model. e joint optimum value of scan rate and scan probability is obtained for the first time from the perspective of social welfare maximization. (iii) For payment systems, service providers face a dilemma between profit maximization and social welfare maximization. We propose a queueing system with boundedly rational customers to characterize the payment systems and then discuss the optimal decision and pricing by combining the Stackelberg game and the logit choice model. To the best of our knowledge, a model that combines a queueing system with boundedly rational customers, the Stackelberg game, and the logit choice model is not considered in the literature. e paper is organized as follows. In Section 2, we describe the mathematical model of public mail service systems. Section 3 derives the partial generating functions of the joint distribution of the server state and queue length and then obtains performance measures. In Section 4, we study the optimum values of scan rate and scan probability in the case of free service, and we explore the sensitivity of the optimums on some parameters. Section 5 considers the case that each served sender needs to pay a certain service fee, and we obtain 3D optimal strategy. Finally, conclusions are given in Section 6.

Model Description
We consider a mail service system subject to virus attacks, in which senders' mails randomly arrive in the system and are served by the mail server according to the order of arrivals. We assume that mails' arrivals follow a Poisson process. e service time, which is the period beginning when a mail arrives in the system and ending when the mail is completely transmitted, is assumed to be independent and identically distributed with probability distribution function B(·), probability density function b(x), and finite first two moments: ) be the service completion rate function. Upon completion of a mail service, the server begins a scan with p or serves the next sender's mail with 1 − p, where p is called the scan probability. e bigger the value of p is, the higher the frequency of scans is. We assume that the level of each scan is stochastic, and its scan time follows an exponential distribution with scan rate θ. Just as stated in Section 1, the scan rate can reflect the scan level. For example, if θ is very big, the scan will be completed at a rapid rate (i.e., the so-called fast scan), but it is unwary. e viruses may not have been fully detected. After completing a scan, the mail server will immediately serve the first mail waiting in the queue if there are other mails waiting for service in the system; otherwise, the server will perform another scan. Arrival process, service process, and scan process are mutually independent. According to the above statement, we can use an almost 2 Complexity unobservable M/G/1 queueing system with Bernoulli vacations to model our proposed model. e difference between our model and Zhu and Wang [2] lies in the fact that the information about the queue length and the state of the server (i.e., handling mails, virus scanning, or idle) is ignored in the latter. erefore, the mails' arrival rate is a constant in [2], regardless of whether the server is busy, idle, or is performing virus scanning. Evidently, this paper takes into account the sensitivity of users to different system state information. In this paper, we assume that the system is almost unobservable, namely, the state is observable, but the queue length is invisible. In this setting, it is a natural assumption that mails' arrival intensity is different under different system state information, which reflects users' sensitivity to different levels of information. We assume that mails' arrivals follow a Poisson process with intensity λ 0 if the server is performing virus scanning or idle, while mails' arrivals follow a Poisson process with intensity λ 1 if the server is handling a mail. ese assumptions imply that users will adopt different joining strategies when facing different system states. Obviously, it is more natural and reasonable. In addition, if λ 0 and λ 1 are set to the same value λ (i.e., λ 0 � λ 1 � λ), our model will degenerate to [2]. Our objective is to explore the optimal decision and pricing strategy in the mail service system subject to virus attacks. If the mail service operates correctly, we will derive the joint optimum value of the scan rate and the scan probability from the perspective of maximizing the expected social welfare. For the case of levying service fees, we assume that senders are boundedly rational and obtain the optimal decision and pricing strategy of the service provider based on the logit choice model and the Stackelberg game.

Performance Measures
In this section, we consider performance measures of the mail service system under the condition that the system is stable.
Let N(t) be the number of mails in the system at time t and X(t) be the elapsed service time of the serving mail at time t. I(t) denotes the state of the server, where 0, the server is performing virus scanning or idle, 1, the server is handling a mail.
(1) e stochastic process (I(t), N(t), X(t)), t ≥ 0 { } is a Markovian process with the state space Here, the state (0, 0) denotes that the system is idle; (0, j) means that the system is performing a scan and j mails are waiting for services; (1, j, x) denotes that there are j mails in the system, one of which is being served, and the elapsed service time of the serving mail is x. Figure 1 shows the transition rate diagram in the mail service system. For convenience of narration, we can also divide the state of the server into three categories, that is, idle, the server is idle, busy, the server is handling a mail, under scan, the server is performing virus scanning.
Let P n (t, x)dx be the joint probability that, at time t, there are n mails in the system and a mail is being served with elapsed service time between x and x + dx, namely, . Q n (t) denotes the probability that, at time t, the server is performing virus scanning and there are n customers in the system, i.e., Q n (t) ≜ Pr(I(t) � 0, N(t) � n). In this paper, we consider the case that the system is stable. In this situation, lim t⟶∞ Q n (t) and lim t⟶∞ Q n (t, x) both exist. Let Q n � lim t⟶∞ Q n (t) and P n (x) � lim t⟶∞ Q n (t, x). By considering transitions of the process between time t and t + Δt and letting Δt ⟶ 0 and t ⟶ ∞, we have where the last equation in (4) can be obtained from the normalizing equation After some derivations, (4) can be rewritten as Solving (5), we obtain where Actually, Q(z), P(z) are the partial generating functions of the joint distribution of the server state and the queue length. e above results are summarized in the following theorem.

Theorem 1.
For a mail service system, the partial generating functions of the joint distribution of the server state and the queue length can be computed from , Figure 1: Transition rate diagram in the mail service system. 4 Complexity respectively, be the probabilities that the server is idle, scanning, and busy. According to eorem 1, we can obtain the probabilities that the server is in different states.

Theorem 2.
In the steady-state situation, the following results hold: (a) e probability that the server is idle, Π 0 , can be obtained from (b) e probability that the server is busy is (c) e probability that the server is performing virus scanning can be computed from Proof.
(a) e probability that the server is idle From (6), we immediately get (11). (b) e probability that the server is busy can be written as where rough simple computations, we obtain (12). (c) e probability that the server is performing virus scanning equals one minus the probability that the server is busy or idle, that is, we obtain (13). is completes the proof.

Theorem 3. e mail service system is stable if and only if
e system is stable if and only if the number of mails in the mail service system does not trend infinite as t ⟶ ∞. In other words, the system is stable if and only if the probability that the system has no mail waiting for service is positive. According to eorem 2 (a), Π 0 > 0 if and only if is result is the same as eorem 4.1 of Zhu and Wang [2], which is a special case of eorem 3 present in this paper. Now, we explore the expected queue length of mails waiting in the system and the expected waiting time of an arriving sender. L a (λ 0 , λ 1 , β 1 , β 2 , θ, p) is assumed to be the expected queue length of the mail service system.

Theorem 4.
Under the condition that the system is stable, the expected queue length of mails waiting in the system can be given by where Proof. According to the definitions of P n (x) and Q n , we can compute the expected queue length of the system from Complexity 5 where Since f(1) � g(1) � 0, the above equation can be computed by L'Hospital rule: where f ′ (z) and g ′ (z) can be determined in (21) and (22), From (3), we have After some deviations, we get where h ′ (z) and v ′ (z) can be determined by (16) and (17), respectively, and the second-order derivatives of h(z) and v(z) can be written as From (27)-(29), we have Substituting (26) and (30) into (19) yields (18). is completes the proof.
Let W(λ 0 , λ 1 , β 1 , β 2 , θ, p | I) be the expected waiting time of an arriving sender under the condition that the server is Complexity 7 performing virus scanning or idle upon arrival. W(λ 0 , λ 1 , β 1 , β 2 , θ, p | B) is assumed to be the expected waiting time of an arriving sender under the condition that the system is busy upon arrival. By Little's formula, we have e above performance measures of the system provide a basis for exploring the optimal decision of the service provider. In the sequel, we will consider two cases according to whether to impose a certain service fee on each customer, respectively.

Free for Services: 2D Optimal Decision
In this section, we consider the optimal decision problem of the service provider in the case of free service. All potential senders are assumed to prefer to enter the system for services since the services are free. Our proposed system is the public mail service system like the mail service system for education departments, so the objective of the service provider is to maximize the expected social welfare. We first give two models of social welfare: basic social welfare model and extended social welfare model, where only the second model takes into account the energy assumption.

(i) Basic Social Welfare Model.
e social welfare is assumed to be the expected total net benefit of senders minus the expected lost due to virus attacks (ii) Extended Social Welfare Model. e social welfare is customers' expected total net benefit minus the expected lost due to virus attacks and the expected energy consumption of the mail service system Compared with the basic social welfare model, the extended model takes into account the effect of the energy consumption on the social welfare. We assume that C 0 denotes the waiting cost per time unit under the condition that the server is performing virus scanning or idle, and C 1 is the waiting cost per time unit under the condition that the system is busy. Note that regardless of whether the server is performing virus scanning or idle, the waiting cost per time unit is consistent. It is because an arriving sender cannot distinguish the system whether it is in the scanning state or the idle state. e waiting cost per time unit depends on the server state observed by the senders. In different states, the waiting costs per time unit are different. is assumption is based on the result of Maister [18], who considered the psychology of waiting lines and believed that the psychological state of anxiety results in higher waiting cost. Let U B (θ, p), U E (θ, p), respectively, be the expected social welfares in the basic and extended social welfare models.
When the server is performing virus scanning or idle, the expected waiting time of an arriving mail is W(λ 0 , λ 1 , β 1 , β 2 , θ, p | I). After completing the service of the mail, the sender receives the reward of R, which reflects the satisfactory degree of the served sender. us, in this situation, the expected net benefit equals R − C 0 W(λ 0 , λ 1 , β 1 , β 2 , θ, p | I). When the system is busy, the expected waiting time of an arriving mail is W (λ 0 , λ 1 , β 1 , β 2 , θ, p | B), and then the expected net benefit is R − C 1 W(λ 0 , λ 1 , β 1 , β 2 , θ, p | B). According to eorem 2, the probability that the server is performing virus scanning or idle is Π 0 + Π s , and the probability that the system is busy is Π b . en, the effective arrival rate of mails is λ 0 (Π 0 + Π s ) if the server is performing virus scanning or idle, and the effective arrival rate is λ 1 Π b if busy. e expected loss due to virus attacks depends on the scan probability and the scan rate. In practice, the loss increases with the scan rate and decreases with the scan probability. We construct a mathematical expression C 2 p − c θ δ to model the loss, where C 2 , c, and δ can be obtained by statistic inference. erefore, the expected social welfare under the basic social welfare model can be computed from Let C 3 , C 4 , and C 5 , respectively, be the costs of energy consumption per time unit when the server is idle, scanning, and busy. en, the expected social welfare under the extended social welfare model U E (θ, p) can be written as Now, we explore the optimal scan rate/scan probability to maximize the expected social welfare. e scan rate θ (or 8 Complexity scan probability p) is a unique optimization variable if all other parameters are given. Let θ * B|p and θ * E|p , respectively, be the optimal scan rates for fixed p under the basic and extended models. p * B|θ and p * E|θ are, respectively, assumed to be the optimal scan probabilities for fixed θ under the basic and extended models. us, the optimal solutions can be obtained from where i � B, E. Figures 2(a) and 2(b) show that the expected social welfare U B (θ, p) is concave in the scan rate θ for fixed p, and it is concave in the scan probability p for fixed θ. erefore, the optimal scan rate/scan probability exists and is unique. Similarly, Figure 3(a) shows that the expected social welfare U E (θ, p) is concave in θ. It can also be found that U E (θ, p) is concave in p from Figure 3(b). erefore, there exists a unique optimal solution of θ (or p) for a given scan probability p (or scan rate θ).
However, in real-life situation, the scan rate and the scan probability both are determined by the manager of the mail service system. Hence, a joint optimum value of the scan probability and the scan rate needs to be explored. We summarize our optimization problem as follows: where i � B, E. In the above optimization problem, (θ, p) is a two-dimensional (2D) decision variable. Let (θ * B , p * B ) and (θ * E , p * E ), respectively, be the joint optimums of the scan probability and the scan rate under the basic and extended models. us, these 2D optimal solutions can be computed from where i � B, E. e solutions of our proposed optimal problems can be obtained by Matlab or Mathematica. Figures 4(a) and 4(b) show the relationship among the expected welfare U i (θ, p), the scan probability p, and the scan rate θ for R � 5, C 0 � 0.2, C 1 � 0.3, C 2 � 0.1, λ 0 � 0.5, λ 1 � 0.6, β 1 � 0.8, β 2 � 0.4, c � 0.5, and δ � 0.8. From Figure 4(a) and Table 1, we find that the expected social welfare under the basic social welfare model is jointly concave in the scan rate and the scan probability via numerical analysis; thus, we can obtain a unique joint optimum value. Observing Table 1, the joint optimum value of the scan probability and the scan rate (θ * B , p * B ) � (2.6, 0.8), and the corresponding expected social welfare is 2.17944. Similar to the basic social welfare model, in the extended model, a unique joint optimum value can also be obtained by numerical analysis. From Table 2, U E (θ, p) is maximized as (θ * E , p * E ) � (3.2, 1), so the optimal decision of the manager is to implement a virus scanning at scan rate θ � 3.2 after each service completion. Now, we explore the sensitivities of the joint optimum value on λ 0 , λ 1 , β 1 , β 2 , C 0 , C 1 , and C 2 , respectively. We only consider the case of the basic social welfare model. Similar analysis is also suitable for the extended model. Figure 5(a) shows that the optimal scan rate θ * B is increasing in λ 0 , and the optimal scan probability p * B decreases with λ 0 for R � 5, C 0 � 0.2, C 1 � 0.3, C 2 � 0.1, λ 1 � 0.6, β 1 � 0.8, β 2 � 0.4, c � 0.5, and δ � 0.8. e scan rate embodies the speed when each scan is implemented, and it reflects the level of scan. Big scan rate means the scan level is low, i.e., the system has implemented a fast scan. In addition, the scan probability denotes the probability that the mail system has implemented a scan after a service completion, so it embodies the frequency of scans. Figure 5(a) implies that the manager of the system should implement fast scans and reduce scanning frequency as λ 0 grows. Figures 5(b)-5(d) show the optimal scan rate θ * B and the optimal scan probability p * B both are decreasing in λ 1 , β 1 , and β 2 . is implies the optimal decision of the manager is to implement deep scans and reduce scan frequency as λ 1 , β 1 , or β 2 is very big. Figures 5(e) and 5(f) show that the optimal scan rate θ * B and p * B is increasing in both C 0 and C 1 . To maximize the expected social welfare, the manager should frequently implement a fast scan with the increase of C 0 or C 1 .

Make a Charge for Service: 3D Optimal Decision
In this section, we consider the case that each served sender needs to pay a charge for mail service. e social welfare is one of the important concerns for a nonprofit company, but it is necessary to operate and improve the mail service system by levying service fees, which may reduce the social welfare. An ideal scenario is that both the social welfare and the revenue of the service provider are simultaneously maximized, but this cannot be achieved generally. How do we determine the optimal scan rate, scan probability, and price? It is a question worth studying. In Section 4, we have discussed the case of free service, in which we did not consider senders' strategic behavior since all mail services are free and all potential senders are assumed to prefer to enter the system. Once the mail service is not free, senders need to decide whether to seek services or leave the system. We assume that senders are boundedly rational, namely, senders have limited cognitive ability in evaluating their own waiting time. We use the logit choice model to characterize senders' choices (the related literature includes Huang et al. [11], Li et al. [12], and Li et al. [13], among others). Let ϕ B be the probability that a sender sends his mail to the mail service system when the system is busy upon arrival. ϕ I is assumed to be the probability that a sender sends his mail to the mail service system when the server is not handling a mail upon arrival. We assume that senders are pessimists, who believe all other senders choose to enter the system. According to the logit choice model, ϕ I , ϕ B can be computed from

10
Complexity where P denotes the service fee for each service request. en, the effective arrival rate of mails when the server is scanning or idle is λ 0 ϕ I . Similarly, λ 1 ϕ B is the effective arrival rate when the server is handling a mail. Let U s (P, θ, p) be the expected social welfare in the case of making a charge for each service.
Adopting the basic social welfare model, we obtain the expected social welfare as follows: For given P, the joint optimum value of θ and p can be computed by arg max On the contrary, the nonprofit mail service provider also hopes to get more income to operate and improve the mail service system. e income of the service provider equals the effective arrival rate λ 0 ϕ I + λ 1 ϕ B times the service fee P; thus, the provider needs to consider the following optimization problem: For the above optimization problem, θ, p are two given values.
From the viewpoint of the public welfare service provider, the social welfare and the income are two concerns. Increasing the income results in the reduction of the social welfare. How to balance these two interests? It is a dilemma and also is a game problem existing in the mind of the manager. We adopt the Stackelberg game to characterize this problem. e idea of "maximizing the expected social welfare" is the Stackelberg leader while the idea of "maximizing the income" is the Stackelberg follower. We will derive the recursion formulas of optimal strategy. In the formulas, optimal price, scan rate, and scan probability can be obtained. Let θ (n) , p (n) , and P (n) , respectively, be the values of θ, p, and P after n iterations. Let θ * � lim n⟶∞ θ (n) , p * � lim n⟶∞ p (n) , and P * � lim n⟶∞ P (n) . To make our approach easy to understand, we provide the computational algorithm of the 3D optimal strategy (P * , θ * , p * ) as follows.
To check the above computational algorithm, we provide a numerical example. Observing Figure 6, we find that, after six iterations, (θ (n) , p (n) , P (n) ) tends to be stable as n grows. More specifically, Table 3 shows that (θ (n) , p (n) , P (n) ) remains constant as n ≥ 8. erefore, the optimal strategy under the Stackelberg game (P * , θ * , p * ) � (3.976, 2.298, 1) for , c � 0.5, and δ � 0.8. In this case, it is quite difficult to say whether the expected social welfare is jointly concave in the scan rate and the scan probability by theoretical derivation. However, we can obtain a unique optimum value through numerical analysis which shows that the optimum value is convergent with the increase of the number of iterations and independent of the initial value of P (1) .

Complexity 13
where i � I, B.
e above equation can be written as (ϕ I , ϕ B ) � (f I (ϕ I , ϕ B ), f B (ϕ I , ϕ B )). We can get ϕ I , ϕ B by iterative computations. In this case, the 3D optimal strategy can be obtained by replacing (39) with (48).

Conclusions
In this paper, we study a public mail service system subject to virus attacks by formulating it as an M n /G/1 queue with Bernoulli vacations. With the supplementary variable method, we obtain the partial generating functions of the joint distribution of the server state and the queue length, and then we derive the probabilities that the system is in different states. We consider two scenarios: (1) the service provider does not charge the senders and (2) levying service fees. For the first case, we adopt two different social welfare models to obtain the joint optimum values of the scan rate and the scan probability. For the second case, we assume that senders are pessimistic, boundedly rational, and we obtain a 3D optimal strategy under the formulation of the Stackelberg game. e corresponding computational algorithm is provided, and we also show some extensions (see Remarks 3 and 4). e results obtained in this paper can provide some managerial insight not only for the mail service provider but also for the optimal management concerning the wireless sensor network, web-clouding service, file transfer service, and so on. For future work, one may extend our model to the unreliable mail service system with service interruptions in which the optimal decision and pricing issues are still important and worthy of further investigation. Furthermore, the reliability analysis of the system deserves to be studied.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.