Maths Olympiad Prep

Library / /136 of 387

, 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 3216=1632-16=16. [[IMAGE0]] Since 16 is obtained by dividing the previous number by 2, then the previous number is 2×162 \times 16 or 3232. [[IMAGE1]] Since 32 is obtained by subtracting 8 from the INPUT, then the INPUT must have been 32+8=4032+8=40. [[IMAGE2]] Solution 2 Suppose that the INPUT is xx. Subtracting 8 gives x8x-8. Dividing this result by 2 gives 12(x8)\frac{1}{2}(x-8) or 12x4\frac{1}{2}x-4. Adding 16 to this result gives (12x4)+16=12x+12(\frac{1}{2}x-4)+16=\frac{1}{2}x+12, which is the OUTPUT. [[IMAGE3]] 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.

Figure for this problem

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.