Author Topic: Little math problem  (Read 703 times)

0 Members and 2 Guests are viewing this topic.

Kiuhnm

  • Guest
Little math problem
« on: 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:

Quote
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?

Offline HTH

  • Official EZ Slut
  • Administrator
  • Knight
  • *
  • Posts: 395
  • Cookies: 158
  • EZ Titan
    • View Profile
Re: Little math problem
« Reply #1 on: 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
<ande> HTH is love, HTH is life
<TurboBorland> hth is the only person on this server I can say would successfully spitefuck peoples women

Offline rasenove

  • Baron
  • ****
  • Posts: 950
  • Cookies: 53
  • ಠ_ಠ
    • View Profile
Re: Little math problem
« Reply #2 on: October 16, 2014, 08:35:15 pm »
No, it's not acceptable. 14 != 1 and 4
Let me simplify things:

Got it?
My secrets have secrets...

Offline HTH

  • Official EZ Slut
  • Administrator
  • Knight
  • *
  • Posts: 395
  • Cookies: 158
  • EZ Titan
    • View Profile
Re: Little math problem
« Reply #3 on: 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.


<ande> HTH is love, HTH is life
<TurboBorland> hth is the only person on this server I can say would successfully spitefuck peoples women

Kiuhnm

  • Guest
Re: Little math problem
« Reply #4 on: 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!