In article <27133513183559@[EMAIL PROTECTED]
>, Marcel Hendrix <mhx@[EMAIL PROTECTED]
>
wrote:
>mhx@[EMAIL PROTECTED]
(Marcel Hendrix) writes Re: [SPOILER] Re: Euler problem #187
>
>> anton@[EMAIL PROTECTED]
(Anton Ertl) writes Re: [SPOILER] Re:
Euler problem #187
>
>>> I found and fixed the bug:
>
>Never forget the old but nonetheless excellent work of others (in this
>case Albert van der Horst).
>
>-marcel
< spoiler snipped>
>\ FORTH> euler187
>\ There are 17xxxxxx composite integers, n < 10^8, having precisely two,
not
>\ necessarily distinct, prime factors.
>\ 0.636 seconds elapsed. ok
It is a benchmark intended to waste cycles in a recursive
program that actually calculates something.
Nice to see that it is up to production work.
I used it myself to find the 10,001 th prime, doing trial and error
by hand.
I solved a few of the harder problems.
The least significant non-zero digits of 10^12 ! (euler188) took me
halve a day.
The problem is that numbers ending in 5 together with an even number
give a zero. The bottom line is that you must account for all factors
5 and 2. On the other hand, you need not bother with the odd
numbers, they all cancel ... (which leaves 5*10^11 numbers to
multiply ).
The other one was the hyper exponentation:
1777 ^ 1777 ^ 1777 .. (1855 times). .. ^ 1777
The task is not to calculate all digits ;-) merely the last 5.
It turns out that some of the solutions were based on wrong
reasoning, but still give the right answer.
Both of these harder problems run in submillisecond time once the are
solved. The advantage of the harder problems is that the discussion is
not closed, such that I can show people some Forth code.
I have other things to do, but cannot help to tackle the colored
triangle, the capacitor and the triomino problem. The triomino problem
can be solved with techniques of the pentominos. A bitmap solution can
be spectacularly fast, and could show off Forth in the discussion.
The people at euler are responsive. On my suggestion they added the
following to the intended audience "professionals who want to keep
their programming and mathematics skills on the edge". Now Marcel,
Anton and myself need no longer be ashamed of working on those
problems.
I'm still at page 3 (of 4 dutch pages) with 14 solved.
Groetjes Albert.
--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- like all pyramid schemes -- ultimately falters.
albert@[EMAIL PROTECTED]
&=n http://home.hccnet.nl/a.w.m.van.der.horst


|