Random Distances Associated with Hexagons

3 downloads 0 Views 311KB Size Report
Jun 11, 2011 - with regular hexagons are given, when the two endpoints of a link are .... [Random distances within a unit hexagon] The probability density ...
1

Random Distances Associated with Hexagons Yanyan Zhuang and Jianping Pan

arXiv:1106.2200v1 [math.PR] 11 Jun 2011

University of Victoria, Victoria, BC, Canada

Abstract In this report, the explicit probability density functions of the random Euclidean distances associated with regular hexagons are given, when the two endpoints of a link are randomly distributed in the same hexagon, and two adjacent hexagons sharing a side, respectively. Simulation results show the accuracy of the obtained closed-form distance distribution functions, which are important in a wide variety of applied sciences and engineering fields. In particular, hexagons are often used in wireless communication networks such as the cellular systems. The correctness of these distance distribution functions is validated by a recursion and a probabilistic sum. The first two statistical moments of the random distances, and the polynomial fits of the density functions are also given in this report for practical uses.

Index Terms Random distances; distance distribution functions; regular hexagons

I. T HE P ROBLEM Define a “unit hexagon” as the regular hexagon with a side length of 1. Picking two points uniformly at random from the interior of a unit hexagon, or between two adjacent unit hexagons sharing a side, the goal is to obtain the explicit probability density function (PDF) of the random distances between these two endpoints. II. D ISTANCE D ISTRIBUTIONS A SSOCIATED

WITH

R EGULAR H EXAGONS

A. Random Distances within a Unit Hexagon A unit hexagon can be decomposed into three congruent rhombuses, as shown in Fig. 1. Define each one of these rhombuses as a “unit rhombus”, i.e., with an acute angle of

π 3

and a

2

y P E Q x

o

F

Fig. 1: A Hexagon Decomposed into Three Rhombuses.

side length of 1. Here we first give the results of the random distances associated with these rhombuses, and then use a probabilistic sum to combine them and obtain the distribution of random distances for a unit hexagon. 1) |P Q|: The probability density function of the random Euclidean distances between two uniformly distributed points that are both inside the same unit rhombus is [1]    √  2π 2π 4 3 16 2  √ √ + d + 0 ≤ d ≤ d −  3 3 2 9 3 3         √ √ √  2  10 2π 3 16 2 2−3− √ √  √8 1 + d3 sin−1 2d3 + 34 − 10π d + ≤d≤1 4d d − 3 3 2 3 9 3 3 fD1 (d) = 2d     √ √ . √  2 −1 2π 4 2 2π 3 d 2  2 √  1 − 3 sin 2d − 3 − 9√3 d + 4d − 3 − 3√3 − 1 1≤d≤ 3  3       0 otherwise (1) 2) |EF |: The probability density function of the random Euclidean distances between two

uniformly distributed points, one in each of the two adjacent unit rhombuses sharing a side but

3

with different orientation, as illustrated by E and F in Fig. 1, is    √  3 2  4 d − 1 + 2π √ d 0 ≤ d ≤  3 3 2 9 3        2  √ √ √   −1 3 4 5 4π 4 2π 3 d 1 2 2−3+ √  √ √ d + + 1 sin + d − ≤d≤1 − 4d −  3 2d 3 3 3 2 3 9 3 3        √ √ √ 2π fD2 (d) = 2d − √2 d32 + 2 sin−1 2d3 + 2π √ + 1 d2 − 3 4d2 − 3 + √ + 21 1 ≤ d ≤ 3 . 3 2 3 9 3 3        2 √  √ √  −1 3 2π d  √ + 1 d2 + 10 d2 − 3 − 8π √ −2 √2  + 4 sin − 3≤d≤2  3 d 3 3 3 9 3 3 3       0 otherwise (2) 3) Final Result: If we look at the two random endpoints of a given link inside a unit hexagon

as shown in Fig. 1, they will fall into one of the two following cases: both endpoints are inside the same unit rhombus, with probability 13 ; each endpoint falls into one of the two adjacent rhombuses sharing a side, with probability 32 . Therefore, given the results in Section II-A1 and II-A2, the probability density function of the random Euclidean distances between these two endpoints is 31 fD1 (d) + 23 fD2 (d). We hence have the following: [Random distances within a unit hexagon] The probability density function of the random Euclidean distances between two uniformly distributed points that are both inside the same unit hexagon is     2π 2π 2  √ − 9 3 d2 − 38 d + √  3 3       √ √   −1 3 2π 2d2 √ d2 − 2 4d2 − 3 + 10π √ √4  + 1 sin + − 3 2d 2 3 3 3 3 3 fDHI (d) = d     2 √ √ 3  −1 3 4π d  √4 √ + 2 d2 + 20 d2 − 3 −  + 4 sin −  3 d 3 3 3 9 3       0

0≤d≤1 1≤d≤

16π √ 3 3

−4





3 .

3≤d≤2 otherwise (3)

4

y F

E

B

I

A

π/3 π/3

C J

G

π/3 π/3

x

D

H

Fig. 2: Random Points between Two Adjacent Hexagons: Different Cases with Rhombuses.

The corresponding cumulative distribution function (CDF) is     1 1 16 3 π  √ √ d2 − 9 3 d4 − 27 d + 32π  3 3 3     4   √ √  2  d 4 10π −1 3 π 4 2 √ √ √ d2 − 26d +3 4d2 − 3 +  − d + sin + d +  3 2d 54 3 3 9 3 9 3     4      √ −1 3 2 1 4 d 2π 16π 2 4 √ √ √ FDHI (d) = + 8d sin − 27 3 + 9 d − 9 3 + 3 d2 3 d 3 3     √  2   + 14d 9+12 d2 − 3 + 59        0

0≤d≤1 1 18

1≤d≤



3 .



3≤d≤2 otherwise (4)

B. Random Distances between Two Adjacent Unit Hexagons Sharing a Side Given two unit hexagons that are adjacent to each other, as shown in Fig. 2, they can be decomposed into six congruent rhombuses in a similar way as that in Fig. 1. Here we simply give the results for the random distances between these unit rhombuses with difference placement, as shown in Fig. 2. At the end we combine them by a probabilistic sum, in order to obtain the distribution for the random distances between two adjacent hexagons sharing a side.

5

