SearcharxivSearch

arXiv subjects

Dimitrios Los

Publications and source records attributed to Dimitrios Los.

12 recordsLinked to original sources

Naively Sorting Evolving Data is Optimal and Robust

We study sorting in the evolving data model, introduced by [AKMU11], where the true total order changes while the sorting algorithm is processing the input. More precisely, each comparison operation of the algorithm is followed by a sequence of evolution steps, where an evolution step perturbs the rank of a random item by a "small" random value. The goal is to maintain an ordering that remains close to the true order over time. Previous works have analyzed adaptations of classic sorting algorithms, assuming that an evolution step changes the rank of an item by just one, and that a fixed constant number $b$ of evolution steps take place between two comparisons. In fact, the only previous result achieving optimal linear total deviation, by [BvDEGJ18a], applies just for $b=1$. We analyze a very simple sorting algorithm suggested by [M14], which samples a random pair of adjacent items in each step and swaps them if they are out of order. We show that the algorithm achieves and maintains, with high probability, optimal total deviation, $O(n)$, and optimal maximum deviation, $O(\log n)$, under very general model settings. Namely, the perturbation introduced by each evolution step is sampled from a general distribution of bounded moment generating function, and we just require that the average number of evolution steps between two sorting steps be bounded by an (arbitrary) constant, where the average is over a linear number of steps. The key ingredients of our proof are a novel potential function argument that inserts "gaps" in the list of items, and a general analysis framework which separates the analysis of sorting from that of the evolution steps, and is applicable to a variety of settings for which previous approaches do not apply. Our results settle conjectures and open problems in the aforementioned works, and provide theoretical support for empirical observations in [BvDEGJ18b].

cs.DS

An asymptotically optimal algorithm for generating bin cardinalities

In the balls-into-bins setting, $n$ balls are thrown uniformly at random into $n$ bins. The na\"{i}ve way to generate the final load vector takes $\Theta(n)$ time. However, it is well-known that this load vector has with high probability bin cardinalities of size $\Theta(\frac{\log n}{\log \log n})$. Here, we present an algorithm in the RAM model that generates the bin cardinalities of the final load vector in the optimal $\Theta(\frac{\log n}{\log \log n})$ time in expectation and with high probability. Further, the algorithm that we present is still optimal for any $m \in [n, n \log n]$ balls and can also be used as a building block to efficiently simulate more involved load balancing algorithms. In particular, for the Two-Choice algorithm, which samples two bins in each step and allocates to the least-loaded of the two, we obtain roughly a quadratic speed-up over the na\"{i}ve simulation.

cs.DS

An Improved Drift Theorem for Balanced Allocations

In the balanced allocations framework, there are $m$ jobs (balls) to be allocated to $n$ servers (bins). The goal is to minimize the gap, the difference between the maximum and the average load. Peres, Talwar and Wieder (RSA 2015) used the hyperbolic cosine potential function to analyze a large family of allocation processes including the $(1+\beta)$-process and graphical balanced allocations. The key ingredient was to prove that the potential drops in every step, i.e., a drift inequality. In this work we improve the drift inequality so that (i) it is asymptotically tighter, (ii) it assumes weaker preconditions, (iii) it applies not only to processes allocating to more than one bin in a single step and (iv) to processes allocating a varying number of balls depending on the sampled bin. Our applications include the processes of (RSA 2015), but also several new processes, and we believe that our techniques may lead to further results in future work.

math.PR

Mean-Biased Processes for Balanced Allocations

We introduce a new class of balanced allocation processes which bias towards underloaded bins (those with load below the mean load) either by skewing the probability by which a bin is chosen for an allocation (probability bias), or alternatively, by adding more balls to an underloaded bin (weight bias). A prototypical process satisfying the probability bias condition is Mean-Thinning: At each round, we sample one bin and if it is underloaded, we allocate one ball; otherwise, we allocate one ball to a second bin sample. Versions of this process have been in use since at least 1986. An example of a process, introduced by us, which satisfies the weight bias condition is Twinning: At each round, we only sample one bin. If the bin is underloaded, then we allocate two balls; otherwise, we allocate only one ball. Our main result is that for any process with a probability or weight bias, with high probability the gap between maximum and minimum load is logarithmic in the number of bins. This result holds for any number of allocated balls (heavily loaded case), covers many natural processes that relax the Two-Choice process, and we also prove it is tight for many such processes, including Mean-Thinning and Twinning. Our analysis employs a delicate interplay between linear, quadratic and exponential potential functions. It also hinges on a phenomenon we call "mean quantile stabilization", which holds in greater generality than our framework and may be of independent interest.

