{"id":6889,"date":"2025-05-24T02:28:15","date_gmt":"2025-05-24T02:28:15","guid":{"rendered":"https:\/\/robertjwallace.com\/?p=6889"},"modified":"2025-05-25T03:23:45","modified_gmt":"2025-05-25T03:23:45","slug":"overhand-shuffles-for-color-trick","status":"publish","type":"post","link":"https:\/\/robertjwallace.com\/es\/overhand-shuffles-for-color-trick\/","title":{"rendered":"Overhand shuffles for color trick"},"content":{"rendered":"<p class=\"\">So I was working on the <a href=\"https:\/\/robertjwallace.com\/es\/the-color-coincidence-card-trick\/\">color coincidence trick<\/a> and was wondering if after showing that the cards never matched colors, would it be possible to use overhand shuffles to return the ten cards back to where they were: five of one color then five of the other.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"\">Having experimented with AI systems I thought I would ask an AI.  I had noticed that after dealing the pairs out, it was simply a matter of looking at the pairs and doing a simple overhand shuffle to get the order of the ten cards back to  where the colors alternated.<\/p>\n\n\n\n<p class=\"\">But the question was if additional overhand shuffles could get the colors back to 5 of one color followed by 5 of the other. Experimenting showed that it was possible, but I was interested if there was a set method, or rule. Here I discovered another limitation of Large Language Model AI&#8217;s.<\/p>\n\n\n\n<p class=\"\">I tried to explain that I wanted to find the solution based on a series of overhand shuffles that ran a number of cards, singularly, during an overhand shuffle.  For example, after the color coincidence trick the cards might be in the order of R,B,R,B, B,R,B,R,B,R.  Running four cards from the top to the bottom with an overhand shuffle would put the cards into an alternating sequence.  So the question was what other overhand shuffles would be needed to separate the cards back into R,R,R,R,R,B,B,B,B,B or B,B,B,B,B,R,R,R,R,R order.<\/p>\n\n\n\n<p class=\"\">After an hour or so I gave up trying to get the AI to answer the question.  This illustrates the fundamental issue with AI.  They don&#8217;t actually reason.  They only use statistical methods to find the most likely pattern of words from their dataset of words and phrases. So instead I asked the AI to write an html based simulator that would let me experiment.  It created this <a href=\"https:\/\/robertjwallace.com\/sim.html\" target=\"_blank\" rel=\"noreferrer noopener\">web page on my site<\/a>.  Using the simulator I found several eight step shuffle patterns that would return the packet to a separated state.  I suspect that eight shuffles is the minimum required.<\/p>\n\n\n\n<p class=\"\">Take ten cards and alternate them, red, black, red, black, etc. Then do eight overhand shuffles running single cards and throwing the remainder on top.  Below are some of the sequences I found using the simulator. <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Pattern 1<\/h2>\n\n\n\n<ul id=\"run-log\" class=\"wp-block-list\">\n<li class=\"\">Step 1: Run 4<\/li>\n\n\n\n<li class=\"\">Step 2: Run 3<\/li>\n\n\n\n<li class=\"\">Step 3: Run 2<\/li>\n\n\n\n<li class=\"\">Step 4: Run 2<\/li>\n\n\n\n<li class=\"\">Step 5: Run 2<\/li>\n\n\n\n<li class=\"\">Step 6: Run 5<\/li>\n\n\n\n<li class=\"\">Step 7: Run 7<\/li>\n\n\n\n<li class=\"\">Step 8: Run 1<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Pattern 2<\/h2>\n\n\n\n<ul id=\"run-log\" class=\"wp-block-list\">\n<li class=\"\">Step 1: Run 4<\/li>\n\n\n\n<li class=\"\">Step 2: Run 3<\/li>\n\n\n\n<li class=\"\">Step 3: Run 2<\/li>\n\n\n\n<li class=\"\">Step 4: Run 4<\/li>\n\n\n\n<li class=\"\">Step 5: Run 3<\/li>\n\n\n\n<li class=\"\">Step 6: Run 2<\/li>\n\n\n\n<li class=\"\">Step 7: Run 3<\/li>\n\n\n\n<li class=\"\">Step 8: Run 3<\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Pattern 3<\/h2>\n\n\n\n<ul id=\"run-log\" class=\"wp-block-list\">\n<li class=\"\">Step 1: Run 2<\/li>\n\n\n\n<li class=\"\">Step 2: Run 3<\/li>\n\n\n\n<li class=\"\">Step 3: Run 2<\/li>\n\n\n\n<li class=\"\">Step 4: Run 4<\/li>\n\n\n\n<li class=\"\">Step 5: Run 3<\/li>\n\n\n\n<li class=\"\">Step 6: Run 2<\/li>\n\n\n\n<li class=\"\">Step 7: Run 4<\/li>\n\n\n\n<li class=\"\">Step 8: Run 2<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Pattern 4<\/h2>\n\n\n\n<ul id=\"run-log\" class=\"wp-block-list\">\n<li class=\"\">Step 1: Run 4<\/li>\n\n\n\n<li class=\"\">Step 2: Run 1<\/li>\n\n\n\n<li class=\"\">Step 3: Run 2<\/li>\n\n\n\n<li class=\"\">Step 4: Run 1<\/li>\n\n\n\n<li class=\"\">Step 5: Run 3<\/li>\n\n\n\n<li class=\"\">Step 6: Run 1<\/li>\n\n\n\n<li class=\"\">Step 7: Run 4<\/li>\n\n\n\n<li class=\"\">Step 8: Run 4<\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Pattern 5<\/h2>\n\n\n\n<ul id=\"run-log\" class=\"wp-block-list\">\n<li class=\"\">Step 1: Run 4<\/li>\n\n\n\n<li class=\"\">Step 2: Run 1<\/li>\n\n\n\n<li class=\"\">Step 3: Run 4<\/li>\n\n\n\n<li class=\"\">Step 4: Run 2<\/li>\n\n\n\n<li class=\"\">Step 5: Run 2<\/li>\n\n\n\n<li class=\"\">Step 6: Run 3<\/li>\n\n\n\n<li class=\"\">Step 7: Run 2<\/li>\n\n\n\n<li class=\"\">Step 8: Run 4<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Pattern 6<\/h2>\n\n\n\n<ul id=\"run-log\" class=\"wp-block-list\">\n<li class=\"\">Step 1: Run 2<\/li>\n\n\n\n<li class=\"\">Step 2: Run 3<\/li>\n\n\n\n<li class=\"\">Step 3: Run 2<\/li>\n\n\n\n<li class=\"\">Step 4: Run 4<\/li>\n\n\n\n<li class=\"\">Step 5: Run 3<\/li>\n\n\n\n<li class=\"\">Step 6: Run 2<\/li>\n\n\n\n<li class=\"\">Step 7: Run 4<\/li>\n\n\n\n<li class=\"\">Step 8: Run 2<\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Notes<\/h2>\n\n\n\n<p class=\"\">When the cards alternate, then any odd number run of cards leaves the cards still alternated. This means that the first shuffle must always be an even number of cards run. That will put two cards of the same color together. Also the top and bottom cards will now be the same color. So no matter how many cards are run next, there will be two colors of the opposite color from those brought together in the first shuffle.<\/p>\n\n\n\n<p class=\"\">Basically this is a means to reset the color coincidence trick. It has two drawbacks. First it seems to be a lot of overhand shuffles. When you include the first overhand shuffle, after the trick is complete, which puts the cards back into alternating sequence, you have eight more shuffles. Second, you have to memorize the pattern of shuffles. This is not as hard as it seems. For example, pattern 4 has a &#8220;pattern&#8221; in it. Just remember 42, 34. Shuffle 4, then 1; shuffle 2 then 1. That is the 42. Do the same for 34 but end with 4.  Pattern 5 can be remembered as 41, 42, 23, 24<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Afterthoughts<\/h2>\n\n\n\n<p class=\"\">So I asked an AI to write a simulator to find all possible combinations with some limits.  I did not want long runs so I limited the run length of any run to no more than 5, after the first shuffle.  With that limit the program checked 373651 patterns and found 42, all of which had eight shuffle runs.  You can run the simulation at<a href=\"http:\/\/robertjwallace.com\/es\/sim1.html\/\" target=\"_blank\" rel=\"noreferrer noopener\"> http:\/\/robertjwallace.com\/sim1.html<\/a>.   If you limit the first shuffle to less than 5 cards, then the number of possible shuffles is 24.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">After Afterthoughts<\/h2>\n\n\n\n<p class=\"\">After doing one deal of the color coincidence trick, if you have interlaced the cards as they were dealt, and you pick them up, the will often be in the pattern BRBRRBRBRB or the opposite. In this case you can do seven shuffles to get the cards back: 6,2,5,2,2,5,2. The other common pattern is BRBRBRRBRB, which can be put into the first pattern with a simple cut between the two RR cards.<\/p>\n\n\n\n<p class=\"\">: <\/p>","protected":false},"excerpt":{"rendered":"<p>So I was working on the color coincidence trick and was wondering if after showing that the cards never matched colors, would it be possible to use overhand shuffles to return the ten cards back to where they were: five of one color then five of the other.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_eb_attr":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-6889","post","type-post","status-publish","format-standard","hentry","category-magic"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Bob","author_link":"https:\/\/robertjwallace.com\/es\/author\/admin\/"},"_links":{"self":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/6889","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/comments?post=6889"}],"version-history":[{"count":12,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/6889\/revisions"}],"predecessor-version":[{"id":6924,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/6889\/revisions\/6924"}],"wp:attachment":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/media?parent=6889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/categories?post=6889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/tags?post=6889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}