Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > more euler prob...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 12 of 22 Topic 4048 of 4325
Post > Topic >>

more euler problems, was Re: Euler problem #187

by Albert van der Horst <albert@[EMAIL PROTECTED] > May 12, 2008 at 02:21 PM

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
 




 22 Posts in Topic:
[SPOILER] Re: Euler problem #187
anton@[EMAIL PROTECTED]   2008-05-09 20:27:46 
Re: [SPOILER] Re: Euler problem #187
mhx@[EMAIL PROTECTED] (M  2008-05-10 00:42:26 
Re: [SPOILER] Re: Euler problem #187
cac <cac@[EMAIL PROTEC  2008-05-09 16:23:19 
Re: [SPOILER] Re: Euler problem #187
anton@[EMAIL PROTECTED]   2008-05-10 09:43:00 
Re: [SPOILER] Re: Euler problem #187
mhx@[EMAIL PROTECTED] (M  2008-05-10 12:45:19 
Re: [SPOILER] Re: Euler problem #187
anton@[EMAIL PROTECTED]   2008-05-10 13:11:43 
Re: [SPOILER] Re: Euler problem #187
mhx@[EMAIL PROTECTED] (M  2008-05-10 19:29:58 
Counted loops (was: [SPOILER] Re: Euler problem #187)
anton@[EMAIL PROTECTED]   2008-05-10 17:34:43 
Re: [SPOILER] Re: Euler problem #187
mhx@[EMAIL PROTECTED] (M  2008-05-10 20:10:28 
Re: [SPOILER] Re: Euler problem #187
Luca Masini <lmasini@[  2008-05-10 23:54:21 
Re: [SPOILER] Re: Euler problem #187
mhx@[EMAIL PROTECTED] (M  2008-05-11 00:58:55 
more euler problems, was Re: Euler problem #187
Albert van der Horst <  2008-05-12 14:21:47 
[SPOILER] Re: more euler problems
anton@[EMAIL PROTECTED]   2008-05-12 18:43:32 
Re: [SPOILER] Re: more euler problems
cac <cac@[EMAIL PROTEC  2008-05-12 13:26:55 
Re: [SPOILER] Re: more euler problems
anton@[EMAIL PROTECTED]   2008-05-13 10:14:55 
Re: [SPOILER] Re: more euler problems
cac <cac@[EMAIL PROTEC  2008-05-13 10:16:55 
Re: [SPOILER] Re: more euler problems
anton@[EMAIL PROTECTED]   2008-05-13 18:22:29 
Re: [SPOILER] Re: more euler problems
cac <cac@[EMAIL PROTEC  2008-05-13 12:25:24 
Re: more euler problems, was Re: Euler problem #187
William James <w_a_x_m  2008-05-17 16:40:44 
Re: [SPOILER] Re: Euler problem #187
William James <w_a_x_m  2008-05-17 17:01:57 
Re: Euler problem #187
William James <w_a_x_m  2008-05-17 15:18:54 
Re: Euler problem #187
Bernd Paysan <bernd.pa  2008-05-18 01:24:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 16:44:31 CST 2008.