prajeetboi
Badges: 10
Rep:
?
#1
Report Thread starter 3 weeks ago
#1
I have a question and i can see how to solve it, but i can't see how to do it algebraically. If anyone can help or point me in the right direction i would be grateful:

I have a pack of playing cards, numbered 1-52. They are in order with 1 on the top and 52 on the bottom. I go through the pack discarding every other card, so I end up with a new pile which has 1 on top, then 3, 5, 7.... up to 51. I do the same with the new pile, and so on, getting even smaller piles.

NOTE: If the last card in the pile is one i keep, I will discard the top card of the subsequent pile.

What is the last card i'm left with?
What if i do it again, but discard the 1, keep the 2m etc...?
What if i start with 100 cards?
0
reply
mqb2766
Badges: 18
Rep:
?
#2
Report 3 weeks ago
#2
(Original post by prajeetboi)
I have a question and i can see how to solve it, but i can't see how to do it algebraically. If anyone can help or point me in the right direction i would be grateful:

I have a pack of playing cards, numbered 1-52. They are in order with 1 on the top and 52 on the bottom. I go through the pack discarding every other card, so I end up with a new pile which has 1 on top, then 3, 5, 7.... up to 51. I do the same with the new pile, and so on, getting even smaller piles.

NOTE: If the last card in the pile is one i keep, I will discard the top card of the subsequent pile.

What is the last card i'm left with?
What if i do it again, but discard the 1, keep the 2m etc...?
What if i start with 100 cards?
Can you post the original question and your thoughts about how you solved it?
0
reply
prajeetboi
Badges: 10
Rep:
?
#3
Report Thread starter 3 weeks ago
#3
(Original post by mqb2766)
Can you post the original question and your thoughts about how you solved it?
that is the original question, and i only solved the first question of the 3 but literally doing it lol
0
reply
mqb2766
Badges: 18
Rep:
?
#4
Report 3 weeks ago
#4
(Original post by prajeetboi)
that is the original question, and i only solved the first question of the 3 but literally doing it lol
Ok, if you're solving the question, I won't spoil your fun.
0
reply
prajeetboi
Badges: 10
Rep:
?
#5
Report Thread starter 3 weeks ago
#5
(Original post by mqb2766)
Ok, if you're solving the question, I won't spoil your fun.
no i need help pls idk what to do
0
reply
mqb2766
Badges: 18
Rep:
?
#6
Report 3 weeks ago
#6
(Original post by prajeetboi)
no i need help pls idk what to do
Which part and what are your thoughts? If you don't know how to proceeed, maybe simplify the problem and work out what happens for a small number of cards.
If you're really stuck, describe which part.
0
reply
GabiAbi84
Badges: 20
Rep:
?
#7
Report 3 weeks ago
#7
(Original post by mqb2766)
Ok, if you're solving the question, I won't spoil your fun.
I think they meant they worked out the answer to the first part by literally doing it with cards.
0
reply
prajeetboi
Badges: 10
Rep:
?
#8
Report Thread starter 3 weeks ago
#8
(Original post by GabiAbi84)
I think they meant they worked out the answer to the first part by literally doing it with cards.
yh i literally did it on pen and paper writing all the numbers out, and i know there's a way to do it properly so pls help me out thanks
0
reply
prajeetboi
Badges: 10
Rep:
?
#9
Report Thread starter 3 weeks ago
#9
(Original post by mqb2766)
Which part and what are your thoughts? If you don't know how to proceeed, maybe simplify the problem and work out what happens for a small number of cards.
If you're really stuck, describe which part.
i want to do the whole thing properly pls help
0
reply
mqb2766
Badges: 18
Rep:
?
#10
Report 3 weeks ago
#10
(Original post by prajeetboi)
i want to do the whole thing properly pls help
The forum rules are to help, so pls upload what you've done / and describe what you're confused about
0
reply
prajeetboi
Badges: 10
Rep:
?
#11
Report Thread starter 3 weeks ago
#11
(Original post by mqb2766)
The forum rules are to help, so pls upload what you've done / and describe what you're confused about
ok, i cant really take a pic so i'll just tell you.

I have only got as far as doing the first question and i did it by writing the numbers out and eliminating them, until i was left with 41.
I want to do all 3 of the questions algebraically rather than like this so please help me out thanks
mqb2766
Last edited by prajeetboi; 3 weeks ago
0
reply
RDKGames
Badges: 20
Rep:
?
#12
Report 3 weeks ago
#12
(Original post by prajeetboi)
ok, i cant really take a pic so i'll just tell you.

