Problem 369

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
Eventhorizon
Posts: 19
Joined: Fri Sep 23, 2011 2:16 am

Problem 369

Post by Eventhorizon »

Having trouble making sure I understand a Badugi, because I can't match the 5 card example. My understanding:

Regardless the number of cards in the hand (from 4 to 13), I must be able to form at least one set of 4 cards with the following property: Each card in the set of 4 has a different rank and a different suit.

The question says no pairs and no two of the same suit. I have assumed that means no 3 of a kind, 4 of a kind, no 3 of same suit and no 4 of same suit. But I am afeared of ass-u-me ing!
Image
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 369

Post by TripleM »

That's right.
ldesnogu
Posts: 17
Joined: Wed Jan 11, 2012 10:04 am

Re: Problem 369

Post by ldesnogu »

Eventhorizon wrote:The question says no pairs and no two of the same suit. I have assumed that means no 3 of a kind, 4 of a kind, no 3 of same suit and no 4 of same suit. But I am afeared of ass-u-me ing!
Hmm, I find assumption hard to read :) It looks like you're missing some exclusions.
Image
Eventhorizon
Posts: 19
Joined: Fri Sep 23, 2011 2:16 am

Re: Problem 369

Post by Eventhorizon »

Still not getting it ... so two questions

1) 5 cards, all different ranks, obviously 2 of same suit, e.g 2H, 6H, 3S, 4D, 5C. Does this only count as 1 badugi-containing hand, even though I can form 2 different badugis: 2H, 3S, 4D, 5C AND 6H, 3S, 4D, 5C?

2) 5 cards containing 1 badugi, can the fifth card be any of the remaining 48 without restriction e.g. 2H, 3S, 4D, 5C, RS (R - any rank, S - any suit, not already used)?

I am coming up with too many for the 5 card example 823,680 vs 514,800 given in the question. Is there some restriction on the 5th card that is implied in the question, but I am missing? If not, there must be some restriction on the badugi I am not counting. Grrr.
Image
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 369

Post by TripleM »

1) and 2) are both correct, taken individually. Your problem lies with 1) and 2) when combined.
jbiesnecker
Posts: 1
Joined: Wed Feb 01, 2012 6:11 am

Re: Problem 369

Post by jbiesnecker »

TripleM wrote:1) and 2) are both correct, taken individually. Your problem lies with 1) and 2) when combined.
I think I've figured out that part (the whole "why is card #5 card #5? because it's not one of the others" thing that narrows down the possible cards that it could be), but I'm still off (504,504 vs. 514,800). I know I'm still missing something stupid (and apparently quite small) but I can't for the life of me figure it out.
Eventhorizon
Posts: 19
Joined: Fri Sep 23, 2011 2:16 am

Re: Problem 369

Post by Eventhorizon »

Thank you TripleM, your hint was understood - I see the source of my double-counting!

Of course, that doesn't mean I can solve the problem!

May I suggest if anyone else is having the same problem as me, simplify the deck to ranks 1-3 and suits H and S, and define a badugi' as 2 cards of different rank and suit. Enumerate all the possible Badugi' - containing hands for a hand of 3 cards.

I hope this would not be considered a spoiler.
Image
ScoopyPuppy2
Posts: 8
Joined: Wed Dec 07, 2011 7:07 am

Re: Problem 369

Post by ScoopyPuppy2 »

I really thought I had it, but no. There are already 99 people who solved it, so I guess this won't be my first one-in-a-hundred problem :(

Still, I'd like to check some other values of f, would that be OK? For instance, we know f(5) = 514800, I'd like to check my f(6).

Thanks in advance!
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 369

Post by thundre »

ScoopyPuppy2 wrote:Still, I'd like to check some other values of f, would that be OK? For instance, we know f(5) = 514800, I'd like to check my f(6).
If you PM me your value for f(6), I'll tell you whether it's right or not.
Image
thkang
Posts: 8
Joined: Thu Nov 15, 2012 8:34 am

Re: Problem 369

Post by thkang »

hi,

can you tell me true/false of following n and f(n):

4 : 17160
5 : 514800
6 : 7207200
7 : 67095600
8 : 471330288
9 : 2657521152
10 : 12571072800
11 : 51136072416
12 : 182018076240
User avatar
Marcus_Andrews
Administrator
Posts: 1637
Joined: Wed Nov 09, 2011 5:23 pm

Re: Problem 369

Post by Marcus_Andrews »

4 and 5 = OK. 6 onward = incorrect.
DeatH_StaR
Posts: 16
Joined: Sat Apr 19, 2014 5:09 pm

Re: Problem 369

Post by DeatH_StaR »

My math might be crooked, by if you want to choose 5 cards out of a 52 deck, you can choose a card and have 52 possibilities, then the second with 51 possibilities, the third with 50, fourth with 49 and fifth with 48, so 52*51*50*49*48=311875200, and not 2598960 as you said. What am I doing wrong?
v6ph1
Posts: 134
Joined: Mon Aug 25, 2014 7:14 pm

Re: Problem 369

Post by v6ph1 »

Are {1,2,3,4,5} and {2,3,4,5,1} different sets?
Image
Post Reply