Stochastic Geometry of Network of Randomly Distributed Moving Vehicles on a Highway
Gleb Dubosarskii Serguei Primak Xianbin Wang




]Gleb Dubosarskii

]Serguei Primak

]Xianbin Wang

Gleb Dubosarskii et al



Gleb Dubosarskii, Department of Electrical and Computer Engineering, Western University, Ontario, Canada. gdubosar@uwo.ca



[Summary]Vehicular ad-hoc networks (VANETs) have become an extensively studied topic in contemporary research.
One of the fundamental problems that has arisen in such research is understanding the network statistical properties, such as the cluster number distribution and the cluster size distribution.
In this paper, we analyze these characteristics in the case in which vehicles are located on a straight road.
Assuming the Rayleigh fading model and a probabilistic model of intervehicle distance,
we derive probabilistic distributions of the aforementioned connectivity characteristics, as well as distributions of the biggest cluster and the number of disconnected vehicles.

All of the results are confirmed by simulations carried out for the realistic values of parameters.






,
, and
 (2019),
Stochastic Geometry of Network of Randomly Distributed Moving Vehicles on a Highway, Intern. J. Commun. Systems, 2019;00:1–6.

Stochastic Geometry of Network 
of Randomly Distributed Moving Vehicles
 on a Highway
    X. Wang
    December 30, 2023
=====================================================================================








§ INTRODUCTION

Vehicular ad-hoc networks (VANETs) are developed to provide intelligent transportation that improves road safety, reduces transportation time, and decreases road congestion. One of the possible signal propagation scenarios is vehicle-to-vehicle (V2V) communication, which means a direct connection between two nearby vehicles. Another considered scenario is vehicle-to-infrastructure (V2I) communication, in which a vehicle sends and receives a signal from Road Side Units (RSUs) at the side of the road. RSUs  form infrastructure that improves the performance of VANETs and enhances information distribution.


Multihop information propagation in VANET is limited by high vehicular speed and frequent disconnections. To address these issues, significant progress was made in routing protocols <cit.> developed to reduce latency and stabilize the connection between vehicles, allowing vehicles to receive real-time travel-related information.

The high mobility of vehicles and the changing network topology lead to difficulties in the distribution of content, including images and video. To mitigate these shortcomings, cloud architectures are proposed that allow for the sharing of abundant resources, and for the regulating of network connectivity specifications. In <cit.>, the scheme, in which parked vehicles can play the role of RSUs, is proposed. In <cit.>, RSU cloud is introduced that has the ability to dynamically reconfigure data forwarding rules in the network to meet frequently changing service demands. Article <cit.> integrates both RSU and vehicles into one computational network that provides services, and proposes an optimal strategy for resource allocation.


VANET is a highly dynamic network, making it difficult to analyze from a deterministic point of view. This is the reason that statistical methods are used to make predictions under the assumption of particular probabilistic distributions of vehicles on the road and models of signal transmission. Considering this problem on a real map seems to be an impossible task, so, in most articles, the authors limit themselves to the cases of a highway or a crossroad. Articles <cit.> are devoted to the investigation of statistical characteristics of the network, such as the number of clusters, cluster size, and the number of disconnected vehicles. Let us discuss the content of these articles in more detail. In <cit.>, it is assumed that the probabilistic distribution of distance between cars is known, and as soon as the distance between neighboring vehicles does not exceed transmission range L, they are always able to establish a connection.
Under these assumptions, probability distribution of information propagation distance is found, as well as its  expected value and variation. Articles <cit.> discuss more realistic communication channel models, such as Rayleigh, Rician, and Weibull fading channels. For each of these models, the probability of connection between neighboring vehicles and the probability of full connectivity of the network are derived. The authors of <cit.> consider a more complex case in which the cars are located between two RSUs, but use a simple the model of the communication channel: they assume (as in <cit.>) that the vehicles are always connected within the constant transmission range and disconnected otherwise. Such advanced network characteristics as expected number of clusters, network connectivity probability, expected
number of vehicles required for a VANET to be fully connected, and expected network capacity are found within the framework of this model. In <cit.>, the authors suggest that vehicles in the cluster do not communicate with each other, but, instead, all vehicles communicate with the main car. Under presumption of the Rayleigh fading channel model, the Markov model of packet transmission, and the PHY decoding failure model, the average packet
loss probability is derived. In <cit.>, the evolution of the network over time is considered. In <cit.>, a case in which  a signal is transmitted to vehicles moving in the opposite direction and then sent back to the initial side is investigated. The probability of such a successful two-hop connection is derived under the assumption that vehicles move at a constant speed. Article <cit.> focuses on the study of link duration in the specific case, in which the speed of the vehicles grows linearly, reaches the limit, and then remains constant. In our article <cit.>, the network evolution is investigated under the presumption that the connection between consecutive cars is preserved according to the Markov probabilistic model; its parameters are explicitly expressed through the network macro parameters. Under these conditions, explicit formulas are obtained for the probability distribution of link duration between consequent vehicles, the cluster existence, and other fundamental network characteristics.




