EvilZone

Hacking and Security => Hacking and Security => : Kiuhnm October 16, 2014, 08:10:06 PM

: Little math problem
: Kiuhnm October 16, 2014, 08:10:06 PM
In the book "Hacking: The Art of Exploitation", the author presents a problem which, in his opinion, "illustrates the essence of hacking".
The problem is the following:

Use each of the numbers 1, 3, 4, and 6 exactly once with any
of the four basic math operations (addition, subtraction,
multiplication, and division) to total 24. Each number must be
used once and only once, and you may define the order of
operations; for example, 3 * (4 + 6) + 1 = 31 is valid, however
incorrect, since it doesn’t total 24.

If you want to read the solution, keep reading...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
s
p
o
i
l
e
r
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

The official solution is
6 / (1 - 3/4)

But since the text doesn't say how the four numbers are to be used, I came up with this:
3 * (14 - 6)

Do you think it's acceptable?
: Re: Little math problem
: HTH October 16, 2014, 08:34:22 PM
Honestly I came up with your answer long before I came up with the official one and they both make a good point:

THeir answer forces you to think outside the box and even seperate yourself from the way we think..

Yours uses their question against them and reaches a solution using the things they gave you in an unintended way.

Both are smart. If you wanna stretch it you can say both are hacking...

but really they are just math problems lol
: Re: Little math problem
: rasenove October 16, 2014, 08:35:15 PM
No, it's not acceptable. 14 != 1 and 4
Let me simplify things:
(http://imgur.com/iotHOL3.jpg)
Got it?
: Re: Little math problem
: HTH October 16, 2014, 08:45:11 PM
14 does not EQUAL 1 and four but it is the number one and the number four.

It is not the intended solution but it doesnt violate the wording of the question and is thus valid.


: Re: Little math problem
: Kiuhnm October 16, 2014, 09:08:00 PM
14 does not EQUAL 1 and four but it is the number one and the number four.

It is not the intended solution but it doesnt violate the wording of the question and is thus valid.

This is the way I see it:
the official solution is analogous to mathematically cracking a cryptographic algorithm, whereas the other solution is similar to finding a loophole in the protocol and bypass the cryptographic algorithm altogether.
The thing I like about real problems is that when you find a solution nobody can say "no, that's not acceptable!". If it works, it works!