Multiply

A single snowflake rests at the origin, ( 0 , 0 ) (0, 0) , on an infinite cartesian plane. At time t = 0 t = 0 , it divides and replicates itself, moving exactly 1 1 unit in each of the 8 8 major compass directions (N, NE, E, SE, S, SW, W, and NW), leaving ( 0 , 0 ) (0, 0) vacant.

At t = 1 t = 1 , all snowflakes which occupy the exact same points are merged into one, and then the process repeats for every snowflake, resulting in the following pattern:

So, to iterate the first few steps:

  • There is 1 1 snowflake at time t = 0 t = 0
  • At time t = 1 t = 1 , there are 8 8 snowflakes pre-merge.
  • No snowflakes coincide, so there are 8 8 snowflakes post-merge as well.
  • At time t = 2 t = 2 , there are 64 64 snowflakes pre-merge.
  • Post-merge, only 33 33 snowflakes remain.

How many snowflakes are there at time t = 1000 t = 1000 , post-merge?


Image Credit: http://www.featurepics.com/online/White-Snowflakes-Blue-1406139.aspx


The answer is 334669336001.

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.

5 solutions

Adit Mohan
Nov 14, 2014

we can consider moves in the N,S,E,W directions as completely independent from those in the NE,SE,NW,and SW directions as no multiple of 1/sqrt2 is an integer.
if n moves are dedicated to the NE,SE,NW,and SW we can reach ( n + 1 ) 2 {(n+1)}^{2} points from the original point (even or odd(depending on n) multiple of 1/sqrt2 coordinates).
thus from any lattice point reached in N steps we can reach ( ( 1000 N ) + 1 ) 2 {((1000-N)+1)}^{2} points).
consider the number of lattice points we can reach in N steps.
considering we don't go back(towards the centre) we can reach 4N lattice points. those we can reach by going back will be counted in smaller values of N.
thus our expression is .
N = 1 1000 \sum_{N=1}^{1000} 4N ( 1001 N ) 2 {(1001-N)}^{2} =334668334000.
adding 100 1 2 1001^{2} points for N=0 we have 334669336001


Calvin Lin Staff
Aug 22, 2014

Here's a slightly easier approach. Start off as Daniel did, and realize that we need to solve for solutions to

a + b + c + d = 2 k |a| + |b| + |c| + |d| = 2k

where k = 0 k = 0 to 500.

The number of solutions for k = 0 k=0 is clearly just 1 1 .

Let's consider the number of solutions for k 1 k \geq 1 .
* If none of a , b , c , d a, b, c, d are 0 (1 way), then we need to solve for positive integer solutions to w + x + y + z = 2 k w + x + y + z = 2k , and multiply by 2 4 2^4 to account for signage. Thus, there are 1 × 2 4 × ( 2 k 1 3 ) 1 \times 2^ 4 \times { 2k-1 \choose 3 } solutions.
* If exactly1 of a , b , c , d a, b, c, d is 0 (4 ways), then we need to solve for positive integer solutions to w + x + y = 2 k w + x + y = 2k , and multiply by 2 3 2^3 to account for signage. Thus, there are 4 × 2 3 ( 2 k 1 × 2 ) 4 \times 2^3 { 2k - 1 \times \choose 2 } solutions.
* If exactly 2 of a , b , c , d a, b, c, d is 0 (6 ways), then there are 6 × 2 2 × ( 2 k 1 1 ) 6 \times 2^2 \times { 2k-1 \choose 1 } solutions.
* If exactly 3 of a , b , c , d a, b, c, d is 0 (4 ways), then there are 4 × 2 × ( 2 k 1 0 ) 4 \times 2 \times { 2k-1 \choose 0 } solutions.
* If exactly 4 of a , b , c , d a, b, c, d are 0, then there are no solutions.

Hence, there are 64 k 3 + 32 k 3 \frac{64k^3 + 32 k } { 3} solutions to the equation.

Summing up from k = 1 k = 1 to 500, we obtain 334669336000.

Adding the solution when k = 0 k = 0 , there are 334669336001 in total.