In this article, we consider the case of a vehicle network on a highway. Our goal is to give an extended description of the network, not only in terms of average values and variance, as is done in the previous articles (such as <cit.>), but to find the whole distribution of the number of clusters, cluster size, and the number of disconnected vehicles (here we call them idle vehicles). We use a more realistic model of the communication channel (Rayleigh fading channel) than in <cit.>. We advance further than the authors of <cit.> and find the distribution of the number of clusters and cluster size. The difference between this article and <cit.> is that we do not consider the evolution of the network over time, but concentrate in detail on more nuanced connectivity characteristics at a fixed moment in time.
Moreover, to the best of our knowledge, we are the first to investigate the distribution of the biggest cluster size. We assume that every car communicates only with the nearest car, in front, and behind it. This assumption is made in the previous statistical research in this area, in order to make the model simple enough to analyze.  Under the presumption of  Rayleigh fading model and known density function of intervehicle distance, we express the above mentioned distributions in terms of known parameters of the network. Our model can be applied to other scenarios if the probability of connection between every pair of consecutive vehicles has the same value p. We derive several interesting results describing network connectivity, namely, that the average size of cluster is a constant, approximately equaling 1/(1-p); the average number of clusters is proportional to the number of vehicles n equaling 1+(n-1)(1-p); and in the network, on average there is a constant fraction ≈ 1/(1-p)^2 of the idle vehicles. The average largest cluster of the network, however, is not a constant and grows as log_1/pn. We confirm these and other theoretical results by simulations carried out in the cases of different car densities and number of cars. The averages and variances of the studied properties are summarized in the following table (where γ=0.577… is an Euler constant):



Property        Average     Variance 

Number of clusters       1+(n-1)(1-p)     (n-1)p(1-p) 

Size of clusters       (1-p^n)/(1-p)     (2p^n+1n-2p^n n-p^2n-p^n+1+p^n+p)/(1-p)^2 

Size of the biggest cluster     ≈log_1/p{(n-1)(1-p)}+γ/ln(1/p)+0.5     ≈π^2/ln^2(1/p)+1/12 

Number of idle cars     2(1-p)+(n-2)(1-p)^2      -3np^4 + 10np^3 - 11np^2 + 4np+
8p^4 - 22p^3 + 18p^2 - 4p









The studied statistical characteristics have several practical applications. Cluster size distribution and maximum cluster size distribution provide us with tools for network load prediction. Also, this statistical information can be used for security purposes. The cluster size estimation, for example, allows for the prediction of the number of infected vehicles in the event of an attack on a cluster. Estimation of the number of disconnected vehicles makes it possible to evaluate the quality of connection, in order to make the percentage of disconnected vehicles acceptably low.


The paper is organized as follows. In section <ref> we describe the connectivity model and derive a formula for the probability of connection between two consecutive cars. In <ref> we derive all the probabilistic distributions mentioned above. Finally, in section <ref> the simulation results are presented and compared to the calculations done by the formulas from section <ref>. The appendix is devoted to a quick introduction to the theory of generating functions needed in section <ref>. We use the following abbreviations:





















We use the following abbreviations for the connectivity characteristics of the network:



ClustNum         number of clusters in the network 

ClustSize        size of the cluster               

BiggestClust     size of the biggest cluster       

IdleCars         number of disconnected vehicles   





The following variables and functions are used:



