For a graph on vertices, let be the unique polynomial of degree at most such that for each , equals the number of ways to color the vertices of the graph with distinct colors such that no two vertices connected by an edge have the same color. For each integer , define a -strange graph to be a connected graph on vertices with edges and a cycle of length . Let the strangeness of a -strange graph be the number of coefficients in that are odd integers, and let be the minimal strangeness over all -strange graphs with .
Determine the sum of all integers between and inclusive for which there exists a -strange graph with strangeness .
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.
P G is the chromatic polynomial of G , and it has the property that for any positive integer n , P G ( n ) is precisely the number of ways to color G using n colors (so this is true for all positive integers, not only for up to ∣ V ( G ) ∣ as described in the problem statement).
For a k -strange graph, the chromatic polynomial can be derived pretty easily. First, observe that any k -strange graph has exactly one cycle, which is of length k ; deleting any edge in this cycle gives a tree. Thus, P G can be computed as follows. Consider any coloring of the cycle; then, starting from the cycle and moving outward, we color each of the remaining vertices. At any time, vertices not in this cycle have only 1 neighbor colored, and so given n colors, we can color each vertex not in the cycle with n − 1 remaining choices. Thus P G ( n ) = P C k ( n ) ⋅ ( n − 1 ) 2 0 1 7 − k : the number of colorings for the cycle C k , multiplied by ( n − 1 ) 2 0 1 7 − k for the remaining vertices. P C k ( n ) = ( n − 1 ) k + ( − 1 ) k ( n − 1 ) is well known, or otherwise it can be derived easily by induction. This yields P G ( n ) = ( n − 1 ) 2 0 1 7 + ( − 1 ) k ( n − 1 ) 2 0 1 8 − k .
We will now compute the number of odd coefficients in P G ( n ) . First, we take P G ( n ) ( m o d 2 ) = ( n + 1 ) 2 0 1 7 + ( n + 1 ) 2 0 1 8 − k ; odd coefficients in the original P G translate to odd coefficients here, since we're taking modulo 2. Now, let ν 2 ( n ) be the highest exponent of the power of 2 that divides n . It's well-known that ν 2 ( n ! ) = ∑ i = 1 ∞ ⌊ 2 i n ⌋ , and by using this on the binomial coefficient ( q p ) = q ! ( p − q ) ! p ! , we obtain that ( q p ) is odd exactly when ν 2 ( ( q p ) ) = 0 , which in turn happens when ν 2 ( p ! ) = ν 2 ( q ! ) + ν 2 ( ( p − q ) ! ) . Substituting the formula and simplifying, noting that ⌊ 2 i p ⌋ ≥ ⌊ 2 i q ⌋ + ⌊ 2 i p − q ⌋ for all i , the condition ν 2 ( p ! ) = ν 2 ( q ! ) + ν 2 ( ( p − q ) ! ) forces this inequality to be an equality for all i . This happens exactly when, in the binary representation of q , all set bits are also set in the binary representation of p .
Note that 2 0 1 7 = 1 1 1 1 1 1 0 0 0 0 1 2 ; it has 7 set bits and 4 unset bits. Suppose 2 0 1 8 − k has a + b set bits, a of them also set in 2017 and b unset, and c + d unset bits, c of them set in 2017 and d unset. For example, if k = 1 0 0 , then 2 0 1 8 − k = 1 9 1 8 = 1 1 1 0 1 1 1 1 1 1 0 2 ; we have a = 5 , b = 4 , c = 2 , d = 0 . Clearly we have the condition a + c = 7 , b + d = 4 . Now consider the coefficient of n i in ( n + 1 ) 2 0 1 7 + ( n + 1 ) 2 0 1 8 − k . We have the following, based on the binary representation of i :
The number of odd coefficients in ( n + 1 ) 2 0 1 7 + ( n + 1 ) 2 0 1 8 − k is thus 2 a + b + 2 a + c − 2 a + 1 . We want to minimize this value. We know that a + c = 7 ; thus, to minimize this value, we want a as large as possible and b as small as possible. Of course, this would have been satisfied by a = 7 , b = 0 , c = 0 , but then 2 0 1 8 − k = 2 0 1 7 and so k = 1 , impossible. Thus we'll have to do with the second smallest: a = 6 , b = 0 , c = 1 . This means 2 0 1 8 − k has 6 of the 7 set bits in 2017. This cannot be the last bit, as that means 2 0 1 8 − k = 2 0 1 7 − 1 or k = 2 , also incorrect. But we can choose any of the other six bits: 2 0 1 8 − k = 2 0 1 7 − 2 i for any choice of i ∈ { 5 , 6 , 7 , 8 , 9 , 1 0 } . This means the sum of all k is simply ( 2 5 + 1 ) + ( 2 6 + 1 ) + … + ( 2 1 0 + 1 ) = 2 0 2 2 .