Search found 546 matches

by jaap
Sat Oct 11, 2008 2:27 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 212
Replies: 24
Views: 8706

Re: Problem 212 - lagged Fibonacci generator

The value I get for the sum of the volumes of the first 100 cuboids is less than the hint value given for the sum of their union, so I must have a bug in my lagged Fibonacci generator. However, I can't see anything which looks wrong, and it produces the first two cuboids correctly. Could someone pl...
by jaap
Sat Oct 11, 2008 1:16 pm
Forum: Geometry
Topic: average angle
Replies: 3
Views: 3983

Re: average angle

I don't think there is any other valid way to do this. You're simply converting the angles to unit vectors, adding them, and looking at the angle of this sum vector. If whatever you're working on can be changed to use unit vectors to represent angles throughout, then you don't need any trig of cours...
by jaap
Fri Oct 10, 2008 10:59 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 211
Replies: 24
Views: 10517

Re: Problem 211

How about 9855? ( 9855 = 33 5 73 )
by jaap
Fri Oct 10, 2008 6:20 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 168
Replies: 30
Views: 12441

Re: Problem 168

714285 and 717948 do not divide their right rotation and so are not included in the answer.
by jaap
Fri Oct 10, 2008 3:26 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 044
Replies: 61
Views: 13550

Re: Problem 44, need explanation

JPGargoyle wrote:Does |Pk - Pj| means the absolute value?
Yes, the absolute value of the difference between the two numbers.
JPGargoyle wrote: or distance?
This is exactly how distance is usually defined on real numbers.
by jaap
Thu Oct 09, 2008 2:13 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 205
Replies: 27
Views: 14983

Re: Problem 205

To be sure about submitting the answer: If my result were 0.123456789..., would I be correct that the answer string were "0.1234567"? No, the correct answer would then be 0.123456 8 . It has to be rounded to 7 places, so upwards if the 8th place has a 5 or higher, downwards otherwise. You example s...
by jaap
Tue Oct 07, 2008 6:51 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 034
Replies: 22
Views: 8186

Re: A little confused about Project Euler challenge #34

Here are two ways of looking at it. n! / n = (n-1)! This is true for n>1, and by assuming it is true for n=1 gives 0! = 1!/1 = 1. n! is the number of ways you can order n things in a row. 1!=1 because you have no choice, there is only one way it can be. Similarly with 0 objects there is only 1 way i...
by jaap
Mon Oct 06, 2008 2:16 pm
Forum: News, Suggestions, and FAQ
Topic: New Level System (Feedback)
Replies: 66
Views: 20330

Re: New Level System (Feedback)

Think of this: while the number of faces on Platonic solids increases, the solid itself is approaching a sphere.(at least I think...) Kind of. The icosahedron seems more rounded, but oddly enough: When a dodecahedron is inscribed in a sphere, it occupies more of the sphere's volume (66.49%) than an...
by jaap
Mon Oct 06, 2008 2:06 pm
Forum: Game Theory
Topic: Twelve Knights
Replies: 9
Views: 14095

Re: Twelve Knights

There was a slight oversight in my analysis, though the result stays the same. What I missed in my previous post was that reducing the m,n odd case as I did can also lead to 3xk or 5xk rectangles. I was only thinking of odd squares when I wrote that up. It can be easily fixed, but I now prefer a sli...
by jaap
Sun Oct 05, 2008 7:02 pm
Forum: Number Theory
Topic: Factorization algorithms for largish numbers
Replies: 14
Views: 8445

Re: Factorization algorithms for largish numbers

My reading of the page is that it always works ("Output: a non-trivial factor of N.") Am I missing something or is the page wrong? I think the page is wrong. I implemented exactly what it says on the page earlier today. It did exactly the 11111 example on the page, but some other odd numbers I trie...
by jaap
Sun Oct 05, 2008 6:13 pm
Forum: Number Theory
Topic: Factorization algorithms for largish numbers
Replies: 14
Views: 8445