1) |DE|:  √ √ 2 2d π 4d2 −3 2  √ sin−1 3 + √  d − −  2d 6 3 3 3 3      √  √ 2 +4  d√  √ √ − 3 4d2 − 3 − 34π sin−1 2d3 − 13 + 92π d2 − 23 d + 19   12 4 3 3 3          √ √ √  2  −1 3 2d d√2 10  √ √ + 2 3 sin−1 3 + 4 + 2π √ − − sin d2 +  d 2d 3  3 3 3 3 3 9 3    √ √    √ + 11 4d2 − 3 − 11 d2 − 3 − 23 d + 316π − 13  6 3 2 3         √ √ √ √ √  2  −1 3 2d d√2  √ + 2 3 sin−1 3 − 13 4d2 − 3 3 sin + 2 −  d 2d 6 3 3 3 3    √ fD3 (d) = 2d + 73 d2 − 3 + 2d − 12     2  2 √  √  √  −1 √3  d√ 2d  √ + 4 3 sin−1 3 3 +  + 2 3 sin  2d d 3 3 3 3      √  √ √ √ 2  13 π 2  2 − 3 + 7 d2 − 3  d − − 32d√3 + 2 3 sin−1 2d3 − 3√ 4d  6 3 3     √ √   + 11 4d2 − 27 + 2d − 2 3π − 12   6      √ √   −1 3 3 1 π d√2 4d2 −27 2  √ sin − d + 2d − + − 94 −  2d 3 4  3 3 9 3      0



3 2

≤d≤1

1≤d≤ √

≤d≤



3

3≤d≤2

2≤d≤ √ 3 3 2



√ 3 3 2



.

7

7≤d≤3 otherwise (5)

2) |DI|:

   2π  √ − 1 d2   6 9 3        √  √  2d2 −1 3 4π  √2 √ + 1 d2 + 4d2 − 3 − √π3 + 1 sin −  3 2d 6  3 9 3    2     √ √   −1 3 4d 1 4π  √1 √ √ + 1 d2 + 23 4d2 − 3 − 23 d − 32π + 1 sin + −  3 2d 3 2 3 9 3 3         √ √ √   d2 √5 sin−1 3 − √4 √ − 1 d2 + 5 4d2 − 3  + 2 sin−1 d3 + 94π  2d 3 3 3 3 3 3    √ √ − 1 fD4 (d) = 2d − 4 d2 − 3 − 23 d + 38π 2 3        √  √ √  −1 3 d2 2π  √5 sin−1 3 − √2 √ − 1 d2 + 5 4d2 − 3  + 2 sin +  2d 3 d 6 3 3 3 9 3     √   √ − 1  − 2 d2 − 3 − 2d + 34π  2 3        √  √ √ √ 2  2d  √ + 3 3 sin−1 3 3 + 1 − 2π √ d2 + 32 4d2 − 27 − 2d − 3π  2d 6  3 3 9 3      0

0≤d≤ √

3 2

≤d≤1

1≤d≤ √



3

3≤d≤2 .

2≤d≤



√ 3 2



7

7≤d≤3 otherwise (6)

6

3) |IJ|:    1 π  √ d2 0≤d≤1 −   3 9 3      √ √ √  2  4d π 4d2 −3 8 2  √ sin−1 3 + √ − d − −1 1≤d≤ 3 − 1 d +  2d 3 3  3 3 3 3      2   √ √   −1 3 π 1 4 d  √ √ − 2 sin + − d2 + 83 d − 37 4d2 − 3  3 2d 3  3 9 3    √   4π √ +1  3≤d≤2 +  3 3     2    √ √ 2 −1 3 d 2d π . fD5 (d) = 2d √4 √ sin−1 3 + 1 − √ d2 − 2 sin + 3 2d d 3 3 3 3 3     √ √ √   √ +3  7 − 73 4d2 − 3 + 32 d2 − 3 + 34π 2 ≤ d ≤  3        √  √  √2 −1 3 1 d2 π 2  √ − 4 − sin + d + 2 d2 − 3   3 d 3 3 9 3     √ √   √ −2 − 34π 7 ≤ d ≤ 2 3   3      0 otherwise (7)

7

4) |JE|:      √ √  −1 3 5 1 π 1 d√2 π  √ √ sin d2 − 12 + + + + − 4d2 − 3 + 3√  2d 6 3 3 3 9 3 3     2       √ √  2d 2 1 2π  4 d√2 −1 3 −1 3 √ √ √ √  + − + + − sin sin d2  d 2d 3 3 3 3 3 3 3 9 3     √ √  7  √ − 5  4d2 − 3 + 2 d2 − 3 − 613π + 12  4 3        √ √  2  π 1 d√2 −1 3 −1 3  √2 − d√ √  + − + sin d2 sin  d 2d 6 3 3 3 3 3 9 3    √  √  7 2 − 3 + d2 −3 − 5π  √ − 1 4d +   12 3 4 6 3       2 √ √ √  −1 3√3   −1 3 −1 3 d√2 d√2 2 2d  √ √ 3 sin sin sin − + 3 + −  d 2d 2d  3 3 3 3 3 3 3      √ √ √   2π 2 − 3 + d2 −3 − 3 4d2 − 27  √ − 1 d2 + 7 4d +  6 12 3 2 9 3       √ − 1  + 311π  4 3        2 √ √ −1 3 −1 3 1 d√2 d√ fD6 (d) = 2d √4 √ sin sin − + − d 2d 3 3 3 3 3 2 3        √ √ √   2 4d2 −3 2  √  d − − 32d√3 + 7 2 3 sin−1 32d3 + 13 + 92π  4 3     √ √   √ + 13  − d2 − 3 − 53 4d2 − 27 + 211π  4 3        √ √ √ √   1 −1 3 −1 3 d√2 5 3 −1 3 3 d√2  √4 √ − + sin sin − + sin  d 2d 2 2d  3 3 3 3 3 2 3    √ √ √  2  π  − 54 − 4d4 −3 − d2 − 3 + 56 4d2 − 27 − 2√   3    2  2    √ √ √ √   5 3 −1 3 3 d√ d√ −1 2 3 −1 3 8 1  √ √ − + sin sin sin + +  d 2d 2 2d 3 3 3 3 3 2 3       √ √ √  2  π  − 61 + 9√ d2 − 4d4 −3 + 56 4d2 − 27 + 2 d2 − 12  3       √ − 9  − 631π  4 3       0

