## 4 Epidemic Diffusion
The costs associated with such broadcasting are typically dismissed by prior researchers as negligible, so long as these broadcast messages are contained within a reasonably small geographic region. In this paper, we account for every interaction between nodes and measure the communication, computation and storage costs precisely. * Anti-entropy: Each sensor node \(n\) periodically contacts another node \(p\) at random, and they exchange infections with each other. This exchange can be accomplished in a couple of ways: push, infections known to \(n\), but not to \(p\) are sent from \(n\) to \(p\); pull, infections known to \(p\), but not to \(n\) are sent from \(p\) to \(n\); or push-pull, bidirectional information/infection transfer. It has been shown that either pull or push-pull is greatly preferable to push [35] in terms of dissemination speed, and hence, we opted to use the push-pull mechanism in **Disccard** for diffusing the primary and secondary epidemics and describe it in more detail below. * Rumor mongering: Each sensor node is initially susceptible (has no infection to share). When a node gets infected, this infection, called a rumor, is periodically transmitted (pushed) to a random sensor node in the network. When the node has tried to push its rumor a certain number of times, the node stops transmitting its rumor and is effectively removed in the sense that it becomes inactive. There are a couple of variants proposed by [PERSON] _et al._[35], which determine when a node is removed: 1. Feedback _vs._ blind: A sender node is removed with some probability only if it has pushed its rumor to a recipient that already knows the rumor. In blind mode, the sender is removed with some probability regardless of whether the recipient is aware of the rumor and is perhaps better suited in a sensor network scenario, as we could reap some energy/communication savings by eliminating the feedback message from the recipient. Nevertheless, we do not use this scheme and explain our reasoning below. 2. Coin _vs._ counter: In the coin mode, the sender node is removed with some probability based on the flip of its coin. In the counter mode, the sender node is removed with probability one after a certain number of rumor pushing attempts. 3. Typically, the feedback/blind and coin/counter modes are combined to obtain schemes, such as coin-blind and feedback-counter modes of operation, for the rumor mongering diffusion scheme. As noted above, we chose to implement the push-pull, anti-entropy epidemic-diffusion mechanism to diffuse both the primary and secondary epidemics in the sensor network. Our justification for our choice is the following: Recall the operational states of typical sensor nodes, such as the Mica2 motes: transmit, receive, idle and sleep. In their work on energy analysis of nodes in a sensor network, [PERSON] _et al._[39] showed that most sensor node transceivers operating in the idle mode have a power consumption almost equal to the power consumed in receive mode. Hence, it is energy efficient to completely shut down the transceiver rather than leave it in the idle mode when not transmitting or receiving. They also showed that a significant amount of power is consumed when switching from sleep mode to transmit mode in order to transmit a packet. During transmit and receive, the microcontroller is powered on along with the wireless transceiver. As an aside, it is interesting to note that the energy cost of computation is small when compared to data transmission [40]. Hence, from these above observations, it is clear that rumor mongering would consume greater power due to its repeated transmit/idle/sleep cycles for every update, and so, we did not choose this option. We therefore chose anti-entropy for propagating the primary epidemic, _i.e._, the neighborhood caches that need to be exchanged among the nodes to detect a duplicate node. Having used anti-entropy to transmit the cache to the recipient, we decided to use anti-entropy for exchanging the duplicate node cache among these two nodes, as well.