DeepAI
Log In Sign Up

Resolving Conflicts and Electing Leaders

We review distributed algorithms for transmitting data (n real numbers) under a broadcast communication model, as well as for maximum finding and for sorting. Our interest is in the basics of recursive formulas and corresponding asymptotics as n→∞. The emphasis is on concrete examples rather than general theory.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

12/29/2017

Sorting Real Numbers in O(n√( n)) Time and Linear Space

We present an O(n√( n)) time and linear space algorithm for sorting real...
02/07/2020

Recursive PGFs for BSTs and DSTs

We review fundamentals underlying binary search trees and digital search...
06/12/2019

Broadcasts on Paths and Cycles

A broadcast on a graph G=(V,E) is a function f: V⟶{0,...,diam(G)} such t...
07/04/2018

A complete system of deduction for Sigma formulas

The Sigma formulas of the language of arithmetic express semidecidable r...
01/23/2020

Communication-Efficient String Sorting

There has been surprisingly little work on algorithms for sorting string...
09/05/2018

Data Lakes, Clouds and Commons: A Review of Platforms for Analyzing and Sharing Genomic Data

We review software platforms for managing, analyzing and sharing biomedi...
04/26/2019

Countably Infinite Multilevel Source Polarization for Non-Stationary Erasure Distributions

Polar transforms are central operations in the study of polar codes. Thi...

1 Conflict Resolutions

Consider the R program:

where the integer is initially , the list is initially for simplicity’s sake, and is the built-in R unbiased random Bernoulli generator.  Figure 1 exhibits a sample binary tree for .  The first round of coin tosses yields , where and , and thus , .  On the left side, focusing on only, the next round of tosses yields and thus , .  On the right side, focusing on only, the next round of tosses yields and thus , .  Also, focusing on only, the next round of tosses yields and thus , .  Termination occurs at the next level: any twig of the tree ceases to grow when its leaf contains items.  The number of vertices (including empty vertices) is .  We write .  The labeled ordering of vertices is determined by watching increase, from to , as the algorithm progresses.  Smaller values of occur on the left side because recursive splitting starts with , , … and thereafter continues with , , , ….

Figure 1: Strongly binary tree for conflict resolution.

The probability generating function for

, given , is likewise recursive [3]:

Note that always.  Differentiating with respect to :

we have first moment

that is,

where and .  Clearly and .  Differentiating again:

we have second factorial moment

that is,

where and .  Clearly and

.  Finally, we have variance

which is when and when .

Such recursions are helpful for small , but give no asymptotic information as .  It can be proved that [4, 5]

where is a periodic function of period with tiny amplitude and zero mean, for , .  Functions like these appear throughout the analysis of algorithms.  We shall not specify these here nor later, but merely indicate their presence when required.  An infinite series representation of the mean for arbitrary is [6, 7]

Also, the constant (one-quarter of the variance as ) appears in [8, 9, 10].

2 Leader Elections

Two parameters are examined in this section: height (length of the root-to-leaf path that gives the leader) and size (number of vertices in the associated weakly binary tree).  We further discuss a variation of the election in which draws (involving exactly two competitors) constitute an additional way to stop the process.

2.1 Height

Consider the R program:

where the integer is initially (unlike before) and the list is initially .  Figure 2 exhibits a sample binary tree for .  The first round of coin tosses yields , where and , and thus , .  Focusing on only, the next round of tosses yields and thus , .  Note that we do not indicate nor count the empty vertex. Focusing on only, the next round of tosses yields and thus , .  Focusing on only, the next round of tosses yields and thus , .  Focusing on only, the next round of tosses yields and thus , .  Termination occurs at the next level: the leftmost twig of the tree contains exactly item.  The height (number of steps separating the vertices labeled and ) is . We write .

Figure 2: Weakly binary tree for leader election of height 6.

The probability generating function for , given , is [11]:

Note that always.  Differentiating with respect to :

we have first moment

that is,

where and .  Clearly and .  Differentiating again:

we have second factorial moment

that is,

where and .  Clearly and .  Finally, we have variance which is when and when .

It can be proved that [12, 13, 14]

as , where is the first Stieltjes constant [15] and fluctuations provided by are symmetrical not about , but instead about [16]

Needless to say, the evaluation of is an impressive and difficult achievement.

2.2 Size

Consider the R program:

where the integer is initially and the list is initially .  Figure 3 is almost identical to Figure 2 – it contains the same binary tree for – but the labeling is different.  The number of vertices (excluding empty vertices) is .  We write .  The labeled ordering of vertices is determined by watching increase, from to , as the algorithm progresses.  We sweep across the tree horizontally (in rows) rather than hierarchically.  In particular, the command

increases by if both vertices are non-empty and by only if otherwise.

Figure 3: Weakly binary tree for leader election of size 11.

The probability generating function for , given , is [11]:

Note that always.  Differentiating with respect to :

we have first moment

that is,

where and , .  Clearly and .  Differentiating again:

we have second factorial moment

that is,

where and .  Clearly and .  Finally, we have variance which is when and when .

It can be proved that [11]

as , but a comparable asymptotic expression for remains unknown.

We wonder about the cross-covariance of and , whose calculation would require a bivariate generating function.

2.3 Draws

Let us alter the rules so that a draw between two persons is allowed (if precisely two persons are left, then they both are declared leaders).  The third line of the two preceding R programs is simply replaced by

and the initial conditions of the two preceding recurrences are also changed.  For height, we now have (implying and (implying ); thus

For size, we now have , (implying and (implying ); thus

It would seem that the fraction given within the formula for in [11] is incorrect and should be instead.

3 Coin Tosses

Before moving on to more complicated examples, it may be worthwhile to contemplate the most elementary recursive program imaginable:

mentioned at the end of [17], where is initially .  Note that the third line here is

unlike what we have seen before.  People iteratively toss all coins which show tails until only heads are visible. Omitting details, it follows that the procedural height has generating function

therefore

where (implying , , and (implying , , ).  From this [18]

as .

4 Finding the Maximum

Consider the R program:

where the integer is initially and the list is initially .  We find a comparison of a conflict resolution tree in Figure 4 and its corresponding maximum-finding tree in Figure 5 to be helpful.  Note that the vertex count for the latter is only , which is less than the vertex count of determined for the former.  The discrepancy arises because, at the instant the vertex becomes the leader and consequently increases from to , both the vertex becomes empty and the & vertices are reduced to .  It follows that the vertex is reduced to , which cannot have any descendants, eliminating two twigs.  Also, increases from to and, subsequently, from to ; while the penultimate vertex becomes empty, this does not further alter the count.  We write .

Figure 4: Conflict resolution tree (to be compared with next figure).
Figure 5: Maximum-finding tree (to be compared with previous figure).

The probability generating function for , given , is [19, 20, 21, 22]:

Note that always.  When differentiating with respect to :

we make use of the identity

From this follows the first moment:

setting , hence and when .  That is,