dickwilliams
dickwilliams
  • Threads: 4
  • Posts: 13
Joined: Mar 23, 2010
May 16th, 2017 at 10:01:23 AM permalink
In a deck of non-standard cards, there are 7 red-faced cards and 4 blue-faced cards for a total of 11 cards. Two players are dealt 4 cards at random, face-down, without showing each others what they got. Each player will then discard 1 card face-down, and drop the remaining cards into a blackbox. After both players have done so, the blackbox is opened and each card type is tallied. The good team wins if there are fewer than 2 blue cards in the mix, and the bad team wins if there are 2 or more blue cards in the mix (i.e., at least 5 red cards are required for the good team to win). You can assume there is no way to know who dropped what cards into the blackbox.

A good player will always discard a blue card, and a bad player will always discard a red card, if possible. For example, if a good player receives RRRB, then he will discard B and put RRR into the blackbox. Suppose that both players are *good*, then what is the probability that they end up losing?

EDIT: See the bottom of the page for my brute force answer.
Last edited by: dickwilliams on May 16, 2017
Romes
Romes
  • Threads: 29
  • Posts: 5602
Joined: Jul 22, 2014
May 16th, 2017 at 1:00:29 PM permalink
Just trying to clarify a bit =P... So is the goal here to determine if you're playing with 0, 1, or 2 "good players" regardless of outcome?

i.e. Final 6 = RRR RRR, how many good players?
i.e. Final 6 = RRB RBB how many good players?
etc?
Playing it correctly means you've already won.
dickwilliams
dickwilliams
  • Threads: 4
  • Posts: 13
Joined: Mar 23, 2010
May 16th, 2017 at 1:30:37 PM permalink
I have probably worded this question poorly. Let's try again:

In a group of players, let's say 7, there are exactly 4 good players and 3 evil (bad) players. They will play multiple rounds of the above-said game to test the allegiance of each player. Each round consists of exactly 2 randomly-chosen players out of the pool of 7, and we want to know what is the likelihood that the bad team will win that round despite both players' allegiance being good.

So far I can deduce the following:

If there are 4 blues, i.e., RRBBBB, then both players must be bad, because this can only happen if both players picked up RRBB but decided to discard R (there are only 4 blue cards in the deck).

EDIT: The statement below is false:

If there are 3 blues, i.e., RRRBBB, then at least one of the two players in the round must be bad:
case 1: If player 1 picked up RBBB and player 2 picked up RRRB, then if both players are good, then the result should be RRRBBB since player 1 will discard his only R and player 2 will discard one of his Rs.
case 2: If both players picked up RRBB, then if both players are good, then the result should be RRRRBB, since both players would discard one of their Bs.

Now what is interesting to me is that if there are only 2 blues, then even though the bad teams won the round, it does not guarantee that at least one of the players is bad. The two good players might have just gotten a bad draw. What I am interested to know is what's the likelihood of that happening.
Last edited by: dickwilliams on May 16, 2017
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 2946
Joined: Jun 17, 2011
May 16th, 2017 at 1:35:52 PM permalink
I'm guessing the question is if you find 4 Red and 2 Blue in the box then what were the chances of 0, 1 or 2 good players.

Technically one needs to know what the chances of people being good or bad, but assuming it's 50/50 then my method would be to look at all the starting positions (4/0 3/1; 4/0 2;2... ; 0/4 1/3) and see which land up with 4R/2B for each combination of the players being good and bad.

My guess - as I haven't checked my figures - is about 18.8%.
[edit]Please see answer further down page, I have more confidence in that method!
Last edited by: charliepatrick on May 16, 2017
dickwilliams
dickwilliams
  • Threads: 4
  • Posts: 13
Joined: Mar 23, 2010
May 16th, 2017 at 1:38:37 PM permalink
Hi charliepatrick,

Thanks for your reply. Can you walk me through your calculations? I would love to see it so that I can reproduce it with different parameters (for example, different distribution in the starting deck and different number of participants in the round).
Romes
Romes
  • Threads: 29
  • Posts: 5602
Joined: Jul 22, 2014
May 16th, 2017 at 1:39:48 PM permalink
0 = red
1 = blue

0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111

So of these possibly 16 starting 4 card hands, you could then look at what each player "would" do, which would create 32 possible scenarios. Then, when reviewing the result set, you could find the scenarios it fits in and maybe not all of the time but some of the time know the number of good vs bad players. I feel like there would be a few ambiguous situations, but it's near day end for me and I'm not feeling quite up to the task as of now =P.
Playing it correctly means you've already won.
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 2946
Joined: Jun 17, 2011
Thanked by
dickwilliams
May 16th, 2017 at 2:28:12 PM permalink
Quote: dickwilliams

Hi charliepatrick...Can you walk me through your calculations?...


My first method was to start with player 1 having RRRR then player 2 could have RRRR RRRB RRBB RBBB BBBB (some of these are impossible because of the number of Reds or Blues in the deck). Continue using RRRB (all 5), RRBB (all 5) etc. That gives 25 rows (some which are impossible).
Work out for each row what lands up in the box for players being (Good Good) (Good Bad) (Bad Good) (Bad Bad).
Now I leave it to the reader to work out the permutations for each row - this is the bit I hadn't checked.