1 4

1≤d≤ √

3

3≤d≤2

2≤d≤ √ 3 3 2



≤d≤

√ 3 3 2



7

. √

7≤d≤3

√ 3≤d≤2 3 √ √ 2 3 ≤ d ≤ 13

otherwise (8)

8

5) |HE|:

fD7 (d) = 2d

                                                                                                                  

√2 3

√2 3

√2 3

√1 3

√1 3

√1 3



2d2 3

+ 

√ 3 2d

+

√4 3

sin−1



2d2 3

+ 

 + 1 sin−1



3 d





1 3

+

√ √ −2 4d2 − 3 + 43 d2 − 3 − 37π 3    2 √ + 1 sin−1 2d3 − √23 d3 + 2 sin−1

2π √ 9 3



d2

√ π 4d2 − 3 − 2 d2 − 3 + 3√ 3  2   √ + 1 sin−1 2d3 − √23 d3 + 2 sin−1



3 d



3 d

√ − 2 3 sin−1

√ √ √ 4d2 − 3 − 2 d2 − 3 − 23 4d2 − 27 + 310π 3  2   √ √ √ 2 2d + 1 sin−1 2d3 − √43 d3 + 2 sin−1 d3 − 3 3 sin−1 3   √ √ √ 4d2 −3 2 2 −3− √ d + − 4 + 31 + 92π d 4d2 − 27 2 3

+ 

17π √ 3 3

2≤d≤

3 2

√ 3 3 2





7≤d≤3

√ 3≤d≤2 3 √ 2 3 d

√ √ 2 3 ≤ d ≤ 13

−8

0

otherwise (9)

6) Final Result: Given the results in Section II-A1 to II-B5, when the two endpoints of a given link fall into one of the two adjacent hexagons sharing a side, the probability density function of the random distances between these two endpoints is 2 9

7

√ 3 3 2d



17π √ 3 3

≤d≤

9 2

4d2 − 27 − 3√π 3   2 √ √  −1 3√3 −1 3 2d2 2d √ + 1 sin 2d + 3 3 + 3 3 sin + √83 sin−1 3 2d   √ √ √ 2 2π 1 √ − 3 + 9 3 d2 + 4d2 −3 + 32 4d2 − 27 + 43 d2 − 12 −

√ 3 3 2

√ 3 3 2d

+  2   √ √ −1 3 −1 3 2d2 d √4 + 1 sin − + 2 sin 3 2d 3 d 3   2 √ √ √ √ 2 + 32d√3 + 3 3 sin−1 32d3 + 4d2 −3 − 4 d2 − 3

+ 

3≤d≤2





2d2 3

+ 



1 9

[fD2 (d) + fD5 (d) + fD7 (d)] +

[fD3 (d) + fD4 (d) + fD6 (d)], using the similar reasoning as that in Section II-A3. With this

probabilistic sum, we thus have the following: [Random distances between two unit hexagons] The probability density function of the

.

9

random Euclidean distances between two uniformly distributed points, one in each of the two adjacent unit hexagons sharing a side, is    π 1  √  0≤d≤1 − 3 d2 + 34 d  9 3      √  √ √  11 2 2 − 3 − 4π  √2 (d2 + 2) sin−1 3 − 1 + 5π √ √ − 1 4d 1 ≤ d ≤ 3 d +   2d 3 6 2 9 3 3 3  3         √ √   −1 3 −1 3 d2 d2 π  √2 √4 d2 − 2 sin − + 4 sin + 1 + 3√  3 2d 3 d  3 3 3    √ √ √   9 7 8π 2 − 3 − 20 d2 − 3 + √  + − 4d 3≤d≤2  6 3 2  3    2     √ √ √   −1 3 7 d π 1 2 2 − 3 + 8π  √2 √ √ + 1 d − − 2 sin + − 2 ≤ d ≤ 4d 7  3 2d 3 6 2 3 9 3 3 3     2  2      √ √   d d −1 3 3 −1 3 5π 1 √ √2 √4  d2 + 6 sin − + 2 sin + + − 3 2d 3 d 3 2 3 3 9 3 fDHA (d) = d . √ √ √ 9  11 28π 9  2 2  − 4 d − 3 − 6 4d − 27 + 3√3 + 2 7≤d≤3          2  2 √ √   −1 3 3 −1 3 π d d 1  √2 √4 √  d2 + 12 sin − + 2 sin + −  3 2d 3 d 3 3 3 9 3     √ √ √   √ − 9 − 4 d2 − 3 + 19 4d2 − 27 − 38π 3≤d≤2 3   6 2 3       √ √   2  d2  −1 3 3 −1 2 3 2 4π  √ √ − + 12 sin + sin + d2  3 2d d 3  3 9 3    √ √ √ √    √ − 25 2 3 ≤ d ≤ 13 4d2 − 27 + 16 d2 − 12 − 16π + 19  6 3 2  3      0 otherwise (10)

10

The corresponding CDF is     8 3 π 1  1 √ d4 + 81 d 0≤d≤1 −  18 9 3 3         √   1 5π√ 4π −1 3 1 1 4 4 2 √ √  − d − d2 (d + 4d ) sin + +  2d 54 18 9 3 162 3 27 3     √ √  2 1   1≤d≤ 3 + 94d648+15 4d2 − 3 − 72        4  4 √ √   −1 3 −1 3 2 d d 1 2 2  √ √  sin sin − 4d − + 8d  3 2d 3 d 9 3 9 3         √ √ 2  1  √ + 1 d2 − 2d +1 4d2 − 3 + 54π√3 + 18 d4 + 98π 3≤d≤2   2 24 3     √ 2  7  − 4d 27+12 d2 − 3 − 72      4       √   1 1 d 1 −1 3 π√ 8π 2 4  √ √ − + − 4d sin − d + d2  3 2d 54 18  9 3 162 3 27 3    √ √   2d2 +1 2 − 3 − 53  2 ≤ d ≤ − 4d 7  24 216     4  4    √ √    − √2 d3 + 4d2 sin−1 d3 − √1 d9 + 4d2 sin−1 32d3 9 3 3 3 FDHA (d) = .     √  2 +12 √ 28π 26d 5π 1 1  4 2  + 162√3 + 54 d + 27√3 + 2 d − 81 d2 − 3 7≤d≤3      2 +135 √    − 94d648 4d2 − 27 − 101  216        4 √ √   −1 3 1 −1 3 3 2 d4 d 2 2  √ √ − + 4d sin + + 8d sin   3 d 9 2d 9 3 3 3         √ √ 2  8π π√ 1 4  √ + 1 d2 − 26d +12 d2 − 3 d − + 3 ≤ d ≤ 2 3 −  54 2 81  162 3 27 3    √   158d2 +351  + 4d2 − 27 − 263  648 216        4  √ √    −1 3 3 −1 2 3 1 2π 1 d 2  √ √ + 8d sin + sin − 81 3 + 27 d4  9 2d d 3 3       √ √ √  2  16π 15 √  − 9 3 + 18 d2 + 158d648+351 4d2 − 27 2 3 ≤ d ≤ 13      √  2 25   + 34d81+96 d2 − 12 + 216        0 otherwise (11) Note that although unit rhombuses and unit hexagons are assumed throughout (1)–(11), the

