# When lockscreen hacks strike, maths can be the solution

18 Jul 2016703 Views

Bob is not loving that his phone has been hacked...

Whoever said we don’t need maths in real life has clearly never had to use it to combat a lockscreen hack.

Bob was wandering around town when he ran in to his friend, Alice.

“Did you get my text?” she asked him.

“I have no idea!” said Bob. “My phone has been hacked. Look.”

He handed the phone to Alice. The screen read:

“If I press ← or ≡, nothing seems to happen. If I press Δ, I get my usual home screen and the phone works fine, but sometimes my credit is docked by €1 or €2 and sometimes I’m not charged at all,” said Bob.

“There seems to be no pattern. It’s killing me. So I’m just using the phone for emergencies.”

Alice looked at the phone.

“I’ve heard about this,” she said. “The charge is set randomly – at €0, €1 or €2 – when the screensaver runs. You can’t see what its value is, but you can change it by pressing ← or ≡.

“Pressing ← cycles it ‘round from €0 to €1, from €1 to €2, and from €2 to €0. Pressing ≡ sets it back to €0, unless it’s already €0, in which case it becomes €2.”

Bob thought for a minute.

“So I could easily change the unlock charge to €0 if I knew what it was, but I can’t find out what it is?” he asked.

“Right,” Alice said.

“Is there a way around it?” asked Bob.

Alice gave it a little thought, then pulled out her notepad and drew a diagram:

“I’ve used A for ← and B for ≡,” explained Alice.

They both looked at the diagram for a while, until Alice finally exclaimed, “Yes! You can set the charge to €0 using the same four steps, no matter what the charge is to start with.”

What were Alice’s four steps?

Check back on Friday to see her solution.

This week’s maths puzzle comes courtesy of Prof Anthony G O’Farrell from Maynooth University, who is actively involved in the Irish Mathematical Olympiad and Mathematics Enrichment Classes at Maynooth.

Bob is much happier now that he can use his phone again. Good for you, Bob. Image: Shutterstock