Randomness in the Partition Function Project Report

Report 3 Downloads 83 Views
Randomness in the Partition Function Project Report Will Alexander, Tingting Gao, Yibo Guo Nick Andersen (Graduate Student) Scott Ahlgren (Faculty Advisor) December 13, 2013

1

Introduction

In number theory, the partition function p(n) represents the number of distinct ways of writing n as a sum of natural numbers where the order is irrelevant. For example, p(5) = 7 since 5 = 1 + 4 = 2 + 3 = 1 + 1 + 3 = 1 + 2 + 2 = 1 + 1 + 1 + 2 = 1 + 1 + 1 + 1 + 1. There is a long unsolved conjecture regarding the parity of the partition function; that is, whether the even and odd values are distributed randomly. To attempt to solve this conundrum, we need to answer two questions: 1) How do we compute p(n)? 2) How do we measure randomness of an infinite sequence? In this project, we computed many values of the partition function, measured its randomness using two different metrics, and visualized the result using “random” walks.

2

Computing p(n)

We use the generating function ∞ X

n

p(n)x =

n=0

∞ Y

1 1 − xk k=1

and Euler’s pentagonal number theorem ∞ Y n=1

(1 − xn ) =

∞ X

k

(−1)k x 2 (3k−1)

k=−∞

to produce a formula to compute p(n):   X k(3k − 1) k p(n) = (−1) p n − . 2 k6=0 1

By definition, p(0) = 1 and p(n) = 0 if n < 0. With this method, we were able to compute 10 million values of p(n) mod 3, 4, 5 and 6, and 100 million values of p(n) mod 2, since we focused more on the analysis of p(n) mod 2.

3

p(n) mod 2 Randomness

3.1

Method 1 - Poisson Process

Think of p(n) mod 2 as an infinite string of 0s and 1s, and consider this as a series of events in a Poisson process with parameter λ. If this string is random, then the mean λ should be 1/2. Denote b = b(1)b(2)b(3) . . . b(n) . . . as the binary expression of p(n) mod 2. Define the following symbols: 1. Yn = #{j|1 ≤ j ≤ n, b(j) = 1},which counts how many 1s has occurred from the first digit to the n-th digit; 2. τr = inf{n|Yn = r}, which is the minimum position at which the r-th 1 occurs; 3. Tr = τr − τr−1 , which represents the distance between successive 1s. If p(n) mod 2 is random, then {Tr , r = 1, 2, . . .} forms a sequence of independent identically distributed random variables with exponential distribution. Hence ! k 1X tr . P (Tr > tr , r = 1, . . . , k) = exp − 2 r=1 We then test the hypothesis H: “p(n) mod 2 is random” against the alternative HA : “p(n) mod 2 is not random.” If H is true, then for every d, there exists Kd such that Tr exceeds the value d if we wait long enough: P (T1 ≤ d, . . . TKd ≤ d, TKd +1 > d|H true)     Kd  Y d d = 1 − exp − · exp − 2 2 r=1    Kd d d = exp − 1 − exp − > 0. 2 2 Using our data, we find that d = 25 and Kd = 47767664, and therefore the probability that the string b is not random is 1.82 × 10−83 . So we conclude that it is highly improbable that p(n) mod 2 is not random.

2

3.2

Method 2 - Computing Variance

Count the number of occurrences of all non-overlapping strings of length m. For a given m, there are 2m strings, ordered lexicographically, from 00 . . . 0 (m digits) to 11 . . . 1 (m digits). For example, for m = 1, we count ‘0’ and ‘1’; for m = 2, we count ‘00’, ‘01’, ‘10’, ‘11’. Let Nim denote the number of occurrences of the i-th string of length m. If p(n) mod 2 is random, then each string should occur with frequency 21m . We calculate the variance m

 2 2 1 1 X Nim − σ = m 2 i=1 L/m 2m 2

based on a data set of length L = 108 . m 1 3 5 7 9

Variance 8.35 × 10−10 6.54 × 10−9 9.66 × 10−10 4.86 × 10−10 1.72 × 10−10

m Variance 2 4.41 × 10−9 4 2.54 × 10−9 6 8.60 × 10−10 8 3.32 × 10−10 10 9.51 × 10−11

This data shows that p(n) mod 2 is likely to be random.

4

Other Moduli and “Random” Walks

Our third method for measuring randomness is to create a visual representation of our data in the form of a walk. While not as rigorous as the previous two methods, it’s much more useful for getting an impression of the data as a whole. These walks are much like a random walk, except instead of each step being of unit length in a random direction, each step is of unit length in a direction dictated by our data. Imagine, like our modulo 2 data, we create a long string of values of p(n) modulo 3, 4, and 5. Starting at (0, 0), the coordinate of the j-th step in the walk is given by the formula      2π 2π p(j) , yj−1 + sin p(j) , (xj , yj ) = xj−1 + cos m m For example, modulo 4, a value of 0 would correspond to a step to the right. A value of 1 would go up, 2 would go left, and 3 would go down (see Figure 1). Below we have graphs of 1 000 000 steps modulo 3, 4, and 5. By a famous theorem of Ramanujan, we know that p(5k + 4) ≡ 0 mod 5 for all positive integers k, so we split up the modulo 5 data into four different graphs of 200 000 steps: p(5k), p(5k + 1), p(5k + 2), and p(5k + 3). With these graphs, we look to see if any interesting patterns emerge that couldn’t be explained by pure randomness. As √ a useful check, for a truly random walk, we expect the n-th point to be on the order of n steps away from the origin. We first look at our modulo 4 data in figure 2. After 1 000 000 steps, it travels approximately 1 000 steps away from the origin and very accurately meets our judgement for 3

Figure 1: 100 steps of p(n) mod 4

Figure 2: 1 000 000 steps of p(n) mod 4 random. With no visible patterns, our partition function data seems quite random modulo 4. A similar analysis can be undertaken on the modulo 3 walk in figure 3. Modulo 5, p(n) is more interesting (see Figure 4). The walks corresponding to p(5k) and p(5k +3) appear reasonably random, but p(5k +1) and p(5k +2) have a powerful tendency to travel to the right, for deep theoretical reasons that we didn’t explore in our research. Even without an explanation, it’s an effect worth noting. From this exploration we can deduce that the partition function is reasonably random modulo 3 and modulo 4, and arguably more interestingly, not entirely random modulo 5. 4

Figure 3: 1 000 000 steps of p(n) mod 3

Figure 4: 1. p(5n + 3) mod 5 (200 000 steps) 2. p(5n) mod 5 (200 000 steps) 3. p(5n + 1) mod 5 (200 000 steps) 4. p(5n + 2) mod 5 (200 000 steps)

5

5

References • Andrews, George E. The theory of partitions. Cambridge Mathematical Library. • Bailey, David H., et. al. An empirical approach to the normality of π. Exp. Math. 21 (2012). • Ramanujan, Srinivasa. Congruence properties of partitions. Math Z. 9 (1921).

6