A trick I used :

compute pandigital numbers from 1 to 98765 :-)
Put it in an array of dwords : one bit per digit used
For instance : 9123 is coded 1000001110b
It's a lot faster than perpetual string handling

Interesting, those problems ; now I know I must NOT write eightty nor eightteen ! ;-)
Posted on 2004-06-16 06:05:11 by valy
The gentleman appears very open to suggestion, and is commited to maintaining the problems.
I totally agree with bitRAKE whenever you have a legitimate point. My latest one was when I inquired how could someone logically define a single digit number as a left-right "truncatable" prime. The response was immediate and Problem #37 was corrected appropriately.

Raymond
Posted on 2004-06-16 09:31:32 by Raymond
Haha. Regarding that question, I was wondering how could it be possible that there exist 15 left right truncatable primes when you do not consider single digit prime. Only after a while I realise that the question does consider the single digit prime in the statement "There exist 15 ...". However the single digit primes are not supposed to be added up for the sum in the answers.
Posted on 2004-06-16 11:53:52 by roticv
I emailed him too about problem 37 although not about the same query you had. The problems says:

"Find the sum of all eleven left-right truncatable primes."

But after making a program to do this I found there were far more than 11 of them. In fact there are supposedly 4260 left-right truncatable primes.

Either I've completely misunderstood the problem or there's some error in the wording of it. I haven't had a reply yet for the email I sent him so what am I missing?
Posted on 2004-06-16 11:55:25 by DeX
Dex, those primes are left truncatable primes and not left-right truncatable primes.
Posted on 2004-06-16 12:36:50 by roticv
What's the difference between a left truncatable prime and a left-right truncatable prime?
Posted on 2004-06-16 12:45:40 by DeX
Taking 4547 as an example for left truncatable prime. 4547 is a prime, 547 is a prime, 47 is a prime, 7 is a prime. But it is not a left-right truncatable prime because 454 is not a prime, 45 is not a prime and 4 is not a prime.
Posted on 2004-06-16 12:57:07 by roticv
Ah ok, I must have misunderstood the meaning of the hyphen.

In the problem it talks about things being left to right and right to left truncatable. Then it says find the 11 left-right truncatable primes which I assumed to mean left to right. If it means left and right then it's another matter...
Posted on 2004-06-16 13:08:52 by DeX
If you have an odd number of people, randomly placed, and every person shoots the person closest to him, prove that after all shooting is done, there will be exactly one survivor.
Posted on 2004-06-16 18:00:09 by comrade
We can extrapolate...

1 person has no one to shoot (except himself ;)).

3 persons,
- if A is closest to B:
- - if B closest to A then they shoot each other, C left
- - if B not closest to A then C not closest to A,
- - - B shoot C, C shoot B, A left.

...any odd number of people can be divided up similarly.



There sure are many Swedish programmers working on the problems.
Posted on 2004-06-17 09:49:55 by bitRAKE
There's finally a Canadian flag in the 100% completion category. The most difficult was Problem #66 which I had tried to solve with my limited basic math knowledge as with all the other problems. I even wrote an algo to extract an exact square root from a 96-bit integer (which could be expanded easily to 128 bits).

After a long while, I eventually resigned myself to search for additional knowledge with which I could succeed in writing an algo to reach the solution within a reasonable time.

Now, I can go back to more productive chores.

Raymond
Posted on 2004-07-13 21:04:58 by Raymond
Please, note that a forum has been created at the Challenge web site to discuss solutions once a problem has been solved. :alright:
Posted on 2004-07-26 01:29:51 by bitRAKE
Hi to everyone after a long time.
Really good site, thanks Raymond. I like these kind of challenges. And if you too then you will like geek challenges on OSIX
Posted on 2004-07-30 12:39:52 by inFinie