math.PR

Balanced Allocations in Batches: The Tower of Two Choices

In balanced allocations, the goal is to place $m$ balls into $n$ bins, so as to minimize the gap (difference of max to average load). The One-Choice process places each ball to a bin sampled independently and uniformly at random. The Two-Choice process places balls in the least loaded of two sampled bins. Finally, the $(1+\beta)$-process mixes these processes, meaning each ball is allocated using Two-Choice with probability $\beta\in(0,1)$, and using One-Choice otherwise. Despite Two-Choice being optimal in the sequential setting, it has been observed in practice that it does not perform well in a parallel environment, where load information may be outdated. Following [BCEFN12], we study such a parallel setting where balls are allocated in batches of size $b$, and balls within the same batch are allocated with the same strategy and based on the same load information. For small batch sizes $b\in[n,n\log n]$, it was shown in [LS22a] that Two-Choice achieves an asymptotically optimal gap among all processes with a constant number of samples. In this work, we focus on larger batch sizes $b\in[n\log n,n^3]$. It was proved in [LS22c] that Two-Choice leads to a gap of $\Theta(b/n)$. As our main result, we prove that the gap reduces to $O(\sqrt{(b/n)\cdot\log n})$, if one runs the $(1+\beta)$-process with an appropriately chosen $\beta$ (in fact this result holds for a larger class of processes). This not only proves the phenomenon that Two-Choice is not the best (leading to the formation of "towers" over previously light bins), but also that mixing two processes (One-Choice and Two-Choice) leads to a process which achieves a gap that is asymptotically smaller than both. We also derive a matching lower bound of $\Omega(\sqrt{(b/n)\cdot\log n})$ for any allocation process, which demonstrates that the above $(1+\beta)$-process is asymptotically optimal.

cs.DM

Balanced Allocations with Heterogeneous Bins: The Power of Memory

We consider the allocation of $m$ balls (jobs) into $n$ bins (servers). In the standard Two-Choice process, at each step $t=1,2,\ldots,m$ we first sample two bins uniformly at random and place a ball in the least loaded bin. It is well-known that for any $m \geq n$, this results in a gap (difference between the maximum and average load) of $\log_2 \log n + \Theta(1)$ (with high probability). In this work, we consider the Memory process [Mitzenmacher, Prabhakar and Shah 2002] where instead of two choices, we only sample one bin per step but we have access to a cache which can store the location of one bin. Mitzenmacher, Prabhakar and Shah showed that in the lightly loaded case ($m = n$), the Memory process achieves a gap of $\mathcal{O}(\log \log n)$. Extending the setting of Mitzenmacher et al. in two ways, we first allow the number of balls $m$ to be arbitrary, which includes the challenging heavily loaded case where $m \geq n$. Secondly, we follow the heterogeneous bins model of Wieder [Wieder 2007], where the sampling distribution of bins can be biased up to some arbitrary multiplicative constant. Somewhat surprisingly, we prove that even in this setting, the Memory process still achieves an $\mathcal{O}(\log \log n)$ gap bound. This is in stark contrast with the Two-Choice (or any $d$-Choice with $d=\mathcal{O}(1)$) process, where it is known that the gap diverges as $m \rightarrow \infty$ [Wieder 2007]. Further, we show that for any sampling distribution independent of $m$ (but possibly dependent on $n$) the Memory process has a gap that can be bounded independently of $m$. Finally, we prove a tight gap bound of $\mathcal{O}(\log n)$ for Memory in another relaxed setting with heterogeneous (weighted) balls and a cache which can only be maintained for two steps.

cs.DM

Balanced Allocations with the Choice of Noise

We consider the allocation of $m$ balls (jobs) into $n$ bins (servers). In the standard Two-Choice process, at each step $t=1,2,\ldots,m$ we first sample two randomly chosen bins, compare their two loads and then place a ball in the least loaded bin. It is well-known that for any $m\geq n$, this results in a gap (difference between the maximum and average load) of $\log_2\log n+\Theta(1)$ (with high probability). In this work, we consider Two-Choice in different settings with noisy load comparisons. One key setting involves an adaptive adversary whose power is limited by some threshold $g\in\mathbb{N}$. In each step, such adversary can determine the result of any load comparison between two bins whose loads differ by at most $g$, while if the load difference is greater than $g$, the comparison is correct. For this adversarial setting, we first prove that for any $m \geq n$ the gap is $O(g+\log n)$ with high probability. Then through a refined analysis we prove that if $g\leq\log n$, then for any $m \geq n$ the gap is $O(\frac{g}{\log g}\cdot\log\log n)$. For constant values of $g$, this generalizes the heavily loaded analysis of [BCSV06, TW14] for the Two-Choice process, and establishes that asymptotically the same gap bound holds even if load comparisons among "similarly loaded" bins are wrong. Finally, we complement these upper bounds with tight lower bounds, which establish an interesting phase transition on how the parameter $g$ impacts the gap. The analysis also applies to settings with outdated and delayed information. For example, for the setting of [BCEFN12] where balls are allocated in consecutive batches of size $b=n$, we present an improved and tight gap bound of $\Theta(\frac{\log n}{\log\log n})$. This bound also extends for a range of values of $b$ and applies to a relaxed setting where the reported load of a bin can be any load value from the last $b$ steps.

cs.DM

The Power of Filling in Balanced Allocations

We introduce a new class of balanced allocation processes which are primarily characterized by ``filling'' underloaded bins. A prototypical example is the Packing process: At each round we only take one bin sample, if the load is below the average load, then we place as many balls until the average load is reached; otherwise, we place only one ball. We prove that for any process in this class the gap between the maximum and average load is $\mathcal{O}(\log n)$ w.h.p. for any number of balls $m\geq 1$. For the Packing process, we also provide a matching lower bound. Additionally, we prove that the Packing process is sample-efficient in the sense that the expected number of balls allocated per sample is strictly greater than one. Finally, we also demonstrate that the upper bound of $\mathcal{O}(\log n)$ on the gap can be extended to the Memory process studied by Mitzenmacher, Prabhakar and Shah (2002).

cs.DM

Balanced Allocations in Batches: Simplified and Generalized

We consider the allocation of $m$ balls (jobs) into $n$ bins (servers). In the Two-Choice process, for each of $m$ sequentially arriving balls, two randomly chosen bins are sampled and the ball is placed in the least loaded bin. It is well-known that the maximum load is $m/n+\log_2 \log n + O(1)$ w.h.p. Berenbrink, Czumaj, Englert, Friedetzky and Nagel (2012) introduced a parallel version of this process, where $m$ balls arrive in consecutive batches of size $b=n$ each. Balls within the same batch are allocated in parallel, using the load information of the bins at the beginning of the batch. They proved that the gap of this process is $O(\log n)$ with high probability. In this work, we present a new analysis of this setting, which is based on exponential potential functions. This allows us to both simplify and generalize the analysis of [BCE12] in different ways: $\quad 1.$ Our analysis covers a broad class of processes. This includes not only Two-Choice, but also processes with fewer bin samples like $(1+\beta)$, processes which can only receive one bit of information from each bin sample and graphical allocation, where bins correspond to vertices in a graph. $\quad 2.$ Balls may be of different weights, as long as their weights are independent samples from a distribution satisfying a technical condition on its moment generating function. $\quad 3.$ For arbitrary batch sizes $b \geq n$, we prove a gap of $O(b/n \cdot \log n)$. For any $b \in [n , n^3]$, we improve this to $O(b/n + \log n)$ and show that it is tight for a family of processes. This implies the unexpected result that for e.g. $(1+\beta)$ with constant $\beta \in (0, 1]$, the gap is $\Theta(\log n)$ for all $b \in [n,n \log n]$. We also conduct experiments which support our theoretical results, and even hint at a superiority of less powerful processes like $(1+\beta)$ for large batch sizes.

cs.DM

Tight Bounds for Repeated Balls-into-Bins

