2
$\begingroup$

A party is being held at a local mansion. The host is very rich and his success is because of one thing ~ his famous recipe for Spaghetti!

The only guests that may attend are people the host knows and trusts, whom he gave the password to enter to.

Here's where you come in. You and a friend are trying to steal this recipe. You sneak by and listen to the passwords.

The first guest arrives. The security says "6", and the guest replies "6".

The second guest arrives. The security says "5", the guest replies "1".

The next guest arrives. The security says "10", the guest replies "2".

The next guest arrives. The security says "7", the guest replies "5".

The next guest arrives. The security says "8", the guest replies "4".

You walk up to security and get "3", what is the correct response?

$\endgroup$
2
  • $\begingroup$ Where's the links for all the other parts? No credit? Without the other parts you wouldn't have a base for this question. $\endgroup$
    – warspyking
    Commented Nov 11, 2014 at 13:57
  • 3
    $\begingroup$ As someone posted on part 8, the party-security tag is serving as the list of puzzles now, no need for a massive link chain on every post. $\endgroup$ Commented Nov 11, 2014 at 14:03

7 Answers 7

8
$\begingroup$

Putting these in a table makes a very simple possible pattern much more apparent, where the first column gives the questions, the middle column gives the known answers, and the last column is filled in based on the pattern:

1  |   || 5
2  |   || 4
3  |   || 3
4  |   || 2
5  | 1 || 1
6  | 6 || 6
7  | 5 || 5
8  | 4 || 4
9  |   || 3
10 | 2 || 2

so my answer is 3.

As with all these questions, it may or may not be the answer you're looking for, but it works.

$\endgroup$
1
  • $\begingroup$ Your last sentence hits it right on the head - It's right, but it's not how I got there. $\endgroup$ Commented Nov 11, 2014 at 11:13
4
$\begingroup$

Given a as the input (what guard says) and b as output (keyword)

The next guest arrives. The security says "10", the guest replies "2".

a+b=12

a-b=8

12-8=4

The next guest arrives. The security says "8", the guest replies "4".

a+b=12

a-b=4

12-4=8

and so on, you get this table

a  b  (a+b)-(a-b)
10 2  4
9  ?  (6?)
8  4  8
7  5  10
6  6  12
5  1  2 (Sequence resets?)
4  ?  (4?)
3  ?  (6?)

Since we know a=3

so...

$$(a+b)-(a-b)=6$$ $$(3+b)-(3-b)=6$$ $$3-3+b+b=6$$ $$2b=6$$ $$b=3$$

So

You walk up to security and get "3", what is the correct response?

A : 3. (Steals spaghetti recipe)

$\endgroup$
3
$\begingroup$

My answer is

$3$, since that's what I need to add to the guard's number to make it a multiple of $6$.

$\endgroup$
1
  • $\begingroup$ Again, the answer is good, but the method doesn't match what I've used. $\endgroup$ Commented Nov 11, 2014 at 11:15
3
$\begingroup$

The answer is 3. Find the highest multiple of 12 that is lower than or equal to the question. Subtract the multiple from the question. If the result is greater than 5 then you subtract it from 12, but if the result is 5 or less, then you subtract is from 6.

  1. the highest multiple of 12 less than or equal to 3 is 0.
  2. 3 - 0 = 3.
  3. 3 is less than 5 so 6-3 = 3.
$\endgroup$
5
  • $\begingroup$ That was my thought as well.. $\endgroup$
    – Bolu
    Commented Nov 11, 2014 at 11:17
  • $\begingroup$ As a curiosity, what answer would you give for, say, 22? $\endgroup$ Commented Nov 11, 2014 at 11:18
  • $\begingroup$ @Psychemaster, 2? $\endgroup$
    – Bolu
    Commented Nov 11, 2014 at 11:21
  • $\begingroup$ @Bolu Right, yet your logic in the answer would return -10. Perhaps you'd like to change it... $\endgroup$ Commented Nov 11, 2014 at 11:22
  • $\begingroup$ @Psychemaster I agree with Bolu it would start over after each multiple of 12. $\endgroup$
    – levyian
    Commented Nov 11, 2014 at 11:23
3
$\begingroup$

Look up at the table:

10 - 2  =  8
[9]-[3] =  6 //my guess
 8 - 4  =  4
 7 - 5  =  2
 6 - 6  =  0

As you can see, the difference goes down by every time 'til 0. If we follow this pattern we can go finding the matches for the remaining numbers.

 5 - 1  = 4
[4]-[2] = 2 //my guess
 3 - 3  = 0
[2]-[0] = 2 //my guess
[1]-[1] = 0 //my guess

Obviously, 5 is less than 6, so the difference could be that high, thus 5-1 = 4. The same though has been made for 2-0 = 2.
Following this pattern, the solution is the well-known:

3

$\endgroup$
3
$\begingroup$

Here's the method I used where x is the number called out by the guard

(x mod 6) + 1, then take the number on the opposite side of a standard 6 sided die to the result.

Using this:

(3 mod 6) + 1 = 4, and 3 is the number on the opposite die face.

$\endgroup$
1
  • $\begingroup$ Actually it's easy to prove that your method and the accepted method are equivalent. You do: $(x \mod 6) + 1$ then take the opposite side of the dice, this is $7 - (x \mod 6) + 1 = 6 (x \mod 6)$ $\endgroup$
    – d'alar'cop
    Commented Nov 18, 2014 at 11:53
0
$\begingroup$

The answer is actually the opposite of what everyone has said...

-3.

While the other answers have provided solutions that fit the pattern, the spaghetti host is actually a big fan of...

tenth degree polynomials! For a value "x", the correct response is $p_0x^{10}+p_1x^{9}+p_2x^{8}+p_3x^{7}+p_4x^{6}+p_5x^{5}+p_6x^{4}+p_7x^{3}+p_8x^{2}+p_9x^{1}+p_{10}$ with values $p_i$ from the vector [ 3.30687831e-05, -1.28968254e-03, 1.95436508e-02, -1.35119048e-01, 2.63194445e-01, 2.05625000e+00, -1.47291997e+01, 3.86658730e+01, -4.55535714e+01, 1.84142857e+01, 1.66727566e-10].

Here's the full set of correct responses:

I'm not good at formatting, so I'll write them as (host, guest) ordered pairs. (0,0),(1,-1),(2,-2),(3,-3),(4,-4),(5,1),(6,6),(7,5),(8,4),(9,-9),(10,2).

Sorry if this counts as being a spoilsport, but linear algebra is fun!

$\endgroup$
8
  • $\begingroup$ With enough effort, you could build an equation such that the answer required is the one you want, and all provided inputs fit into it. Sadly, you don't get to set that! $\endgroup$ Commented Nov 11, 2014 at 16:46
  • $\begingroup$ That's exactly what I did! What do you mean, "you don't get to set that!" My whole point is that the puzzle is not fully specified. If you provide n (host,guest) pairs in the puzzle without defining what types of methods the host could be using to generate the password, there will always be an n+1th degree polynomial that allows me to make up an answer for the n+1th query. Obviously this whole solution was a bit flippant, but the point is that there's not really anything in the puzzle that makes the other solutions more valid. $\endgroup$ Commented Nov 11, 2014 at 16:54
  • $\begingroup$ Other than the fact you deliberately came to the completely wrong answer, that is. If you'd made an n+1 degree polynomial which specified 3 as the result, then I'd have at least given you credit for that. $\endgroup$ Commented Nov 11, 2014 at 16:58
  • $\begingroup$ I think you're missing my point though. Your puzzle was not sufficiently well-defined to only have one solution. There's nothing about the puzzle that makes mods legal but not polynomials, which means there's nothing about it that makes 3 right but -3 wrong. I'm claiming the puzzle is just about as invalid as if I had posted it, claiming as the author the solution was 923, then told you your solution for modular arithmetic and 3 was wrong because the answer was really 923. The puzzle itself should be sufficient to narrow things down to a solution without knowing a priori the author's solution. $\endgroup$ Commented Nov 11, 2014 at 17:00
  • $\begingroup$ I fail to see the comparison. If the answer you give is wrong, then how you got to it is irrelevant - it's still wrong. It is the questioner who decides what the correct answer is, not the answerer. $\endgroup$ Commented Nov 11, 2014 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.