Search found 26 matches

by pjt33
Sun Feb 16, 2020 4:12 pm
Forum: News, Suggestions, and FAQ
Topic: easier new problems?
Replies: 5
Views: 140

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: 4919

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: 667

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: 23
Views: 20839

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: 944

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 2:40 pm
Forum: News, Suggestions, and FAQ
Topic: Missed update
Replies: 2
Views: 1207

Re: Missed update

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

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 10:24 pm
Forum: News, Suggestions, and FAQ
Topic: Problem Level Platonic Solid
Replies: 7
Views: 2391

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: 15777

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: 7559

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: 7559

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: 7559

Re: Gladiators

by pjt33
Mon Dec 22, 2008 10:16 pm
Forum: Discrete Mathematics
Topic: Gladiators
Replies: 20
Views: 7559

Re: Gladiators

I make it a Markov model with 236236542585120 states. Fortunately the transition matrix is sparse ;)
by pjt33
Fri Dec 19, 2008 5:26 pm
Forum: Discrete Mathematics
Topic: Non-symmetric Palindromes
Replies: 9
Views: 4403

Re: Non-symmetric Palindromes

#!/bin/sh tr A-Z a-z </usr/share/dict/british-english | sort -u >/tmp/wordlist cat /tmp/wordlist | tr a-z phxdtl%brjzfvn%aqiyeum%csk | grep -v "%" | sort >/tmp/translated cat /tmp/wordlist /tmp/translated | sort | uniq -d Not that many. There are a handful of 5-letter ones: buffy hulls bulls huffy ...
by pjt33
Sun Dec 14, 2008 7:46 pm
Forum: Discrete Mathematics
Topic: Coin Efficiency
Replies: 1
Views: 2026

Re: Coin Efficiency

The spoiler seems to be broken, so I've unspoilered this. Sorry. There's an easily proved lower bound of 2.52; it's achieved by the following 38 sets. I used a brute force search considering only coin values up to 100. The puzzle is so closely related to Golomb rulers that I thought offsetting one o...
by pjt33
Sat Dec 06, 2008 11:07 pm
Forum: Discrete Mathematics
Topic: Gladiators
Replies: 20
Views: 7559

Re: Gladiators

hk,forget the direct picking of numbers. What's intended is that if Ben has B hp and Hur has H hp, then Ben wins with probability B/(B+H) and the only other possible event is that Hur wins.
by pjt33
Mon Dec 01, 2008 10:13 pm
Forum: Combinatorics
Topic: Word quiz problem
Replies: 1
Views: 2065

Re: Word quiz problem

[spoiler]59, at which point the probability is .8333...[/spoiler]
by pjt33
Sat Nov 29, 2008 11:41 pm
Forum: News, Suggestions, and FAQ
Topic: How to find the power set?
Replies: 7
Views: 3362

Re: How to find the power set?

There's an efficient way to do it for sets not larger than 63 (64 if you have unsigned longs in your language). HAKMEM #169. Alternatively, see Knuth's preprint of TAoCP, Vol 4, Fascicle 1a, or check out my code in the discussion fora for problem 215*. *Or for another problem, but I've edited that o...
by pjt33
Sat Nov 08, 2008 6:58 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 037
Replies: 45
Views: 11377

Re: problem 37 : on truncatable primes [1373 left-truncatable?]

1 is not a prime.
by pjt33
Sun Oct 19, 2008 10:46 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 138
Replies: 22
Views: 5913

Re: problem 138

Simple code, but it could be made somewhat faster. As far as I know, Math.round(Math.sqrt(s)) is never off by more than one in the range of long. If you use StrictMath.sqrt then you're guaranteed an error of no more than 1 ulp. Since the largest long is 2^63-1, the largest sqrt of a long is about 1...