Maths Olympiad Prep

Library / CEMC Cayley /158 of 470

CEMC Cayley, 2014

Algebra Difficulty 1.4 Junior Find the answer Canada

Consider the following flowchart:

Figure 0

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

Solution 1

We start from the OUTPUT and work back to the INPUT.


Since the OUTPUT 32 is obtained from adding 16 to the previous number, the previous number is 32−16=1632-16=16.

Figure 1

Since 16 is obtained by dividing the previous number by 2, then the previous number is 2×162 \times 16 or 3232.

Figure 2

Since 32 is obtained by subtracting 8 from the INPUT, then the INPUT must have been 32+8=4032+8=40.

Figure 3

Solution 2

Suppose that the INPUT is xx.

Subtracting 8 gives x−8x-8.

Dividing this result by 2 gives 12(x−8)\frac{1}{2}(x-8) or 12x−4\frac{1}{2}x-4.

Adding 16 to this result gives (12x−4)+16=12x+12(\frac{1}{2}x-4)+16=\frac{1}{2}x+12, which is the OUTPUT.

Figure 4

If the OUTPUT is 32, then 12x+12=32\frac{1}{2}x+12=32 or 12x=20\frac{1}{2}x=20 and so x=40x=40.

Therefore, the INPUT must have been 40.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: CEMC, University of Waterloo, licensed CC-BY-NC-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.