New Protocols for Asymmetric Communication Channels - CiteSeerX

5 downloads 0 Views 99KB Size Report
Most satellite Internet connections offer down- load speeds on the order of megabits per second, but rely on a conventional tele- phone modem for uploads with ...
New Protocols for Asymmetric Communication Channels J OHN WATKINSON Modelwire Inc., USA

M ICAH A DLER Department of Computer Science, University of Massachusetts, USA FAITH E. F ICH Department of Computer Science, University of Toronto, Canada

Abstract In this paper, we study the problem of sending an n-bit binary string drawn from a probability distribution D across a communication channel connecting a client and a server, where the bandwidth from the client to the server is much smaller than the bandwidth from the server to the client. We assume that the client knows the string x but not the distribution D, and the server knows the distribution D, but not the string x. Adler and Maggs demonstrated protocols for this problem where the expected number of bits sent by the client is O(H (D)), and the expected number of bits sent by the server is O(n). Here, H (D) is the binary entropy of the distribution and a lower bound on the expected number of bits that the client must send. In this paper, a new protocol is presented in which the expected number of bits sent by the client is H (D) + 2, and the expected number of bits sent by the server is n(H (D) + 2). This protocol is then generalized so as to reduce the number of rounds of communication at the expense of computation and bits sent by the server.

1 Introduction Recently, many networking technologies have been introduced that are asymmetric in terms of the bandwidth offered in the two directions of transmission. For example, many high-speed home Internet connectivity packages such as cable modems and asymmetric digital subscriber lines (ADSL) have much faster download speeds than upload speeds. Most satellite Internet connections offer download speeds on the order of megabits per second, but rely on a conventional telephone modem for uploads with speeds on the order of 10 kilobits per second. 1

2

Proceedings of SIROCCO 2001

These new networking technologies lead to the following question: what is the best way to use the high bandwidth direction of an asymmetric communication channel to improve the performance of the low bandwidth direction? This question was first addressed in [1]. That work assumes that two parties, called the client and the server, are connected by a channel with much higher bandwidth from the server to the client than from the client to the server. They present a number of protocols that use the high-speed link to reduce the number of bits that the client must send on the slower link. Specifically, in many situations, the client is able to inform the server of an n-bit string x by sending significantly fewer than n bits. The protocols from [1] are within a constant factor of optimal in terms of the number of bits sent by the client, as well as the total number of bits sent by both parties. In this paper, we address the following question: How small can we make the number of bits sent by the client, without significantly increasing the total number of bits sent? We introduce two protocols that address this question. The first is Bit-Efficient-Split, a protocol where the number of bits sent by the client is within a small additive constant of the optimal. However, the number of bits sent by the server is increased and the client only sends one bit per round of communication. The second protocol, Round-Efficient-Split, is a generalization of Bit-Efficient-Split. It reduces the number of rounds of communication at the expense of server computation and the number of bits sent by the server.

1.1 Communication Model The asymmetric communication model proposed by Adler and Maggs in [1] is used in this paper. The model consists of a client and a server connected by a communication link. The bandwidth from the server to the client is greater than the bandwidth from the client to the server. The client holds a string x drawn from a probability distribution D on the set of all n-bit strings. The string x is unknown to the server and the distribution D is unknown to the client. The client must inform the server of the string x. The computational effort on the part of the server is modelled by restricting how the server can access the distribution and counting the number of accesses the server performs. Specifically, an access to the distribution is a black box query. It consists of a binary string t of length m  n. The result of the query is the total probability of all n-bit strings that have t as a prefix. A round of communication consists of the server sending some non-zero number of bits to the client, followed by the client sending some non-zero number of bits back to the server. In this model, the performance of a protocol is characterized by the tuple [σ; φ; λ; ρ], where σ is the expected number of bits sent by the server, φ is the expected number of bits sent by the client, λ is the expected number of black box queries performed by the server, and ρ is the expected number of rounds of

3 communication. All expectations are with respect to the random variable x chosen from D. In all the protocols presented, the client’s computational effort is minimal, and so is ignored.

1.2 Previous Work and Results Given a distribution D over n-bit strings, the entropy of D is H (D) =

1

∑ D(x) log2 D(x)

x2D

;

