Stabilizing nodes from an anchor
In a finite, undirected, connected graph, an integer variable v(n) is associated with each node n. One node is distinguished as the anchor. An operation OP(n) is defined on nodes:
OP(n):
if node n is the anchor, then do nothing,
else set v(n) to the value 1 + min{v(m)}, where m ranges over all neighbors of n that are distinct from n.
An infinite sequence of operations <OP(n),OP(m), …> is executed, the node arguments n, m, … for the operations being chosen arbitrarily and not necessarily fairly. Show that eventually all v(n) stabilize. That is, that after some finite prefix of the infinite sequence of operations, no further operation changes v(n) for any node n.
My First Thought About this question was:
It is obvious that the anchor in this problem plays a key role, and that the anchor is also a node, say a, that has an integer value, v(a), associated with it. Since the graph is connected this means that from any node n, there exists a path to any other node m. We are also unable to determine the order of the sequence of operations.
but finally i got the solution:
Since this graph is connected, we know there is at least one node that shares an edge with the anchor, or at least one node is a direct neighbor to the anchor.
For example: Say the connected undirected graph has 3 nodes.
OP() will be called some finite amount of times. This will continue until all direct neighbors of the anchor are equal to v(a)+1. After this, OP() will be called another finite amount of times. Eventually, the value any given node n, becomes equal to v(a) + d, where d is the length of shortest path from n to a.
At this point, any operation on a node in the graph would result in an unchanged v(n). Thus, the graph is stabilized and this has taken place in a finite amount of steps.
For my example, I used a graph with only 3 nodes, but you can easily see how this effect would take place on a much larger graph. The key here is that the graph is connected, so all nodes have at least one path to the anchor.
Your Answer
More puzzles to try-
Make 7 an Even Puzzle
Through your logical capabilities, can you make 7 an even?Read More »Great Woman
There is a word in the English language in which , the first three letters signify a female, the first ...Read More »The Paintings Puzzle
An art gallery features a modern work of ‘moving art’. The artist stands by a stack of paintings, each featuring ...Read More »Picture sent to jail riddle
Why was the picture sent to jail ?Read More »What word doesn’t belong in this group?
What word doesn’t belong in this group? That, hat, what, mat, cat, sat, pat, or chat?Read More »Find the number of glasses broken
My friend Asha was throwing a very grand party and wanted to borrow from me 100 wine glasses. I decided ...Read More »What day is tomorrow?
When the day after tomorrow is yesterday, today will be as far from Wednesday as today was from Wednesday when ...Read More »Stamp buying riddle
Yesterday John’s mother asked him to buy some stamps. Stamps, in the land of Puzzlefry, are available in 3p, 9p, ...Read More »What is a Relationship Puzzle
John is my uncle’s sister’s granddaughter’s son. What is the closest possible relationship I can have with John?Read More »Touch me !!!
I do not stop working even you break me, I may be trapped when you touch me, Nothing will matter ...Read More »2nd smallest number puzzle
There is 38 numbers. What is the least number of comparison needed to find the 2nd smallest out of them?Read More »Difference between minute and hour hands.
If the difference between hour and minute hand is 6 minutes then after how much time the difference will be 7 ...Read More »Find the mistake in the stack of shoes
Readers with high attention to detail can spot the mistake in the stack of shoes in 5 seconds. Are you ...Read More »Square but round at the same time riddle
What\’s square but round at the same time?Read More »Count The Blocks
Can you count the number of blocks in the picture below?Read More »Number Puzzle
Make 100 using six 9. You can use addition, division and fraction.Read More »Runner outfit
A runner timed himself and found out that if he wore a white outfit he ran 10 miles in 70 ...Read More »How did the theif got the code?
A thief enters a shop and threatens the clerk, forcing him to open the safe. The clerk says, “The code ...Read More »Fire and ice
Waking up I see a smile as warm as fire. Sleeping I see a gaze as cold as iceRead More »Mysterious Death Riddle
Adam was moving down in an elevator. The elevator stopped and the remorse on his face was clear. He knew ...Read More »