distance distribution functions can be easily scaled by a nonzero scalar, for rhombuses or hexagons of arbitrary side length. For example, let the side length of a regular hexagon be

11

0.9 0.8 Within Hex Between Hex

0.7

PDF

0.6 0.5 0.4 0.3 0.2 0.1 0

0

0.5

1

1.5

2 2.5 Distance − d

3

3.5

4

Fig. 3: Distributions of Random Distances Associated with Hexagons.

s > 0, then d d FsD (d) = P (sD ≤ d) = P (D ≤ ) = FD ( ). s s Therefore, 1 d d fsD (d) = FD′ ( ) = fD ( ), s s s

(12)

where fD (·) can be (3) or (10). III. V ERIFICATION

AND

VALIDATION

A. Verification by Simulation Figure 3 plots the probability density functions of the two random distance cases given in (3) and (10), respectively. Figure 4 shows the comparison between the cumulative distribution functions (CDFs) of the random distances, and the simulation results by generating 2, 000 pairs of random points with the corresponding geometric locations. Figure 4 demonstrates that our distance distribution functions are very accurate when compared with the simulation results.

12

1 0.9 0.8 0.7

CDF

0.6 0.5 0.4 0.3

Within Hex Distribution Within Hex Simulation

0.2

Between Hex Distribution Between Hex Simulation

0.1 0

0

0.5

1

1.5

2 2.5 Distance − d

3

3.5

4

Fig. 4: Distribution and Simulation Results For Random Distances Associated with Hexagons.

D

J F

A B C

H L I G

E

K

Fig. 5: Partial Recursion through Hexagons and Rhombuses.

B. Validation by Recursion As shown in Fig. 5, a hexagon with a side length of 2 can be decomposed into three small hexagons with a side length of 1, and three rhombuses A, J and K, each with a side length of 1 as well. With the scale transform in (12), the distance distribution in the large hexagon is f2D (d) = 12 fDHI ( d2 ). On the other hand, if we look at the two random endpoints of a given link inside the large hexagon, they will fall into one of the three following cases: i) both endpoints fall inside one of the three small hexagons (BDF, ECG or HIL), with probability

3 4

× 43 ; ii) one

of the endpoints falls into one of the small hexagons, and the other endpoint falls into one of

13

the three rhombuses A, J or K, with probability 2 × the rhombuses, with probability

1 4

3 4

× 41 ; iii) both endpoints fall into one of

× 14 .

Each of these three cases includes several more detailed sub-cases as follows: Case i) Given the location of the first endpoint of a particular link, the second endpoint will fall in the same hexagon as the first one with probability 13 , and in one of the two adjacent hexagons with probability 23 . The unconditional probability of these two sub-cases are 9 16

×

1 3

=

3 16

and

9 16

×

2 3

= 83 , respectively.

Case ii) Without loss of generality, suppose the first endpoint is located in A. By symmetry, the second endpoint falls into any one of the four rhombuses B, D, F and H with probability 2 , 9

and into L with probability 91 . Thus the unconditional probabilities for |AB|, |AD|,

|AF | or |AH| are all

3 8

×

2 9

=

1 , 12

and

3 8

×

1 9

=

1 24

for |AL|.

Case iii) If the first endpoint is in A, then by symmetry, the second endpoint is still located in A with probability 31 , and in either one of J or K with probability 32 . The unconditional probability of these two sub-cases are

1 16

×

1 3

=

1 48

and

1 16

×

2 3

=

1 , 24

respectively.

In short, we have the probabilistic sum as f2D (d) =

3 3 1 fDHI (d) + fDHA (d) + [fD2 (d) + fD4 (d) + fD3 (d) + fD6 (d)] 16 8 12 1 1 + [fD7 (d) + fD8 (d)] + fD1 (d), 24 48

(13)

where fD8 (d) is the density of |AL| in Fig. 5, which is the only distance distribution function that has not been given yet. We will do so in the immediate following.

14

1) |AL|:   2    √ √ √ d −1 3 2π 1  √2 √ √ +2 d2 − 10 2≤d≤ 7 − + 4 sin + + d2 − 3 + 38π   3 d 3 3 3 9 3 3        2  2  √ √   −1 3 −1 3 3 2π d d  √2 √4 √ + 8 sin + + 6 sin − 1 + d2  3 d 3 2d  3 3 3 3    √ √ √    √ − 11 4d2 − 27 − 340π 7≤d≤3 + 6 d2 − 3 + 11  3  3       2  2   √ √   −1 3 4 −1 3 3 1 2π 2 d d √ √ √  + 8 sin − + 12 sin + + d2  3 d 3 2d 3 3 3 9 3    √ √ √ fD8 (d) = 2d √ +7 4d2 − 27 + 332π 3≤d≤2 3 . + 6 d2 − 3 − 19 3 3     2  2     √ √   d d −1 3 3 −1 2 3 2π  √4 √2 √  − d2 + 12 sin − + 8 sin + 1 +  3 2d 3 d 3 3 3 3     √ √ √ √   √ + 17 − 19 2 4d2 − 27 − 4 d2 − 12 + 364π 3 ≤ d ≤ 13   3 3        √  √ √  20 2 2 − 12 − 32π  √2 d2 + 16 sin−1 2 3 − 1 + 2π √ √ −8 d + d 13 ≤ d ≤ 4  3 d 3 3  3 9 3 3 3      0 otherwise (14) 2) Validation: In order to confirm that the two definitions of f2D (d) at the beginning of Sec-