Re: Factorization algorithms for largish numbers

Looking at wiki, I came across http://en.wikipedia.org/wiki/Shanks%27_square_forms_factorization It says it's O(N^(1/4)), which looks pretty good, comparable with Pollard and similar methods. Haven't implemented it yet to try. The algorithm on that page doesn't always work. It sometimes ends with a...
by jaap
Fri Oct 03, 2008 2:57 pm
Forum: Applied Mathematics
Topic: truth value, circular logic
Replies: 6
Views: 9902

Re: truth value, circular logic

This is about problem 209. I think you misunderstand what truth table means. A 6-input truth table for τ looks like this: a b c d e f:τ 0 0 0 0 0 0:x 0 0 0 0 0 1:x 0 0 0 0 1 0:x .... 1 1 1 1 1 1:x where each of the x's is a 0 or 1. It has 64 rows, one for each combination of values for a-f. So τ is ...
by jaap
Thu Oct 02, 2008 4:44 pm
Forum: Combinatorics
Topic: placing boxes
Replies: 5
Views: 3017

Re: placing boxes

R(n,k) = Choose(n+1-k,k), so the maximum will be assumed for k = floor((5n+2-sqrt(5n 2 +20n+24))/10)+1, also for that value-1 if the expression is an integer. Not a particularly elegant formula :( . I got exactly the same: R(n,k) = n+1-k C k To see when this is largest, I'll use a ratio test: R(n,k...
by jaap
Thu Oct 02, 2008 2:23 pm
Forum: Combinatorics
Topic: placing boxes
Replies: 5
Views: 3017

Re: placing boxes

Did you forget the word "non-adjacent" somewhere?
by jaap
Wed Oct 01, 2008 3:46 pm
Forum: Game Theory
Topic: Twelve Knights
Replies: 9
Views: 14095

Re: Twelve Knights

If there exists a knight's tour, we get an upper bound of mn/2 . A knight's tour may exist on a board with odd number of cells(such as 5*5). Then the upper bound should be (mn+1)/2, not mn/2 . Yes. Maybe Eigenray was thinking only of closed knight's tours . Long, complete, and I hope correct analys...
by jaap
Tue Sep 30, 2008 9:27 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 210
Replies: 70
Views: 29457

Re: Problem 210

It maybe should be mentioned in this thread that in most computer languages a floating point type with 64 bits (e.g. a 'double') will only have essentially 53 bits to hold an integer value. It is therefore not accurate for integers above 253, or about 9*1015.
by jaap
Tue Sep 30, 2008 9:16 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 038
Replies: 38
Views: 16384

Re: Problem 38

They are not intervals (which only use 2 numbers in the notation).
They are n-tuples, i.e. ordered (multi-)sets.
by jaap
Mon Sep 29, 2008 7:30 am
Forum: Combinatorics
Topic: Combinations with Irregular Repetition
Replies: 6
Views: 5348

Re: Combinations with Irregular Repetition

If you just want to find all divisors of a number for which you have a prime factorisation, there are better ways to do that. You have thrown in extra 1's and choose exactly 4 numbers, some of which can be 1. It is much better to not use the extra 1's, and choose any amount of the numbers. How many ...
by jaap
Sat Sep 27, 2008 11:17 pm
Forum: Recreational
Topic: Puzzles based on sporadic simple groups
Replies: 2
Views: 1795

Re: Puzzles based on sporadic simple groups

Here's a video of the genius puzzle inventor Oskar van Deventer demonstrating his physical puzzle that is based on the M12 sporadic group:
http://www.youtube.com/watch?v=H8ZcYvU0sLY
by jaap
Fri Sep 26, 2008 10:17 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 074
Replies: 8
Views: 3659

Re: Can someone verify problem 74?

harryh wrote:I had to snip a couple of values - since they seemed to be giving away almost all of the possibilities.
Sorry about that, I didn't notice. Thanks.