Search found 34 matches

by pjt33
Tue Aug 04, 2020 11:02 am
Forum: Programming languages
Topic: the Spartan way of C
Replies: 5
Views: 58

Re: the Spartan way of C

lucasart wrote:
Tue Aug 04, 2020 5:47 am
PS: C and C++ are completely different ball games. They shouldn't be lumped together. It's obvious that this groupping was made by mathematicians, not programmers.
Bear in mind that the grouping was made two decades ago, when C++ had diverged much less from C than it has now.
by pjt33
Wed Jul 22, 2020 4:42 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 623
Replies: 18
Views: 3820

Re: Problem 623

Also, $\Lambda(n)$ is described as the number of distinct $\alpha$-equivalent lambda-terms that can be written using at most $n$ symbols, but it's actually the number of such symbols which are closed . Thank you for pointing that out, Sardaai. The description has now been updated to ask for closed ...
by pjt33
Wed Jun 17, 2020 8:44 pm
Forum: Recreational
Topic: Missing Wedding Ring Finger
Replies: 18
Views: 14481

Re: Missing Wedding Ring Finger

euler wrote:
Sun Jul 17, 2016 1:15 pm
The use of the missing finger is a nice angle as that is often ignored in solutions, so there may be some mileage in that. However, keeping a finger on ice for 30 years
is surely not implied at all by ultimatro's answer?
by pjt33
Wed May 27, 2020 7:55 pm
Forum: Number
Topic: Floor sum
Replies: 1
Views: 5943

Re: Floor sum

If there is a solution along similar lines to the one for $\lfloor \sqrt{k} \rfloor$ then it's a polynomial in $n$ and $\lfloor \sqrt{n} \rfloor$. Asymptotically the solution is $\Theta(n^2)$, so there are only 9 coefficients to determine. Pick 9 values of $n$, perform Gaussian elimination to get th...
by pjt33
Fri May 22, 2020 8:35 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 089
Replies: 67
Views: 23236

Re: Problem 089

Nothing wrong with cleverness, but I do think that one of the qualifications for a problem to make it to PE is that it should be a true combination of math and programming, so a problem shouldn't be solvable without a computer doing at least some computation. The compromise position is to include t...
by pjt33
Tue Apr 21, 2020 3:18 pm
Forum: News, Suggestions, and FAQ
Topic: Answer checking API for CI/CD
Replies: 4
Views: 988

Re: Answer checking API for CI/CD

It would be awesome if it was possible for me to add a script which could check the solutions to the puzzles in the builds which would fail if incorrect. For that use case you don't want an API: you want a local file with test cases. Otherwise your build can randomly fail due either to temporary ne...
by pjt33
Wed Apr 15, 2020 5:31 pm
Forum: Resources
Topic: Project Euler Android App
Replies: 11
Views: 14637

Re: Project Euler Android App

Who's the target audience? I've answered a few PE questions on my phone on the bus or in the café in my coffee break, and the only app I needed was qPython3.
by pjt33
Fri Mar 20, 2020 12:32 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 236
Replies: 9
Views: 4330

Re: Problem 236

there is inevitably some spoilage each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A' These quotes from the problem statement exclude solutions with no spoilage for one of more products. I think that is less than crystal clear. It's a perfectly reasonable (and, in ge...
by pjt33
Sun Feb 16, 2020 4:12 pm
Forum: News, Suggestions, and FAQ
Topic: easier new problems?
Replies: 5
Views: 1269

Re: easier new problems?

I think one useful tool is simply to classify. A large chunk of problems are fundamentally about prime factorisations of integers from 1 to N: i.e. number theory. (They can be further classified: e.g. problems which rely on efficient counting of primes up to N). A smaller chunk of problems are about...
by pjt33
Tue Feb 11, 2020 9:18 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 610
Replies: 18
Views: 6232

Re: Problem 610

The question states The rules do not place any restriction on the number of occurrences of M, so all integers have a valid representation. but doesn't explain how to get negative integers, and I got the tick with an answer which assumes that negative integers don't have a valid representation. I thi...
by pjt33
Mon Jan 27, 2020 1:24 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 699
Replies: 0
Views: 3041

Problem 699

There's an error in the problem statement. It currently says
the denominator is a power of 3 i.e. $b=3^k, k>0$.
It should say
the denominator is a power of 3 other than 1, i.e. $b=3^k, k>0$.
(The other possible correction, $>$ to $\ge$, doesn't match up with the test cases).
by pjt33
Sat Jan 25, 2020 11:42 am
Forum: Resources
Topic: Retrieving Minimal Information
Replies: 24
Views: 24713

Re: Retrieving Minimal Information

For those interested in knowing, the minimal information script has been re-implemented. I have updated the first post to reflect any changes that may have taken place. There seems to be one change, possibly more recent than that, which isn't reflected in the first post: when logged in, I'm seeing ...
by pjt33
Fri Jan 24, 2020 8:45 pm
Forum: Combinatorics
Topic: Matrix-valued generating functions
Replies: 0
Views: 5278

Matrix-valued generating functions

On another site, I recently tackled a question asked about an "idle" computer game which boiled down to the expected time to reach the absorbing state in a Markov process. As I didn't know the standard approach (I have now learnt it, so don't feel obliged to explain it :wink:), I reasoned as follows...
by pjt33
Sat Jul 04, 2009 3:40 pm
Forum: News, Suggestions, and FAQ
Topic: Missed update
Replies: 2
Views: 1402

Re: Missed update

Aha. Thanks.
by pjt33
Sat Jul 04, 2009 2:23 pm
Forum: News, Suggestions, and FAQ
Topic: Missed update
Replies: 2
Views: 1402

Missed update

I was expecting to see either Problem 253 or at least a countdown to it today. Have I missed an announcement? Is something up?
by pjt33
Tue May 05, 2009 11:24 pm
Forum: News, Suggestions, and FAQ
Topic: Problem Level Platonic Solid
Replies: 7
Views: 2730

Re: Problem Level Platonic Solid

Another obvious extension is the regular "solids" of infinite volume. There are three, with respectively 6 triangles, 4 squares, or 3 hexagons meeting at each vertex, and tiling the surface of an infinitely large sphere.
by pjt33
Tue Jan 06, 2009 9:46 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 094
Replies: 47
Views: 17309

Re: problem 94

tiny wrote:The text says: whose perimeters do not exceed 1.000.000.000

Does this mean, that for every triangle the perimeter is less than 1.000.000.000?
Almost. It means less than or equal to 1.000.000.000.
by pjt33
Tue Jan 06, 2009 1:35 pm
Forum: Discrete Mathematics
Topic: Gladiators
Replies: 20
Views: 8340

Re: Gladiators

I leave it as an exercise for the reader to prove that the un ordered partition of n health between r gladiators is (n+r-1)Cn. I think there is a typo there. Yes. For n=160, r=16, I find the number of ordered partitions to be much larger : 175 C 160 =1823828930470225269045 and the number of unorder...
by pjt33
Mon Jan 05, 2009 12:26 am
Forum: Discrete Mathematics
Topic: Gladiators
Replies: 20
Views: 8340

Re: Gladiators

Huh, that looks interesting. How did you calculate that number? It's the ordered partition* of 160 health between 16 gladiators. I leave it as an exercise for the reader to prove that the unordered partition of n health between r gladiators is (n+r-1)Cn. * The partition into n distinguishing the n....
by pjt33
Sat Dec 27, 2008 8:03 pm
Forum: Discrete Mathematics
Topic: Gladiators
Replies: 20
Views: 8340

Re: Gladiators