September 29th, 2024

Solving 100 Bushels Using Matrix Factorization

John Mount discusses a solution to the "100 Bushels of Corn" puzzle using matrix factorization, highlighting its educational value in teaching Diophantine equations and linear algebra concepts.

Read original articleLink Icon
Solving 100 Bushels Using Matrix Factorization

The article discusses a solution to the "100 Bushels of Corn" puzzle, which involves distributing 100 bushels among 100 people, with men receiving 3 bushels, women 2 bushels, and children 0.5 bushels each. The author, John Mount, highlights the puzzle as a practical example for demonstrating tools used in solving Diophantine equations. He presents a matrix factorization approach to arrive at the solution, emphasizing its educational value in understanding linear algebra concepts. The article serves as an announcement for a more detailed write-up that will be available for further reading.

- The "100 Bushels of Corn" puzzle involves distributing bushels among men, women, and children.

- John Mount provides a matrix factorization solution to the puzzle.

- The puzzle serves as a practical example for teaching Diophantine equations.

- The article aims to keep the solution editable while ensuring reliable LaTeX rendering.

Link Icon 5 comments
By @satisfice - 6 months
The brute force method proposed in the article is so strangely obscure.

Here's a very simple alternative:

  for m in range(0,100):
    for w in range(0,100):
      for c in range (0,100):
        if m + w + c == 100 and 3*m+2*w+.5\*c==100:
          print(m,w,c)
By @cjlarose - 6 months
Does this technique apply if the dimension of the null space of the linear transformation is greater than 1? In other words, if there is more than 1 free variable, can you still use the Smith normal form of the matrix to find a bijection from the integers to the solution set?

Edit: related follow up: any chance this technique is a good fit for enumeration of [Magic Squares][0] of a given order?

[0]: https://en.wikipedia.org/wiki/Magic_square

By @CamperBob2 - 6 months
Interestingly, o1-preview gets all 7 solutions in 18 seconds. It also makes short work of Bachet’s Four Weights Problem as recounted at https://ninazumel.com/blog/2024-09-29-four-weights/ .

Pretty smart parrot.

By @qsort - 6 months
Am I stupid or this is solvable with pen and paper?

The word problem directly translates to this system of diophantine equations:

    (i)  { x + y + z = 100
    (ii) { 6x + 4y + z = 200
Replacing z in (ii) using (i) yields:

    (ii) <=> 6x + 4y - x - y + 100 = 200 <=> 5x + 3y = 100
Which is solvable with the usual method.
By @ggrothendieck - 6 months
In R `nnls` (nonnegative least squares) does not guarantee integrality but in this case does give one solution and it happens to be integral: `library(nnls); nnls(A, b)`