Mind Matters Natural and Artificial Intelligence News and Analysis
abstract-background-3d-many-cubes-with-neon-purple-blue-glow-506029480-stockpack-adobestock
Abstract background 3D, many cubes with neon purple blue glow on black interesting science technology background, 3D render illustration.
Image Credit: Cobalt - Adobe Stock

Monday Microsofty 93: Square Dance With the Mathematicians!

How do we determine how many squares there are in squares of squares? Or cubes of cubes?
Share
Facebook
Twitter/X
LinkedIn
Flipboard
Print
Email

Great programmers must be able to break big problems down into smaller pieces. That’s the challenge for this week’s Microsofty.

There are five parts to this puzzle. The challenge increases with each one. The solution gets mathy. See how far you can go:

1. You see here a 4×4 set of squares. How many squares are there in total? You will notice that there are sixteen 1×1 squares and one 4×4 square. But there are also 2×2 squares and 3×3 squares. How many squares are there in total?

2. Suppose instead of a 4×4 square,  there is a big nxn square. How many squares are there in total?

3. Now let’s think 3D. Suppose we have a 4x4x4 cube. You have 64 1x1x1 cubes and one 4x4x4 cube. There are also 2x2x2 cubes and 3x3x3 cubes  How many cubes are there in total?

4. Can you generalize this result to an nxnxn cube?

5. And here is the toughy for super nerds: We’ve looked at this in two dimensions and three dimensions. How does it generalize in N dimensions?   What if you have a  nxnxnx…xn  hypercube in N dimensions? How many hypercubes are there in general?

This is a fun problem for mathies.

Solution to Micro Softy 92: When the Nerd Enters the Room

When the nerd enters a room…Here’s the problem: Michael, a nerd, entered a room ready to network. Nine other people also arrived at the same time. Everybody shook everybody else’s hand. How many handshakes were there?

Michael shook hands with nine other people. The first person he shook hands with has to shake hands with eight other people. The next person has to shake hands with seven people, etc. So the answer is 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 +1 = 45. 

As a student, Friedrich Gauss (1777–1855) was once told by a teacher to add the numbers from 1 to 100. He finished almost instantly, astonishing his teacher. We’re going to use Gauss’s pairing trick to solve the classic “shaking hands” problem—and to see how we could do a sum like this in our heads.

Numbers are paired in the sum so that each adds up to 9. First, 9+0=9. Then 8+1=9, 7+2=9, 6+3=9 and 5+4=9. There are five 9s, so the answer is 45. Pretty slick, eh?

 To generalize, the sum 1+2+3+…+ n has (n+1)/2 pairings of numbers that sum to n. This gives Gauss’s well-known formula:

1+2+3+…+ n = n(n+1)/2.

For n=9, this is  (10 x 9/2) = 45 which is the same answer we got before.

See you next week!

_____ Special thanks to Kevin Couch who found a goof in my original posted solution. Thanks Kevin!

The Monday Micro Softy is a weekly feature of Mind Matters News. Here are the links to all the puzzles and answers to date:

Monday Microsofty 92: When the nerd enters a room… Shaking hands is expected. Here’s a math question about the custom, to delight the true nerds among us. A hint for Microsofty 91: Where might Jimmy the Mooch have found some spare energy? You can find links and answers to Microsofties 91 through 87 here as well.

Image Credit: Victor Moussa - Adobe Stock

Monday Microsofty 87: Are you as good a detective as you think? Here’s a test from the world of codebreaking To solve last week’s puzzle, look up the definition of “calorie.” Are we using the word to mean the same thing? You can find links and answers to Microsofties 77 through 86 here as well.

Monday Microsofty 76: The Smoking Gun explains a computer scientist or engineer, a law enforcement officer often relies on abductive reasoning to crack a case, so with this in mind, you will have to crack last week’s puzzle. You can find links and answers to Microsofties 55 through 75 here as well.

Monday Microsofty 55: “It happens every spring.” Baseball, that is. Here’s a puzzle that takes in baseball’s summer. To solve last week’s puzzle, you don’t need to know the distance. Check the problem again for the number you do need to know. You can find links and answers here to Microsofties 51 through 54 as well.

Monday Microsofty 50: Cutting through the cornbread. How did Yuri Senior cut the cornbread into eight identical portions using only three straight cuts? You can guess the answer to Microsofty 49 if you try the test question yourself at home, using a small mirror. You can find links and answers here to Microsofties 46 through 49 as well.

Delicious, golden, and fluffy cornbread pieces, artfully stacked, enticing a feeling of warmth and comfortImage Credit: Oleksiy - Adobe Stock

Monday Microsofty 45: Can Tony beat the fast-food curfew? An early curfew on fast food service motivated a boy to exercise more vigorously. But how fast was he pedalling? To solve Micro Softy 44, recall that Tony doesn’t need to take the individual pills each day, only the prescribed amount of each. You can find links and answers here to Micros Softies 41 through 44 as well.

Monday Microsofty 40: The fate of a false prophet. He wasn’t actually fired for being a false prophet but for something that his prophecy unintentionally revealed. The solution to Micro Softy 39 lies in considering an alternative possible meaning of a word commonly used in sports. You can find links and answers here to Micro Softies 30 through 39 as well.

Monday Microsofty 29: A funeral lament in four lines. The funeral director was puzzled by Dan’s description of his relationship to the deceased but there was no question that his grief was sincere You can find links and answers here to Microsofties 22 through 29 as well.

Monday Microsofty 21: Finding More of the Deadly Fentanyl Pills. You can find links and answers here to Microsofties 11 through 20 as well.

Monday Microsofty 11: What Happened to That Other Dollar? You can find links and answers here to the first ten Micro Softies. Have fun!


Monday Microsofty 93: Square Dance With the Mathematicians!