Daniel's path sums

For integers n > 2 n > 2 , let G n G_n be a complete graph on n n vertices such that each vertex is labeled by a distinct number 1 , 2 , 3 , , n 1,2,3,\cdots,n , and each edge is labeled by the sum of its endpoint labels. Let f ( G n ) f(G_n) be the minimum sum of edge labels in any path that touches every vertex in G n G_n exactly once.

How many values of n n satisfy f ( G n ) 2013 ( m o d n ) ? f(G_n)\equiv 2013\pmod{n}?


The answer is 4.

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.

3 solutions

Daniel Chiu
Dec 23, 2013

If a vertex is not at the start or the end of the path, it connects to two edges in the path, and its label is added twice to the sum. If a vertex is at the start or the end of the path, it connects to one edge in the path, and its label is added once to the sum.

Therefore, if a path starts and ends at the vertices with the highest labels, it will have the minimum edge sum. Such a path will always exist since a complete graph has an edge between every pair of vertices.

Applying this, we have f ( G n ) = 2 ( 1 + 2 + + ( n 2 ) ) + ( ( n 1 ) + n ) = ( n 2 ) ( n 1 ) + ( n 1 ) + n = n 2 n + 1 \begin{aligned} f(G_n)&=2(1+2+\cdots+(n-2))+((n-1)+n) \\ &=(n-2)(n-1)+(n-1)+n \\ &=n^2-n+1 \end{aligned} Taking modulo n n , f ( G n ) 1 2013 ( m o d n ) f(G_n)\equiv 1\equiv 2013\pmod n Now, we must simply find the number of possible n n such that 2012 0 ( m o d n ) 2012\equiv 0\pmod n This is equal to the number of divisors of 2012 = 2 2 503 2012=2^2\cdot 503 We find that 2012 has 6 factors, but since n > 2 n>2 , we must exclude 1 and 2. The answer is 4 \boxed{4} .

Daniel, I just want to say thank you. Seeing the words "complete graph" on here made my day. I'm very happy now. :D

Jacob Erickson - 7 years, 5 months ago

This problem is great! Thanks for sharing :)

Daniel Liu - 7 years, 5 months ago

:( I came up to 6 6 but did not notice the condition n > 2 n>2

Snehal Shekatkar - 7 years, 5 months ago

Precisely. The factors of 2012 greater than 2.

What I don't understand is how is this a combinatorics problem? Isn't it more of a number theory problem ???

Soumya Chakraborty - 7 years, 3 months ago

I did it the same way, now I'm so sad because I forgot to exclude those 2 on my first attempt (impulsive answering) and lost a bit of points >_>

Liu Tianyi - 7 years, 3 months ago

I did literally the same way so I think that writing a solution would be needless

Veselin Dimov - 2 years, 4 months ago
Daniel Liu
Dec 23, 2013

Let the vertices passed through in order be v 1 , v 2 , v n v_1,v_2,\ldots v_n . Note that the edge sum would then be v 1 + v n + 2 ( v 2 + v 3 + + v n 1 ) v_1+v_n+2(v_2+v_3+\ldots + v_{n-1}) .

To minimize v 1 + v n + 2 ( v 2 + v 3 + + v n 1 ) v_1+v_n+2(v_2+v_3+\ldots + v_{n-1}) , we maximize v 1 v_1 and v n v_n .

Therefore, v 1 = n v_1=n and v n = n 1 v_n=n-1 . This means that 2 ( v 2 + v 3 + + v n 1 ) = 2 ( 1 + 2 + + n 2 ) = ( n 2 ) ( n 1 ) 2(v_2+v_3+\ldots +v_{n-1})=2(1+2+\cdots + n-2)=(n-2)(n-1) .

Therefore, f ( G n ) = n + n 1 + ( n 2 ) ( n 1 ) = n 2 n + 1 f(G_n)=n+n-1+(n-2)(n-1)=n^2-n+1 .

We plug this into the bottom equation: n 2 n + 1 2013 ( m o d n ) n^2-n+1\equiv 2013\pmod{n} .

Simplifying, we get that 1 2013 ( m o d n ) 2012 0 ( m o d n ) n 2012 1\equiv 2013\pmod{n}\implies 2012\equiv 0\pmod{n}\implies n|2012 .

Factoring 2012 2012 , we see that 2012 = 2 2 503 2012=2^2\cdot 503 so 2012 2012 has ( 2 + 1 ) ( 1 + 1 ) = 6 (2+1)(1+1)=6 factors, and therefore there are 6 6 values of n n that satisfy the equivalence.

However, since n > 2 n>2 , we omit n = 1 , 2 n=1,2 and arrive at a final answer of 6 2 = 4 6-2=\boxed{4} .

Daniel Chiu, great question! I had a lot of fun solving it.

Stefano Scx
Jan 4, 2014

Each path contains twice the number of each vertex, except the initial vertex and the final one that are counted only once. So we need to start and finish from vertex n n to vertex n 1 n-1 or vice versa and f ( G n ) = n ( n 1 ) + 1 f(G_n) = n(n-1)+1 . So we have to solve n ( n 1 ) 2012 ( m o d n ) n 2012 n(n-1) \equiv 2012 \pmod n \Leftrightarrow n | 2012 and the solutions are n = 2012 , 1006 , 503 , 4 n=2012,1006,503,4 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...