p     probability of connection between two consecutive vehicles 

  G_T     transmit antenna gain

  G_R     receive antenna gain

  P_tx     transmit power 

  α     path loss exponent

  K     constant associated with the path loss model

  d     distance between cars

  C     speed of light

  W     thermal noise power

  k     Boltzmann constant, k=1.38× 10^-23 J/K

  f_c     carrier frequency

  T_0     room temperature

  B     transmission bandwidth

  f_γ(x)     Signal-to-noise ratio probability density function

  f_d(x)     intervehicle distance probability density function

  ks     binomial coefficient 

  coeff_x^n f(x)     coefficient of the term x^n  in series f(x)

  clust(N)     number of clusters of vehicle network N

  count(r;N)     number of clusters of vehicle network N having size r

  Num(s,k)     number of networks  having k clusters, under condition that s of them have size r.

  γ     Euler constant, γ=0.577…

  









§ NETWORK MODEL
 

We consider the network of randomly distributed cars on a highway and suppose that every vehicle of the network can establish a connection only with the closest front and back neighbours.  We denote by d the distance between two consecutive vehicles. We assume that the distance between vehicles has random distribution with density function f_d(x). Typically it is assumed that distance between cars has
exponential distribution, normal distribution, gamma
distribution or log-normal distribution. These distributions correspond to different flow conditions. For instance, exponential distribution corresponds to low traffic flow conditions, while high traffic flow conditions are described by normal distribution.

Let us suppose that there are n cars on a road and distribution of distance between cars has a mean value M, therefore, the average distance between the first and the last car is (n-1)M, consequently, despite the fact that the road is long, it is improbable that the distance between first and last vehicle is very large.

We assume that the average channel Signal-to-noise ratio (SNR) between two consecutive vehicles γ is calculated using the following formula from <cit.>:

    γ=P_txK/d^α W,

where P_tx is the
transmit power, α is the path loss exponent and K is a
constant associated with the path loss model. The parameter K is given by the formula

    K =G_T G_R C^2/(4π f_c)^2,

where G_T and G_R are the transmit and receive antenna gains, C is the
speed of light and f_c is the carrier frequency. We assume that the antennas are omni directional

    G_T = G_R = 1

and f_c=5.9 GHz.
The thermal noise power can be determined by the formula

    W =k T_0 B,

where k =1.38× 10^-23 J/K is the Boltzmann constant, T_0 (T_0 =300^∘ K) is the room
temperature, and
B (B = 10 MHz) is the transmission bandwidth.











The SNR density function f_γ(x) (is different from f_d) is given by the formula

    f_γ(x)=1/γe^-x/γ.

It is assumed that there is a connection between consecutive cars if γ is greater than the threshold Ψ. Therefore,

    P(γ>Ψ)=∫_Ψ^∞ f_γ(x)dx=e^-Ψ/γ.



Let us denote the probability that two consecutive vehicles can establish a connection by p.
By using (<ref>), (<ref>) and following the logic of <cit.> we can derive formula expressing value of the probability p through intervehicle density function f_d(x):

    p=∫_0^∞ P(γ(x)>Ψ)f_d(x)dx= ∫_0^∞ e^-Ψ x^α W/P_txKf_d(x)dx.


The value of the parameter p lies within an interval (0, 1) and plays a prominent role in the further investigations. It determines the quality of communication. A larger value  of parameter p leads to a better quality of connection and consequently a bigger size of clusters.














§ CONNECTIVITY OF THE NETWORK
 




 §.§ Distribution of number of clusters 
 


The main achievement of this article is that we drive not only the average values of various connectivity characteristics, as in the previous articles (see the Introduction), but also their probability distributions and variations. In this section we investigate such a significant characteristic of the network as distribution of number of clusters. In this section we establish the following formula for the probability of number of clusters ClustNum equaling r:

    P(ClustNum=r)=n-1r-1 p^n-r(1-p)^r-1,

where parameter p is determined in (<ref>).
In other words, number of clusters has binomial distribution.

To prove formula (<ref>) we need to better understand the structure of the network. The idea behind the derivation is to consider connections between vehicles as Bernoulli trials. There are n vehicles in the network establishing no more than n-1 connections between each other, thus, we can think about them as n-1 independent trials, in which each of them is successful if consecutive vehicles can connect, and unsuccessful otherwise. Clusters are assumed to be formed by a series of several consecutive vehicles, therefore, if there are r clusters in the network, then exactly r-1 vehicles cannot establish a connection. From the above we could conclude that the probability P(ClustNum=r) equals the probability that in n-1 trials exactly r-1 are unsuccessful with the probability of success p. This probability is given by well-known formula for binomial distribution, which in our case is  exactly formula (<ref>).

