Search found 57 matches

by DJohn
Wed Apr 01, 2020 11:44 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 679
Replies: 2
Views: 49

Re: Problem 679

I don't know what you mean by "eliminating the duplicates". What duplicates? If I List all 15-letter words Count the number of occurrences of each keyword in each word, including overlapping occurrences as v6ph1 points out Delete the words that don't have exactly one occurrence of each keyword then ...
by DJohn
Sat Mar 28, 2020 4:40 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 192
Replies: 36
Views: 9586

Re: Problem 192

62831818251916/902212330695 is correct. The differences are very small, and the sort of error you get from floating point approximations will be much greater.
by DJohn
Wed Mar 04, 2020 10:34 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 704
Replies: 3
Views: 217

Re: Problem 704

That value for S(10) looks familiar. You've likely misread the problem in the same way that I originally did. Check the definition of F carefully: it's the maximum value of g for a fixed n.
by DJohn
Wed Feb 26, 2020 10:01 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 703
Replies: 2
Views: 396

Re: Problem 703

Each function from B^3 to B maps three inputs to one output. There are 8 possibilities for the input, and a function is specified by giving an output independently for each of them. There are 2^8 = 256 ways of doing this, so there are 256 possible functions. In general, there are 2^(2^n) functions f...
by DJohn
Wed Nov 13, 2019 9:40 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 688
Replies: 7
Views: 915

Re: Problem 688

You might be reading "We stack n plates into k non-empty piles" as "We stack n plates onto k non-empty piles", which (to me at least) has a quite different meaning. We start with nothing but n plates. Stacking takes place. Then we have k piles, none of which are empty. The question is concerned with...
by DJohn
Mon Oct 07, 2019 9:43 pm
Forum: News, Suggestions, and FAQ
Topic: Problem 94 typo
Replies: 3
Views: 726

Re: Problem 94 typo

That's standard terminology. Integer is the noun, integral the adjective.
by DJohn
Mon Sep 23, 2019 4:06 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 680
Replies: 2
Views: 662

Re: Problem 680

The question says that for some K iterations, one array value needs to be swapped with another array value in A. That is not what the question says. the $j$-th operation consists of reversing the order of those elements in $A$ with indices between $s_j$ and $t_j$ So if the array is 0, 1, 2, 3, 4, 5...
by DJohn
Mon Sep 09, 2019 3:49 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 503
Replies: 10
Views: 2613

Re: Problem 503

A strategy is just a function from "what has happened so far" to "what to do next". There are only n cards and games can't go on forever, so there's a finite number of possibilities for "what has happened so far" and a finite number of possible strategies. For small n it's possible to test all of th...
by DJohn
Tue Aug 06, 2019 8:43 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 137
Replies: 10
Views: 3063

Re: Problem 137

RishadanPort wrote:
Mon Aug 05, 2019 10:22 pm
IE x = -2 and x = 1/2 both result in Af(x) = 2
$A_F(-2) \neq 2$. It doesn't converge.
by DJohn
Tue Jul 30, 2019 8:48 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 111
Replies: 28
Views: 6099

Re: Problem 111

RishadanPort wrote:
Tue Jul 30, 2019 4:08 am
I am assuming the same prime can be in 2 or more categories, and have it's sum added in multiple times?
It doesn't happen in the case of 4 digit primes, but there's nothing in the problem statement that rules it out. Each S() is evaluated independently.
by DJohn
Mon Jul 29, 2019 12:31 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 111
Replies: 28
Views: 6099

Re: Problem 111

I might be missing something... But why doesn't the question just ask: "What is the sum of all 10 digit primes"... end of question. Simply because the solution is not the sum of all 10 digit primes. For 4 digit numbers, 1013 is prime, but we don't include it in S(4, 1) because it only has 2 1s and ...
by DJohn
Fri Jun 14, 2019 4:09 pm
Forum: News, Suggestions, and FAQ
Topic: Errors/Warnings/Bugs
Replies: 529
Views: 114541

Re: Errors/Warnings/Bugs

Problem 411 is missing its picture.
by DJohn
Wed May 08, 2019 10:30 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 177
Replies: 24
Views: 12181

Re: Problem 177

I'm wondering if the tolerance could be wrong for the way I'm calculating this problem. Is it possible that, given my calculation method / choice of language, the tolerance should actually be 10^(-8) or 10^(-10) or something? For the method that I used, at least, it's quite tolerant of varying tole...
by DJohn
Fri Apr 05, 2019 3:06 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 663
Replies: 11
Views: 2679

Re: Problem 663

Just wanted to check, say the array $A_n = [8, -1, 2, 3, -5, 6, -100, 2, 4, 6]$, so would the maximum sub-array sum be $8 + (- 1) + 2 + 3 + (- 5) + 6 = 13$. So if negative values can be "absorbed", we should "absorb" them? That's what the definition of M implies, and you won't get the right value f...
by DJohn
Tue Jan 22, 2019 2:15 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 175
Replies: 4
Views: 2140

Re: Problem 175

While investigating problem 175 I calculated that f(242)=13 and f(241) = 17, using the function developed for problem 169. However the problem statement for 175 states that f(241) = 13 and f(240) =17. Which of us is right? The problem statement is correct. It's possible that your implementation for...
by DJohn
Thu Sep 27, 2018 9:52 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 637
Replies: 3
Views: 1219

Re: Problem 637

I don't understand where you think the problem is. No one has made any claims about f(10211914,10), and the problem statement does not give any algorithm. With 1. 1+0+2+1+1+91+4 = 100 => 2. 1+0+0 = 1 you've shown that f(10211914,10) <= 2. But then where do you get 10211914 -9*floor(10211914/9) = 1 T...
by DJohn
Mon Sep 17, 2018 9:44 am
Forum: Recreational
Topic: Suggest me a book
Replies: 13
Views: 10733

Re: Suggest me a book

Albert H Beiler "Recreations in the Theory of Numbers" is an interesting one. It belongs to the very end of the hand-computation era, just as computers were starting to take over. The methods he describes are very different to the ones you'd use now. That's what made it fascinating for me. It's a lo...
by DJohn
Fri Aug 31, 2018 9:21 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 504
Replies: 12
Views: 4233

Re: Problem 504

Yes. A point is not strictly inside if it's on an edge.
by DJohn
Fri Jun 22, 2018 9:39 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 004
Replies: 83
Views: 15501

Re: Problem 004

Please don't post code or solutions (even wrong ones): see the big red text at the top. Are you certain that your palindrome() function works? Try testing it with a few numbers that you know are palindromes, and some that you know aren't. There is definitely more than one palindromic product of two ...
by DJohn
Thu May 10, 2018 3:10 pm
Forum: Clarifications on Project Euler Problems
Topic: problem 206
Replies: 33
Views: 11092

Re: problem 206

You don't need a calculator to see that you've gone wrong: The last digit of 1388659302 is 2. Whatever the square is, its last digit will be 4, not 0.