Daily

Random

Practice set

Baltic Way 2017 · Problem 16

Number Theory

Is it possible for any group of people to choose a positive integer NN and assign a positive integer to each person in the group such that the product of two persons' numbers is divisible by NN if and only if they are friends?

Change pool

When you’re ready

Review material becomes available with the next Daily.

Review

Topics

Divisibility and factorization

Solutions

Solution

Answer: Yes, this is always possible.

Consider a graph with a vertex for each person in the group. For each pair of friends we join the corresponding vertices by a red edge. If a pair are not friends, we join their vertices with a blue edge.

Let us label blue edges with different primes p1,…,pkp_{1}, \ldots, p_{k}. To a vertex AA we assign the number n(A)=P2P(A)n(A)=\frac{P^{2}}{P(A)}, where P=P= p1p2…pkp_{1} p_{2} \ldots p_{k}, and P(A)P(A) is the product of the primes on all blue edges starting from AA (for the empty set the product of all its elements equals 1). Now take N=P3N=P^{3}.

Let us check that all conditions are satisfied. If vertices AA and BB are connected by a red edge, then P(A)P(A) and P(B)P(B) are coprime, hence P(A)P(B)∣PP(A) P(B) \mid P and P3∣ n(A)n(B)=P4P(A)P(B)P^{3} \left\lvert\, n(A) n(B)=\frac{P^{4}}{P(A) P(B)}\right.. If vertices AA and BB are connected by a blue edge labelled with a prime qq, then q2q^{2} divides neither n(A)n(A) nor n(B)n(B). Hence q3q^{3} does not divide n(A)n(B)n(A) n(B).

Contest context

Results from Baltic Way 2017

11 teams

Mean score
3.6 / 5
Scores of 4 or 5
8 / 11
Estonia
5 / 5

Score distribution

03
10
20
30
40
58
All team scores
TeamScore
St. Petersburg5 / 5
Germany5 / 5
Poland5 / 5
Denmark5 / 5
Estonia5 / 5
Lithuania0 / 5
Sweden5 / 5
Norway5 / 5
Finland5 / 5
Iceland0 / 5
Latvia0 / 5