Note: This approach easily generalizes counting the number of solutions to a + b + + k = n |a| + |b| + \ldots + |k| = n .

The general answer seems to be ( t 2 + 2 t + 3 ) ( t + 1 ) 2 3 \frac{(t^2+2t+3)(t+1)^2}3 .

As usual, it might be interesting to establish a bijection between the snowflakes and the things the OEIS says this sequence counts (pan-diagonal magic squares?): http://oeis.org/A014820

Patrick Corn - 6 years, 9 months ago
Daniel Ploch
Aug 21, 2014

The merging rule is what makes this problem difficult. As can be seen in the animation, merging starts early at t = 2 t = 2 , and continues onwards with increasing complexity. Let's start with an easier problem. Let's define a 'step' to be a single replication in a single direction, and for the moment, let's keep replication down to just 4 4 directions instead of 8 8 , going in the strict cardinal directions.

The first thing we need to recognize is that snowflakes which exist at even times have positions entirely disjoint from those that exist at odd times. This is because, for any snowflake coordinates ( x , y ) (x, y) , x + y mod 2 |x| + |y|\:\text{mod}\:2 is invariant for any given t t . Given this information, we'll ask another question: How many snowflakes exist at positions at time t t , where no snowflakes existed at time t 2 t - 2 ? Any point reachable at time t 2 t - 2 is trivially reachable at time t t by simply adding a left and right step to cancel each other out. We call this restricted function D ( t ) D(t) . Then the answer to our original question is thus (assuming t t even):

S ( t ) = k = 0 t / 2 D ( 2 k ) S(t) = \sum_{k=0}^{t/2} D(2k)

We set D ( 0 ) = 1 D(0) = 1 for correctness. So, going in 4 4 directions, we find that D ( 0 ) = 1 D(0) = 1 , D ( 2 ) = 8 D(2) = 8 , D ( 4 ) = 16 D(4) = 16 , and, in general, D ( t > 0 ) = 4 t D(t > 0) = 4t , which is easily seen geometrically by the fact that the points accounting for the value D ( t ) D(t) form a discrete diamond perimeter, expanding 4 4 units every step. We can easily compute S ( t ) S(t) using Euler's formula in this case.

However, now we must go back to the original problem with 8 8 cardinal directions. We don't get a nice discrete diamond perimiter to use here, though... however, we'll realize that, if we again restrict ourself to 4 4 directions, but using the diagonals this time, we see the same pattern emerge at a different rotation. Additionally, we'll note that every point in the 8 8 direction space is of the form:

( m 1 + n 1 2 2 , m 2 + n 2 2 2 ) (m_1 + n_1\frac{\sqrt{2}}{2}, m_2 + n_2\frac{\sqrt{2}}{2})

And since 2 \sqrt{2} is irrational, any such point has unique representation - the tuple of integers ( m 1 , n 1 , m 2 , n 2 ) (m_1, n_1, m_2, n_2) is unique for any such point. Therefore, the points can be represented as:

( m 1 , m 2 ) + ( m 1 2 2 , n 1 2 2 ) (m_1, m_2) + (m_1\frac{\sqrt{2}}{2}, n_1\frac{\sqrt{2}}{2})

Which is just the sum of two vectors, one from each cartesian lattice! So, for given m m and n n , the points that can be reached in m m steps, but not m 2 m - 2 , in one lattice, and in n n steps, but not n 2 n - 2 , in the other lattice, are unique to the pair ( m , n ) (m, n) . For m , n > 0 m, n > 0 , the number of such points is ( 4 m ) ( 4 n ) = 16 m n (4m)(4n) = 16mn , and the pairs are fully described by the constraints 0 m , n m + n t 0 \leq m, n \leq m + n \leq t , and m + n t mod 2 m + n \equiv t\:\text{mod}\:2 . So, we let X = t / 2 X = t/2 , t t even, and we get the formula:

S ( t ) = 1 + k = 1 X 4 ( 2 k ) + q = 1 X 4 ( 2 q ) + k = 0 X 1 ( q = 0 X k 1 16 ( 2 k + 1 ) ( 2 q + 1 ) ) + k = 1 X 1 ( q = 1 X k 16 ( 2 k ) ( 2 q ) ) S(t) = 1 + \sum_{k=1}^{X} 4(2k) + \sum_{q=1}^{X} 4(2q) + \sum_{k=0}^{X-1} \left( \sum_{q=0}^{X-k-1} 16(2k+1)(2q+1) \right) + \sum_{k=1}^{X-1} \left( \sum_{q=1}^{X-k} 16(2k)(2q) \right)

Using some factoring, some algebra, and the first three instances of Faulhaber's Formula , we can reduce the entire expression down to:

S ( t ) = 16 3 ( X 4 + 2 X 3 + 2 X 2 + X ) + 1 S(t) = \frac{16}{3} (X^4 + 2X^3 + 2X^2 + X) + 1

Recall that X = 500 X = 500 , plug into a calculator (or use a bunch of scratch paper), and we get the answer 334669336001 \boxed{334669336001} .

I added an approach for how one can "easily" do the counting in your later half. The underlying idea is Polya Enumeration Theorem .

Calvin Lin Staff - 6 years, 9 months ago

Note: There are only 4 cardinal directions (North, South, Easy West).

You should clarify that the merging only happens at the end of the time period. IE, After the first step, there is a snowflake at ( a , a ) (a, a) and ( a , a ) (-a, a) where a = 2 2 a = \frac{\sqrt{2} } { 2} . At the second step, does the snowflake that heads west from ( a , a ) (a, a) and the snowflake that heads east from ( a , a ) (-a,a) will meet at ( 0 , a ) (0,a) briefly. Do they merge?

Calvin Lin Staff - 6 years, 9 months ago

Log in to reply

I think it could have been stated that when 2 or more snowflakes appear at the same spot, it becomes and is counted as 1. I looked at this as a problem of how many ways vectors add up to the same spot. In other words, go directly from the first snowflake to the final configuration and forget about inbetween states.

Michael Mendrin - 6 years, 9 months ago

Updated the wording of the problem to reflect both points. To clarify - no, snowflakes in transit do not merge (how would you decide which one 'wins', anyway?). Merging only happens at the next instant of replication - so Michael's interpretation is in sync with mine (as evidenced by the fact we both got the same answer).

I thought that you could call them the 4 major cardinals and the 4 minor cardinals for some reason, but the internet is proving me wrong :). See the problem for the rewording.

Daniel Ploch - 6 years, 9 months ago
Kenny Lau
Sep 3, 2014

I have used 2 days to solve this question.

I created three functions to solve this question, with F(n) being the answer with n iterations.

\[s(n) = \left\{\begin{array}{}1 \mbox{ if } n=0\\4n \mbox{ otherwise}\end{array}\right.\] f ( n ) = i = 0 n s ( i ) s ( n i ) f(n) = \sum_{i=0}^n s(i)s(n-i) \[F(n) = \left\{\begin{array}{}f(n)+f(n-2)+f(n-4)+...+f(0) \mbox{ if 2|n} \\ f(n)+f(n-2)+f(n-4)+...+f(1) \mbox{ otherwise}\end{array}\right.\]

s(n) is a dummy function which returns 1,4,8,12,16,..., which is the number of points obtained if one is to walk in any 4 orthogonal directions for n steps without turning back.

f(n) is the number of points obtained by walking for n steps without turning back.

F(n) is the answer.

I used a computer to obtain the value of F(1000).

Michael Mendrin
Aug 22, 2014

Or maybe i plotted the whole thing out and counted it up? Very pretty GIF! It reminds me of supernova simulations.

Thanks! I found a Java API for making animated GIFs, so expect more of these in the future! 'Tis a dangerous tool in my obsessive hands.

Also, tell me where you get your paper for drawing 0.3 trillion dots. My printer only does 0.2 trillion.

Daniel Ploch - 6 years, 9 months ago

Log in to reply

It is a VERY good printer.

Michael Mendrin - 6 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...