By using known formulas for mean and variance of binomial distribution one can derive that the average number of clusters and their variance are given by the formulas

    E[ClustNum]=1+(n-1)(1-p),


    Var[ClustNum]=(n-1)p(1-p).

Here we consider a disconnected vehicle as a separate cluster. The average number of clusters formed by at least two cars can be calculated by substracting from (<ref>) the average number of idle cars derived later in section <ref> (see the formula (<ref>)). Therefore, it is given by the following formula:

    1+(n-1)(1-p)-2(1-p)-(n-2)(1-p)^2.

Remark.  We see from (<ref>) that the average number of clusters in the system grows linearly with the number of vehicles with a growth factor 1-p.



 §.§ Distribution of cluster size


In this subsection we concentrate on finding probability P(ClustSize = r) that size of arbitrary cluster in the network is r.
We prove the following formula:


    P(ClustSize=r)=
                          p^r-1(1-p),     r<n, 
    
                          p^n-1,    r=n.

Unfortunately, we do not know a simple proof. So, we use mathematical apparatus of generating functions, which allows for reformulating the problem in terms of series and use different analytical methods to operate with them.

We denote number of clusters of some vehicle network N by clust(N) and number of clusters having size r by count(r;N). Let us establish the formula

    P(ClustSize=r)=∑_k=1^n ∑_N:clust(N)=kcount(r;N)/k  P(N),

where P(N) is the probability of the network N and the second summation is carried out over all networks N with the restriction clust(N) = k.
The network could have from 1 to n clusters, so k varies from 1 to n, and for each value of the parameter k, we consider all networks with k clusters. Finally, for each such case, we sum up the probabilities that a randomly selected cluster has size r. Since the network N contains count(r;N) clusters of size r, then the probability of choosing a cluster of size r among k clusters is given as count(r;N)/k. We should multiply the last probability by P(N) in order to calculate the probability that the cluster of size k is chosen in the network N.


We denote networks having k clusters, under condition that s of them have size r by N_s,k,
therefore, count(r;N_s,k)=s. Since the network has k clusters, s varies from 1 to k. We rewrite the summation over all networks N as the summation over the networks N_s,k:





    P(ClustSize=r)=
    ∑_k=1^n ∑_s=1^k ∑_N_s,kcount(r;N_s,k)/k  P(N_s,k)=
    ∑_k=1^n ∑_s=1^k ∑_N_s,ks/k  P(N_s,k).

Repeating the steps of derivation of (<ref>) we conclude that

    P(N_s,k)=(1-p)^k-1p^n-k.

From (<ref>) and (<ref>) we derive that

    P(ClustSize=r)=∑_k=1^n ∑_s=1^k ∑_N_s,ks/k (1-p)^k-1p^n-k=
    ∑_k=1^n (1-p)^k-1p^n-k∑_s=1^k s Num(s,k)/k.


Let us establish the formula

    Num(s,k)=coeff_x^nks x^r s (x+x^2+x^3+… - x^r)^k-s,

where ks is a binomial coefficient and coeff_x^n P(x) is a coefficient of the term x^n in polynomial P(x). The important step is to understand that the value of Num(s,k) equals the number of representations of the integer n as a sum of k summands under condition that exactly s of them equal r. This is true, because the clusters are formed by group of consecutive vehicles. Therefore, we can use the formula (<ref>) in the appendix identical to the formula (<ref>) for calculation of Num(s,k).

From (<ref>) we obtain

    ∑_s=1^k s Num(s,k)/k = 1/k coeff_x^n∑_s=1^k kss x^r s (x+x^2+x^3+… - x^r)^k-s= 1/k coeff_x^n∑_s=1^k ks s x^r s(x/1-x - x^r)^k-s.

The following identity

    ∑_s=1^k ks s x^r s y^k-s=k(x^r+y)^k-1x^r

holds. We substitute y=x/1-x - x^r into (<ref>)
and use (<ref>) to derive the following:

    ∑_s=1^k s Num(s,k)/k
    =
    coeff_x^n(x^r+x/1-x - x^r)^k-1x^r 
    =
    coeff_x^n(x/1-x)^k-1x^r.

