2

I'm new to the whole distributed system world. I need help to how to form a cluster on this environment and also decide which one is the CH(cluster header). I want use spanning tree to choose the nodes with highest energy to be the CH. When CH is chosen, every other nodes should send their information to CH and CH send it to the base station(the red node).

The problem is I don't know how the algorithm should be. Here's some algorithm I tried to do

Clustering algorithm

  • Every one hour, nodes start a spanning tree to find the nodes which contains most energy
  • If a nodes which receive a “search” message:

    -compare the energy left of each nodes, if the energy from the sender is lower than itself. Reply with it own ID. If the energy from the sender is higher than itself. Reply with the senders ID and pass it to the other neighbor

  • When a nodes receives it’s own ID, it make it self cluster header
  • When other nodes knows the cluster header has been choose start sending information to cluster header

Environment:

Assume that this is a router network

The number is energy power of each nodes

The red nodes is the base station.

alt text

TrieuBui
  • 51
  • 1
  • 5
  • If you don't tell us what is wrong with the algorithm you tried, it is hard to know what you want help with. – Nick Fortescue Jan 06 '11 at 08:14
  • I don't think he knows how the algorithm looks like, he might need some ideas to start to design it. – Manuel Salvadores Jan 06 '11 at 17:38
  • @Nick Fortescue: My algorithm doesn't sounds good. I need to draw a flow chart and pseudo code to this environment. I'll try to explain what I can't figure out. Here's an example: * A has energy 15 and B has energy 7 * When A send a search message to B. B compare the energy of itself and A. In this case A has more energy than B so B will reply the ID of A. * When A receive the message it make itself a cluster header, but how about node C, D, E? maybe they have more energy than A @msalvadores: Exactly, I need some help with the thinking or how you guys would have choose the algorithm – TrieuBui Jan 07 '11 at 06:09

2 Answers2

0

Your algorithm is almost perfect, the only thing missing is the information about the diameter of the network.

The diameter of a network is the distance of the two most distant nodes of the network.

Now, let's denote your algorithm, routine A and the diameter of the network diam(G). Before continuing further lets agree that it is trivial to prove that a simple flooding algorithm starting at an arbitrary node of the (connected) network needs diam(G) rounds to reach every node of the network.

First we have to make the assumption that the node with the most energy is unique (ie. no other node with the same amount of energy exists).

If every node knew beforehand the diameter of the network then the problem would be solved very easily, we just call routine A for diam(G) rounds and after that, only one node will have a message identical to his own ID and that node sets his variable leader to true and then floods the network with the "Leader is elected, and it is me" message.

Laurel
  • 5,965
  • 14
  • 31
  • 57
ios k
  • 16
  • 2
-1
Cluster Form
{
In each cluster
If(Energy==…..)   
{
Energy= ……..;
Send    (CH_ID,CLUSTER_ID_CH)
}
If(Node_ CLUSTER _ID_CH== CLUSTER_ID_CH)
   {
send Join_Message(NODE_ID,CH_ID)
//when receving Join_Messag
CH send  (TDMA)
}
}**


for more information send me to  e.ouchker@gmail.com