Skip to main content
OlympiadHQ

Browse · MathNet

Print

Estonian Mathematical Olympiad

Estonia counting and probability

Problem

A positive integer is given. There are computers in a network, numbered with natural numbers . The computers are connected with one-way communication lines such that information can be sent from any computer to all other computers either directly or through other computers in the network. Initially, each computer only knows its own number. When a certain procedure is initiated on any computer, the computer outputs all the numbers of computers it knows and communicates them to all the computers it has direct lines to. The computer operator initiates this procedure on any selected computers in any chosen sequence (possibly multiple times on the same computer). Prove that the minimum total number of procedure initiations, for which it is possible for all computers to have output the numbers of all computers at least once, does not depend on the network of lines, but only on the number , and find this number of initiations.
Solution
We will show that initiations are necessary regardless of the network of lines. Consider an arbitrary sequence of initiations, at the end of which all computers have output the numbers of all computers. Let be the computer with the latest time of the initiation of the first procedure. Since the procedure has been initiated at least once in all other computers by that time, the order number of this initiation is at least . Therefore, after the first initiations, no computer has output the number of computer . To ensure that each computer outputs the number of computer at least once, more initiations are needed. Thus, at least initiations are necessary.

Now we will show that initiations are sufficient regardless of the network of lines. Choose an arbitrary computer and construct a sequence of the remaining computers without repetition, such that each computer in this sequence can receive information directly from some preceding computer in this sequence or from computer . Such a sequence of length indeed exists, because if at any step adding the next computer was not possible, then from none of the already included computers in the sequence nor from computer could information be sent directly to any of the remaining computers – which contradicts the condition of the problem that information can move between these computers via the network. Similarly, construct a sequence of computers without repetition, such that each computer in this sequence can send information directly to some preceding computer in this sequence or to computer . By symmetry considerations, such a sequence also exists. It turns out that a suitable sequence of procedure initiations of length is .

We will prove this statement; for simplicity, denote . According to the construction of the sequence , each computer where , sends its number to at least one computer where . If , then computer in turn sends the number of computer to at least one computer where . Continuing in this way, the number of computer reaches computer for successively smaller indices . Since there are computers besides , the number of computer must reach computer in at most steps. Since was chosen arbitrarily, the numbers of all other computers reach computer within the first initiations of the procedure. It remains to note that during each subsequent initiation of the procedure, all computer numbers are output and transmitted. This is evidently done by computer , and when all computers have done this, then by the construction of the sequence , computer also does this. Consequently, after initiations of the procedure, all computers have output the numbers of all computers at least once.
Final answer
2n - 1

Techniques

Graph TheoryAlgorithms