Waste less time on Facebook — follow Brilliant.

5 card car dealer math/logic problem for any number of cards

Remember the old 5 card car dealer math/logic problem? Goal: get the lowest markup possible

5 cards - each has an unknown base amount plus a multiple of 100 ranged as base+0,base+100,base+200,base+300,base+400 When a card is flipped up you can either keep that amount or discard it and draw again but must settle on 1 card of the 5. What is the average result for best decision practices?

Solving for the general solution instead of just the 5 card solution: --- treating the additional numbers (0,100,etc) as multiples (0,1,2,etc.) of 100 ---

My old notes for my general solution were:

Observations (with 5 card solution already calculated)

A five card game for card B is


with n(n-1) elements=20

A four card game


with 12 elements

A three card game


with 6 elements

3 cards is the low limit of informed decisions - 2 cards would be pure random

All subsets follow the same pattern.

{Xn}={[lowest],2[second lowest],...(n-1)[largest on low side], --- and mirrored on the high side to [highest]}


cards=n Min=0 Max=n-1

The lower half set is limited by a-Max=0 and a-1=Max-1

The upper half set is limited by a+1=1 and a+Max=Max


Cards A,B,C

A is a random of the three and averages to 1

{A}={0,1,2}=3/3=1 Min=[a-2]=0 Max=[a+2]=2

If you draw card B the possible values for B are A-2,A-1,A+1,A+2


if B=A-2 it must be B=0, A=2, and C will be 1

so you keep B=0 every time and we know that [a-2]=0


if B=A+2 then A=0,B=2, and C=1 so always draw C and [a+2]=1


if B=A-1 we might have xBA or BAx, B is either 0 or 1 average 0.5 and C is either 0 or 2 average 1 so we keep B making the average result for [a-1] = 0.5


if B=A+1 ( xAB or ABx ), B is 2 or 1 average 1.5, C is 0 or 2 average 1, so draw C making the average value of [a+1]=1




4 card procedural:


if B=A-3 BxxA B=0 [a-3]=0, if B=A+3 AxxB draw to [a+3]=[a+1]=1


if B=A-2 xBxA BxAx B={1,0} C={0,2}{1,3}=4[2/3] [a-2]=2[0.5]={0,1}

------invalidating straight substitution of the 3 card set [a-2]=0 value------


if B=A+2 xAxB AxBx B={3,2}=2.5 C={0,2,1,3}=1.5 draw C

if C=A-1 CAxB C=0 stop, if C=A+3 AxBC draw D=1


if C=A+1 xACB ACBx C={3,2}=2.5 D={0,3}=1.5 draw D



if B=A-1 xxBA xBAx BAxx B={2,1,0}=1 C={0,1,0,3,2,3}=1.5 keep B


if B=A+1 xxAB xABx ABxx B={3,2,1}=2 C={0,1,0,3,2,3}=1.5 draw C

{C}= {[a-2],2[a-1],2[a+2],[a+3]}

if C=A-2 CxAB C=0, if C=A+3 ABxC draw D=2


if C=A-1 xCAB CABx C=(1,0}=0.5 D=(0,3}=1.5 keep C


if C=A+2 xABC ABCx C={3,2}=2.5 draw D={0,3}=1.5



and we already know a 5 card game comes to .9 and is a 20 element set for the AB combinations


each smaller set is a subset of the next larger card set where Card A = Max or 0 in the larger set

so the 3 card {B3}={[a-2],2[a-1],2[a+1],[a+2]} in terms of the 4 card set

{B4}={[a-3],2[a-2],3[a-1],3[a+1],2[a+2],[a+1]} gives us a 3 card subset of

{B4.3}={[a-3],2[a-2],2[a+2],[a+1]} and the 4 card set is


Same pattern next level up {B5}={4[a-1],4[a+1]}{B5.4}

and we see that {Bn}={(n-1)[a-1],(n-1)[a+1]}{Bn.n-1}

{(n-1)[a-1],(n-1)[a+1]} is a set of 2 equally weighted subsets each with n-1 elements

[a-1]=n-2,[a+1]=1 for the Bn.n-1 subset

[a-1]=(n-1)[1/(n-1)] , [a+1]=(n-1)[(n-2)/(n-1)] = 2(n-1)[1]

each subset for Bn combines (2n-2)[1] with the Bn.n-1 set

(add 2n-2 to numerator and denominator and element count)

beginning with the {B3}={0,1,1,0}=4[2/4] set

so if {B3}=2/3 ( actually 6[4/6] ) then


and {B5}=18/20, {B6}=28/30, {B7}=40/42, {B8}=54/56

looking at the sets again we see the obvious pattern

and the entire sequence reduces to

Bn = (n(n-1)-2) / n(n-1) where n > 2

Cards and final score

1 : 0 (= 0.0) ==> 1[0] ={0}

2 : 1/2 (= 0.5) ==> 4[2/4] = {0,1}{1,0} = {0,1,1,0}

3 : 2/3 (= 0.6667) ==> 6[4/6] = {0,1,1,1,1,0}

4 : 5/6 (= 0.8333) = 12[10/12] = {0,1,1,1,1,1,1,1,1,1,1,0}

5 : 9/10 (= 0.9) = 20[18/20] = {0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0}

6 : 14/15 or actually 28/30

and a set of 100 cards would be 9898/9900

There must be a formal method of mathematical notation to express this - does anyone know what that would be? I was just making a notational method up on the fly but I believe the logic is correct.

Note by Wayne Mathias
1 month ago

No vote yet
1 vote


There are no comments in this discussion.


Problem Loading...

Note Loading...

Set Loading...