Talk:Mind boggling card trick: Difference between revisions

m (→‎thoroughness of shuffling the deck: fixed a tense of a verb.)
Line 41:
==Johnathan Creek Investigates==
I once read a book on optimizing code. It started "Obviously no programmer would deliberately waste system resources, but ....". Then there came this task. Let us forget the randomness, my tame card shark is able to shuffle any deck such that the result is B R B R ... B R. Each examined card is therefore black. All the unseen cards must be red. So the final result is a black stack of 26 red cards and an empty red stack. So no black cards in either stack and no red cards in the red stack. He now shuffles it so all the examined cards are red. Result an empty black stack and 26 black cards in the red stack. So no black cards in the red stack and no red cards in the black stack. He now shuffles the pack so that the first 26 cards are black and the last 26 cards are red. Result 13 black cards in the black stack and 13 red cards in the red stack (13=13). Let us not move a random number of cards but agree that moving 3 cards is essentially the same as moving 1 card 3 time, exactly the same if we avoid moving the same card more than once. Also swapping a black card in one pile with a black card in the other is pointless, also if both are red. So if I move a red card I now have 1 red card in the black stack and 1 black card in the red stack. For the general case let us say there are n black cards and g red cards in the examined set of cards, obviously g=26-n. In the unseen set there must be 26-n,which equals g black cards, and 26-(26-n), which equals n red cards. My tame card shark can arrange things so that the result is a black stack with n red cards and a red stack with g black cards. The result of any other initial assignment can be achieved by swapping red and black cards in the two piles, which as shown above always leaves the same number of red cards in the black pile as there are black cards in the red pile. Never before have I seen so many system resources deliberately wasted attempting to randomly shuffle cards for no purpose.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 11:04, 29 August 2018 (UTC)
 
:I guess I know that the magician isn't about to saw the person in half... It's all about the show! The theatrics! And maybe knowing a bit more than your neighbour ;-)<br> --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 11:02, 5 September 2018 (UTC)
Anonymous user