Combining equations (<ref>) and (<ref>) we obtain

    P(ClustSize=r)=
    ∑_k=1^n coeff_x^n(x/1-x)^k-1x^r (1-p)^k-1p^n-k
    =
    p^n-1∑_k=1^n coeff_x^n(x/1-x)^k-1x^r (1-p/p)^k-1  =
    p^n-1∑_k=1^∞ coeff_x^n-r(x/(1-x)1-p/p)^k-1.

The last equality in (<ref>) is true because of the identity

    p^n-1∑_k=n+1^∞ coeff_x^n-r(x/(1-x)1-p/p)^k-1=0.

The last identity is valid, because the series ∑_k=n+1^∞(x/(1-x)1-p/p)^k-1 has nonzero coefficients only of x^i,i≥ n. Therefore, the coefficient of x^n-r equals zero.
Applying the formula of the sum of geometric progression to (<ref>) we finally derive

    P(ClustSize=r)=
    p^n-1coeff_x^n-r∑_k=1^∞(x/(1-x)1-p/p)^k-1 =
    p^n-1coeff_x^n-r1/1-x/(1-x)1-p/p=
    p^n-1coeff_x^n-r1-x/1-x(1+1-p/p)
    =
    p^n-1coeff_x^n-r (1-x) ∑_k=0^∞ x^k p^-k =
    
            p^n-1( p^-n+r -p^-n+r+1),     r<n, 
    
            p^n-1,     r=n
    
    =
            p^r-1(1-p),     r<n, 
    
            p^n-1,     r=n.

Formula (<ref>) is proven.


Now we are ready to calculate the average value and the variance of the distribution (<ref>). Firstly, we find the first two moments by the formulas

    M_1=np^n-1+(1-p)∑_α=1^n-1α p^α-1,


    M_2=n^2p^n-1+(1-p)∑_α=1^n-1α^2 p^α-1.

By using the identities

    ∑_α=1^n-1α p^α-1=1+((n-1)p-n)p^n-1/(1-p)^2,


    ∑_α=1^n-1α^2 p^α-1=1+p-((n-1)^2p^2+(-2n^2+2n+1)p+n^2)p^n-1/(1-p)^3

we derive

    M_1=1-p^n/1-p,


    M_2=2p^n+1n-2p^nn-p^n+1-p^n+p+1/(1-p)^2.

From formulas (<ref>) and (<ref>) we finally obtain

    E[ClustSize]=M_1=1-p^n/1-p,


    Var[ClustSize]=M_2-M_1^2
    =2p^n+1n-2p^n n-p^2n-p^n+1+p^n+p/(1-p)^2.


Remark.  It follows from the formulas (<ref>) and (<ref>) that the average cluster size approximately equals 1/(1-p) (constant!) and its variance approximately equals p/(1-p)^2, since p^n→ 0, n→∞.




 §.§ Distribution of size of the biggest cluster


In the previous section we explored the question about distribution of cluster size. It was established that the average cluster size is
approximately 1/(1-p), therefore, being a constant. However, it is natural to investigate this problem further and understand how the biggest cluster size deviates from the average.





We denote the probability that the biggest cluster of the network is formed by exactly r vehicles by P(BiggestClust=r). Let us introduce the function g(k) by the formula




    g(k)=∑_m=1^⌊ n/(k+1) ⌋ (-1)^m p^mk(1-p)^m-1n-1-mkm-1+
    ∑_m=0^⌊ (n-1)/(k+1) ⌋ (-1)^m p^mk(1-p)^mn-1-mkm,

where ⌊ x ⌋ means rounding down. We establish the following formula:

    P(BiggestClust=r)=
                          p^n-1,    r=n,
    
                          g(r)-g(r-1),     1<r<n, 
    
                          (1-p)^n-1,    r=1.

The cases r=n and r=1 are trivial, because under these assumptions all vehicles are connected or disconnected respectively. Thus, we need to prove the formula (<ref>) only in the case 1<r<n.
We denote the length of the longest run in the sequence of the n-1 Bernoulli trials by L_n-1. The following equation is proven in <cit.>:

    P(L_n-1≤ r-1)=g(r),

where g(k) is determined in (<ref>). The number of vehicles in the network is n, consequently, there are n-1 connections between them and we can consider them as a sequence of Bernoulli trials as before. The probability P(BiggestClust = r) equals the probability that the network has the longest run equaling r-1 (number of connections is less than the number of cars by 1). From the above we derive

    P(BiggestClust=r)=P(L_n-1=r-1)=P(L_n-1≤ r-1)-P(L_n-1≤ r-2)=g(r)-g(r-1).

