Problem 053

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
shadowboy
Posts: 4
Joined: Mon Sep 01, 2008 9:59 am

Problem 053

Post by shadowboy »

For the combinatorics problem 53, 23C10 is the same as 23C13. Do these count as two values or 1?

In other words, is the question asking for unique number of values or *total* number?
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: Problem 53

Post by Tommy137 »

They count as two values.
Image
User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Problem 53

Post by Georg »

The question is asking for *total* number.
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 53

Post by jaap »

Rereading it now, it seems ambiguous. Maybe it should read something like:

How many pairs of numbers (n,r), for 1<=n<=100, are there with nCr greater than one-million?

The phrase "values of nCr" in the original question probably shouldn't be used considering 23C10 = 23C13 are both counted but have the same value.
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Problem 53

Post by daniel.is.fischer »

The phrase "How many values of nCr" can indeed be interpreted in two ways.
You can either consider the function (n,r) &rarr; nCr, which is the intended interpretation here, or you can consider the set of values and its cardinality.
Would "How many values of nCr, for 1 &le; n &le; 100, 0 &le; r &le; n, are greater than one-million?" be good?
Il faut respecter la montagne -- c'est pourquoi les gypa&egrave;tes sont l&agrave;.
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 53

Post by jaap »

daniel.is.fischer wrote: Would "How many values of nCr, for 1 &le; n &le; 100, 0 &le; r &le; n, are greater than one-million?" be good?
I think that is just as ambiguous. How about:
For 1 &le; n &le; 100, 0 &le; r &le; n, how often is nCr greater than one-million?
User avatar
hk
Administrator
Posts: 12842
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 53

Post by hk »

Or simply:
How many, not necessarily distinct, values of nCr, for 1<=n<=100, are greater than one-million?
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
hk
Administrator
Posts: 12842
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 53

Post by hk »

As no further comments were given, I changed it to my version which is nearest to the original version.
Image
War ruins the life and health of untold numbers of innocent children.
m34tcode
Posts: 4
Joined: Sun May 22, 2011 8:02 pm

Problem 053

Post by m34tcode »

Im having a ton of trouble with this one. My program will return 1144066 for 23C10, but my count is always wrong. tried changing it a little tons of times, really cant see anything wrong. anyone care to look at it? i wrote it in java.
User avatar
Molx
Posts: 3
Joined: Tue Jun 07, 2011 6:44 pm
Location: Brazil
Contact:

Re: Problem 053

Post by Molx »

If your code correctly returns the nCr function then it's probably miscounting. I suggest you re-check your code to make sure your're counting according to the problem rules, as I myself often get a wrong interpretation of those.

Next time remember to leave the problem link =)
Problem 53 (View Problem)
Image
User avatar
Lord_Farin
Posts: 239
Joined: Wed Jul 01, 2009 10:43 am
Location: Netherlands

Re: Problem 053

Post by Lord_Farin »

m34tcode wrote:Im having a ton of trouble with this one. My program will return 1144066 for 23C10, but my count is always wrong. tried changing it a little tons of times, really cant see anything wrong. anyone care to look at it? i wrote it in java.
If you don't manage to solve it with the above suggestion, I could take a look. You can send a PM.
Image
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 053

Post by jaap »

Remember to only count the distinct values. For example 23C10 and 23C13 are both 1144066 but only count as one rather than two.
Edit: Ignore this post
Last edited by jaap on Wed Jun 08, 2011 2:37 pm, edited 1 time in total.
User avatar
hk
Administrator
Posts: 12842
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 053

Post by hk »

jaap wrote:Remember to only count the distinct values. For example 23C10 and 23C13 are both 1144066 but only count as one rather than two.
This contradicts earlier posts.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 053

Post by jaap »

hk wrote:
jaap wrote:Remember to only count the distinct values. For example 23C10 and 23C13 are both 1144066 but only count as one rather than two.
This contradicts earlier posts.
Sorry! I remembered it wrong and misunderstood the problem when I reread it. I even contradicted my previous own post (the thread was merged then).

Anyway, every (n,r) pair that gives nCr greater than a million should be included in the count.
Post Reply