• Tidak ada hasil yang ditemukan

5.4 Algorithm I

5.4.3 Node Degree

It is natural to think that when a node u uses Algorithm I to determine its coverage radiusr,udoes it in the following way: ufirstly letsr = 0; thenugradually increases r, and as a result, u covers (connects itself to) more and more neighbors; when r reaches a particular value — let’s call it r0, — one more new neighbor is covered and suddenly all u’s cone angles become smaller than π, and u knows that its coverage radius should be equal to r0.

For the ease of analysis, let’s do a little imagination: let’s imagine that node u keeps increasing r for ever — even after r has exceeded r0. (uwill always remember that r0 is what its coverage radius should be, though. So such an imagination won’t hurt our analysis.)

Let’s now understand the above process in another way. Let’s imagine there is a circle centered at u whose circumference has length 1, which we shall call the ‘Unit Circle’. We denote the neighbors of u by v0, v1, v2 · · ·, where d(u, v0) < d(u, v1) <

d(u, v2) < · · ·. (In this chapter we always only consider the nodes to be in general positions, because in the probabilistic analysis, the probability that several nodes are not in general positions equals 0. Please keep this in mind also for analysis elsewhere.) For eachvi, the ray starting atu and going throughvi intersects the Unit Circle, and we denote the intersection point by wi. (See Fig. 5.3 for an example.) We assign a coordinate to each point on the Unit Circle in the following way: for point p, its coordinate equals the distance one needs to cover when one moves from w0 to p clockwise on the Unit Circle. (So the coordinate is in the range [0,1).)

When u is increasing its coverage radiusr to cover more neighbors, every time a new neighbor — say it’svi — is covered, vi can be anywhere on the circle of radius r with the same probability; so wi’s coordinate has a uniform distribution in the range [0,1). We would like to think that the pointsw0,w1, w2 · · · cut the Unit Circle into pieces. (For example, in Fig. 5.3, when u has 4 neighbors, the Unit Circle is cut into 4 pieces, whose endpoints are respectively w0 and w1,w1 and w3, w3 and w2,w2 and w0.) Clearly, all u’s cone angles are smaller than π if and only if all the pieces

v0

v1 v2 v3

w0 w1

w2 w3

r

u Unit Circle

Figure 5.3: Projecting u’s neighbors onto the Unit Circle.

of the Unit Circle have lengths smaller than 0.5.

Theorem 5.1 Let Z denote the degree of a node in a network constructed using Algorithm I. Then P r{Z ≤n}= 12n−1n for n= 1,2,3,· · ·; and P r{Z =n}= 2n−2n−1

for n= 2,3,4,· · ·.

Proof: We consider the nodeuin the previous discussion, and letZbe its degree. The probability that ‘Z ≤n’ equals the probability of the following event — “n uniformly distributed points w0, w1, · · ·, wn−1 on the Unit Circle cut the Unit Circle into n pieces whose lengths are all smaller than 0.5”, which then equals the probability of this event — “among those n uniformly distributed points w0, w1, · · ·, wn−1, there exist two pointswiandwj (1≤i6=j ≤n−1) such that the following three conditions are satisfied: (i) wi’s coordinate x is in the range (0,0.5), (ii) wj’s coordinate y is in the range (0.5, x+ 0.5), (iii) for each of the n−3 points excludingw0,wi and wj, its coordinate is either in the range (0, x) or in the range (y,1).”

There are (n−1)(n−2) ways to select the two points xi and xj. The probability that ‘a pointwk (k 6= 0, i, j) is in the range (0, x) or (y,1)’ equals (x−0) + (1−y) = 1 +x−y. So P r{Z n} =R 1

2

0

Rx+1

2 1

2 (n−1)(n−2)(1 +x−y)n−3dydx = 1 2n−1n . (Here n 3.) The rest of the proof is straightforward. 2

Next we compute the expectation and variance of the node degree and show that they are small. In principle they can, certainly, be computed by using the distribution of node degree derived in Theorem 5.1. However we present here an

alternative solution for the following reasons: the solution is intriguing and makes the degree’s expectation and variance significantly easier to compute; it provides a more ‘combinatorial’ analysis that can be extended for many generalized forms of Algorithm I.

Theorem 5.2 Let Z denote the degree of a node in a network constructed using Algorithm I. Then E(Z) = 5, V ar(Z) = 4.

Proof: Let’s once more consider the generic node u in the previous analysis, and let Z be its degree. Assume at some moment, the Unit Circle is cut into n pieces by n points — w0, w1, · · ·, wn−1. For i = 1,· · ·, n 1, let’s use Ci to denote the coordinate of wi; and we write Ci in the binary form: Ci = (0.ci1ci2ci3· · ·)2. (For example, if Ci = 0.75, then its binary form is Ci = (0.ci1ci2ci3· · ·)2 = (0.110· · ·)2.) Let’s re-order C1, C2, · · ·, Cn−1 according to this rule: “Ci is placed in front of Cj if (0.0ci2ci3· · ·)2 < (0.0cj2cj3· · ·)2.” Let’s call those re-ordered numbers D1, D2, · · ·, Dn−1. (For example, if n= 4and C1 = (0.010· · ·)2,C2 = (0.111· · ·)2,C3= (0.101· · ·)2, then we re-order them as: D1= (0.101· · ·)2,D2= (0.010· · ·)2,D3= (0.111· · ·)2.)

Fori= 1,2,· · · , n−1, we denote the binary form of Di by (0.di1di2di3· · ·)2. Now let’s observe the following sequence of bits: d11, d21, · · ·, d(n−1)1. It’s not difficult to realize that “the n points — w0, w1, · · ·, wn−1 — cut the Unit Circle into n pieces all shorter than 0.5” if and only if “in the sequence of bits — d11,d21,· · ·, d(n−1)1 — there is a 0 that appears behind a 1”. We can also see that even if the permutation (re-ordering) from ‘C1, C2, · · ·, Cn−1’ to ‘D1, D2, · · ·, Dn−1’ is fixed, ‘d11, d21, · · ·, d(n−1)1’ are still n−1 i.i.d. random variables with the equal probability to be 0 or 1 (because the permutation has nothing to do with the sequence ‘d11,d21,· · ·,d(n−1)1’).

We define the following game: “we throw a fair coin at discrete times 1, 2, 3· · ·; if at timei, the coin shows side 1 (or, ‘HEADS’)for the first time, then we letx=i; if at timej (j > i), the coin shows side 0 (or, ‘TAILS’)for the first time after time i, then we lety=j−i.” From the analysis, we can see thatP r{Z ≤n}=P r{x+y≤n−1}.

So for any m, P r{Z = m} = P r{x+y+ 1 = m}. So E(Z) = E(x+y+ 1) and V ar(Z) = V ar(x+y+ 1). x and y both have the geometric distribution and they

are clearly independent. So E(x) = E(y) = V ar(x) = V ar(y) = 1/(12) = 2. So E(Z) = E(x) +E(y) + 1 = 5 and V ar(Z) =V ar(x) +V ar(y) = 4. 2