Formula (<ref>) is proven.

Despite the fact that the formula (<ref>) can be used for the calculation of the probabilities P(BiggestClust=r), it is overly complicated to predict behaviour of the network with growing number of vehicles.
Fortunately, the asymptotic of the longest successful run with growing n is already found (see, for instance, <cit.>),
in which the expected value and variance of the longest run are derived for sufficiently large values of n. Taking into account that there are n-1 connections in our network, the fact that the number of connections is less that number of vehicles in a cluster by 1, and the formulas from above mentioned articles we conclude that the expected value and variation of the biggest cluster of our network are

    E[BiggestClust]≈log_1/p{(n-1)(1-p)}+γ/ln(1/p)+0.5,


    Var[BiggestClust]≈π^2/ln^2(1/p)+1/12,

where γ=0.577… is Euler constant.

Remark.  From the previous derivations we know that the size of average cluster is ≈ 1/(1-p), however, from (<ref>) we conclude that the size of the biggest cluster grows logarithmically with the number of vehicles in the network.



 §.§ Distribution of idle cars
 


We call car idle if it fails to establish a connection with any of its neighbours.
Unfortunately, there is no simple formula for calculating the probability P(IdleCars=r) that the network has exactly r idle vehicles. One can prove by using method of generating functions that the probability P(IdleCars=r) can be calculated by the formula

    P(IdleCars=r)= p^n+1/(1-p)^2(n-r)!d^n-r/dx^n-r{(1-x)^r+1/((1-x)p/1-p-x^2)^r+1}|_x=0,

where k! is a factorial and d^k/dx^kf(x)|_x=0 is k-th derivative of function f(x) calculated at the point x=0.

Despite the fact that the formula of distribution of idle vehicles is quite complicated, we can derive simple expression for the expected number of idle vehicles. Let us denote the random variable that equals 1 it k-th vehicle is idle and 0 otherwise by ξ_k.
Let us prove that the expected value of  ξ_k can be determined by this formula

    E[ξ_k]=
          (1-p)^2,     1<k<n, 
    
          1-p,     k=1  k=n.

It is enough to prove the formula (<ref>) in the case 1<k<n, since derivations in other cases are similar. If 1<k<n, then the vehicle has exactly two neighbours. Since the probability of disconnection equals (1-p), the probability of car being idle equals (1-p)^2. Finally,

    E[ξ_k]=1×(1-p)^2+0×(1-(1-p)^2)=(1-p)^2.

Formula (<ref>) is proven.

Therefore, the average number of idle cars is

    E[IdleCars]=E[∑_k=1^nξ_k]=∑_k=1^nE[ξ_k]=2(1-p)+∑_k=2^n-1 (1-p)^2=2(1-p)+(n-2)(1-p)^2.


Let us calculate the variance of distribution of number of idle vehicles. It is given as follows:

    Var[IdleCars]=E[(∑_k=1^nξ_k)^2]-E[IdleCars]^2=
    ∑_k=1^n E [ξ_k^2]+2∑_k=1^n-1∑_j=k+1^n E[ξ_kξ_j]-E[IdleCars]^2.





If two vehicles are not neighbours then the variables ξ_k and ξ_j are independent and, therefore, E[ξ_kξ_j]=E[ξ_k]E[ξ_j], otherwise E[ξ_kξ_j] can be derived by analogy with the derivation of (<ref>). Thus, the following formula

    E[ξ_kξ_j]=E[ξ_k]E[ξ_j],     j>k+1, 
    
          (1-p)^3,     j=k+1  1<k<n-1,
    
          (1-p)^2,     j=k+1, k=1  k=n-1.

is valid for j> k. Using (<ref>), we derive

    ∑_k=1^n-1∑_j=k+1^n E[ξ_kξ_j]=
    ∑_k=1^n-1∑_j=k+2^nE[ξ_k]E[ξ_j]+
    ∑_k=2^n-2E[ξ_kξ_k+1]+
    E[ξ_1ξ_2]+E[ξ_n-1ξ_n]
    =
    ∑_k=1^n-1∑_j=k+2^nE[ξ_k]E[ξ_j]+(n-3)(1-p)^3+2(1-p)^2.