I have only got as far as doing the first question and i did it by writing the numbers out and eliminating them, until i was left with 41.
I want to do all 3 of the questions algebraically rather than like this so please help me out thanks
mqb2766
Deducing the algebraic approach in this problem is like opening can of worms.

Let us firstly consider what happens if we start with an even/odd number of cards, and if we begin by discarding the first/second card.

Let n be the number of cards we begin with.


Case 1: n is even, and we begin by discarding the second card

In this scenario, we will discard every even card, therefore the final card will be discarded as well. This hence does not imply that on the next sweep we discard the first card.

So out of the pile numbered {1,2,3,4,5,...,n} we end up with a pile numbered {1,3,5,...,n-1}.

We end up with \dfrac{n}{2} cards of the form 2k-1 for k=1,2,\ldots,\dfrac{n}{2}, which represents our new card order.

If n/2 is even, then we do the same thing and end up with {1,5,9,...,n-2}. Note that k is odd here, so we need to ensure that k=2m-1 for m=1,2,\ldots,n/4. Hence, the surviving numbers are of the form 2k-1 = 2(2m-1)-1 = 4m-3.

Note that we can deduce if n is divisible by 2^p, then the resulting surviving numbers are p consecutive sweeps are of the form 2^pK - (2^p - 1) for K = 1,2,\ldots,\dfrac{n}{2^p}.


Case 2: n is odd, and we begin by discarding the second card

In this scenario, we discard every second card but keep the final card. This hence means that on the following sweep we begin by discarding the first card.

Out of the cards numbered {1,2,3,4,5,...,n-1,n} we obtain the list {1,3,5,7,...,n}

We end up with n - \dfrac{n-1}{2} = \dfrac{n+1}{2} number of cards, and they are all of the form 2k-1 for k=1,2,...,\dfrac{n+1}{2}.

Case 3: n is even, and we begin by discarding the first card

In this case, we discard the first, third, etc... card and keep the final card. This hence means that on the following sweep we begin by discarding the first card.

Out of the cards numbered {1,2,3,4,5,...,n-1,n} we obtain {2,4,6,8,...,n-4,n-2,n}.

The numbers we keep are of the form 2k where k=1,2,...,\dfrac{n}{2}.

If this number of cards is even again, we go again and obtain {4,8,...,n-4,n}

and the numbers are of the form 2(2m) = 4m for m=1,2,\ldots,\dfrac{n}{4}.

We can generalise and see that if n is divisible by 2^p, then after p consecutive sweeps the surviving numbers are of the form 2^p K for K = 1,2,\ldots,\dfrac{n}{2^p}.

Case 4: n is odd, and we begin by discarding the first card

Here it is the same game as in Case 3 except the discard the final card.

From {1,2,3,4,5,6,...,n} we are left with {2,4,6,...,n-1}.

The leftover numbers are of the form 2K for K = 1,2,...,\dfrac{n-1}{2}.




So, to get the answer for 52 cards, we deal with this systematically.

52 is div by 4 therefore after two consecutive sweeps we obtain numbers of the form

4a-3 for a = 1,2,3,...,13.

We have 13 cards remaining, so we activate Case 2. The surviving numbers are of the form

4(2b-1)-3 = 8b - 7

and then we are left with 7 cards, and we need to begin by picking the first card [Case 4]. The surviving numbers are

8(2c)-7 = 16c - 7 for c = 1,2,...,3.

So we have 3 cards. We go back to Case 2. The surviving numbers are of the form

16(2d-1) - 7 = 32d - 23

and we have 2 cards remaining. Case 3 yields the surviving card as

32(2f) - 23 = 64f - 23


Thus, the surviving card is 64(1) - 23 = 41.


Anyway, I got to run now, so hopefully you can use this to check the 100 case.
0
reply
DFranklin
Badges: 18
Rep:
?
#13
Report 3 weeks ago
#13
(Original post by RDKGames)
Deducing the algebraic approach in this problem is like opening can of worms.
PRSOM for the effort.

This isn't my own work, but unless I'm stealing an approach to the wrong problem, then then there's actually a fairly straightforward way of solving this.

First, solve the case where the number of cards is a power of 2.
Next, reduce the case where the number of cards is NOT a power of 2 to the previous case.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Current uni students - are you thinking of dropping out of university?

Yes, I'm seriously considering dropping out (49)
16.23%
I'm not sure (8)
2.65%
No, I'm going to stick it out for now (103)
34.11%
I have already dropped out (4)
1.32%
I'm not a current university student (138)
45.7%

Watched Threads

View All