I've got a different result using the following method (which I suspect is more likely to be correct).
Consider eight slots, each with a Red or Blue. List the 256 permutations of R or B for each slot and give 1-4 to Player 1 and 5-8 to Player 2.
Note some of these will be impossible but this gets evaluated; eg with RRRRRRRR when you know there are no Reds left for slot 8, so the perms is 7x6x5x4x3x2x1x0.

For each combination of Players being good or bad, work out how many Blues in the box for all 256 rows.

Derive results according to the question!

Players0 Blues1234
Good Good16.970%54.545%27.879%0.606%0.000%
Good Bad1.212%21.212%52.727%24.848%0.000%
Bad Good1.212%21.212%52.727%24.848%0.000%
Bad Bad0.000%2.424%25.455%51.515%20.606%

Again I haven't checked these results as it's getting late here, so assume they're a guidance. Although I know Good Good can get 3 blues if one of them gets all 4.
gordonm888
Administrator
gordonm888
  • Threads: 60
  • Posts: 5043
Joined: Feb 18, 2015
May 16th, 2017 at 3:04:52 PM permalink
Quote: charliepatrick



For each combination of Players being good or bad, work out how many Blues in the box for all 256 rows.

Derive results according to the question!

Players0 Blues1234
Good Good16.970%54.545%27.879%0.606%0.000%
Good Bad1.212%21.212%52.727%24.848%0.000%
Bad Good1.212%21.212%52.727%24.848%0.000%
Bad Bad0.000%2.424%25.455%51.515%20.606%



Using cp's excellent analysis, let's factor in the number of players. Given 4 good players and 3 bad players, the probability of the players being good-good, good-bad and bad-bad is:

Good-good = 6/21= 0.2857
Good-bad (and bad-good) =12 /21 = 0.5714
Bad-bad = 3/21 = 0.1429

So, the frequency of finding 2 Blues would be 0.4173 which is the sum of the three rows below:

Good-good =0.2857*0.2788 =0.07965
Good-bad = 0.5714*0.5273 = 0.3013
Bad-bad = 0.1429*0.2545 = 0.0364

And the probability that 2 Blues are the result of a good-good player pair is 0.07965/0.4173 = 0.191
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
dickwilliams
dickwilliams
  • Threads: 4
  • Posts: 13
Joined: Mar 23, 2010
May 16th, 2017 at 8:09:40 PM permalink
So I actually brute-forced my way to an answer to this question:

Given that both players are good, what is the probability that they will still end up losing?

To do this, I generated all P(11,4*2) = 6652800 permutations of hands. Here's the breakdown:


P1\P2 RRRR RRRB RRBB RBBB BBBB
RRRR 0 80640 362880 241920 20160
RRRB 80640 967680 1451520 322560 0
RRBB 362880 1451520 725760 0 0
RBBB 241920 322560 0 0 0
BBBB 20160 0 0 0 0


There are exactly three ways good players can lose:

case 1: BBBB + RRRR. Player 1 discards B and player 2 discards R, the box ends up with BBB RRR
case 2: RBBB + RRRX. Player 1 discards B and player 2 discard X, the box ends up with BBR RRR
case 3: RRBB + RRBB. Both players discards B. The box ends up with RRB RRB

So if we sum occurrence of each case we can get the probability:

P(lose) = (20160 + 241920 + 322560 + 725760 + 322560 + 241920 + 20160)/6652800 = 1895040/6652800 = 0.2848485

In other words, approximately 28% of the time, even if both players are good, they can still lose the game simply due to bad hands.

Now, can anyone teach me how to use actual combinatorics approach to solve this problem?
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 2946
Joined: Jun 17, 2011
May 16th, 2017 at 9:55:17 PM permalink
One way to simply it a bit is to work out patterns and then how often they occur.

I sense you did it by brute force: for ia=1 to11, for 1b=1 to 10 etc (which gets 6652800).

My second way considered the problem as eight slots and thus only had to consider 256 patterns. However this does mean you have to look at how many times each pattern occurs. For instance RRRBRRRB, in that order, can happen 7 reds 6 reds 5 reds 4 blues 4 reds 3 reds 2 reds 3 blues = 60480. This is fairly easy logic so one can be reasonably confident with the answer.

One way of simplifying it further (which I didn't do) is to notice that RRRB RRRB is similar to other sequences such as BRRR RRRB. This type of line occurs 16 times in the 256 patterns (as the Blue can appear in four positions for player 1 and four for player 2). Thus the total combinations for RRRB with RRRB = 16 * 60480 = 967680 (which is the same as your figure). You now do a similar thing for all the possible patterns in your table. As this is more complicated you need to double check you've got all the permutations correct - so this can take longer to do.


If you study card games, you'll see a similar technique. For instance trying to work out 3-card poker hands can eventually be simplified to Trips, Pairs+suited card, Pairs+unsuited card, Three suited cards (SSS), 2 of 3 suited card (SSH,SHS,SHH), 3 rainbow cards (SHD). Thus you have fewer starting categories of hands, but each category needs an occurrence factor (e.g. three suited cards AJ8 can be SHD or C, so the factor = 4).
  • Jump to: