Thursday, May 29, 2025

Frame the Cards

 Task: create a rectangle with playing cards of any one suit from A through 10 such that the total count of pips on each edge is the same. Here is an example that does not meet that restriction.


The total across the top is 20, bottom is 19, left side is 23, and right side is 22.

Here is an example that does meet that restriction.


All edges in this example total 20.

According to the source where I found this problem, Teaching Through Problems Worth Solving version 3.0 by Alicia Burdess and a few others, problem #27, Frame the Cards, there are 10 unique solutions to this problem. By unique I assume simple rotations and reflections are out, as would be a solution that simply swaps the position of two inner cards on the sides with four cards. I wanted to find solutions and, if possible, figure out an easily articulated rule for generating solutions.

First thing I realized was that only certain totals for each side are possible. The total of all numbers from one to ten is 55 (cue the standard math teacher story about a young Gauss). But each corner card would be counted twice in a total. The highest the corner cards could be is 10, 9, 8, and 7, totaling 34. But 55+34 is 89, and 89 isn't evenly divisible by 4, so that can't be a solution. The highest possible corner card total is 33, which would make the total on each edge 22, if we can work it out right.

Similarly the lowest total for corners is 10 (1+2+3+4), but that also gives a total count of 65 which isn't divisible by four; same problem as above. So the lowest workable corner total is 13, making each edge 17, if we can work it.

Because we need a total that is divisible by four, the total for the corners can only be 13, 17, 21, 25, 29, and 33. This significantly narrows down the possibilities if I want to try brute force solving.

If we start at the high end, the only way to make 88 is with corners 10, 9, 8, 6. I know I am aiming for a total of 22 to an edge, I know if I try 10, 3, 9 across the top that leaves 8 and 6 in the bottom corners. I would need another 8 to make that 22, so this isn't possible. It also starts me thinking about what corners are possible. What if the top were 10, 4, 8 and the bottom is 9, 7, 6. That would force the left edge to be 10, A, 2, 9 and the right edge 8, 3, 5, 6.


Great! I know it is possible to find a solution. Is there any other solution with these corner values? The only grouping I didn't try is 10, 6, which needs another 6, so that isn't possible. This must be the only solution with 22 to an edge.

So I realize that I can filter possibilities for appropriate corner combinations. Once I filter for the corner there must be a way to filter for the corner placements as well. If I consider the low corner total of 13 there are only three combinations to make this total; {1,2,3,7}, {1,2,4,6}, and{1,3,4,5}. Remember that a corner total of 13 forces an edge total of 17.

Since there are two edges (which I'm putting on top and bottom) composed of three cards, I need to be able to make the edge total two ways with the grouping of cards. There are a low finite number of distinct corner placements. In the first case, of {1,2,3,7} I can only have 1,2 and 3,7, or 1,3 and 2,7, or 1,7 and 2,3. There is no third card to bring 1,2 up to the target 17. Same for 1,3. Same for 2,3. So I can conclude it is not possible to work this puzzle with an edge total of 17.


The analysis for the 17 edge case was fairly quick, because there are so few combinations of cards for the corners. But the number quickly increases with higher numbers. I need a better way to analyze this.

Next higher than the 17 edge is an 18 edge. This requires corner cards totaling 17, which can be made in nine ways, with {1,2,4,10}, {1,2,5,9}, {1,2,6,8}, {1,3,4,9}, {1,3,5,8}, {1,3,6,7}, {1,4,5,7}, {2,3,4,8}, and {2,3,5,7}. As before there is no third card to bring 1,2 or 1,4 or 2,4 up to the required 18, so the first combo is out. On the other hand, at first glance {1,2,5,9} looks like a possibility.

I'm not thinking of a good way to do this analytically, so I will use a Python script (running on my TI-84 Python Edition) to identify quintuples of interest. I will use for loops to run through all quintuples, and test for possibility of generating the desired edge total. I won't brute-force for all solutions this way, but rather will narrow down the possible corner combinations to look at. I'm hoping I will see some pattern in those numbers.

No comments:

Post a Comment