tion III-B are equivalent, i.e., 1 24

3 1 f (d) + 83 fDHA (d) + 12 16 DHI

[fD2 (d) + fD4 (d) + fD3 (d) + fD6 (d)] +

1 [fD7 (d) + fD8 (d)] + 48 fD1 (d) is equal to 21 fDHI ( d2 ), we verify them mathematically as follows.

i) 0 ≤ d ≤



3 2

:

3 d fDHI (d) = 16 8



2 2π − √ 3 9 3



 2π 8 d − d+ √ , 3 3 2

    1 d 4 2π 1 fD2 (d) = d− + √ d2 , 12 6 3 3 9 3 d 1 fD1 (d) = 48 24



4 2π + √ 3 9 3

d 3 fDHA (d) = 8 12

d 1 fD4 (d) = 12 6 





2π 1 √ − 9 3 6

 2π 16 d − d+ √ , 3 3 2

π 1 √ − 9 3 3 

d

2





,

 4 d + d , 3 2

15

while the probability density functions are 0 for all other cases. Thus, 3 3 1 1 fDHI (d) + fDHA (d) + [fD2 (d) + fD4 (d)] + fD1 (d) 16 8 12 48 # "     2    4 d d d 1 2 2π π 2π 2π 8 d 2 = +√ − √ d − d+ √ = − √ − 6 6 18 3 3 6 3 9 3 2 3 2 3 3

f2D (d) =

= ii)



3 2

1 d fDHI ( ). 2 2

≤d≤1:

3 d fDHI (d) = 16 8



2 2π − √ 3 9 3



 2π 8 d − d+ √ , 3 3 2

d 3 fDHA (d) = 8 12



π 1 √ − 9 3 3



 4 d + d , 3 2

" # √     2 4 4 d 4π 5√ 2 d 1 1 3 2π 2 −1 √ − −√ d + d− fD (d) = + 1 sin + 4d − 3 + √ , 12 2 6 2d 3 3 3 3 9 3 3 3 " # √     2 √ 3 d 2 4π 1 1 2d π √ √ + d2 + 4d2 − 3 − √ , fD (d) = + 1 sin−1 − 12 4 6 3 2d 6 3 9 3 3 " # √ √ 2 −3 1 3 4d 2d2 d π − √ sin−1 , fD (d) = + √ d2 − 12 3 6 2d 6 3 3 3 3 # √     2 √ 1 3 d 10π 10 8 4 d 16 2π √ 1+ 4d2 − 3 − √ . sin−1 fD1 (d) = + − √ d2 − d + 48 24 3 2d 3 9 3 3 3 3 3 "

Thus, 3 1 1 3 fDHI (d) + fDHA (d) + [fD2 (d) + fD4 (d) + fD3 (d)] + fD1 (d) 16" 8 12 48 #      2 d 2 2π 8 d d 2π d 1 = + √ = fDHI ( ). − − √ 6 3 9 3 2 3 2 2 2 3

f2D (d) =

iii) 1 ≤ d ≤



3:

" # √  2  √ 3 4 10π d 2d 2π 3 −√ fD (d) = + 1 sin−1 + √ d2 − 2 4d2 − 3 + √ , 16 HI 8 3 2d 3 3 3 3 3

16

" # √   d 1 5π 2 2 11 √ 2 4π 1 3 3 −1 2 √ (d + 2) sin , fD (d) = − + √ d + 4d − 3 − √ − 8 HA 12 2d 3 9 3 6 3 3 3 2 " # √     2 √ 3 1 2 3 d 2π 1 1 d 2π √ + −√ d2 − , fD (d) = + 2 sin−1 + 4d2 − 3 + √ + 12 2 6 3 2d 3 2 3 9 3 3 2 " # √  2    √ 4d 2 1 1 3 d 1 1 4π 2π 2 √ , fD (d) = + 1 sin−1 + − √ d2 + 4d2 − 3 − d − √ + 12 4 6 3 2d 3 9 3 3 3 3 3 3 2 " # √   1 d d2 + 4 −1 3 2π 19 √ 2 1 2 3 4π 2 √ sin 4d − 3 − √ − , fD (d) = − + √ d − d+ 12 3 6 2d 3 9 3 3 12 3 3 3 4 "  # √    √ d2 d 1 π 1 5 1 1 3 π − √ + √ sin−1 , fD (d) = + + √ d2 − 4d2 − 3 + √ + 12 6 6 2d 6 12 3 3 3 9 3 3 3 4 " # √     √ 1 3 d 2π 4 2 d2 2π √ 1− sin−1 fD (d) = − − √ d2 + 4d2 − 3 − √ − 1 . 48 1 24 3 2d 3 9 3 3 3 3 Thus, f2D (d) =

iv)



3 1 3 fDHI (d) + fDHA (d) + [fD2 (d) + fD4 (d) + fD3 (d) + fD6 (d)] 16 8 " 12 #      2 1 2 2π d d 2π 8 d d 1 + fD1 (d) = + √ = fDHI ( ). − √ − 48 6 3 9 3 2 3 2 2 2 3

3≤d≤2: "

d 4 3 √ fDHI (d) = 16 8 3



2





3 d + 4 sin−1 − 3 d





20 √

4π 2 √ + d2 + 3 9 3 3

#

16π d2 − 3 − √ − 4 , 3 3

" √ √    2  2 d 2 3 4 3 3 d d −1 −1 √ fDHA (d) = − 2 sin −√ + 4 sin 8 12 2d d 3 3 3 3    7√ 2 9 20 √ 2 8π π 2 , 4d − 3 − d −3+ √ + + 1+ √ d − 6 3 3 3 3 2

17

