Given a mesh network of N nodes, where each node is connected to C other nodes, what is the probability a node is connected to another directly, or indirectly through a maximum of D bridge nodes?
Please look for the latest attempt within the answers.
Attempt 1 (wrong)
(As pointed by Amaury.)
I have developed a function, but I doubt it is correct for 1) I've never been good at calculating probabilities, and 2) it is easy for this function to yield greater than 1 probabilities. Here it goes anyway:
The probability of a direct connection would be $$P(N,C,0) = \frac{1}{N-1}$$
The probability of an indirect connection should be multiplied by $C$, which yields
$$P(N,C,1) = \frac{1}{N-1} + C \frac{1}{N-1}$$
Abstracting the pattern, we should get
$$P(N,C,2) = \frac{1}{N-1} + C \left(\frac{1}{N-1} + C \left(\frac{1}{N-1}\right)\right)$$
for a depth of 2 bridge nodes. And generalizing the abstraction, I get
$$P(N,C,D) = \frac{1}{N-1} \sum_{n=0}^{D}{C^{D-n}}$$
Now, is this correct? Please point my flaws otherwise.
Your formulas are wrong, consider the extreme case in which $C=N-1$, then the probability of any node being connected to other one is $0$, however your first formula always yields $\frac{1}{N-1}$. If you keep considering this case, your second, third, and generalized formulas give a number greater than $1$!
Your first formula should be given nodes $a$ and $b$ out of $N$ nodes in which each one is connected to other $C$ nodes:
$$ P(\mbox{a and b are connected})=\frac{C}{N-1} $$
you just have to think about it as: "I have a node, and I will pick up another randomly out of $N-1$ of which $C$ are connected to the one I have". Sadly, I think there is not enough information to generalize this further.