A train toy is made of a series of any number of wooden pieces, each piece is either 6 cm or 7 cm long. how can I -mathematically- prove that the train can never be 29 cm long?
-
1Any thoughts? If nothing else, $29$ is a very small number. Brute force solves the thing quite quickly. – lulu Aug 31 '19 at 21:47
-
1Start off with an equation $6a+7b=29$, then try to solve for any integer solutions, then show why there cannot be any. – Andrew Chin Aug 31 '19 at 21:49
-
Search the site for numerical semigroups. – Jyrki Lahtonen Aug 31 '19 at 21:53
-
I highly recommend this post for a local, more general argument. – Jyrki Lahtonen Aug 31 '19 at 21:54
-
The general result tells that 29 is the longest impossible length – Jyrki Lahtonen Aug 31 '19 at 21:56
-
@TedShifrin, thanks for the hints. I will change it. – NoChance Aug 31 '19 at 22:01
2 Answers
Constructing a train out of 6- and 7-inch cars is equivalent to taking some number of 6-inch cars and then adding a number of 1-inch pieces no greater than the number of 6-inchers. That is, you want to find nonnegative integers $m$ and $n$ such that $6m+n=29$ and $m\ge n$. Clearly, $m\le4$, but what does this mean for $n$?

- 53,693
You could try to prove that the equation below (where $x, y$ represent the number of pieces of length $7,6$), has no integer solution for $x, y$ - Here we insist on integer values because the values represent pieces that have to be used as a whole and can't be cut to fit (at least I assume so):
$$7 x + 6 y=29 \tag1$$
If you don't want to get into number theory, and you don't want to try it by varying $x, y$, you can draw the line representing (1) (in this case it is the red one) You will notice that at the intersection of integer values of $x,y$, the point on the line is not an integer.
As an example of a case where you can find integer $x,y$ values, and how would they look like on the line graph, take the case of the Blue line provides a case where you can construct a train using $2$ pieces each of $7cm$ and $3$ pieces each of $6cm$.
To plot these lines you could do this:
1-Put $x=0$ to get the value of y-intercept
2-Put $y=0$ to get the value of x-intercept
3-Draw the line between the above $2$ points.

- 6,427
-
2First, you should check the numbers in the original question. Second, you didn't write an equation! – Ted Shifrin Aug 31 '19 at 21:56
-