where x 2 D means that D(x) > 0. Shannon’s well-known Coding Theorem [5] states that even if the client is aware of the distribution D, the expected number of bits sent by the client must be at least H (D). Thus, when the client is unaware of the distribution, the expected number of bits sent by the client must still be at least H (D). In [1], Adler and Maggs study the communication model in detail and demonstrate some lower bounds on the number of client bits, the number of server bits, server computation and the number of rounds. They also present three protocols. The first is Computation-Efficient. Their analysis demonstrates that this protocol has performance characteristics [3n; 1:71H (D) + 1; 3n; 1:71H (D) + 1], and this analysis has been improved to [3n; 1:089H (D) + 1; 3n; 1:089H (D) + 1] by [3]. The second is Round-Efficient, a constant-round protocol that requires considerable computation on the part of the server. Their original analysis gives performance characteristics [O(n); O(H (D) + 1); 2n ; 6], which has been improved to [O(n); 2H (D) + O(1); 2n ; 3] in [6]. Adler and Maggs also present a hybrid of these two protocols, Computation-Rounds-Tradeoff(c), with performance characterc istics [O(n); O(H (D) + 1); O( n2c ); O(min( nc ; H (D) + 1))], for any positive integer c  n. For all these protocols, the expected number of bits sent by the client is within a multiplicative factor of optimal. We also mention that [4] provides a different technique such that the expected number of client bits is only 1:47H (D). However, this result has been subsumed by the improved analysis of [3] on the protocols of [1]. The two communication protocols presented in this paper improve the expected number of bits sent by the client to be within an additive constant of optimal. In Section 2.2, we present Bit-Efficient-Split, a protocol with performance characteristics [n(H (D) + 2); H (D) + 2; n(H (D) + 3); H (D) + 2]. In Section 2.3, we present Round-Efficient-Split, a generalization of Bit-Efficient-Split, with performance characteristics [O(2k nH (D)); H (D) + 2; O(2k nH (D)); H (Dk)+1 + 2℄.

Proceedings of SIROCCO 2001

4



s

F 0 (110) F (110)

1

F 0 (111) sF (111)

F 0 (101)

F 0 (011) = F (011)

s

s

F (101)

F 0 (100) s

F (100)

F 0 (010)

s

s

F 0 (000) F (000)

s

F 0 (001)

F (010)

F (001)

0 Figure 1: The functions F and F 0 .

2 The Protocols Consider the lexicographic ordering of binary strings, where x < y if x is a prefix of y or if z0 is a prefix of x and z1 is a prefix of y, for some string z. Then x  y if and only if x < y or x = y. The protocols work by having the server send carefully chosen strings to the client, who indicates whether they are lexicographically greater than the client’s string x. We begin, in Section 2.1, by defining these strings and describing how to find them. The algorithms Bit-Efficient-Split and Round-Efficient-Split are presented in the following two sections.

2.1 Split Strings Let F (x) = ∑fD(y)jy is an n-bit string and y < xg denote the cumulative distribution function for a distribution D over n-bit strings. Note that D(x) is not included in this sum. Plotting F (x) versus x yields a rising staircase of steps of varying

5 height. The step corresponding to x has height D(x). Let F 0 (x) = F (x) + 12 D(x). This value is called a split point for D. The functions F and F 0 , for a particular distribution over 3-bit strings, are illustrated in Figure 1. Given a real number v 2 (0; 1℄, let t be the lexicographically greatest n-bit string such that F 0 (t )  v. We call t the v-split string for D. Note that, if F 0 (0n ) > v, then there is no v-split string. One way to find the v-split string for D is to first find the string z , defined to be the lexicographically greatest string such that F (z )  v. This can be done by using the results of black box queries to effectively perform binary search. Then the v-split string is either z or its predecessor. Specifically, if F 0 (z )  v, then z is the v-split string. Otherwise, the predecessor y of z , if it exists, is the v-split string, since F 0 (y) = F (y) + 12 D(y)  F (y) + D(y) = F (z )  v. See Figure 2 for examples of split strings. An algorithm, Split-String, that finds the v-split string as just described, is provided below. For this description, we extend the definition of the distribution D to strings y0 of length less than n as D(y0 ) = ∑fD(y)jy0 is a prefix of the n-bit string yg: Algorithm Split-String 1. Initialize z to the empty string and real numbers p and r to 0 and 1, respectively. 2. While the length of z is less than n:

   3. Let s

Let q = D(z0). If p + q > v then append 0 to z and r Otherwise, append 1 to z and p (r + p)=2.

p + q.

p + q.

This is equal to F 0 (z ).

4. If s  v then output z. 5. Otherwise s > v. Two cases remain:

 

If z = 0n , then indicate that there is no v-split string and terminate. Otherwise, output the predecessor of z.

There are three loop invariants: p = ∑fD(y)jy is an n-bit string and y < zg, r = ∑fD(y)jy is an n-bit string and y  z1n jzj g, and z is a prefix of z . Thus, when the loop terminates, z = z , p = F (z ), r p = D(z ), and s = (r + p)=2 = F (z ) + 1  0  2 D(z ) = F (z ). Each iteration of the loop, one black box query is performed, for a total of n black box queries. The proof of correctness follows.

Proceedings of SIROCCO 2001

6



v

F 0 (z ) F 0 (z )

v



s

F (z )

F 0 (y)

s

s

F (z )

F 0 (y )

s

F (y )

F (y)

(a)

(b)

Figure 2: Examples of split strings. In (a), z is the v-split string. In (b), the predecessor, y, of z is the v-split string.

2.2 Bit-Efficient-Split In this protocol, the server performs binary search for the client’s string x by sending split strings to the client. The client responds with 0 if its string is less than or equal to the split string, and 1 if its string is greater than the split string. The server maintains two n-bit strings y and z such that y  x  z and two nonnegative numbers u < v such that F 0 (x0 ) 2 (u; v℄ if and only if y  x0  z. The complete algorithm Bit-Efficient-Split appears below. During each iteration of the loop, the server determines the w-split string, for w = (u + v)=2. Suppose that, in some iteration of the loop, a w-split string did not exist. Then F 0 (0n ) > w. Since F 0 (0n 1 1)  D(0n ) = 2F 0 (0n ) > 2w  v and F 0 (z)  v, it follows that z = 0n . Hence y = z and the iteration would not have occurred. Therefore, in each iteration, a w-split string t exists. Moreover, since F 0 (t )  w  v, and F 0 (x0 )  v implies that x0  z, we know that t  z. Since t is the w-split string, F 0 (x0 )  w if and only if x0  t. If x  t, then the client sends 0 to the server, who updates u to w and z to t. Otherwise, t < x and the client sends 1 to the server. In this case, the server updates u to w and y to be the successor of t, so y  x. Furthermore, F 0 (x0 ) > w if and only if x0  y. Thus, in both cases, the invariants remain true.

7 Algorithm Bit-Efficient-Split 1. The server initializes u to 0, v to 1, and z to 1n . 2. If D(0n ) = 0, the server computes the 0-split string t0 and initializes y to the successor of t0 ; 3. otherwise, the server initializes y to 0n . 4. While y 6= z do:

  

Let w = client.

u+v 2 .

The server computes the w-split string t. It sends t to the

If x  t, then the client sends 0 to the server. Otherwise, the client sends 1. If the server receives 0, then v y the successor of t.

w and z

t. Otherwise, u

w and

5. The server outputs z.

Theorem 1 For any distribution D, Bit-Efficient-Split has performance characteristics [n(H (D) + 2); H (D) + 2; n(H (D) + 3); H (D) + 2]. Proof. We begin by deriving an upper bound on the number of rounds performed by the protocol as a function of D(x), where x is the client’s string. Note that D(x) > 0. Let m = dlog2 D(1x) e + 1 and suppose that the protocol performs at least m rounds. Let um and vm denote the values of u and v, respectively, at the end of round m. The interval (um ; vm ℄ has length 2 m , since the interval (u; v℄ initially has length 1 and decreases by half each iteration. By the loop invariants, the interval (um ; vm ℄ contains F 0 (x). Since D(x)  21 m and F 0 (x) is the midpoint of the interval (F (x); F (x) + D(x)℄, this interval must entirely contain (um ; vm ℄. Thus, y = z = x at the end of the round and the protocol terminates. Hence, the number of rounds is at most m + 1 = dlog2 D(1x) e + 1  log2 D(1x) + 2 and the expected number of rounds is at most:



∑ D(x) log2

x2D

= =

1 +2 D (x )

1 ∑ D(x) log2 D(x) x2D H (D ) + 2 :



!

+2

8

Proceedings of SIROCCO 2001

Since the client sends one bit each round, the above bound also applies to the expected number of bits sent by the client. Each round, the server sends an n-bit string to the client, so it follows that the expected number of bits that the server sends is n(H (D) + 2). Split String uses at most n black box queries to find a split string. Since at most H (D) + 3 split strings are required (one before the main loop of the protocol and H (D) + 2 during the main loop), the expected number of black box queries is at most n(H (D) + 3). 2 Notice that the server could compute a split string that has been sent to the client during an earlier round of the protocol. This corresponds to the situation where the interval (u; w℄ does not contain any split points. A more efficient implementation of the protocol would skip such rounds. This protocol performs an “interactive” version of Shannon-Fano-Elias coding of x (as discussed in [2]). The string formed by the concatenation of the bits sent by the client is the Shannon-Fano-Elias codeword for x.

2.3 Protocol Round-Efficient-Split(k) In the protocol Bit-Efficient-Split, the server maintains a subinterval of [0,1] that contains F 0 (x). Each round, one half of the interval is removed depending on the bit received by the client. While this is very efficient with respect to the number of bits sent by the client, the client is only sending one bit during each round. Typically, there is latency introduced with each round-trip between the server and the client, so conducting as few rounds as possible is desirable. A simple modification to Bit-Efficient-Split is to have the server subdivide its interval into 2k equal size subintervals and to send to the client, for each subinterval (u; v℄, the split string for the subinterval, i.e. the v-split string. The client can then simulate k rounds of the Bit-Efficient-Split protocol, with the k single-bit responses sent back to the server in a single batch. The server is required to send 2k split strings each round with this protocol. Although large, this may be a viable trade-off to reduce the number of rounds by approximately a factor of k. A difficulty with this method is that the total number of bits sent by the client must be a multiple of k. This may introduce an additive constant of k to the number of bits sent by the client. The additional bits sent by the client occur when the client’s string has large probability relative to the subinterval under consideration by the server during the last round of the protocol. As a result, the server may send several copies of the string to the client, to which the client replies several times. Alternatively, the client could send back the number of split strings (among the 2k that were sent) that are lexicographically greater than or equal to x. This also uses k bits each round. To limit the total number of bits sent by the client to H (D) + 2, RoundEfficient-Split(k) requires some additional ideas.

9

F (z) + D(z)

F 0 (z)

6 F (y) + D(y)

s

F (z)

I3

6 I3

?6 F 0 (y)

I2

F (y)

I1

? (a)

F 0 (z)

?6 F (y) + D(y)

I2

? 6 s

F (z) + D(z)

? 6

s

F (z)

F 0 (y )

I1

?

s

F (y )

(b)

Figure 3: In (a), y is a span string for I2 and a split string for I3 . In (b), y is a split string for both I1 and I2 and z is a span string for I3 . A string s is a span string for an interval I if the interval (F (s); F (s) + D(s)℄ contains I. Furthermore, if F (x) 2 I, then x = s. In our algorithm, the server determines a representative string for each of the 2k subintervals of the current interval. The representative string is either the span string for the interval, if it exists, or the split string for the interval. Note that, if an interval (u; v℄ has no split string, then F 0 (0n ) > v. This implies that 0n is a span string for the interval (u; v℄, since F (0n ) = 0  u. During a round of the protocol, the server sends all these strings to the client, and indicates, for each, whether it is a span string or a split string. If the client’s string x is one of the span strings, the client indicates which one. Otherwise, the client indicates the least split string that is greater than x and further rounds ensue.

Proceedings of SIROCCO 2001

10

The representative string for each interval (u; v℄ can be computed using a slight variant of the Split String algorithm. Since p = F (z) and r = F (z) + D(z), it suffices to insert the following line between parts 2 and 3: 2.5 If p  u and r  v, then indicate that z is the span string for the interval (u; v℄ and terminate. Note that a string can be the representative string for more than one interval. However, if it is the representative string for more than two intervals, then it must span all except possibly the first and last of those intervals. Hence, it can be a split string for at most two intervals. Figure 3 shows examples of these cases. The second idea is for the client to respond with shorter codewords for likely strings and longer codewords for less likely strings. However, the client does not have direct access to the distribution D. Instead, each round, the server will send a good encoding of the strings, in addition to the strings themselves. The encoding we use is based on the number of intervals each representative string spans. For a binary string t, let 0:t be the real number in [0; 1) whose digits after the decimal place are the bits of t. The following protocol considers intervals of the form (0:t ; 0:t + 2 j ℄, where j is the length of the string t. The server maintains such an interval containing F 0 (x) and, each iteration, the interval is shrunk until it is contained in (F (x); F (x) + D(x)℄. Consider an execution of the above protocol in which m rounds occur. Let t0 and j0 denote the initial values of t and j. Let ti and ji denote the values of t and j, respectively, at the end of the ith round. Let ui = 0:ti and vi = 0:ti + 2 ji . Theorem 2 Round-Efficient-Split has performance characteristics [O(2k nH (D)), H (D) + 2; O(2k nH (D)); H (Dk)+1 + 2℄. Proof. Assume the client holds string x and let i = dlog2 D1(x) e. The rounds of the protocol consist of some number of split rounds, in which the server receives codewords for split strings, followed by a final span round where the server receives a codeword for a span string. At the end of each split round, the server reduces the current subinterval by a factor of 2k . If m = d i+k 1 e split rounds occur, then (um ; vm ℄ has length at most 2 (i+1). Since D(x)  2 i and F 0 (x) 2 (um ; vm ℄, if follows that (um ; vm ℄ lies completely within the interval (F (x); F (x) + D(x)℄. Thus, there is a span string for this interval. In the next round, the client sends the corresponding codeword to the server, and the server learns the string. Thus, the protocol performs at most d i+k 1 e + 1 rounds. It follows that the expected number of rounds is:

∑ D(x)

x2D

&

dlog2 D1x e + 1 ' ! ( )

k

+1

 ∑ D (x )

log2 D(1x) + 1

x2D

=

H (D ) + 1 + 2: k

k

!

+2

11

Algorithm Round-Efficient-Split(k) 1. Initialize t to be the empty string. Let j be the length of t, which is initially zero. 2. Repeat the following until there is only one string z such that F 0 (z) (0:t ; 0:t + 2 j ℄:



   

2

Let a1 ; : : : ; a2k be the 2k distinct binary strings of length k. The server finds the representative strings for the intervals (0:tai ; 0:tai + 2 j k ℄, i = 1; : : : ; 2k . Each span string y is assigned a weight, which is the number of these intervals for which y is a span string. Each split string is assigned weight 1. The server then generates a Shannon code [5] for the set of representative strings, based on the weights of these strings. If a string is both a span string and a split string, two separate codewords are generated; otherwise, only one codeword is generated for that string. First the set of span strings are sent to the client, in lexicographic order, each with its respective codeword. These are followed by the split strings, in lexicographical order, with their respective codewords. If the client’s string x is one of the span strings, then the corresponding codeword is sent back to the server. Otherwise, among the split strings it has received, the client finds the lexicographically least string y such that x  y. It sends back the codeword for y. The server does one of the following, depending on the codeword it receives from the client: – If the server receives the codeword for a span string, then it outputs the string and terminates. – Otherwise, the server receives the codeword for a split string, y. Let al be the lexicographically least string such that y is not a span string for (0:tal ; 0:tal + 2 j k ℄ and y is a (0:tal + 2 j k )split string. The server appends al to t and increments j by k, so that j is the new length of t.

3. The server outputs z.

Proceedings of SIROCCO 2001

12

F (x) + D(x)

6

interval almost spanned

q q q

F 0 (x)

2k

e+1

1 intervals

q q q

s

? F (x)

interval almost spanned

Figure 4: The largest possible interval (F (x); F (x) + D(x)℄ for a span string x whose codeword has length e. Next, consider the number of bits sent by the client. Each round, the server sends a Shannon code to the client based on the weights of the different representative strings. Recall that each weight is a positive integer and the sum of these weights is at most 2k . It follows that no codeword has length greater than k. If at most m rounds occur, the client sends at most km bits. Otherwise, there are m split rounds, during which the clients sends a total of at most km bits, followed by a final span round, in which the client sends the codeword for x. Let e be the length of this codeword. Since a string of weight at least 2k e+1 has length at most e 1, the string x has weight at most 2k e+1 1 and, hence, spans at most 2k e+1 1 intervals. However, x can come arbitrarily close to spanning 2 k e+1 + 1 subintervals, since it can nearly span the subintervals on either end. (See Figure 4.) Each subinterval has length 2 k(m+1) . Therefore, D(x) < (2k

e+1

+ 1 )2

k(m+1)