" # √     2 10 √ 2 d 2 2π d 1 8π 1 3 2 −1 √ + √ d + fD (d) = + 4 sin − d −3− √ −2 , 12 2 6 d 3 3 3 9 3 3 3 3 " √ √     2 3 3 5√ 2 d 5 4 1 4π 1 d −1 −1 √ sin √ − d2 + fD4 (d) = −√ + 2 sin + 4d − 3 12 6 2d d 3 3 3 3 9 3 3  √ 1 8π 2 2 −4 d − 3 − d + √ − , 3 3 3 2 "  √ √    2   √ 1 3 3 d d2 2π 2d 4 10 −1 −1 √ + √ sin √ + 2 3 sin − fD3 (d) = − + + √ d2 12 6 d 2d 3 9 3 3 3 3 3 3  13 √ 2 16π 11 11 √ 2 2 − , 4d − 3 − d −3− d+ √ + 6 3 3 2 3 3 √ √      3 3 2d2 2π 2 1 4 d2 −1 −1 √ + √ sin + √ − √ sin − + √ d2 d 2d 3 9 3 3 3 3 3 3 3  √ 5 13π 7√ 2 , 4d − 3 + 2 d2 − 3 − √ − + 12 6 3 4

1 d fD6 (d) = 12 6

"

" √ √    2  √ 1 3 3 d 4 2π 1 2 2d −1 −1 √ fD7 (d) = + 1 sin + √ sin − + √ d2 + 4d2 − 3 24 12 3 2d d 3 9 3 3 3  7π 4√ 2 d −3− √ −2 . + 3 3 3 Thus, f2D (d) =

v) 2 ≤ d ≤

√ 3 3 2

3 1 3 fDHI (d) + fDHA (d) + [fD2 (d) + fD4 (d) + fD3 (d) + fD6 (d)] 16 8 " 12 #      2 2 2π d d 2π 8 d d 1 1 + √ = fDHI ( ). − √ − + fD7 (d) = 24 6 3 9 3 2 3 2 2 2 3

:

" # √  2    √ d 7 1 d 2 3 1 π 8π 3 √ , fDHA (d) = − 2 sin−1 + − √ d2 − 4d2 − 3 + √ + 8 12 2d 3 9 3 6 3 3 3 3 2

18

" √ √     2 5√ 2 d 5 2 2π d 1 1 3 3 −1 −1 √ − √ sin d2 + fD4 (d) = −√ + 2 sin + 4d − 3 12 6 2d d 3 3 3 3 9 3 6  √ 1 4π 2 −2 d − 3 − 2d + √ − , 3 3 2 √ √  2   √ √ 3 3 13 √ 2 d2 2d √ + 2 3 sin−1 √ + 2 3 sin−1 4d − 3 − − d 2d 6 3 3 3 3  1 7√ 2 , d − 3 + 2d − + 3 2

1 d fD3 (d) = 12 6

"

" √ √     2 d 1 3 3 d d2 2 1 π 7√ 2 −1 −1 √ sin fD6 (d) = + √ − √ sin − + √ d2 + 4d − 3 12 6 3 3 d 2d 6 9 3 12 3 3 3 √  1 d2 − 3 5π , − √ − + 3 6 3 4 " √ √    2  2 1 3 3 √ 2 d 2 2 2d d −1 −1 √ fD7 (d) = + 1 sin −√ + 2 sin + 4d − 3 24 12 3 2d d 3 3 3  √ π 2 −2 d − 3 + √ , 3 3 "

2 d 1 −√ fD8 (d) = 24 12 3



2





3 d + 4 sin−1 + 3 d



2π 1 + √ 3 9 3



d2 −

10 √ 3

#

8π d2 − 3 + √ + 2 . 3 3

Thus, 3 1 1 fDHA (d) + [fD4 (d) + fD3 (d) + fD6 (d)] + [fD7 (d) + fD8 (d)] 8" 12 24 # √   2 √ 2 π d 10π d 3 −√ + 2 sin−1 + √ d2 − 2 d2 − 3 + √ = 6 3 d 3 6 3 3 3   s   √   2  2 2(d/2)2 d d d 4 3 2π 10π = −√ + 1 sin−1 + √ −2 4 −3+ √  6 3 2(d/2) 3 3 2 2 3 3 3

f2D (d) =

=

d 1 fDHI ( ). 2 2

19

vi)

√ 3 3 2

≤d≤



7: "

3 d 2 √ fDHA (d) = 8 12 3



2





3 d − 2 sin−1 + 3 2d



π 1 − √ 3 9 3



d2 −

7√

#

1 8π , 4d2 − 3 + √ + 6 3 3 2

" √ √     2 1 5√ 2 d 5 3 2 3 2π d 1 −1 −1 √ sin √ − d2 + fD4 (d) = −√ + 2 sin + 4d − 3 12 6 2d d 3 3 3 3 9 3 6  √ 4π 1 −2 d2 − 3 − 2d + √ − , 3 3 2 √ √  2   √ √ 2d2 3 d −1 3 3 −1 √ + 4 3 sin √ + 2 3 sin + 2d d 3 3 3 3 √   2 √ 3 2d π 13 √ 2 7√ 2 −1 √ + 2 3 sin − − √ d2 − 4d − 3 + d −3 2d 6 3 3 3 3 3  √ 11 √ 2 1 4d − 27 + 2d − 2 3π − + , 6 2

d 1 fD3 (d) = 12 6

"

" √ √ √    2  √ 3 3 d d2 2 2d d2 1 −1 3 3 −1 −1 √ sin √ + 3 3 sin fD (d) = + √ − √ sin − 12 6 6 3 3 d 2d 2d 3 3 3 3 3 √    d2 − 3 3 √ 2 7√ 2 2π 1 1 11π 2 + √ − d + , − 4d − 3 + 4d − 27 + √ − 12 3 2 9 3 6 3 3 4 " √ √ √  2  2   √ 2d d 1 3 3 3 d 2 2 3 √ fD7 (d) = + 1 sin−1 −√ + 2 sin−1 − 2 3 sin−1 24 12 3 2d d 2d 3 3 3  √ √ 2√ 2 10π 4d − 27 + √ , + 4d2 − 3 − 2 d2 − 3 − 3 3 3 " # √    2  √ 3 2 d 1 2π d 10 8π 1 −√ fD (d) = + 4 sin−1 + + √ d2 − d2 − 3 + √ + 2 . 24 8 12 d 3 9 3 3 3 3 3 3

20

Thus, 3 1 1 fDHA (d) + [fD4 (d) + fD3 (d) + fD6 (d)] + [fD7 (d) + fD8 (d)] 8 12 24  s   √    2 2 2 d d 4 2π 3 10π 2(d/2) d = −√ + 1 sin−1 + √ −2 4 −3+ √  6 3 2(d/2) 3 3 2 2 3 3 3

