"In theory there is no difference between theory and practice. In practice there is,"although the quotation has been attributed also to Albert Einstein. Solving this spaghetti problem didn't quite command a Nobel Prize, since there was considerable prior art, but it did win a 2006 Ig Nobel Award.[5] The second spaghetti problem is actually a problem in geometry most easily explicated by spaghetti. It has a long history, since it's been traced back at least to 1854.[6-7] The problem is simply stated:[7]

A spaghetti stick, dropped on the floor, breaks at random into three pieces. What is the probability that the three parts obtained are the sides of a triangle?The key to the problem is the so-called triangle inequality, which states that the sum of the lengths of any two sides of a triangle must always exceed the length of the third side. A moment's reflection will reveal that this must be true to build any sort of triangle if you envision the third side to be the base. Ref. 7 gives an analytical solution. As usual, my programming skill exceeds my mathematical skill, so I did a Monte Carlo calculation, the source code of which can be found here. The figure shows a histogram of successful triangle builds for 10,000 trials of 10,000 broken spaghetti sticks. It's not surprising that the analytical calculation in Ref. 7 gives a 25% probability.

1. Scaling so that a full length of spaghetti represents the highest number MAX, prepare a length of spaghetti (n/MAX) for each number n to be sorted. This is done by breaking the spaghetti strand at the proper length and discarding the unneeded piece.Dewdney presented this as an example of how quantum computing might be able to speed some computations.[8]

2. Take all the spaghetti strands loosely in your fist and bring them perpendicularly into contact with a tabletop.

3. Pick the longest strand from the stack, note its value, then the next longest, etc.

4. When the strands have all been removed, the sort is done.

- Feynman's Interest in Spaghetti
- RWD Nickalls, "The Dynamics Of Linear Spaghetti Structures," June 14, 2006 (PDF File)
- Basile Audoly and Sébastien Neukirch, "Fragmentation of Rods by Cascading Cracks: Why Spaghetti Does Not Break in Half," Phys. Rev. Lett., vol. 95, no. 9 (25 August 25, 2005), Document 95.095505 (4 pages).
- Josh Gladden, Nestor Handzy, Andrew Belmonte and Emmanuel Villermaux, "Dynamic Buckling and Breaking of Thin Rods."
- James Riordon, "Physical Review Letter on Breaking Spaghetti Leads to 2006 Ig Nobel Award," American Physical Society Press Release, October 6, 2006.
- G.S. Goodman, "The problem of the broken stick reconsidered," Math. Intelligencer, vol. 30, no. 3 (2008), pp. 43-49.
- Eugen J. Ionascu and Gabriel Prajitura, "Things to do with a broken stick," arXiv Preprint (September 5, 2010).
- A.K. Dewdney, "On the spaghetti computer and other analog gadgets for problem solving", Scientific American, vol. 250, no. 6 (June, 1984). pp. 19-26.