Announcements (89)
Automation (122)
..3D Measurement (6)
..Green Technology (2)
..HMI and SCADA (29)
....Iconics (7)
....WinCC (12)
....WinCC OA (6)
....Wonderware (2)
..MES (5)
..Motion Control (10)
....SiMotion (3)
..Packaging Machinery Programming (3)
..PC (19)
..PLC (75)
....Allen Bradley PLC (8)
....B&R (4)
....Beckhoff and TwinCAT (2)
....Siemens PLC (47)
....Yaskawa (2)
..Robotics (17)
..Vision Inspection (28)
Boston (31)
Chicago (117)
Consulting Services (95)
..Business Intelligence (2)
....Office 365 BI (1)
....Power BI (1)
....SharePoint BI (1)
....SQL Server BI (2)
..CRM (7)
..Custom Applications (1)
..MS Licenses / Subscriptions (4)
..Office 365 (34)
..Packaged Solutions (1)
..SharePoint (93)
....Dashboards (8)
....Document Management (5)
....Enterprise Search (2)
....Team Collaboration (4)
....Workflow (13)
Custom Hardware and Software (144)
...NET Micro Framework (8)
..ASP.NET (12)
..Dot Net Nuke (7)
..Embedded Design (34)
....Circuit Design (7)
....Texas Instrument Design (2)
..HTML and CSS (15)
..Java (10)
..MS Visual Studio/.NET (58)
..Scripting (10)
..SDK, API, and Driver (5)
..Software Development (16)
..Web Application Development (12)
Customer Service (38)
Denver (22)
Design (3)
..UI/UX (2)
Front Page (341)
Geek Challenge (50)
General Topics (347)
Hardware (40)
..DAQ Hardware (31)
..GHI Embedded Master and EMX (6)
Houston (2)
Just Plain Fun (350)
Oil and Gas (4)
Special Events (144)
Test and Measurement (90)
..BMS (11)
..Data Analysis (6)
..LabVIEW (101)
..LabVIEW for Real-Time and FPGA (7)
..LabVIEW Vision (7)
..Safety and Compliance Systems (1)
..Test Stand (7)
Web (15)

Geek Challenge Results: New Year's Beeramid by the Numbers

Geek Challenge Results: New Year's Beeramid by the Numbers

January's Geek Challenge questioned the construction of a New Year's Eve party beer can pyramid. I first encountered this challenge in my freshman year at Marquette. I was building the beeramid with five other students at a band party, some were engineers and math majors and we couldn't figure it out. I didn't sleep until I found the answer at 4am!

The correct answer for an 8 layer Beeramid is C: 120 cans. Congratulations to this month’s winner, Harry Maddock of the City of Tacoma, WA!

There were eight correct respondents for the Beeramid Geek Challenge. They are:

  • Harry Maddock of City of Tacoma, WA
  • Dan Freve of DMC
  • Gerard Hajduk of Cinch Connectors
  • Jason Livermore of Nokia -Siemens Networks
  • Jimmy Condon of DMC
  • Richard Thiel of Smalley Steel Ring
  • Bill Meyer of Wrigley
  • Joe Woroby of Nalco

Four people also answered the extra-credit question with 171,700 cans for a 100 layer Beeramid.

All but one person started their solution the same general way:

1 Layer = 1
2 Layers = 1 + (1 + 2)
3 Layers = 1 + (1 + 2) + (1 + 2 + 3)
and so on.

Having established this pattern, the problem was solved algebraically, through programming, and by brute-force counting.

Harry Maddock saw this problem in another way:

One can has been added to all eight levels.
An additional two cans have been added to seven levels.
An additional three cans to six levels.
So the total number of cans is (8 * 1) + (7 * 2) + (6 * 3) + (5 * 4) + (4 * 5) + (3 * 6) + (2 * 7) + (1 * 8) = 120

Harry's solution points out another angle of envisioning the problem. Imagine if the pyramid were not made of loose cans, but connected spheres. Also, what if, instead of resting on a triangular base the pyramid (which is now a regular tetrahedron) were balanced on one edge. The lowest layer would be a line of 8 balls. Above that there would be a rectangle of 2x7 balls. Above that would be a rectangle of 3x6 balls. This would go on until reaching the top, which is no longer a point, but a line of 8 balls which is orthogonal to the lowest line. This method also produces Harry's formula of: (8 * 1) + (7 * 2) + (6 * 3) + (5 * 4) + (4 * 5) + (3 * 6) + (2 * 7) + (1 * 8) = 120. Harry wins for his conversion of this very triangular problem into a simple series of rectangles.

Arriving at the Extra Credit result for 100 layers requires either a computer, way too much time, or using algebra to derive a general formula. The algebraic problem was most elegantly expressed by Joe Worobey:

Algebraic Solution:

Dan Freve and Jason Livermore both demonstrated algebraic solutions to this problem. Here is Dan’s:

For each level, t(n), the number of cans in the level is the triangle series is the summation of consecutive integers from 1 to n, which is represented as:

So, the finite sum of the triangle series (I'll call it p(n) for the pyramid) is represented as:

We can simplify this by breaking it into parts:

The general form for the second term in this summation is trivial (it’s the same as t(n)). However, I had to look up the general form for the quadratic term:

So, now we can substitute into our equation for p(n) and simplify:

Now that we have the general form, the answers can easily be calculated:

The crux of the algebraic solution is that step in the middle where a polynomial representing is needed. Nowadays you can just look this up in Wikipedia. When I solved my first Beeramid in 1992, Al Gore was still inventing the internet, and I didn’t know I needed a copy of Fibonacci’s Liber Abaci to see how he solved it in 1202. And I don’t much like inductive proofs anyway because they presuppose that you know or have correctly guessed at the answer. So I came up with my own unique straight-forward solution, which I have now published here.

Spreadsheet Solution:

For the more practically minded, the full problem can also be solved in about 1 minute using a spreadsheet. Here’s how:

  • Fill the first column with the numbers 1 through 100 starting at A1.
  • In Cell B1, type the formula: =SUM(A1:A$1)
  • Copy cell B1 through to the range B1 to C100.

Having done this, the first column represents the Beeramid height. The second column represents the number of cans in the base level at this height, and the third column represents the total number of cans in the Beeramid at each height. You will see the number 120 in C8, and 171700 in C100.

Submit your comments to:

Learn more about DMC's company culture.


There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)


Enter the code shown above:

Copyright 2015 DMC, Inc. | All Rights Reserved | Trademarks | Employee Links