Min menu

Pages

News Sports

How do you solve a riddle answer? - Tech4Task4B

Your antivirus squad is especially up against malicious code that has hijacked your mainframe. What you've learned from other infected systems—before you go dark—is that it likes to toy with antivirus agents in very strange ways.

This corrupts one of the 4 disks running your mainframe, represented by lights which are on and which are off. Then it selects a member of the antivirus squad—that would be you—and brings them into the mainframe. 

It tells them which disk it has corrupted,

allows the agent to turn a disk on or off, then immediately deregisters the agent. Your squad can launch an all-out attack to infiltrate the mainframe and destroy a disk before it is wiped. 

If they destroy the corrupted, the malware will be defeated. Any more, and the virus will wipe out the entire system. The lights are only visible inside the mainframe, so you won't know until you get there which, if any, are on. 

How can you tell from one of your actions,

which of the 4 disks is damaged? Stop by to find out for yourself. Answer in 3 Answer in 2 Answer in 1 Answer order is a big clue to a solution. 

Using binary code—the basic two-number system that uses only 1s and 0s—we code each of the 4 disks with a 2-bit binary number from 00 for a zero to 11 for a three. can represent. 

What we are looking for now is some mathematical operation that can take a light disk as input, and give a damaged disk as output. Let's consider one possibility. Say it had a corrupted disk, and no lights come on when you come in. 

You can turn on 11 to identify this disk. Well, what if you come in and it's already 11? You have to switch a light. Which seems like the most innocent to change?

 Probably 00, so if you add 00 and 11,

you still get 11. So perhaps the key is to think of an addition of binary numbers, with a collection of bright disks communicating the corrupted disk number. This works great, unless we start with a different dummy. 

What if 00 was the bad disk, and 01 and 10 were on? Here, the sum of bright disks is 11. But we need to convert it to an amount of 00 with the flip of a switch. We have four options: Turning on switch 00 gives us 11. Turning off 01 takes us back to 10, and turning off 10 gives 01. 

None of them work. Turning on switch 11 gives us 110 through standard binary addition. But we don't really want three-digit numbers. So what if - to keep the result a two-digit number - we break the rules a bit and let the sum equal 22. 

This is not a binary number, but if we consider 2s equal to 0s, it indicates a valid disk. So this suggests a strategy: look at the sum of all the luminous disks we see, 2s with respect to 0s. 

If this is already a correct result, flip 00, and if not, find a switch that makes the sum correct. You can see for yourself that any initial configuration can add any number from 00 to 11 at the flip of a switch. The reason it works is related to a concept called equality. 

Parity tells you whether a value is even or odd.

In this case, the values we're considering to be equal are the number of 1s in each digit position of our binary sums. And so we can say that 2 and 0, both even numbers, can be considered equal. 

By adding or subtracting 00, 01, 10, or 11, we can change the parity of both, or either, and create custom disk numbers. What's incredible about this solution is that it works for any mainframe whose disks are a power of two. 

With 64 you can convert each activated disk into a 6-bit binary number and make the sum of 1s in each column equal to 0 and any odd sum equal to 1. 1,048,576 disks would be difficult but completely doable. 

Fortunately, your mainframe is too small. You sacrifice bravely and your team steps up to eradicate corruption and liberate the system.

You are now in the first article

Comments