## 3 Model Formulation
### Demand Sharing between Two Hospitals  
We can see that both HD and HS are faced with a mismatch between supply and demand. It seems that it is beneficial for both hospitals if the HD shares a part of its patients with the HS. We consider one type of patients sharing alliance between the two hospitals,wherein the HD adds an alternative for its patients that they can opt to use HS's service, as shown in Figure 1. The price of this option \(p_{12}\) is different from the original price of HD's service \(p_{1}\). If a patient opts this alternative and purchases HS's service, then the HD can get a commission fee \(s\) from this transaction.  
In this alliance, HS is faced with two classes of patients. Two classes are completely differentiated and observed by the HS upon their arrivals. HS can control the arrival rate of the two streams by pricing. We assume that all patients are served on a FCFS basis. Thus, the expected waiting times postulated by the two classes are the same. We also assume that the patients from HD are more impatient than those from Region-2, that is, \(c_{1}\geq c_{2}\). We make this assumption due to two main reasons. First, if \(c_{1}\geq c_{2}\), then it will be more profitable for HS to serve patients from Region-2 under the same waiting time. As a result, the balking patient must belong to Market-1, if it exists, which is more appropriate for most scenarios. Second, if we make an opposite assumption, that is, \(c_{1}<c_{2}\), then the balking patient must belong to Region-2, if it exists. This would produce similar results because the HS's trade-off between revenue gain from higher utilization and revenue loss due to the externality of new patients would still hold.  
We now describe the interaction between hospitals and patients in this alliance. Two hospitals need to make pricing decisions. HD decides the price of its service \(p_{1}\) and the commission fee \(s\). HS decides its price for Region-2 \(p_{2}\) and the price for patients switching from HD \(p_{12}\).  
Given the prices, each arriving patient in HD is faced with three options--joining the queue of HD, switching to the queue of HS, and balking. Patients must choose one option with the largest net surplus. Concerning patients in Region-2, they join the queue of HS if the patient's net surplus is positive. In equilibrium, a patient should be indifferent between either alternative. Hence, two classes of patient's decentralized decision behavior for a given pricing strategy results in the following relations:  
\[\begin{cases}V_{1}-p_{1}-\frac{c_{1}}{\mu_{1}-\lambda_{1}}=V_{2}-p_{12}-\frac {c_{1}}{\mu_{2}-\lambda_{12}-\lambda_{2}}\geq 0,\\ V_{2}-p_{2}-\frac{c_{2}}{\mu_{2}-\lambda_{12}-\lambda_{2}}\geq 0,\\ \lambda_{1}+\lambda_{12}\leq\Lambda_{1},\end{cases} \tag{1}\]  
wherein \(\lambda_{12}\) represents the arrival rate of patients that switch from HD to HS.  
Both HD and HS attempt to maximize their revenues by pricing their services. The HD utilizes the price \(p_{1}\) and commission fee \(s\) to control the demand served by itself, \(\lambda_{1}\), and the part shared with the HS, \(\lambda_{12}\). Hence, the HD's optimization problem is as follows:  
\[\max_{p_{1},s}\pi_{1}(p_{1},s)=p_{1}\lambda_{1}+s\lambda_{12}. \tag{2}\]  
Given that each patient type is known upon arrival, the HS can set different prices for different classes of patients. There exists a trade-off between making extra revenue and increasing the delay of patients by serving more patients that switch from the HD. The  
Figure 1: Graphic representation of the system configuration.  
HD employs two prices--\(p_{2}\) and \(p_{12}\)--to balance the two types of demands. The HS's optimization problem is as follows:  
\[\max_{p_{2},p_{12}^{0}}\pi_{2}(p_{2},p_{12}^{0})=p_{2}\lambda_{2}+p_{12}^{0} \lambda_{12}, \tag{3}\]  
where \(p_{12}^{0}=p_{12}-s\).