We study the repeated balls-into-bins process introduced by Becchetti, Clementi, Natale, Pasquale and Posta (2019). This process starts with $m$ balls arbitrarily distributed across $n$ bins. At each round $t=1,2,\ldots$, one ball is selected from each non-empty bin, and then placed it into a bin chosen independently and uniformly at random. We prove the following results: $\quad \bullet$ For any $n \leq m \leq \mathrm{poly}(n)$, we prove a lower bound of $\Omega(m/n \cdot \log n)$ on the maximum load. For the special case $m=n$, this matches the upper bound of $O(\log n)$, as shown in [BCNPP19]. It also provides a positive answer to the conjecture in [BCNPP19] that for $m=n$ the maximum load is $\omega(\log n/ \log \log n)$ at least once in a polynomially large time interval. For $m\in [\omega(n),n\log n]$, our new lower bound disproves the conjecture in [BCNPP19] that the maximum load remains $O(\log n)$. $\quad \bullet$ For any $n\leq m\leq\mathrm{poly}(n)$, we prove an upper bound of $O(m/n\cdot\log n)$ on the maximum load for all steps of a polynomially large time interval. This matches our lower bound up to multiplicative constants. $\quad \bullet$ For any $m\geq n$, our analysis also implies an $O(m^2/n)$ waiting time to reach a configuration with a $O(m/n\cdot\log m)$ maximum load, even for worst-case initial distributions. $\quad \bullet$ For any $m \geq n$, we show that every ball visits every bin in $O(m\log m)$ rounds. For $m = n$, this improves the previous upper bound of $O(n \log^2 n)$ in [BCNPP19]. We also prove that the upper bound is tight up to multiplicative constants for any $n \leq m \leq \mathrm{poly}(n)$.

cs.DM

Balanced Allocations: Caching and Packing, Twinning and Thinning

We consider the sequential allocation of $m$ balls (jobs) into $n$ bins (servers) by allowing each ball to choose from some bins sampled uniformly at random. The goal is to maintain a small gap between the maximum load and the average load. In this paper, we present a general framework that allows us to analyze various allocation processes that slightly prefer allocating into underloaded, as opposed to overloaded bins. Our analysis covers several natural instances of processes, including: The Caching process (a.k.a. memory protocol) as studied by Mitzenmacher, Prabhakar and Shah (2002): At each round we only take one bin sample, but we also have access to a cache in which the most recently used bin is stored. We place the ball into the least loaded of the two. The Packing process: At each round we only take one bin sample. If the load is below some threshold (e.g., the average load), then we place as many balls until the threshold is reached; otherwise, we place only one ball. The Twinning process: At each round, we only take one bin sample. If the load is below some threshold, then we place two balls; otherwise, we place only one ball. The Thinning process as recently studied by Feldheim and Gurel-Gurevich (2021): At each round, we first take one bin sample. If its load is below some threshold, we place one ball; otherwise, we place one ball into a $\textit{second}$ bin sample. As we demonstrate, our general framework implies for all these processes a gap of $\mathcal{O}(\log n)$ between the maximum load and average load, even when an arbitrary number of balls $m \geq n$ are allocated (heavily loaded case). Our analysis is inspired by a previous work of Peres, Talwar and Wieder (2010) for the $(1+\beta)$-process, however here we rely on the interplay between different potential functions to prove stabilization.

cs.DM

Balanced Allocations with Incomplete Information: The Power of Two Queries

We consider the allocation of $m$ balls into $n$ bins with incomplete information. In the classical Two-Choice process a ball first queries the load of two randomly chosen bins and is then placed in the least loaded bin. In our setting, each ball also samples two random bins but can only estimate a bin's load by sending binary queries of the form "Is the load at least the median?" or "Is the load at least 100?". For the lightly loaded case $m=O(n)$, Feldheim and Gurel-Gurevich (2021) showed that with one query it is possible to achieve a maximum load of $O(\sqrt{\log n/\log \log n})$, and posed the question whether a maximum load of $m/n+O(\sqrt{\log n/\log \log n})$ is possible for any $m = \Omega(n)$. In this work, we resolve this open problem by proving a lower bound of $m/n+\Omega( \sqrt{\log n})$ for a fixed $m=\Theta(n \sqrt{\log n})$, and a lower bound of $m/n+\Omega(\log n/\log \log n)$ for some $m$ depending on the used strategy. We complement this negative result by proving a positive result for multiple queries. In particular, we show that with only two binary queries per chosen bin, there is an oblivious strategy which ensures a maximum load of $m/n+O(\sqrt{\log n})$ for any $m \geq 1$. Further, for any number of $k = O(\log \log n)$ binary queries, the upper bound on the maximum load improves to $m/n + O(k(\log n)^{1/k})$ for any $m \geq 1$. Further, this result for $k$ queries implies (i) new bounds for the $(1+\beta)$-process introduced by Peres et al (2015), (ii) new bounds for the graphical balanced allocation process on dense expander graphs, and (iii) the bound of $m/n+O(\log \log n)$ on the maximum load achieved by the Two-Choice process, including the heavily loaded case $m=\Omega(n)$ derived by Berenbrink et al. (2006). One novel aspect of our proofs is the use of multiple super-exponential potential functions, which might be of use in future work.

cs.DM