Consequently, by using (<ref>) and (<ref>) and taking into account that ξ_k^2=ξ_k we obtain

    Var[IdleCars]=
    ∑_k=1^n E [ξ_k^2]+2∑_k=1^n-1∑_j=k+1^nE[ξ_kξ_j]-
    (E[∑_k=1^nξ_k])^2=
    ∑_k=1^n E [ξ_k^2]+2∑_k=1^n-1∑_j=k+2^nE[ξ_k]E[ξ_j]
    +2(n-3)(1-p)^3+4(1-p)^2-
    ∑_k=1^n E [ξ_k]^2-2∑_k=1^n-1∑_j=k+1^n E[ξ_k]E[ξ_j]
    
    =∑_k=1^n E [ξ_k]-∑_k=1^n E [ξ_k]^2
    -2∑_k=1^n-1E[ξ_k]E[ξ_k+1]+2(n-3)(1-p)^3+4(1-p)^2.

We derive the explicit formulas for every sum in (<ref>). Equality (<ref>) gives us

    ∑_k=1^n E [ξ_k]=2(1-p)+(n-2)(1-p)^2.

By analogy with derivation of (<ref>) we can deduce that

    ∑_k=1^n E [ξ_k]^2=2(1-p)^2+(n-2)(1-p)^4.

The last sum in (<ref>) can be derived using (<ref>) as follows:

    ∑_k=1^n-1E[ξ_k]E[ξ_k+1]=
    ∑_k=2^n-2E[ξ_k]E[ξ_k+1]+
    E[ξ_1]E[ξ_2]+E[ξ_n-1]E[ξ_n]=(n-3)(1-p)^4+2(1-p)^3.


Combining formulas (<ref>)–(<ref>) we obtain

    Var[IdleCars]=
    2(1-p)+(n-2)(1-p)^2-2(1-p)^2-(n-2)(1-p)^4-2(n-3)(1-p)^4-4(1-p)^3
    +2(n-3)(1-p)^3+4(1-p)^2=-3np^4 + 10np^3 - 11np^2 + 4np + 8p^4 - 22p^3 + 18p^2 - 4p.


Remark.  Formula (<ref>) leads us to an important conclusion that in average there is a constant fraction ≈ (1-p)^2 of idle vehicles in the network.




§ SIMULATIONS
 

We use the model described by the equations (<ref>)–(<ref>) and
make simulations for n=10 and n=20 vehicles on the road assuming exponential distribution of the intervehicle distance with probability density function ρ e^-ρ x, where ρ is a vehicle density.
We consider two scenarios. In the first case, the density is low ρ = 0.01 (10 cars per kilometer) which is the case for rural traffic, in the second case ρ = 0.05 (50 cars per kilometer), which corresponds to urban traffic.
We use the following values of the parameters taken from <cit.> (see their descriptions in section <ref>):


G_T = G_R = 1, f_c=5.9 GHz, α = 2.5, 

T_0 =300^∘ K, B = 10 MHz, Ψ=10 dB.


We use the transmit power value P_tx = 4 dBm. This value corresponds to the message transmission over short distances up to 99 meters <cit.>.


Graphs of all network properties are plotted in the cases a) n = 10, ρ = 0.01, b) n = 10 ,  ρ = 0.05, c) n = 20 ,  ρ = 0.01, and d) n = 20 ,  ρ = 0.05. In the case ρ = 0.01, the probability of connection between two consecutive cars is p = 0.5576, in the case ρ = 0.01 the probability of connection is p = 0.9525 (it does not depend on the number of cars within the model). To verify the obtained formulas we generate sequence of vehicles randomly 100000 times and then calculate network connectivity distributions from these sample values.
The graphics of the simulations are identical to the results obtained by the formulas, which confirms their correctness.
















On Figure 1 the graphics of distribution (<ref>) of number of clusters are presented as well as simulation results for scenarios a, b, c, and d.
As one can see from Figure 1 in cases a and c, the connection is less stable (p = 0.5576), therefore, the network on average has sufficiently large number of clusters 4.9812 and 9.4048, respectively. In cases b and d, the connection occurs with a much higher probability p = 0.9525, therefore, in these cases the network tends to be fully connected, which is expressed in a high probability of having 1–3 clusters. In these cases average cluster sizes are significantly lower: 1.4278 and 1.9031, respectively.
The fact that the distributions on Figure 1 are close to normal is not surprising, since, as well known, the binomial distribution in the case n →∞ tends to normal.