f2D (d) =

=

vii)



1 d fDHI ( ). 2 2

7≤d≤3:

" √ √  2  2   d d 3 3 d 2 4 −1 3 3 −1 −√ fDHA (d) = + 6 sin −√ + 2 sin 8 12 2d d 3 3 3 3    √ 5π 9 11 √ 2 28π 1 2 2 , + √ d −4 d −3− 4d − 27 + √ + + 3 9 3 6 3 3 2

1 d fD4 (d) = 12 6

"

# √    √ √ √ 3 3 2d2 1 2π 3 √ + 3 3 sin−1 + − √ d2 + 4d2 − 27 − 2d − 3π , 2d 6 9 3 2 3 3

" # √ √   2 − 27 d2 d 9 π 3 4d 1 1 3 √ − − √ sin−1 d2 + 2d − , fD3 (d) = + − 12 6 2d 4 4 3 3 9 3 3 √ √  2   d2 3 d 3 4 1 −1 −1 √ − √ sin √ + √ sin − d 2d 3 3 3 3 3 2 3 ! √ √ √   2d2 4d2 − 3 √ 2 1 2π 7 3 −1 3 3 2 √ + − sin + + √ d − − d −3 2 2d 3 9 3 4 3 3  11π 5√ 2 13 , 4d − 27 + √ + − 3 4 2 3

1 d fD6 (d) = 12 6

"

" √ √ √  2  2   √ 2d d 1 3 3 d 4 1 −1 −1 −1 3 3 √ fD (d) = + 1 sin −√ + 2 sin − 3 3 sin 24 7 12 3 2d d 2d 3 3 3 √    √ √ 9 4d2 − 3 1 2π 17π + , + √ d2 + − 4 d2 − 3 − 4d2 − 27 + √ + 3 9 3 2 3 3 2

21

" √ √     2  2  d 4 2π 2 d d 1 3 −1 −1 3 3 √ fD8 (d) = + 8 sin +√ + 6 sin − 1 + √ d2 24 12 d 2d 3 3 3 3 3 3  √ 11 √ 2 40π +6 d2 − 3 + 4d − 27 − √ − 11 . 3 3 3 Thus, 1 1 3 fDHA (d) + [fD4 (d) + fD3 (d) + fD6 (d)] + [fD7 (d) + fD8 (d)] 8 12 24  s   √    2 2 2 d d 4 3 2π 10π 2(d/2) d = −√ + 1 sin−1 + √ −2 4 −3+ √  6 3 2(d/2) 3 3 2 2 3 3 3

f2D (d) =

=

d 1 fDHI ( ). 2 2

√ viii) 3 ≤ d ≤ 2 3 :

" √ √    2  2 3 d 2 3 3 4 3 d d √ fDHA (d) = + 12 sin−1 −√ + 2 sin−1 8 12 2d d 3 3 3 3    √ 1 9 π 19 √ 2 8π 2 2 d −4 d −3+ , 4d − 27 − √ − + √ − 6 9 3 3 3 3 2 √ √ √  3 5 3 −1 3 3 d2 1 −1 √ + √ sin + sin sin 2d 2 2d 3 3 2 3 √  4d2 − 3 √ 2 5 5√ 2 π − , − d −3+ 4d − 27 − √ − 4 6 2 3 4

1 d fD6 (d) = 12 6

"

d2 4 √ −√ 3 3 3



−1



3 − d



√ √    2  2 1 3 3 d 4 1 2d d −1 −1 √ fD7 (d) = + 1 sin −√ + 2 sin 24 12 3 2d d 3 3 3 # √ √   2 2−3 √ √ √ 3 π 3 2d 3 4d + − 4 d2 − 3 + 4d2 − 27 − √ , + √ + 3 3 sin−1 2d 2 2 3 3 3 3 "

" √ √  2  2     d d 1 3 d 4 1 2π 2 −1 −1 3 3 √ fD8 (d) = + 8 sin −√ + 12 sin + + √ d2 24 12 d 2d 3 9 3 3 3 3 3  √ 19 √ 2 32π +6 d2 − 3 − 4d − 27 + √ + 7 . 3 3 3

22

Thus, 3 1 1 fDHA (d) + fD6 (d) + [fD7 (d) + fD8 (d)] 8 12 24  s   √    2 2 2 d d 4 2π 3 10π 2(d/2) d = −√ + 1 sin−1 + √ −2 4 −3+ √  6 3 2(d/2) 3 3 2 2 3 3 3

f2D (d) =

=

1 d fDHI ( ). 2 2

√ √ ix) 2 3 ≤ d ≤ 13 :

" √ √ !   2   d 3 d 2 4π 2 −1 3 3 −1 2 3 √ − fDHA (d) = + 12 sin + sin + √ d2 8 12 2d d 3 9 3 3 3  19 √ 2 16 √ 2 16π 25 + , 4d − 27 + d − 12 − √ − 6 3 2 3 √ √ √ √    2 2 1 3 3 3 3 d2 d 5 3 8 √ + √ sin−1 √ + √ sin−1 − + sin−1 d 2d 2 2d 3 3 3 3 3 2 3 √    √ 9 4d2 − 3 5 √ 2 1 π 31π 4d − 27 + 2 d2 − 12 − √ − − , + √ d2 − + 6 9 3 4 6 6 3 4

1 d fD6 (d) = 12 6

"

" √ √ √   2   2 √ 3 d 1 8 2d 1 2d −1 −1 3 3 −1 2 3 √ + 3 3 sin √ fD (d) = + 1 sin + + √ sin 24 7 12 3 2d 2d d 3 3 3 3 √    1 4d2 − 3 3 √ 2 2π 4√ 2 17π 2 − 4d − 27 + d − 12 − √ − 8 , + √ d + + 3 9 3 2 2 3 3 3 " √ √     2  2  3 3 4 d 2 2π 3 2 1 d d −1 −1 −√ fD (d) = + 12 sin −√ + 8 sin + 1 + √ d2 24 8 12 2d d 3 3 3 3 3 3  √ 19 √ 2 64π 4d − 27 − 4 d2 − 12 + √ + 17 . − 3 3 3

