On the Domino Ring

Consider a set of N ( N + 1 ) 2 \frac{ N (N+1) } { 2 } dominos which have faces of values 1 to N.
A ring of dominos is a closed loop of them, in which any 2 touching dominos display the same value.
Let F ( N ) F(N) be the minimum numbers of rings that are needed to use up all of these dominos.

Find the last three digits of n = 1 2016 F ( n ) \displaystyle \sum _{n = 1} ^{2016} F(n) .

Inspiration


  • As an explicit example, F ( 3 ) = 1 F(3) = 1 because we have the ring listed in the above image.
  • For the purposes of this question, assume a single domino to be a ring. So F ( 2 ) = 3 F(2) = 3 (see image below) because there are three rings.


The answer is 553.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Pranshu Gaba
Jun 26, 2015

Consider N N vertices labelled 1 , 2 , 3 , N 1, 2, 3, \ldots N . Let the edge joining two vertices, say a a and b b represent the domino [ a b ] [a | b] . Once we draw all the edges, we will obtain a complete graph along with a loop on each vertex.

In the problem, a ring is defined as either a single domino, which is a single edge on our graph, or it is defined as a closed loop, which is a Eulerian cycle on our graph. To use minimum number as rings, there should be more Eulerian cycles and of bigger size.


When N = 1 N = 1 , the graph obtained is a single loop. It corresponds to a single domino [ 1 1 ] [1|1] . Therefore F ( 1 ) = 1 F(1) = 1 .

For all odd integers N N , each vertex will be of even degree, and the graph is connected, so the entire graph is one Eulerian cycle; i.e. we can always find a path that starts and ends at the same vertex and uses each edge exactly once. Hence it is possible to use just one ring.

So, for all odd integers N N , F ( N ) = 1 F(N) = 1 .


When N = 2 N=2 , the following graph is obtained.

There is no Eulerian cycle possible in this case, so we have to split it into three edges, so F ( 2 ) = 3 F(2) = 3 .


A connected graph is Eulerian iff each vertex has an even degree. If N N is even, then each vertex has an odd degree. By separating out alternate edges on the perimeter of the polygon , we are left with a Eulerian graph.

For example N = 4 N = 4 . We remove the alternate red edges of the square, and now each vertex has an even degree. It is now a Eulerian graph.

For even integers N 4 N \geq 4 , F ( N ) = 1 + N 2 F(N) = 1 + \frac{N}{2} .


Therefore

n = 1 2016 F ( n ) = ( F ( 1 ) + F ( 3 ) + F ( 5 ) + + F ( 2015 ) ) + F ( 2 ) + ( F ( 4 ) + F ( 6 ) + + F ( 2016 ) = ( 1008 × 1 ) + 3 + ( 1007 × 1 + 4 2 + 6 2 + + 2016 2 ) = 1008 + 3 + ( 1007 + ( 2 + 3 + 4 + 5 + + 1008 ) ) = 1011 + 1007 + 1008 × 1009 2 1 = 2018 + 504 × 1009 1 18 + 504 × 9 1 ( m o d 1000 ) 18 + 4536 1 ( m o d 1000 ) 553 ( m o d 1000 ) \begin{aligned} \displaystyle \sum _{n = 1} ^{2016} F(n) & = (F(1) + F(3) + F(5)+ \ldots + F(2015)) + F(2) + (F(4) + F(6) + \ldots + F(2016)\\ & = (1008 \times 1) + 3 + (1007 \times 1 + \frac{4}{2} + \frac{6}{2} + \ldots + \frac{2016}{2}) \\ & = 1008 +3 + (1007 + (2 + 3 + 4 + 5 +\ldots + 1008))\\ & = 1011 + 1007 + \frac{1008 \times 1009}{2} - 1\\ & = 2018 + 504 \times 1009 -1 \\ & \equiv 18 + 504 \times 9 - 1 \pmod{1000}\\ & \equiv 18 + 4536 - 1 \pmod{1000} \\ & \equiv \boxed{553} \pmod{1000} ~~~ _{\square} \\ \end{aligned}


Please comment below if any step is not clear and I will explain it in detail.

Moderator note:

Great solution!

It should be mentioned why N = 2 N= 2 results in a different case than N = 2 k N = 2k , which is because when the "alternate red edges" are removed, we end up with a disconnected graph (in which every vertex has an even number of edges). Whereas, for N 4 N \geq 4 , we (have to verify) that we have a connected graph remaining.

Great problem! Got tricked by the n = 2 n=2 case at first, and answered 552 552 . Realized my mistake later.

Daniel Liu - 5 years, 11 months ago

Maybe I misunderstood the question but for a given N, aren't we supposed to have one domino for every distinct pair of number from 1 to N? You have the domino 1-1, 1-2, 1-3,...,1-n, 2-2,2-3,...,2-n, 3-3,...,3-n, ... n-n

Pierre Dufour - 4 years, 5 months ago

Log in to reply

Yes. Your list is both of all the dominos and of all the edges in a complete graph. This is the key to the above solution.

Chris Maitland - 2 years, 11 months ago

I'm sorry but you did not proove that 1 + N/2 is the minimum. you simply showed one construction.

Thomas Lesgourgues - 3 years, 2 months ago

Log in to reply

If a number appears in a cycle of length greater than one, then it appears in pairs on adjacent dominos. This means that you will always take an even number of edges off a vertex in the complete graph to form these cycles. When N N is even, the degree of each vertex is odd, hence leaving an odd number on each vertex when you can't form any more cycles. This means there are at least N 2 \frac{N}{2} edges left over. Hence, 1 + N 2 1+\frac{N}{2} is the minimum.

Chris Maitland - 2 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...