Resource-Competitive Algorithms1 1 Introduction
Total Page:16
File Type:pdf, Size:1020Kb
Resource-Competitive Algorithms1 Michael A. Bender Varsha Dani Department of Computer Science Department of Computer Science Stony Brook University University of New Mexico Stony Brook, NY, USA Albuquerque, NM, USA [email protected] [email protected] Jeremy T. Fineman Seth Gilbert Department of Computer Science Department of Computer Science Georgetown University National University of Singapore Washington, DC, USA Singapore [email protected] [email protected] Mahnush Movahedi Seth Pettie Department of Computer Science Electrical Eng. and Computer Science Dept. University of New Mexico University of Michigan Albuquerque, NM, USA Ann Arbor, MI, USA [email protected] [email protected] Jared Saia Maxwell Young Department of Computer Science Computer Science and Engineering Dept. University of New Mexico Mississippi State University Albuquerque, NM, USA Starkville, MS, USA [email protected] [email protected] Abstract The point of adversarial analysis is to model the worst-case performance of an algorithm. Un- fortunately, this analysis may not always reflect performance in practice because the adversarial assumption can be overly pessimistic. In such cases, several techniques have been developed to provide a more refined understanding of how an algorithm performs e.g., competitive analysis, parameterized analysis, and the theory of approximation algorithms. Here, we describe an analogous technique called resource competitiveness, tailored for dis- tributed systems. Often there is an operational cost for adversarial behavior arising from band- width usage, computational power, energy limitations, etc. Modeling this cost provides some notion of how much disruption the adversary can inflict on the system. In parameterizing by this cost, we can design an algorithm with the following guarantee: if the adversary pays T , then the additional cost of the algorithm is some function of T . Resource competitiveness yields results pertaining to secure, fault tolerant, and efficient distributed computation. We summarize these results and highlight future challenges where we expect this algorithmic tool to provide new insights. 1 Introduction In his influential exegesis on The Art of War, the warlord Cao Cao wrote that \he who wishes to fight must first count the cost", noting that preparing for conflict requires a careful accounting 1This research is supported by NSF grants CNS-1318294 and CCF-1420911. ACM SIGACT News 57 September 2015, vol. 46, no. 3 of available resources [71]. In this article, we argue that this maxim should guide our approach to distributed computation, which is often analyzed as a struggle between an algorithm and an adversary. Resource competitiveness is a recent algorithmic technique that accounts for the cost incurred by an adversary for disrupting the system. Here, the notion of cost corresponds to any resource such as bandwidth, computational power, or an onboard energy supply. In parameterizing by this cost, we can design an algorithm with the following guarantee: if the adversary pays T , then the additional cost of the algorithm is some function of T . In much of the literature on robust distributed computing, the adversary has a known (or upper bounded) budget that can be used to disrupt a task being executed by correct nodes. As a common example, this budget may be expressed by the number of malicious (bad) nodes controlled by the adversary. In this context, a number of seminal results have originated from the theory community (for examples, see [57, 46, 29]) and from the community of practitioners (for examples, see [45, 16, 60, 1, 65]). Such results fix the maximum amount of resources at the adversary's disposal | expressed as an upper bound on the number of bad nodes, t, that can be tolerated | and then focus on optimizing metrics such as latency or communication overhead. There are many settings where this treatment makes sense: perhaps the adversary is unconcerned with its own costs, or the distributed computation is provably impossible beyond this maximum budget t. However, there are limitations inherent to this approach: • Both the good nodes and the adversary may be resource constrained, and ignoring this aspect places algorithm designers at an unnecessary disadvantage. Instead, we should incorporate the resource constraints of the adversary into the design of our algorithms. Such a situation may arise when the adversary incurs a cost to obtain physical resources for launching attacks; for example, there are monetary costs for renting a botnet [30]. In such cases, a notion of relative cost is compelling. • The budget may be unknown. Moreover, the adversary may never actually utilize any of this budget. Consequently, an algorithm that proactively has a large overhead to tolerate disruption | disruption which may never occur | is inefficient. By ignoring these aspects, traditional approaches to fault tolerance consider a one-sided picture. Instead, a more complete approach follows from measuring the performance of an algorithm relative to the amount of disruption in the system. 1.1 A Formal Definition of Resource Competitiveness We now formally define what it means for a distributed algorithm A to be resource competitive. This was originally proposed in [37], but we refine the definition here. Assume a system with a set G of n good nodes that obey actions specified by algorithm A. There exists an adversary who incarnates a source of disruption in the system. For example, the adversary may represent (1) any number of malicious nodes that collude and deviate arbitrarily from A, or (2) the effects of more benign failures due to software or hardware faults. Let Cost(α; v) denote the resource expenditure (or cost) to a good node v for executing the actions prescribed by A in an execution α. A resource might be bandwidth, CPU cycles, energy, actual money, or another useful domain-specific measure. ACM SIGACT News 58 September 2015, vol. 46, no. 3 Let T (α) be the adversary's total cost; this is typically unknown to the good nodes. It is possible for Cost(α; v) and T (α) to correspond to different resources. For example, good nodes may be concerned with bandwidth while the adversary is concerned with CPU cycles. We now define what it means for A to be resource competitive: Definition 1. Algorithm A is (ρ, τ)-resource competitive if maxfCost(α; v)g ≤ ρ(T (α)) + τ for v 2 G any α. Definition 1 states that A is resource competitive if the maximum cost incurred by any good node is less than some function of the adversary's total cost, ρ(T (α)), plus some additive term τ, where both ρ and τ are functions mapping to non-negative real values. The function ρ is called the robustness function and it is a function of T and possibly other parameters such as n. Throughout, we will simply refer to T instead of T (α) since α is implicit. Why do we need τ? Note that when T = 0 (there is no disruption), the good nodes clearly cannot incur less than zero cost; τ represents the unavoidable cost to attain a goal when there is no disruption. It is useful to make this separation explicit via this notation τ which we call the efficiency function; τ can be a function of parameters such as n, but it is not a function of T . In designing A, we desire ρ to be a slow-growing function. The efficiency function, τ, may not be a slow growing function, but it should be small relative to the best-performing algorithm that functions in the absence of disruption. For example, if a distributed computation requires n messages to be exchanged, then τ = O(n) would imply only a constant-factor increase in overhead which, while not a slow-growing function, is asymptotically optimal. In the example to follow in Section 2, we will observe the following adaptive behavior of A. When T is zero or \small", the efficiency function will dominate the cost of A; this is the unavoidable (or upfront) cost of running the algorithm. As T increases, the robustness function will be the dominating component. Therefore, beyond the upfront cost, the cost of A grows as a function of the amount of disruption. Functions other than the maximum cost over all nodes may be appropriate depending on the context. For instance, we may consider the average or median cost. Furthermore, if a resource- competitive algorithm is randomized, then we can speak of cost in terms of a high probability guarantee, or in expectation, with minor changes to the definition. Definition 1 accounts for finite executions. In the case of an infinite execution, an algorithm is resource competitive if it is resource-competitive for every prefix of the execution. Finally, we note that resource-competitive results are typically reported using big-O notation of the form O(ρ(T ) + τ). 2 Proof of Concept: Jamming-Resistant Communication We now provide a concrete \proof of concept" by summarizing a result from [43] dealing with wire- less sensor networks. The wireless medium is vulnerable to interference caused by malfunctioning, or even malicious, devices; such interference is called jamming. A number of elegant results have addressed communication under jamming attacks (see [76] for examples). However, these prior works constrain the jamming strategy of the adversary in some fashion; for example, the jamming may be random [58], or bounded within a window time [5, 61, 62, 63, 21], or limited to a subset of the total spectrum [24, 25, 35, 28, 50]. ACM SIGACT News 59 September 2015, vol. 46, no. 3 Less Naive for any round Robust Communication for round i ≥ 2 Send Phase: For each of ` slots do Send Phase: For each of 2ci slots do p • Alice sends m with probability d= ` • Alice sends m with probability 2=2i p • Bob listens with probability d= ` and ter- • Bob listens with probability 2=2(c−1)i and minates if he receives m terminates if he receives m Nack Phase: For 1 slot do Nack Phase: For each of 2i slots do • Bob sends a nack message • Bob sends a nack message • Alice listens with probability 1 and termi- • Alice listens with probability 4=2i and ter- nates if the slot is clear minates if she hears a clear slot Figure 1: Pseudocode for Less Naive and Robust Communication.