offline-bot's blog

By offline-bot, history, 11 months ago, In English

What is the Chicken McNugget Theorem?

The Chicken McNugget Theorem states that for any two relatively prime positive integers $$$m, n$$$ the greatest integer that cannot be written in the form $$$am + bn$$$ for nonnegative integers $$$a, b$$$ is $$$mn - m - n$$$

Explain

Let's say you and a friend are playing cricket. You can only score $$$2$$$ and $$$5$$$, whereas your friend can score in all ranges. You can only now make the following runs: $$$0, 2, 4, 5, 6, 7,\dots$$$ Thus, you are unable to score both $$$1$$$ and $$$3$$$.

Notice that after a specific number, all possible numbers are written as the sum of $$$2$$$ and $$$5$$$.
These kinds of issues can be resolved by Chicken McNugget Theorems. The largest number that cannot be represented in the form $$$a\cdot m + b\cdot n$$$ for nonnegative integers $$$a$$$ and $$$b$$$ is $$$(m-1)\cdot (n-1) - 1$$$ if $$$m$$$ and $$$n$$$ are two relatively prime positive integers.
Additionally, for nonnegative integers $$$a$$$ and $$$b$$$, all numbers bigger than $$$(m-1)\cdot (n-1)- 1$$$ can be represented in the form $$$a\cdot m + b\cdot n$$$.
Finally, the number of positive integers that can't be expressed in the form $$$a\cdot m + b\cdot n$$$ is exactly $$$\frac{(m-1)\cdot (n-1)}{2}$$$.

A helpful resource for determining the largest number that cannot be expressed as the sum of two given numbers is the Chicken McNugget Theorem. The total number of positive integers that cannot be expressed in this form can also be found using these theorems.

For more information and proof, you can visit Chicken McNugget Theorem.

Finding two reasonably prime positive integers is the first step in solving a problem. Next, determine the largest number that cannot be expressed as $$$am + bn$$$. Mark the numbers that fall between $$$1$$$ and $$$(m-1)\cdot (n-1) - 1$$$ as the multipliers of $$$m$$$ and $$$n$$$.

Applying the Chicken McNugget Theorem will allow you to solve the Problem 1526B - I Hate 1111.

Full text and comments »

  • Vote: I like it
  • +75
  • Vote: I do not like it