# of levels |
# of routers |
1 |
$2^1-1=1$ |
2 |
$2^2-1=3$ |
3 |
$2^3-1=7$ |
4 |
$2^{4}-1=15$ |
At $n^{th}$ level, # of routers = $\left \lceil \dfrac{1}{2}\times(2^n-1) \right \rceil$
At $(n-1)^{th}$ level, # of routers = $\left \lceil \dfrac{1}{4}\times(2^n-1) \right \rceil$
.
.
At $n^{th}$ level, # of hops = $n-1$ hops
At $(n-1)^{th}$ level, # of hops = $n-2$ hops
.
.
Total # of hops from router to root router:
$\left \lceil \dfrac{1}{2}\times (2^n-1) \right \rceil \times (n-1)+$ $\left \lceil \dfrac{1}{4}\times (2^n-1) \right \rceil \times (n-2)+$ $\left \lceil \dfrac{1}{8}\times (2^n-1)\right \rceil \times (n-3)+.....$
Putting values from the question:
$\left \lceil \dfrac{1}{2}\times (2^4-1)\right \rceil \times 3+\left \lceil \dfrac{1}{4}\times (2^4-1)\right \rceil \times 2+$ $\left \lceil \dfrac{1}{8}\times (2^4-1)\right \rceil \times 1=34$
$\dfrac{34}{15}=2.26$
mean # of hops from router to another router you will multiply $2.26\times 2$ which will give you $4.53$.