Wednesday, 25 July 2012

Tripod Vs Quadpod Stand

Why a tripod stand is much more stable than a quadpod stand? Or why does camera persons always tripod stand rather than a quadpod stand?

Sunday, 22 July 2012

Repeated Albhabets

Consider a 36 letter word. Find the expected number of the alphabets that would be repeated?

Wednesday, 18 July 2012

Undercover Agent's Dillemma

You are an undercover agent, currently working with a criminal gang. The gang doubts you as an undercover agent but is not sure.
You have been given a gun to shoot another agent to prove that indeed you are a part of the gang. (You don't know whether the gun is loaded or empty)
Analyse the situation being the undercover agent and decide will you shoot the agent or will you shoot the head of the criminal gang.

Selection through identical balls

You randomly withdraw 3 balls out of a lot containing identical red, identical green and identical blue balls. What is the probability that you get 1 red, 1 green and 1 blue ball given the number of
a) Red balls = 3,  Green balls = 3,  Blue balls = 3
b) Red balls = p,  Green balls = q,  Blue balls = r such that p,q,r>3
c) Red balls = infinity,  Green balls = infinity,  Blue balls = infinity

Monday, 16 July 2012

Search for Celebrity

Consider a party of n people. Consider a matrix A (nXn) with each entry being either 0 or 1. 
A(ij) = 1 if the ith person knows jth person in party
A(ij) = 0 if the ith person doesn't know jth person in party
Also note that A(ij) is not always equal to A(ji)


A celebrity is the one who doesn't know anybody but everybody knows him. 
Can you find the celebrity in O(n).

Disclaimer: This was again asked in GSach Interview which I was unable to answer. I guess you can try using directed graphs for solving this but not sure.