On Figure 2 the graphs of the cluster size distribution are presented. The results are obtained by the formula (<ref>) and compared to the simulation results.
The same logic as in the previous paragraph leads us to the conclusion that the cluster size in cases a and c should be smaller than in cases b and d. This hypothesis is confirmed, because the average cluster sizes in these cases are 2.2541 and 2.2606, respectively, versus 8.1109 and 13.0948 in cases b and d. The decrease in graphs in cases a and c is explained by the fact that in these cases the connection is less stable, therefore, the probability of a cluster having a size i decreases with increasing of the parameter i.
Graphs b and d have a pronounced peak, since in the case of stable connection, the network tends to be fully connected, therefore, a cluster having size n has a maximum probability.








 The graphs of the biggest cluster size distribution obtained by the formula (<ref>) and simulation results are presented on Figure 3. By analogy with the explanation of the behavior of cluster size distribution graphs, the behavior of the maximum cluster size distribution can be explained. The average values in cases a, b, c, and d equal 4.0425, 8.9048, 5.2253, and 16.0203, respectively.










Finally, the graphs of the distribution of the number of idle vehicles are depicted on Figure 4. The simulation results are compared with the probabilities calculated by the formula (<ref>). One can explain the graphs of distribution of idle cars by the fact that in the case of a more stable connection (graphs b and d), the probability that idle cars are not present in the network is close to 1, and then quickly decreases with increasing their number.
On graphs a and c, on the contrary, the probability of the network having several idle vehicles is quite high due to the less stable connection. This can also be explained in terms of average numbers of idle vehicle in cases a, b, c, and d equaling 2.4501, 0.1131, 4.4069, and 0.1357 respectively.




















§ CONCLUSION

This article aims to present versatile investigation of VANET connectivity properties in the case, in which vehicles are distributed on the road. It expresses results in terms of parameters of known probability distributions of intervehicle distance and connectivity model. We derive distributions of number of clusters, cluster size, size of the biggest cluster and number of  idle vehicles as well as calculate expected value and variance of every of these characteristics. The results are confirmed by the simulations in the cases of urban and rural traffic flow.

























§ METHOD OF GENERATING FUNCTIONS
 

In this subsection we give a brief exposition of  mathematical method of generating functions. This elegant and effective method is used in this article to obtain distribution of cluster size. The essence of the method is that it
treats infinite sequence of numbers a_k as the coefficients of a power series
∑_k=0^∞ a_k x^k.
We use this method to establish a relation between the number of different representations of integer number as a sum of integer numbers with some restrictions. We touch only one aspect of this theory, for other applications we recommend to read the book <cit.>. Here we formulate several problems in ascending order of complexity. We need the result of the problem 3, but in order to obtain it we solve problems 1 and 2.

Problem 1. What is the number of representations of positive integer number n as a sum of k positive integer summands?

We denote coefficient of x^n in power series F(x) by coeff_x^n F(x).
It is stated that the following coefficient:

    coeff_x^n(x+x^2+x^3+…)^k

equals the number of representations of n as k summands. Let us prove it. We can rewrite the sum (x+x^2+x^3+…)^k as

    ∑_α_1∑_α_2…∑_α_k x^α_1x^α_2… x^α_k=
      ∑_α_1∑_α_2…∑_α_k x^α_1+α_2+…+ α_k=
      ∑_l=1^∞ x^l ∑_α_1+α_2+… +α_k =l  1.

Therefore, the coefficient (<ref>) indeed equals the number of representations of n as a sum of k summands α_1,α_2,…,α_k.

Problem 2.  What is the number of representations of positive integer number n as a sum of k positive integer summands not equal r?

The following formula gives the solution to this problem:

    coeff_x^n(x+x^2+x^3+… -x^r)^k.

The only difference between formulas (<ref>) and (<ref>) is that we subtract x^r because integer summands do not equal α. It can be proven similar to the proof of formula (<ref>).

Problem 3.  What is the number of representations of positive integer number n as a sum of k positive integer summands with the following restriction: among them exactly s numbers equal r?

The answer is given by the following equality:

    coeff_x^n{ks x^r s(x+x^2+x^3+… -x^r)^k-s}.

because we can choose s summands equaling r in ks ways and other k-s summands should not be equal r (see problem 2).





































