wonder_laptop -3 Junior Poster in Training

Hello guys,

I'm not sure if i'm in the right forum,but i couldn't find more related one to my question.

suppose we have a strongly connected network, how can we know how many nodes there are int ?
suppose its a synchronous mode.

i thought of a way :

1)we apply leader election algo.
2)then the leader will broadcast a message to all of the nodes in the Network
3)and it will count the number of response it got.

of course it ( the leader) has to make sure it doesn't get more than one message from each
process ( easy, we use the UID of each process)

but one bad thing about this algo is that i'm carrying the overhead of leader election algo.
is there any more efficient way of doing it ?

Looking forward for your opinion .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.