Page 1 of 1

Number sequence puzzle

Posted: Fri Dec 16, 2011 11:51 am
by sje
Guess the next number in the sequence:

Code: Select all

1, 6, 36, 146, 511, 1512
Bozo knows the answer, although this required an embarrassingly large amount of coding time.

Big hint: it's tablebase related.

Re: Number sequence puzzle

Posted: Fri Dec 16, 2011 10:04 pm
by marcelk
sje wrote:Guess the next number in the sequence:

Code: Select all

1, 6, 36, 146, 511, 1512
Bozo knows the answer, although this required an embarrassingly large amount of coding time.

Big hint: it's tablebase related.
Is it different from 4032, with applications in chemistry (alkanes)? That would be really cool.

Re: Number sequence puzzle

Posted: Fri Dec 16, 2011 10:29 pm
by sje
marcelk wrote:Is it different from 4032, with applications in chemistry (alkanes)? That would be really cool.
You got it. Did you calculate the number, or did you find it somewhere?

Re: Number sequence puzzle

Posted: Fri Dec 16, 2011 10:32 pm
by Rémi Coulom

Re: Number sequence puzzle

Posted: Fri Dec 16, 2011 11:03 pm
by sje
The numbers are the counts of distinct endgame classes:

Code: Select all

    { Tablebase class counts, each for N men }

    tbcm02len =     1;
    tbcm03len =     6;
    tbcm04len =    36;
    tbcm05len =   146;
    tbcm06len =   511;
    tbcm07len =  1512;
    tbcm08len =  4032;
    tbcm09len =  9752;
    tbcm10len = 21942;
That this should match the alkane sequence first described in 1897 is quite unexpected.

The match ends at N=10 because at N=11 the KPPPPPPPPPK class would be included, but would be inadmissible as it has nine pawns and so is unreachable.

Number sequence puzzle and interesting download.

Posted: Sat Dec 17, 2011 10:33 am
by Ajedrecista
Hello Steven:
sje wrote:Guess the next number in the sequence:

Code: Select all

1, 6, 36, 146, 511, 1512
Bozo knows the answer, although this required an embarrassingly large amount of coding time.

Big hint: it's tablebase related.
The hint was crucial. During much time I did not get it and also I forgot about thinking more in it. At 21:00 h in Madrid, Spain (which is GMT + 1) I turned off the computer and ten minutes later I realized about the key! But I decided to wait for the next day to answer: when you sad that was tablebase related I only thought about sorts of endgames, and I remembered 1, 5, 30, 110, ..., 1001 (I did not remember the number of different endgames in 6-man but yes in 7-man (because someone commented something somewhere a while ago (<ironic> I am highly accurate </ironic>) about Generator Chess), and I did not get that 6 = 1 + 5; 36 = 1 + 5 + 30; [...] and so on. A curious thing is that I searched this sequence in Google and I read about Losanitsch's Triangle (the first time I hear about that triangle), but I got nothing from there... it is like I would have K+Q (me) vs. K against Kasparov and I draw by stalemate... so silly!

I was going to try to calculate these numbers on my own (very risky) but I remember that once I downloaded an excellent Excel file about that! This forum is excellent and I recommend it. Here is where I downloaded it:

http://kirill-kryukov.com/chess/discuss ... 6be#p58156

TBs combinatorics.rar (351.75 KiB)

Great merit of user kronsteen. Please download it because it deserves the download. The numbers match: 2520 different types for 8-man and 1512 + 2520 = 4032 is the next number of this sequence.

I am curious about this required an embarrassingly large amount of coding time... how much time (if you want to say it)?

Regards from Spain.

Ajedrecista.

Re: Number sequence puzzle and interesting download.

Posted: Sat Dec 17, 2011 6:24 pm
by sje
Ajedrecista wrote:I am curious about this required an embarrassingly large amount of coding time... how much time (if you want to say it)?
It took hours of thought and coding, and the sad part is that I had solved a very similar problem (TB class dependency) long ago. My major mistake was to first try using the material signature as a sort of index variable; what I should have done from the start was to split the signature into its two color indexed components.

For details, send me your email address and I'll reply with the CookieCat source.

Re: Number sequence puzzle

Posted: Sat Dec 17, 2011 6:35 pm
by sje
Someone should inform OEIS and Wikipedia of the serendipitous discovery of this connection between chess and chemistry.

Thompson calculated the first four elements of the TB class name sequence some thirty years ago and the paraffin series has been around for more than a century. But apparently not until this week has anyone made the connection.

Thank you Steven.

Posted: Sat Dec 17, 2011 6:43 pm
by Ajedrecista
Hello Steven:
sje wrote:
Ajedrecista wrote:I am curious about this required an embarrassingly large amount of coding time... how much time (if you want to say it)?
It took hours of thought and coding, and the sad part is that I had solved a very similar problem (TB class dependency) long ago. My major mistake was to first try using the material signature as a sort of index variable; what I should have done from the start was to split the signature into its two color indexed components.

For details, send me your email address and I'll reply with the CookieCat source.
You are implied in some projects (run of Perft(13), BozoChess / CookeCat...) and the results seem to be fairly good! Congratulations. I wish you good luck.

You are so kind when you offer to share CookieCat sources, but I am not interested because I will not understand them. I am a total inexpert in programming: I do not know how to do the 'Hello world' exercise in any programming language (maybe in Fortran '90). So, if you want to share your sources, please do it with someone that will understand them. Sending me CookieCat sources is a total waste of time, be sure of it. Anyway, thanks for the offering: I really appreciate it.

Regards from Spain.

Ajedrecista.