23

Thus, 3 1 1 fDHA (d) + fD6 (d) + [fD7 (d) + fD8 (d)] 8" 12 24 # √  2    d 1 d 1 10 √ 2 π 16π 2 −1 2 3 √ + √ d − 12 − √ − 4 = d + + 16 sin − 6 d 3 3 3 9 3 6 3 3   s √    2    2 2 (d/2) 2 d d 4 3 d 4π 20 16π √ √ + = + 4 sin−1 − + − 3 − √ − 4 6 3 d/2 2 3 2 3 9 3 3 3 3

f2D (d) =

=

x)



1 d fDHI ( ). 2 2

13 ≤ d ≤ 4 :

" # √    2  √ 3 d 2 1 2π 2 32π d 20 1 √ fD (d) = + 16 sin−1 − + √ d2 + d2 − 12 − √ − 8 . 24 8 12 d 3 9 3 3 3 3 3 3 Thus, " # √     2 √ 3 10 d 1 2 π 1 1 d 16π √ √ + d2 − 12 − √ − 4 d2 + fD (d) = + 16 sin−1 − f2D (d) = 24 8 6 3 d 6 3 3 9 3 3 3   s √   2    2  2 d 3 4π 20 16π d 4 2 d (d/2) √ + √ + 4 sin−1 − + − 3 − √ − 4 = 6 3 d/2 2 3 2 3 9 3 3 3 3 =

d 1 fDHI ( ). 2 2

In summary, we have f2D (d) = 21 fDHI ( d2 ) by recursion, and the probabilistic sum 3 1 (d) + 12 f 8 DH A

3 f (d) + 16 DHI

1 1 [fD2 (d) + fD4 (d) + fD3 (d) + fD6 (d)] + 24 [fD7 (d) + fD8 (d)] + 48 fDRI (d) is equal

to 21 fDHI ( d2 ) in all the cases discussed above. The results are a strong validation of the correctness of the distance distribution functions that we have derived. IV. P RACTICAL R ESULTS A. Statistical Moments of Random Distances The distance distribution functions given in Section II can conveniently lead to all the statistical moments of the random distances associated with hexagons. Given fDHI (d) in (3), for example,

24

TABLE I: Moments and Variance—Numerical vs Simulation Results Geometry Within a Single Hexagon Between two Adjacent Hexagons

(1)

MD 0.8262542775s 0.8263306317s 1.8564318344s 1.8583366966s

PDF/Sim fDHI (d) Sim fDHA (d) Sim

(2)

MD 0.8333333333s 0.8335924725s 3.832947195s 3.8326819696s

V arD 0.1506291100s2 0.1507701596s2 0.3866080394s2 0.3792666917s2

the first moment (mean) of d, or the average distance within a regular hexagon, is (1) MDH I

=

Z

0

2

√   √ i  √ 7 3 7 1 h 28 ln 2 3 + 3 + 29 ln 2 3 − 3 ≈ 0.8262542775, xfDHI (x)dx = − + 30 90 60

and the second raw moment is (2) MDH I

=

Z

2 0

5 x2 fDHI (x)dx = , 6

from which the variance, or the second central moment, can be derived as V arDHI =

(2) MDH I

h i2 (1) − MDH ≈ 0.1506291100. I

When the side length of a hexagon is scaled by s, the corresponding first two statistical moments given above then become (1)

MDH = 0.8262542775s, I

(2)

MDH = I

5s 6

and

V arDHI = 0.1506291100s2.

(15)

Table I lists the first two moments, and the variance of the random distances in the two cases given in Section II, and the corresponding simulation results for verification purposes.

B. Polynomial Fits of Random Distances Table II lists the coefficients of the high-order polynomial fits of the original PDFs given in Section II, from the highest degree (degree-10 for (3) and degree-20 for (10)) to d0 , together with the corresponding norm of residuals. Figure 6 (a)–(b) plot the polynomials listed in Table II with the original PDFs. From the figure, it can be seen that both polynomials match closely with

25

TABLE II: Coefficients of the Polynomial Fit and the Norm of Residuals (NR) PDF

Degree

Polynomial Coefficients 10 × [−0.0146710 0.136604 − 0.538052 1.167903 −1.525478 1.230615 − 0.605940 0.175147 − 0.043772 0.025830 − 0.000025] 4 10 × [0.00000035 − 0.000013 0.000207 − 0.002094 0.014469 − 0.072522 0.272508 − 0.782682 1.736254 −2.986406 3.976655 − 4.072372 3.169347 − 1.841066 0.778001 − 0.230634 0.045522 − 0.005534 0.000394 −0.0000103 0.00000007092]

NR

2

fDHI (d)

10

fDHA (d)

20

1

0.075608

0.191157

0.7

0.9 Within Hex PDF

0.6

Polynomial Fit 0.5

0.7 0.6

0.4 PDF

PDF

Between Hex PDF

Polynomial Fit

0.8

0.5 0.23

0.3

0.4

0.088

0.22 0.3

0.2

0.084

0.21 0.2 0.2 0.1 0

0

0.2

0.4

0.6

0.08

0.1 1.56

1.58

1.6

0.8 1 1.2 Distance − d

3.12 1.4

1.6

1.8

2

0

0

(a) Within a Single Hexagon

0.5

1

1.5

3.14

3.16

2 2.5 Distance − d

3

3.5

4

(b) Between two Adjacent Hexagons

Fig. 6: Polynomial Fit.

the original PDFs. These high-order polynomials facilitate further manipulations of the distance distribution functions, with a high accuracy. V. C ONCLUSIONS In this report, we gave the closed-form probability density functions of the random distances associated with hexagons. The correctness of the obtained results has been verified by a recursion and a probabilistic sum, in addition to simulation. The first two statistical moments, and the polynomial fits of the density functions are also given for practical uses.

26

ACKNOWLEDGMENT This work is supported in part by the NSERC, CFI and BCKDF. The authors also want to thank Dr. Lin Cai for the initial work involving squares, Dr. Aaron Gulliver for posing the new problem associated with hexagons, and Dr. A.M. Mathai, Dr. David Chu and Dr. T.S. Hale for their correspondence and encouragement. R EFERENCES [1] Y. Zhuang and J. Pan, “Random Distances Associated with Rhombuses,” arXiv:1106.1257, 2011.