Processing math: 100%
Skip to main content

Section 18.3 Method of Computing van der Waerden Numbers

The work done in this paper is primarily based on the work of Tanbir Ahmed in his 2013 paper “Some More van der Waerden Numbers” utilizing a backtracking algorithm for computing van der Waerden Numbers of the form W(r;k0,k1,,kr1) where k0=k1==kj1=2 where rj+2 and ki3 for ij. [18.6.2] While backtracking is the approach taken for the results in this paper, note that many other papers, include Ahmed's, utilize SAT solvers in solving for more general forms of van der Waerden numbers.

For any w=W(r;k0,k1,,kr1), one can demonstrate wl with a certificate of length l which is a colouring of {1,2,,l} containing no monochromatic arithmetic progression of length ki for all i. For example, the certificate that W(8;2,2,2,2,2,2,3,3)>24 is

067766776162347576677667

as it is an 8 colouring of {1,,24} contains no two long arithmetic progression is colours 0,1,2,3,4,5 and no three long arithmetic progression in colours 6,7. One can compute van der Waerden numbers by building these certificates. Once a certificate of length l is not possible, then by definition W(r;k0,k1,,kr1)=l as a monochromatic arithmetic progression becomes unavoidable.

In this paper, these certificates are built using a brute force backtracking approach. It is an exponential time algorithm that tries permutations of a length l to check if a certificate exists. If a certificate exists, it then tries permutations of length l+1 and so on until a certificate can no longer be found. However speedups can still be achieved with 2 key optimizations based on symmetry.

Consider again the certificate

067766776162347576677667

for W(8;2,2,2,2,2,2,3,3)>24. Notice that the colours 0,1,2,3,4,5 are used exactly once. As such, there are 6! equivalent certificates which simply permute the locations of 0,1,2,3,4,5. The certificate can be transformed into

012211221010002021122112

where 0's are any permutation of 0,1,2,3,4,5 and 6,7 get reduced to colours 1 and 2. This turns the 8–ary backtracking tree to a 3–ary tree and greatly reduces the search space. More generally, for W(r;k0,,kj1,kj,,kr1) where kj+2 with k0=k1==kj1=2 and ki3 for ij this turns a r–ary search tree into a rj+1–ary tree.

Consider the reduced certificate

012211221010002021122112

and notice this is also equivalent to

021122112020001012211221.

Clearly the search space here can be halved by simply ignoring certificates that swap the order of the colours.

More generally, for W(r;k0,,kj1,kj,,kr1) with k0=k1==kj1=2 and ti=t3 for i=j,j+1,,r1 a maximal certificate, due to symmetry, will contain an equal number of colours kj,kj+1,,kr1 which will be isomorphic to (rj)! other certificates. Ignoring these equivalent certificates greatly reduces the search space again.

These optimizations greatly increase the space of numbers computable in a reasonable amount of time.