The Triplet Solution


Our candy problem can be written as a system of linear equations. If h, m and n represent the number of bags of Hurties, Marsh, and Nessy candy we buy, then the need to get 100 red, green and blue candies can be written as:

  2 h + 4 m + 12 n = 100
  5 h + 5 m + 7 n = 100
  6 h + 7 m + 3 n = 100
or, symbolically, A*x=b, a 3x3 linear system than can be solved by hand, or by a program such as MATLAB, to give us the solution: buy 6 bags of Hurties, 7 Marsh, and 5 bags of Nessy to get 100 each of red, green, and blue candies...

If solutions can be cranked out automatically, what happens when the arrangement of candies is changed? Specifically, suppose we again want to get 100 of each color, but now the assortments are:

          Hurties      Marsh     Nessy
  # Red:     5           5         4
  # Green:   1           7         6
  # Blue:    7           4         3
  -------   --          --        --
  # Total:  13          16        13
You may or may not get an answer to this problem. What has gone wrong?


Last revised on 27 January 2019.