Sunday, 9 November 2014

password - The Security to the Party [Part 5]


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 who correctly reply to the guard at the door.


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 "2", and the guest replies "4".


The second guest arrives. The security says "3", the guest replies "4".


The third guest arrives. The security says "5", the guest replies "4".


The fourth guest arrives. The security says "8", the guest replies "8".


Your friend thinks he's got it all figured out so he walks up to the door and the security says "4". He replied "4", and is tarred and feathered and sent away in shame.


Another guest arrives, security says "6" and he says "6" to get in.


You walk up and get a "7" from security. What is your response?


Thanks for the ideas, credits to:


Part 1 was created by warspyking and is found here: The Security to the Party


Part 2 in Mew's version The Security to the Party [Part 2]



Part 3 in skv's version The Security to the Party [Part 3]


Part 4 in JNF's version The Security to the Party [Part 4]


Tip 1



Oops! I'm sorry. The tip WAS wrong!
Real tip:
It's related to electronic display screen. Draw the number like this:



 -
| |

-
| |
-


And COMPARE WITH the answer.



Tip 2



2 more example:

security: 1 guest: 0
security: 4 guest: 3




Answer



I say



1.



Because:




I think the answer is the number of corners in the digital display representation of it, with a T shape counting twice, i.e. towards both sides.



Example for explanation:



For "3" we count: 1: the upper right corner connects the top bar and the top right bar. 2: the top right and middle bar. 3: middle and lower right bar. (2+3 make said T shape). 4: lower right and bottom bar.



Edit: A more mathematical way to express this is:



answer = number of unique pairs (h,v) where h is a horizontal bar, v an adjacent vertical bar and both are lit when displaying the number given by the guard.




Edit: forgot an important detail in the previous (hidden) paragraph.


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...