CEMC Banner

Problem of the Week
Problem C and Solution
Jumbled Numbers 1

Problem

Imani wrote a program that switches digits in numbers. Users enter a \(4\)-digit number and then use the following buttons to switch digits in the number:

Button Function
Red button switches the thousands and tens digits
Blue button switches the hundreds and units (ones) digits
Yellow button switches the thousands and units (ones) digits

Imani enters the last four digits of her phone number, then presses the following sequence of buttons, in order from left to right.

Red, yellow, blue, red, yellow.

The number now shown is \(2148\).

Then, Imani restarts the program, enters the last four digits of her phone number again, and presses the following sequence of buttons, in order from left to right.

Blue, yellow, red, blue.

What number is now shown?

Solution

First we need to determine the last four digits of Imani’s phone number, as this is the number she entered into the program. We can determine this by working backwards starting with \(2148\), which is the number shown after all the buttons were pressed. We will then go through the buttons one by one, from last to first.

Thus, the last four digits of Imani’s phone number are \(8214\).

Now we can determine the number shown after Imani entered \(8214\) and pressed the second sequence of buttons.

Thus, the number \(1824\) is now shown.