Question

A ring consists of n nodes. Each node holds a value known only to itself. Design...

A ring consists of n nodes. Each node holds a value known only to itself. Design an efficient single-initiator protocol to find the minimum value in a ring. Prove its correctness and analyze its costs.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note: Each node has 2 neighbors in the ring.

Without lose of generality, lets say we have n nodes from 1....n.

Lets san The ring looks like this 1-2-3.....-n-1

Not that n is linked back to 1 which forms ring, if that edge was not there then there won't be a ring formation by this connection.

Algorithm:

Lets say node 1 is initiator.

  • Node 1 sends its value to its neighbor say 2.
  • Node 2 sends min(value got from 1, its own value) to its neighbor who have not sent it the result. 2 has neighbors 1 and 3. 1 sent 2 the value so now 2 will send value to only 3.
  • By doing step 2 on rest of nodes now we look at what happens at n.
  • n gets value from n-1. It sends min(its own value, value got from n-1) to 1.
  • So now 1 have got the minimum value

Cost-

Each node sends message once so,

we are sending n messages to find minimum value in ring.

Correctness-

Proof that the value find is indeed minimum.

Assume minimum value was m at node i.

So when node i sends value to next node it does

x = min(m,value it got)

since m is minimum so x evaluates to m.

So node i sends m to next node.

Now this m will reach 1 without reducing further as m was the minimum value of a node in ring.

Add a comment
Know the answer?
Add Answer to:
A ring consists of n nodes. Each node holds a value known only to itself. Design...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Joseph ring 【Problem description】 N people numbered as 1,2...,n sit in a circle in clockwise, and each has only one...

    Joseph ring 【Problem description】 N people numbered as 1,2...,n sit in a circle in clockwise, and each has only one password of positive integer. Firstly a positive integer is arbitrarily selected as the upper limit value m, then numbering off from 1 to m in clockwise is carried out, and the person reporting m will leave the circle and his password will be used as the new m value for the next round of numbering off. This process will carry...

  • A Hvdraulic Svstem Design A hydraulic-lift table is used to raise a 1506-kg crate It consists of ...

    It is about hydraulic system design. Please do a and b. A Hvdraulic Svstem Design A hydraulic-lift table is used to raise a 1506-kg crate It consists of a platform and two identical linkages on which hydraulic cylinders exert equal forces. (Only one linkage and one cylinder are shown.) Members EDB and CG are each of length 2a, and member AD is pinned to the midpoint of EDB. If the crate is placed on the table, so that half of...

  • Recursion and Trees Application – Building a Word Index Make sure you have read and understood...

    Recursion and Trees Application – Building a Word Index Make sure you have read and understood ·         lesson modules week 10 and 11 ·         chapters 9 and 10 of our text ·         module - Lab Homework Requirements before submitting this assignment. Hand in only one program, please. Background: In many applications, the composition of a collection of data items changes over time. Not only are new data items added and existing ones removed, but data items may be duplicated. A list data structure...

  • 1. Focusing on only the inpatient care cost (i.e., ignoring operating room costs), what is the...

    1. Focusing on only the inpatient care cost (i.e., ignoring operating room costs), what is the cost of a TAH (non-oncology) under each of the cost accounting systems? A tuboplasty? A TAH (oncology)? What accounts for the differences? Croswell University Hospital This report doesn't describe where our costs are generated. We're applying one standard to all patients, regardless of their level of care. What incentive is there to identify and account for the costs of each type of procedure? Unless...

  • In Problem Set 7 you designed and implemented a Message class. This time, let's design and...

    In Problem Set 7 you designed and implemented a Message class. This time, let's design and implement a Mailbox class in a file named Mailbox java. Do the following with this class • You may use the Message class from PS 7. You will have to add new features to the Message class from PS 7 as you work through this problem. You are welcome to start with my sample solution if you wish • Suppose there are multiple mail...

  • . Required Question: 1. Should Matt try to suggest a better method for reducing purchasing costs?...

    . Required Question: 1. Should Matt try to suggest a better method for reducing purchasing costs? (200 words) 3. How can Matt find out more information about the suppliers in a short period of time? (200 words) 3. what are his internal or external resources that he should consider? Custom Equipment It was July 2, and Mat Roberts had just been given his robots/weldguns, affiliate-produced parts/fabricated com- first assignment, te Wire Management Program" ponents, and steel/other metals. Matt was hired...

  • Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between...

    Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between international trade and domestic trade More complex context More difficult and risky Higher management skills required 3. Basic concept s relating to international trade Visible trade & invisible trade Favorable trade & unfavorable trade General trade system & special trade system Volume of international trade & quantum of international trade Commodity composition of international trade Geographical composition of international trade Degree / ratio of...

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

  • What are the instruments that have been utilized for the review article discussions? ` 1. Introduction...

    What are the instruments that have been utilized for the review article discussions? ` 1. Introduction In recent years, nanoclays have been the object of particular interest for many scientists and researchers in chemistry, physics, engineering and biology due to their excellent properties as well as their sustain- ability [1-3]. For instance, they represent the starting point to the de velopment of smart materials for drug delivery (4-9), food packaging [10-12), environmental remediation and wastewater treatment [13], cultural heritage [14–17and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT