1. ## Dolev-Klawe-Rodeh

Can anybody do this;

The algorithm of Chang and Roberts achieve the 0(NlogN) (N the number of nodes) complexity of messages in the medium case, but at worst however it achieves 0(n^2). The algorithm of Peterson of/Dolev-Klawe-Rodeh achieves complexity of messages the O(NlogN) at worst situation improving the algorithm of Chang and Roberts for the leader election of head in rings of one way direction, where each node has his own unique identity.
The algorithm is based on the following idea.Firstly each identity is active, but in each round some identities becomes passive,as we will show then.In a round an active identity compares itself with the active identities of her two neighbouring nodes, that are found the one at the time and the other contrary to the time of indicators of clock. Supposing that is elected the smaller identity, if an active identity constitutes local minimal, then she remains active and goes to the next round, otherwise she becomes passive. So, after logN rounds will only have remained in the ring an active identity and this gains the election.
This idea can be applied directly in rings of that are double direction. In one way round of direction,the messages can move itself only at a time (eg that of indicators of clock), thing that makes difficult the acquisition of identity that is found at the direction of movement of messages.We suppose that we have a ring with three active in line identities r, q, p. Then q it can receive the message of r, but it cannot receive the message of p because the ring is one way of direction and should not waits for a entire circle to receive it.However in order to be the comparison,q sends her identity in the p and the r does not send simply her identity in q, but q promotes him in the p, in order that the p make the comparison. The activities that lose the election and become passive, simply promote the messages that they receive. If a activity receives a identity that is equal with hers then it is called leader, while if it receives a identity different from hers compares this identity with hers and with running minimal that it has kept from the previous comparisons. If the missed identity is smallest, then the activity becomes passive and it keeps new minimal.
For each activity it will be supposed you store her identity, running minimal, the identity of the leader and her situation.

It's new for me and i have no idea!!!

2. Lemme guess. Homework?

3. Yes of course someone can "do" that - I'm sure the author can at least.
Do you have any code to post, or did you get as far as "The algorithm" and give up?

4. I don't give up but i can't do that.I don't know how...i just need help!!!

5. The idea about homework is described here. In short, you either ask a very specific question, or you post some code that you have a problem with and ask a question on that code. You don't just post your entire homework description and hope that someone produces it for you, complete and ready to hand in.

--
Mats

6. Ok i found this but i can't understand it.I don't think that the following is c...

7. ## dolev

I can't understand the following...Is it c;

8. No, that is not C (or C++). I'm not quote sure what it is..

--
Mats

9. Rather than trying to steal someone else's code (whatever that is), why don't you tackle the problem yourself?

Try not to spam your question on every forum on the internet. I hope no-one is stupid enough to do your homework, ask MacGyver -- he might do it

Go and ask your teacher, or whoever gave you the assignment and say you have no idea -- they might be able to help you!

10. it is SPIN language
http://en.wikipedia.org/wiki/Spin_(programming_language)

Your best bet it do do it in C and work on it. Post code (yours) that you don't get and the programmers here will provide resources and hints to get you there. Trust me I know!!

11. > I can't understand the following...Is it c;
Nope, though it looks like it might use the C pre-processor.

With all those 'do od' constructs, it reminds me of some of the old ALGOL languages, though which one I'm not sure.

12. For a moment, I thought it was Verilog.

--
Mats