<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6149692539226863505</id><updated>2012-01-15T20:31:15.812-08:00</updated><category term='The warden and 23 prisoners'/><category term='Find Age Of Children'/><category term='Interview Puzzle'/><category term='Mice puzzle'/><category term='An Honest Man'/><category term='Puzzle Types'/><category term='Trilogy interview puzzle'/><category term='Find House Address'/><category term='2 Egg Puzzle Secrets'/><category term='Hats and IIT students'/><category term='Adobe Interview puzzles'/><category term='Dogs'/><category term='River'/><category term='Four ships Puzzle'/><category term='A Box of Defective Balls'/><category term='Lateral Thinking Puzzles'/><category term='4 Quarts of Water'/><category term='Eight Queens Puzzle'/><category term='Hundred numbers in a sheet'/><category term='Poisened Drink Puzzle'/><category term='Induction Puzzles'/><category term='Engineers and Managers Puzzle'/><category term='The Gold Chain'/><category term='Covent Garden Puzzle'/><category term='Image puzzles'/><category term='Defective balls'/><category term='Heaven'/><category term='Globe walker'/><category term='Stick puzzles'/><category term='Three Ants on Triangle'/><category term='MACHINE WEIGHING - Coin Puzzle'/><category term='Family and Dogs Puzzle'/><category term='How to interview'/><category term='chess puzzle'/><category term='Microsoft Puzzles'/><category term='Four People on a Rickety Bridge'/><category term='7 Days work'/><category term='Thoughtworks puzzles'/><category term='Google Interview puzzles'/><category term='Prisoners and hats puzzle'/><category term='Dragon and Knight'/><category term='Interview Riddles'/><category term='Infosys puzzles'/><category term='Einstein’s Riddle'/><category term='Google Puzzle'/><category term='Egg puzzle'/><category term='Three Boxes and a Ruby'/><category term='Horse Race'/><category term='Blue-eyed Samurais'/><category term='Aeroplane'/><title type='text'>Interview Puzzles</title><subtitle type='html'>How to interview, Interview puzzles, Microsoft Puzzles, Puzzles Riddles, Google puzzles, Puzzles with answers, puzzles with solutions, Programming puzzles, Programming Riddles.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>54</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-8056327870451144183</id><published>2011-07-24T11:40:00.000-07:00</published><updated>2011-07-24T11:40:00.747-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dogs'/><title type='text'>Chasing Dogs Puzzle</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;h1 class="post-head" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; font-size: 22px; font: normal normal normal 24px/140% Georgia, 'Times New Roman', Times, serif; line-height: 22px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; vertical-align: baseline;"&gt;&lt;u&gt;Chasing Dogs&amp;nbsp;Puzzle :&lt;/u&gt;&lt;/h1&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; font-size: 13px; line-height: 22px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; font-size: 13px; line-height: 22px; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-kr19I7WtdKs/TixmaPnkDPI/AAAAAAAAANc/Kp6CNpUrwLU/s1600/4dogs_8578.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="428" src="http://1.bp.blogspot.com/-kr19I7WtdKs/TixmaPnkDPI/AAAAAAAAANc/Kp6CNpUrwLU/s640/4dogs_8578.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; font-size: 13px; line-height: 22px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; font-size: 13px; line-height: 22px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; line-height: 22px;"&gt;&lt;b&gt;&lt;u&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Puzzle :&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; font-size: 13px; line-height: 22px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; line-height: 22px;"&gt;&lt;div&gt;There are four dogs each at the corner of a unit square. Each of the dogs starts chasing the dog in the clockwise direction. They all run at the same speed and continuously change their direction accordingly so that they are always heading straight towards the other dog. How long does it take for the dogs to catch each other and where?&lt;/div&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; line-height: 22px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 22px;"&gt;Have a better solution? Let us know through the comments section!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 22px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 22px;"&gt;Liked this question? Post this on Stumble, Twitter or Digg!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 22px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; font-size: 13px; line-height: 22px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Tahoma, Geneva, Verdana, sans-serif; font-size: 13px; line-height: 22px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-8056327870451144183?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/8056327870451144183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=8056327870451144183' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/8056327870451144183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/8056327870451144183'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2011/07/chasing-dogs-puzzle.html' title='Chasing Dogs Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-kr19I7WtdKs/TixmaPnkDPI/AAAAAAAAANc/Kp6CNpUrwLU/s72-c/4dogs_8578.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-2671410099401770900</id><published>2011-07-24T07:05:00.000-07:00</published><updated>2011-07-24T07:05:35.866-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Heaven'/><title type='text'>Heaven Puzzle</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;u&gt;Heaven Puzzle.&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-zYor8UFeQCI/TiwkeNQ47bI/AAAAAAAAAM8/gkeoW_ya56k/s1600/heaven.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-zYor8UFeQCI/TiwkeNQ47bI/AAAAAAAAAM8/gkeoW_ya56k/s1600/heaven.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;u&gt;Puzzle :&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;div style="font-size: x-large; font-weight: bold; text-align: left; text-decoration: underline;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;A person dies, and he arrives at the gate to heaven. There are three doors in the heaven. one of them leads to heaven. another one leads to a 1-day stay at hell, and then back to the gate, and the other leads to a 2-day stay at hell, and then back to the gate. every time the person is back at the gate, the three doors are reshuffled. How long will it take the person to reach heaven?&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;this is a probability question - i.e. it is solvable and has nothing to do with religion, being sneaky, or how au dente the pasta might be ;-)&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;u&gt;Answer:&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;1/3 of the time, the door to heaven will be chosen, so 1/3 of the time it will take zero days. 1/3 of the time, the 1-day door is chosen; of those, the right door will be chosen the next day, so 1/9 trips take 1 day. Similarly, 1/9 will take two days (choosing the 2-day door, then the right door).&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;After that, the cases split again, and again, and again. I can’t seem to make a nice infinite sum this way, so let’s try again.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Suppose the average days spent is X. 1/3 of the cases are done in zero days as before. 1/3 of the cases are 1 day plus X. 1/3 are 2 + X. So:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;X = 1/3 * 0 + 1/3 * (1 + X) + 1/3 * (2 + X)&lt;/div&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp; = 0 + 1/3 + X/3 + 2/3 + X/3&lt;/div&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp; = 1 + 2X/3&lt;/div&gt;&lt;div style="text-align: left;"&gt;Therefore,&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp; X/3 = 1&lt;/div&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp; &amp;nbsp; X = 3&lt;/div&gt;&lt;div style="text-align: left;"&gt;On average, it takes three days to get to heaven. Two if the noodles are limp.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Took me one blind alley, and about five minutes.&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-2671410099401770900?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/2671410099401770900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=2671410099401770900' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2671410099401770900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2671410099401770900'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2011/07/heaven-puzzle.html' title='Heaven Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-zYor8UFeQCI/TiwkeNQ47bI/AAAAAAAAAM8/gkeoW_ya56k/s72-c/heaven.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7909648884353031939</id><published>2011-01-25T10:55:00.000-08:00</published><updated>2011-01-28T23:41:03.103-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chess puzzle'/><title type='text'>Chess Board Puzzle</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a class="thickbox" href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TT8cVoMiPRI/AAAAAAAAAMc/ClJA-XHSnYI/s1600/chess.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="chess board puzzle" border="0" height="266" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TT8cVoMiPRI/AAAAAAAAAMc/ClJA-XHSnYI/s400/chess.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Chess&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Chess Board Puzzle :&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Imagine there are infinite number of Queens (Chess Game Piece) with u. Find the minimum number of queens required so that every square grid on the chess board is under the attack  of a queen. Arrange this minimum no. of Queens on a chess board. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;u&gt;Answer :&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-bottom: medium none; border-collapse: collapse; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;tbody&gt;&lt;tr style="height: 19.45pt;"&gt; &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; border-right: black 1pt solid; border-top: black 1pt solid; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: black 1pt solid; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: black 1pt solid; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: black 1pt solid; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: black 1pt solid; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: black 1pt solid; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: black 1pt solid; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: black 1pt solid; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 19.45pt;"&gt; &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 19.45pt;"&gt; &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 19.45pt;"&gt; &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 19.45pt;"&gt; &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 19.45pt;"&gt; &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 19.45pt;"&gt; &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 19.45pt;"&gt; &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;td style="border-bottom: black 1pt solid; border-left: medium none; border-right: black 1pt solid; border-top: medium none; height: 19.45pt; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; width: 24.6pt;" valign="top" width="33"&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TUPD-BfMroI/AAAAAAAAAMg/1aFjQ5LQ8FQ/s1600/Chess+Queen.bmp" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;Indicates Queen.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7909648884353031939?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7909648884353031939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7909648884353031939' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7909648884353031939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7909648884353031939'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2011/01/chess-board-puzzle.html' title='Chess Board Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/TT8cVoMiPRI/AAAAAAAAAMc/ClJA-XHSnYI/s72-c/chess.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1345660542187894950</id><published>2010-09-22T09:43:00.000-07:00</published><updated>2010-09-22T09:46:58.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Puzzle'/><title type='text'>Tumblers on a Rotating Table</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/TJoxkAoDk-I/AAAAAAAAALg/Guj5I6kQxnU/s1600/Four_Tumblers.jpg" imageanchor="1" class='thickbox' style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/TJoxkAoDk-I/AAAAAAAAALg/Guj5I6kQxnU/s400/Four_Tumblers.jpg" width="320" alt="Four Tumblers" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Tumblers on a Rotating Table Puzzle :&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A blind gnome and an evil goblin take turns to play a game. Four  tumblers are placed at the corners of a square table. The initial  configuration of the tumblers (facing up or facing down) is chosen by  the evil goblin. When the blind gnome gets his turn, he is allowed to  specify a subset of the four tumblers and flip them simultaneously. To  be precise, he may choose “one tumbler”, “two diagonally opposites”,  “two adjacent”, “three tumblers” or “four tumblers” lying in front of  him, and flip them simultaneously. After flipping, if all four tumblers  are upright, he wins the game! Otherwise, the game continues and the  evil goblin is allowed to rotate the table by an  amount of his choice.  Can the blind gnome win the game with a &lt;em&gt;deterministic&lt;/em&gt; strategy?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Solution :&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If there were only two cards, then “flip both” — “flip one” — “flip  both” would ensure a victory for the blind gnome. For the case of four  cards, let F denote “all four cards”, A denote “two adjacent cards”, D  denote “two diagonally opposite cards”, O denote “one card”. Then the  following 15-step sequence ensures victory for the blind gnome: F, D, F,  A, F, D, F, O, F, D, F, A, F, D, F. The procedure can be generalized to  2^n cards. This problem is studied in detail by Ehrenborg and Skinner  (see bibliography below); they call it “The Blind Bartender’s Problem”.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A variant of the above problem allows the blind gnome to first  “touch” any t out of n tumblers on a polygonal table with n sides.  Touching allows the gnome to deduce which of the t tumblers he touched  are upright, and then to decide which of these t tumblers to flip. It  was this variant that was originally published in Martin Gardner’s  article in Feb 1979. For four tumblers, the blind gnome can win in five  moves, as Gardner showed in his subsequent article in Mar 1979. The  problem generated quite some interest. Two pairs of mathematicians  independently proved that the blind gnome can win with a deterministic  strategy if and only if t ≥ n(p-1)/p where p is the largest prime factor  of n (Lewis and Willard in 1980; Laaser and Ramshaw 1981). These proofs  are quite involved&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1345660542187894950?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1345660542187894950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1345660542187894950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1345660542187894950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1345660542187894950'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/09/tumblers-on-rotating-table.html' title='Tumblers on a Rotating Table'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/TJoxkAoDk-I/AAAAAAAAALg/Guj5I6kQxnU/s72-c/Four_Tumblers.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-11075428084374253</id><published>2010-09-08T10:23:00.000-07:00</published><updated>2010-09-11T06:22:53.486-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thoughtworks puzzles'/><title type='text'>Mars Rovers thoughtworks puzzles</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a class="thickbox" href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TIfCXH-xBwI/AAAAAAAAALY/_2vPsiSSOvg/s1600/mars_rover.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="267" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TIfCXH-xBwI/AAAAAAAAALY/_2vPsiSSOvg/s400/mars_rover.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;Mars Rovers is one of the famous puzzle asked by many companies while recruiting people for them. Here the problem is defined and answers are given with Java program.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html#Mars_Rovers_Puzzle"&gt;Mars Rovers Puzzle&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html#input"&gt;Input&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html#output"&gt;Output&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html#input_and_output"&gt;Input and Output&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html#solution"&gt;Solution&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html" name="Mars_Rovers_Puzzle"&gt;Mars Rovers thoughtworks puzzles&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A squad of robotic rovers are to be landed by NASA on a plateau on Mars. This plateau, which is curiously rectangular, must be navigated by the rovers so that their on-board cameras can get a complete view of the surrounding terrain to send back to Earth.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A rover's position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In order to control a rover, NASA sends a simple string of letters. The possible letters are 'L', 'R' and 'M'. 'L' and 'R' makes the rover spin 90 degrees left or right respectively, without moving from its current spot. 'M' means move forward one grid point, and maintain the same heading.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;Assume that the square directly North from (x, y) is (x, y+1).&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html" name="input"&gt;INPUT:&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;The first line of input is the upper-right coordinates of the plateau, the lower-left coordinates are assumed to be 0,0.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;The rest of the input is information pertaining to the rovers that have been deployed. Each rover has two lines of input. The first line gives the rover's position, and the second line is a series of instructions telling the rover how to explore the plateau.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;The position is made up of two integers and a letter separated by spaces, corresponding to the x and y co-ordinates and the rover's orientation.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;Each rover will be finished sequentially, which means that the second rover won't start to move until the first one has finished moving.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html" name="output"&gt;&lt;b&gt;OUTPUT:&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;The output for each rover should be its final co-ordinates and heading.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html" name="input_and_output"&gt;INPUT AND OUTPUT:&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;Test Input:&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;5 5&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;1 2 N&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;LMLMLMLMM&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;3 3 E&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;MMRMMRMRRM&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;Expected Output:&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;1 3 N&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;5 1 E&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;==========&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/09/mars-rovers-thoughtworks-puzzles.html" name="solution"&gt;SOLUTION :&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Administrator removed the solution. Try your own.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-11075428084374253?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/11075428084374253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=11075428084374253' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/11075428084374253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/11075428084374253'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/09/mars-rovers-thoughtworks-puzzles.html' title='Mars Rovers thoughtworks puzzles'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/TIfCXH-xBwI/AAAAAAAAALY/_2vPsiSSOvg/s72-c/mars_rover.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-2685394359170294607</id><published>2010-09-03T03:18:00.000-07:00</published><updated>2010-09-04T08:23:45.473-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Covent Garden Puzzle'/><title type='text'>Covent Garden Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TIDK6X3t9LI/AAAAAAAAALQ/gi_XSKU9cm4/s1600/Apple-of-Kashmir-India_620.jpg" class="thickbox" imageanchor="1" style="clear: right; cssfloat: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" ox="true" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TIDK6X3t9LI/AAAAAAAAALQ/gi_XSKU9cm4/s320/Apple-of-Kashmir-India_620.jpg" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TIDK4bKeYvI/AAAAAAAAALI/8tuWeBbzpWs/s1600/apple%2520scrumptious.jpg" class="thickbox" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" ox="true" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TIDK4bKeYvI/AAAAAAAAALI/8tuWeBbzpWs/s320/apple%2520scrumptious.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;&lt;u&gt;Covent Garden Puzzle&lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mrs. Ram and Mrs. Jones had equal number of apples but Mrs. Jones had larger fruits and was selling hers at the rate of two for a penny, while Mrs. Ram sold three of hers for a penny. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Mrs. Ram was for some reason called away and asked Mrs. Jones to dispose of her stock. Upon accepting the responsibility of disposing her friend's stock, Mrs. Jones mixed them together and sold them of at the rate of five apples for two pence.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;When Mrs. Ram returned the next day the apples had all been disposed of, but when they came to divide the proceeds they found that they were just seven pence short, and it is this shortage in the apple or financial market which has disturbed the mathematical equilibrium for such a long period.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Supposing that they divided the money equally, each taking one-half, the problem is to tell just how much money Mrs. Jones lost by the unfortunate partnership? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;&lt;u&gt;Puzzle Solution&lt;/u&gt;&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;&lt;/span&gt;&lt;/strong&gt;&amp;nbsp; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The mixed apples were sold of at the rate of five apples for two pence. So they must have had a multiple of five i.e. 5, 10, 15, 20, 25, 30,…, 60, 65,… etc apples. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;But the minimum number of apples they could have together is 60; so that 30 would have been of Mrs. Ram's that would fetch her 10 (an integer) pence and the other 30 of Mrs. Jones's that would fetch her 15 (also an integer) pence. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;When sold separately it would fetch them 10+15=25 pence altogether. But when sold together it would fetch them 60X2/5=24 pence i.e. a loss of one (25-24=1) pence. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Since they lost 7 pence altogether; they had altogether 60X7=420 apples that fetched them only 420X2/5=168 pence and they shared 84 pence each of them. But Mrs. Jones could sell her 420/2=210 apples for 210/2=105 pence so she lost "21 pence". &lt;/div&gt;Note: to solve it algebraically:&lt;br /&gt;They lost 7 pence altogether&lt;br /&gt;Suppose each lady has x apples&lt;br /&gt;x/2 + x/3 - 2(2x/5) = 7&lt;br /&gt;&lt;br /&gt;15x + 10x - 24x = 210&lt;br /&gt;&lt;br /&gt;x = 210&lt;br /&gt;Note: Mrs. Johns lost 21 pence.&lt;br /&gt;&lt;br /&gt;But without working Mrs. Ram earned 14 extra pence!&lt;br /&gt;&lt;br /&gt;(84 pence – 210/3 pence = 14 pence).&lt;br /&gt;&lt;br /&gt;Not very fair!&lt;br /&gt;&lt;br /&gt;(Perhaps Mrs. Johns was not very good at math)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-2685394359170294607?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/2685394359170294607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=2685394359170294607' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2685394359170294607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2685394359170294607'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/09/covent-garden-puzzle.html' title='Covent Garden Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/TIDK6X3t9LI/AAAAAAAAALQ/gi_XSKU9cm4/s72-c/Apple-of-Kashmir-India_620.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1676736238996985278</id><published>2010-09-01T07:06:00.000-07:00</published><updated>2010-09-04T08:25:55.871-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Einstein’s Riddle'/><title type='text'>Einstein’s Puzzle</title><content type='html'>&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Five friends have their gardens next to one another, where they grow three kinds of crops: fruits (apple, pear, nut, cherry), vegetables (carrot, parsley, gourd, onion) and flowers (aster, rose, tulip, lily).&lt;/div&gt;&lt;br /&gt;1. They grow 12 different varieties.&lt;br /&gt;2. Everybody grows exactly 4 different varieties&lt;br /&gt;3. Each variety is at least in one garden.&lt;br /&gt;4. Only one variety is in 4 gardens.&lt;br /&gt;5. Only in one garden are all 3 kinds of crops.&lt;br /&gt;6. Only in one garden are all 4 varieties of one kind of crops.&lt;br /&gt;7. Pear is only in the two border gardens.&lt;br /&gt;8. Paul's garden is in the middle with no lily.&lt;br /&gt;9. Aster grower doesn't grow vegetables.&lt;br /&gt;10. Rose grower doesn't grow parsley.&lt;br /&gt;11. Nuts grower has also gourd and parsley.&lt;br /&gt;12. In the first garden are apples and cherries.&lt;br /&gt;13. Only in two gardens are cherries.&lt;br /&gt;14. Sam has onions and cherries.&lt;br /&gt;15. Luke grows exactly two kinds of fruit.&lt;br /&gt;16. Tulip is only in two gardens.&lt;br /&gt;17. Apple is in a single garden.&lt;br /&gt;18. Only in one garden next to the Zick's is parsley.&lt;br /&gt;19. Sam's garden is not on the border.&lt;br /&gt;20. Hank grows neither vegetables nor asters.&lt;br /&gt;21. Paul has exactly three kinds of vegetable.&lt;br /&gt;&lt;br /&gt;Who has which garden and what is grown where?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Answer :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/TH5d0ZUSZ3I/AAAAAAAAAK4/YT5rJROqf_k/s1600/eninstein.png" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/TH5d0ZUSZ3I/AAAAAAAAAK4/YT5rJROqf_k/s320/eninstein.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1676736238996985278?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1676736238996985278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1676736238996985278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1676736238996985278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1676736238996985278'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/09/einsteins-puzzle.html' title='Einstein’s Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/TH5d0ZUSZ3I/AAAAAAAAAK4/YT5rJROqf_k/s72-c/eninstein.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-6060333116913606603</id><published>2010-08-31T21:52:00.001-07:00</published><updated>2010-09-04T08:25:24.419-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to interview'/><title type='text'>How to interview a person - An Article</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/THqAY7AwdsI/AAAAAAAAAKo/szr3gJxN5gQ/s1600/how+to+conduct+interview.jpeg" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/THqAY7AwdsI/AAAAAAAAAKo/szr3gJxN5gQ/s320/how+to+conduct+interview.jpeg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;u&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;How to Conduct an Interview&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;Interviews have four stages that precede the writing of a story:&amp;nbsp;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#a1"&gt;Arrangements.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#a2"&gt;Preparation.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#a3"&gt;The actual interview.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#a4"&gt;The reconstruction.&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="a1"&gt;ARRANGEMENTS&lt;/a&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Once an interviewer has decided to interview someone, He should call the candidate in advance to make an appointment.&amp;nbsp; Identify himself by his name and the name of his publication.&amp;nbsp; If the interviewer feels that he need to do so or asked to describe what the story is about, be brief and general.&amp;nbsp; The shape of the story might change as him continue his reporting. If the interviewer interviewing several persons in connection with the story, interview the principal person last, because he will be better prepared based on what the learning from the earlier interviews.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="a2"&gt;PREPARATION&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try to prepare as much research as possible on the person in advance on topic working on. Sources might be the library, public records, the internet and the expert people in that technology for background information.&amp;nbsp; Prepare the questions in advance if necessary writing and bring them into the interview.&amp;nbsp; Refer to them but don't show them to the candidate, because it creates too formal an atmosphere.&amp;nbsp; Ask other questions as they might arise, based on what the candidate says or something new that might come at the moment.&amp;nbsp; Bring pencil (or pen) and paper.&amp;nbsp; A stenographer's notebook is usually easier to handle than a large pad but use whatever is comfortable.&amp;nbsp; Bring a tape recorder but be sure to get the permission to use it from the person you are interviewing.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="a3"&gt;THE INTERVIEW &lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is inadvisable to launch right into the interview unless it’s being given a few minutes.&amp;nbsp; Some casual conversation to start with will relax both of you.&amp;nbsp; Interviewers should ask Questions should be as short as possible.&amp;nbsp; Give the respondent time to answer.&amp;nbsp; Interviewers must be a good listener. If candidate prattles on, it is appropriate to move on as politely.&amp;nbsp; Interviewer might say something such as:&amp;nbsp; "Fine, but let me ask you this ".&amp;nbsp; Try to draw out specifics:&amp;nbsp; How long, how many, when, etc.?&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try to absorb the atmospherics of the locale where the interview takes place, with particular attention to what might be a reflection of the candidate’s personality and interests, such as photos of children or bowling trophies or a paper-littered desk or a clean one, etc.&amp;nbsp; Note characteristics of the candidate that might be worth mentioning in your story, such as pacing, looking out the window to think, hand gestures and the like.&amp;nbsp; Invite the person to call you if she/he thinks of anything pertinent after the interview.&amp;nbsp; It often happens, Interviewer should provide his name, email addresses and phone number on a card or piece of paper before to leave.&amp;nbsp; If that person has a secretary, be sure to get that person's name and telephone number, too, in case there is some detail that needs follow up and, again, leave information as to how you may be contacted.&amp;nbsp; If a photo is needed and is not taken during the interview, be sure to make arrangements then to have one taken at a later time.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="a4"&gt; RECONSTRUCTION &lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As soon as it's practical after the interview, find a quiet place to review the handwritten notes.&amp;nbsp; While taking notes, that may have written abbreviations for words that won't mean anything in a day or two later.&amp;nbsp; Or some scribbling may need deciphering, and, again, it is more likely to be better able to understand the scribbles soon after the interview.&amp;nbsp; Underline or put stars alongside quotes that seemed most compelling. One star for a good quote, two stars for a very good one, etc.&amp;nbsp;&amp;nbsp; It will speed the process when you get to the writing stage.&amp;nbsp; One other thing to look for in the notes:&amp;nbsp; the quote wrote down might not make a lot of sense, unless to remember what specific question it was responding to.&amp;nbsp; In short, fill in whatever gaps exist in the notes that will help better understand them when writing.&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;How to Interview a Programmer&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Finding good programmers is hard because good programming is dependent on much more than just knowledge of programming language syntax. &lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.&amp;nbsp; The Interviewer needs someone who, despite wearing striped pants with a polka dot shirt, has a good sense of taste in OO design. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.&amp;nbsp; He need someone who the candidate is creative enough to find innovative solutions to problems, yet anal retentive enough to always line up their curly braces. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. The Interviewer needs someone who (the Programmer) is humble enough to be open to suggestions for improvement, but arrogant enough to stand firm and provide leadership when they are the best person to provide it.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;How to tell all this about a stranger by spending 30 minutes with them in a conference room?&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Summery:&lt;/b&gt;&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#b1"&gt;Explore an Area of Expertise &lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#b2"&gt;Have Them Critique Something&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#b3"&gt;Ask Them to Solve a Problem&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#b4"&gt;Look at Their Code&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#b5"&gt;Ask About a People Problem&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#b6"&gt;Get to Know Them&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html#b7"&gt;Conclusion&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="b1"&gt;Explore an Area of Expertise&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Rather than simply look for expertise and experience in the exact area in which the candidate will work, it is necessary look for general programming talent and ability. One way to explore and judge a candidate's talents is to explore an area of their expertise: &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Hire for talent. One of the biggest mistakes companies make is to recruit from a shopping list: I need a programmer with six years Java, three years Oracle, and two years EJBs. The world changes, so to hire folks who change with it. Look for people who know computing, not necessarily particular narrow niches. Not only will they adapt better in the future, they're also more likely to be innovative in the present.&amp;nbsp; &lt;/li&gt;&lt;li&gt;&amp;nbsp;To identify how good the candidates are technically, I let them choose an area in which they feel they have expertise. I need them to know something well, and I ask them about that. I ask them why. I want them to know why something in their area of expertise works the way it does. I'm not necessarily after an expert in the area I need. If they learned why in the past, I have confidence they'll learn why in the future. &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="b2"&gt;Have Them Critique Something&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Another technique involves the importance of creating a dialog with the candidate. To get to know the candidate's talents and personality, Do n’t merely ask questions that have short factual answers. Find a way to engage a conversation. To stimulate dialog, ask the candidate to critique some technology: &lt;br /&gt;&lt;ol&gt;&lt;li&gt;I ask candidates to critique a system or platform that we both have in common, preferably something they will use on the job. For example, I might ask, "What parts of Java don't you like and why?" &lt;/li&gt;&lt;li&gt;I give candidates samples of our current code and ask them to explain and critique it. This gives me a sense of their skills, but also lets them know what they can expect. &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="b3"&gt;Ask Them to Solve a Problem&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Another way to foster an open-ended dialog is to ask the candidate to perform a task: to solve a problem or create a design. Although everyone at the meeting seemed to agree that this was important and useful technique, it also generated a lot of concern. People felt that asking the candidate to solve puzzles and problems needed to be done with care:&lt;br /&gt;&lt;br /&gt;Several expertise interview taken and their review is given below&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I like to ask a candidate to solve a small-scale design problem, finger exercises, to see how they think and what their process is: "How would you write a function that tells me if its argument is a power of 2?" I'm not looking for the optimal bit-twiddling solution ((n &amp;amp; -n) == n). I'm looking to see if they get the method signature right, if they think about boundary cases, if their algorithm is reasonable and they can explain its workings, and if they can improve on their first attempt. &lt;/li&gt;&lt;li&gt;I ask candidates to create an object model of a chicken. This eliminates any problems with uncertainties about the problem domain, because everyone knows what a chicken is. I think it also jars people away from the technical details of a computer. It tests to see if they are capable of thinking about the big picture. &lt;/li&gt;&lt;li&gt;I hate anything that asks me to design on the spot. That's asking to demonstrate a skill rarely required on the job in a high-stress environment, where it is difficult for a candidate to accurately prove their abilities. I think it's fundamentally an unfair thing to request of a candidate. &lt;/li&gt;&lt;li&gt;I don't like when I'm asked to write a program that does X on a piece of paper. Don't ask the candidate to write a program on paper. That is a waste of time and sweat. People don't write software on paper, they do it with computers using auto-completion, macros, indexed API documentation, and context-sensitive help. They think about it, refractor it, and even rewrite it. If you want to see a person's work, ask them to write some small module or implement some interface before the interview and bring the code on a notebook PC or on hard copy. Then you can review it and discuss the design, coding style, and decisions that went into it. This will give you a much more realistic and useful assessment of a person's work and style. &lt;/li&gt;&lt;li&gt;I like design dialog questions that don't have a single fixed answer. That way they have to ask me questions, and this sparks a discussion. It's good to have a whiteboard available in the room. A dialog lets the interviewer see how the interviewee works, whereas a question of fact is just that: it is great for TV quiz shows, but doesn't tell you how someone will work and approach things over time. A puzzle question requires knowing a trick, which is in essence something that is either known or unknown. I dislike puzzle questions, because they don't require dialog. &lt;/li&gt;&lt;li&gt;What constitutes a reasonable question depends a lot on the candidate's experience and maturity. &lt;/li&gt;&lt;li&gt;I look for people with curiosity. Present problems, not puzzles. &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="b4"&gt;Look at Their Code&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; One technique we all seemed to like: Have the candidate bring a code portfolio to the interview. Look at the candidate's code and talk to them about it. Although we were concerned that some candidates may not have code they could legally bring to the interview, we figured most candidates could probably come up with something. It can't hurt at least to ask a candidate to bring to the interview a sample of code they had written in the past. &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Find Out What Books They Read Several people indicated that they ask candidates about the programming books they read to see if a programmer is self-motivated or concerned about improving their own programming skills:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="b5"&gt;Ask About a People Problem&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As important as technical ability, or perhaps more important, is personality. How well would the candidate fit the team? How well would they fit the work environment? People used various techniques to judge personality. Good citizenship is probably more important than technical prowess, because if you have people with the right kind of attitude and demeanor, you can help them gain the technical knowledge and software development habits. But if you have people who lack humility and maturity, it can be extremely difficult to get them to cooperate in reaching a goal, no matter how bright they are or what they've accomplished in the past. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="b6"&gt;Get to Know Them&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Perhaps the prominent theme of our discussion was that you need to try to get to know the candidate as best you can. Talk to the candidate in the interview. Try to get a feel for them. If possible, bring them in on a trial basis or for a probationary period. That would give you more time to get to know the candidate, and give the candidate more time to get to know you:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Chuck Allison:&lt;/i&gt; I talk to them. I get a feel for them. I always ask about what they've done. I have found that by discovering what a person is excited about technically, you can learn a lot of important things about them. In the past I've asked people to describe a project that was especially interesting to them, or that was challenging and successful. On occasion I've asked what they've done that they're the most proud of. This usually reveals the depth of one's understanding and mastery. It also gets them to turn on the fire hose verbally, and you can sit back and get most of the answers you need.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Randy Stafford: &lt;/i&gt;I look at past projects listed on their resume, and ask them to talk about those projects—how was the team organized, what the technologies and architectures were used, was the software successful in production, etc. In their answers I'm listening for what lessons they learned from those experiences, and whether those lessons match with lessons I've learned from my experiences and from professional literature. I get a glimpse into how they perceive themselves in relation to the world around them. Some come off as arrogant, some ignorant, some helpless. Others sound humble, intelligent, and motivated. I often ask them what software development literature they read. Continuous education is very important to me.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Angelika Langer: &lt;/i&gt;In Germany, hiring is like marrying someone. It's "until death do us part"—a marriage without the backdoor of a divorce, because you can't fire employees. The only chance for firing someone is during a three- to six-month probationary period, or when the company goes out of business. The major filtering is done before the interview, based on the curriculum vitae (CV) and submitted papers, such as evaluations from former employers. (In Germany, employers must provide every employee with a written evaluation when they leave the company.) The interview itself is usually brief. The main tool in filtering is scrutinizing the CV and papers; 98 percent of all applicants are disqualified in this phase. The interview should confirm the impression you gain from the applicant's papers and allows you to sense their personality. The lucky winner then goes on a probationary period. Probation definitely does not replace the filtering; it just keeps a last exit open until you really must commit.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Andy Hunt: &lt;/i&gt;We've hired people who interviewed well, but they were terrible at the job. If possible, hire them in for a trial period.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Dawn McGee: &lt;/i&gt;You could also bring candidates in for half a day, and have them do what they would be doing on the job.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://interviewpuzzle.blogspot.com/2010/08/how-to-conduct-interview.html" name="b7"&gt;Conclusion&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To sum up the overlying themes from our hour-long discussion in Portland: You should look for talent and fit more than specific skill sets. Ask open-ended questions to initiate revealing dialog. Ask candidates to critique something. Ask them to design something. Investigate their past experience. Review their code. And through conversation and, if possible, a trial period, you should try to become familiar with the candidate's technical abilities, talents, and personality. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-6060333116913606603?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/6060333116913606603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=6060333116913606603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/6060333116913606603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/6060333116913606603'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/how-to-interview-person-article.html' title='How to interview a person - An Article'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/THqAY7AwdsI/AAAAAAAAAKo/szr3gJxN5gQ/s72-c/how+to+conduct+interview.jpeg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-3688933872706222635</id><published>2010-08-31T21:50:00.000-07:00</published><updated>2010-09-04T08:26:46.558-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lateral Thinking Puzzles'/><category scheme='http://www.blogger.com/atom/ns#' term='Poisened Drink Puzzle'/><title type='text'>Poisened Drink Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TH3a2xU8yxI/AAAAAAAAAKw/1gQA-uXjbOg/s1600/scotch.jpeg" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TH3a2xU8yxI/AAAAAAAAAKw/1gQA-uXjbOg/s320/scotch.jpeg" width="239" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Poisened Drink Puzzle&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A rich old man has died. After his  death, his children are surprised to learn that he has left all of his  money to his oldest son Jeremiah, who loved him dearly, and ignored his  other children, who hated him. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; So,  the funeral is a day or two later, and the other sons and daughters  have decided to kill Jeremiah and take his inheritance. Since his  father's death, Jeremiah has taken to drinking, and they know that, at  the wake, he's going to be gulping down the liquor like it was nectar of  the gods. So they decide to poison the drinks. One of the other sons,  Wallace, tends bar, and gets the poison all ready. So  Jeremiah comes up, crying and depressed, and orders a scotch on the  rocks. Wallace serves him one, and he chugs it down in two seconds.  "Give me another." Wallace gives him a second glass of scotch, which he  also drinks in a matter of moments. The other siblings are puzzled...the  poison is fast-acting; Jeremiah should be convulsing on the floor and  retching his guts out. Finally, fifteen minutes later, a rather  inebriated and very much alive Jeremiah orders one last glass of scotch,  but as Wallace hands it to him, he changes his mind and leaves,  sobbing. The other siblings come over to Wallace, and wonder what's  going on. They talk about what could have gone wrong for a few minutes,  and figure the poison's harmless. So Wallace sips the drink he poured  for Jeremiah, and is pronounced DOA thirty minutes later.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;Why did Jeremiah live? (He had no immunity to the poison, he didn't know it was coming, and the poison was obviously deadly.)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Answer :&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: small;"&gt;Jeremiah orders a scotch on the rocks (ice  cubes). Dropping the poison into his drink, it lands on top of the ice  cubes. Jeremiah downs his two drinks very quickly, not giving enough  time for the poison to mix with his drink. Conversely, the brother waits  a "few minutes" before drinking, allowing the ice cubes to melt and  giving ample time for the poison to mix with the scotch. He is soon dead  as a result! &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-3688933872706222635?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/3688933872706222635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=3688933872706222635' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3688933872706222635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3688933872706222635'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/poisened-drink-puzzle.html' title='Poisened Drink Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/TH3a2xU8yxI/AAAAAAAAAKw/1gQA-uXjbOg/s72-c/scotch.jpeg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-3308016997179252885</id><published>2010-08-28T21:51:00.000-07:00</published><updated>2010-09-04T08:31:51.921-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Four ships Puzzle'/><title type='text'>Four ships Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/THnmYAGvD-I/AAAAAAAAAKI/J_zAbRvw3mU/s1600/DCL4ShipsSmaller.jpg" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/THnmYAGvD-I/AAAAAAAAAKI/J_zAbRvw3mU/s320/DCL4ShipsSmaller.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Four ships are sailing on a 2D planet in four different directions. Each ships traverses a straight line at constant speed. No two ships are traveling parallel to each other. Their journeys started at some time in the distant past. Sometimes, a pair of ships collides. A ship continues its journey even after a collision. However, it is strong enough only to survive two collisions; it dies when it collides a third time. The situation is grim. Five of six possible collisions have already taken place (no collision involved more than 2 ships) and two ships are out of commission. What fate awaits the remaining two?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Solution :&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/THnnGyE-GfI/AAAAAAAAAKY/jPgk28KukDs/s1600/fateofships.JPG" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/THnnGyE-GfI/AAAAAAAAAKY/jPgk28KukDs/s320/fateofships.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Let z-axis denote time. let x- and y- axes denote the 2D planet. Then the four trajectories are straight lines. Since no collision involved more than two ships, these four lines must all lie in a plane. So, one might be tempted to believe that the two other ships will also collide. But, they might have collided in negative time. So, it cannot be decided from the given information that the two ships will collide or not?&lt;br /&gt;&lt;br /&gt;This can be made clearer through the following two diagrams. In the first one, the four ships move such that there is no collision between the two ships. In the other diagram, the four ships move such that there is a collision between them.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-3308016997179252885?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/3308016997179252885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=3308016997179252885' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3308016997179252885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3308016997179252885'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/four-ships-puzzle.html' title='Four ships Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/THnmYAGvD-I/AAAAAAAAAKI/J_zAbRvw3mU/s72-c/DCL4ShipsSmaller.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7493529893343872301</id><published>2010-08-28T21:41:00.000-07:00</published><updated>2010-09-04T08:28:21.644-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Three Boxes and a Ruby'/><title type='text'>Three Boxes and a Ruby Puzzle with Solution</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/THnkBXPuBjI/AAAAAAAAAKA/pS_nLoREaoM/s1600/index.jpeg" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="342" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/THnkBXPuBjI/AAAAAAAAAKA/pS_nLoREaoM/s400/index.jpeg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Puzzle :&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alice places three identical boxes on a table. She has concealed a precious ruby in one of them. The other two boxes are empty. Bob is allowed to pick one of the boxes. Among the two boxes remaining on the table, at least one is empty. Alice then removes one empty box from the table. Bob is now allowed to open either the box he picked, or the box lying on the table. If he opens the box with the ruby, he gets a kiss from Alice (which he values more than the ruby, of course). What should Bob do?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Solution:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This problem is known as the &lt;a href="http://en.wikipedia.org/wiki/Monty_Hall_problem"&gt;Monty Hall Problem&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Bob switches his choice, he wins with probability of 2/3. &lt;a href="http://www.youtube.com/watch?v=mhlc7peGlGg"&gt;The YouTube video&lt;/a&gt;  explaining this solution in detail.&amp;nbsp; To get better intuition, it helps to consider a slightly different problem with 100 boxes with one box containing a ruby. Bob then picks one of the boxes at random. At least 98 of the remaining boxes are empty — these are removed by Alice. So now, we are left with two boxes: should Bob switch? Indeed, for he wins with probability 99/100 if he switches!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7493529893343872301?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7493529893343872301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7493529893343872301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7493529893343872301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7493529893343872301'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/three-boxes-and-ruby-puzzle-with.html' title='Three Boxes and a Ruby Puzzle with Solution'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/THnkBXPuBjI/AAAAAAAAAKA/pS_nLoREaoM/s72-c/index.jpeg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-5756330775954025966</id><published>2010-08-15T11:54:00.000-07:00</published><updated>2010-09-04T08:28:53.285-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eight Queens Puzzle'/><title type='text'>Eight Queens Puzzle</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;u&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Eight Queens Puzzle&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The eight queens puzzle is the problem of placing eight chess queens&amp;nbsp; on an 8×8 chessboard such that none of them are able to capture any other using the standard chess queen's moves. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TGg2kUM1T0I/AAAAAAAAAJg/nCV3lxP0Ysk/s1600/TitleBoard.jpg" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TGg2kUM1T0I/AAAAAAAAAJg/nCV3lxP0Ysk/s320/TitleBoard.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&amp;nbsp;Available movement of the Queen is shown in above picture. The queens must be placed in such a way that no two queens attack each other. In chess, a queen can move as far as horizontally, vertically, or diagonally. The standard 8 by 8 Queen's problem asks how to place 8 queens on an ordinary chess board so that none of them can hit any other in one move.&lt;br /&gt;&lt;br /&gt;&lt;embed bgcolor="#000000" height="510" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="http://tszone.co.cc/8Queens.swf" type="application/x-shockwave-flash" width="760"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;span id="goog_2055148219"&gt;&lt;/span&gt;&lt;span id="goog_2055148220"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This puzzle has &lt;u&gt;&lt;b&gt;twelve unique solution&lt;/b&gt;&lt;/u&gt;. The following image show one solution as using backtracking algorithm method. See &lt;a href="http://en.wikipedia.org/wiki/Eight_queens_puzzle"&gt;wikipedia &lt;/a&gt;for more details about 8 Queen puzzle.&lt;br /&gt;&lt;br /&gt;&lt;span id="goog_1006611189"&gt;&lt;/span&gt;&lt;span id="goog_1006611190"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TGg51zoUSoI/AAAAAAAAAJ4/MqGuFA07YMk/s1600/8Q_finish.png" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TGg51zoUSoI/AAAAAAAAAJ4/MqGuFA07YMk/s320/8Q_finish.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;u&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Algorithms :&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Check the following links &lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.mactech.com/articles/mactech/Vol.13/13.12/TheEightQueensProblem/%20"&gt;http://www.mactech.com/articles/mactech/Vol.13/13.12/TheEightQueensProblem/ &lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://yuval.bar-or.org/index.php?item=9"&gt;http://yuval.bar-or.org/index.php?item=9&lt;/a&gt;&lt;br /&gt;3. &lt;a href="http://firefang.net/english/n-queens"&gt;http://firefang.net/english/n-queens&lt;/a&gt;&lt;br /&gt;4. &lt;a href="http://bridges.canterbury.ac.nz/features/eight.html"&gt;http://bridges.canterbury.ac.nz/features/eight.html&lt;/a&gt;&lt;br /&gt;5. &lt;a href="http://mathworld.wolfram.com/QueensProblem.html"&gt;http://mathworld.wolfram.com/QueensProblem.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;for algorithm to solve this problem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Source Code :&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;The solved java program is available here.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. &lt;a href="http://tszone.co.cc/NQueens.java"&gt;http://tszone.co.cc/NQueens.java&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. &lt;a href="http://rooparam.blogspot.com/2009/12/eight-queens-solution-with-dfs-using.html"&gt;http://rooparam.blogspot.com/2009/12/eight-queens-solution-with-dfs-using.html&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-5756330775954025966?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/5756330775954025966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=5756330775954025966' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5756330775954025966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5756330775954025966'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/eight-queens-puzzle.html' title='Eight Queens Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/TGg2kUM1T0I/AAAAAAAAAJg/nCV3lxP0Ysk/s72-c/TitleBoard.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-8806092935892089775</id><published>2010-08-14T10:47:00.000-07:00</published><updated>2010-09-04T08:28:14.052-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hats and IIT students'/><title type='text'>Hats and IIT students</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TGbWKDOG9JI/AAAAAAAAAJY/SpfBu4tCBlQ/s1600/images.jpeg" class="thickbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TGbWKDOG9JI/AAAAAAAAAJY/SpfBu4tCBlQ/s320/images.jpeg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This is another hats puzzle same like as &lt;a href="http://interviewpuzzle.blogspot.com/2010/05/prisoners-and-hats-puzzle.html"&gt;prisoners and hats puzzle&lt;/a&gt;. The puzzle is Nine IIT students were sitting in a classroom. Their professor wanted them to test. Next day the professor told all of his 9 students that he has 9 hats, The hats either red or black color. He also added that he has at least one hat with red color and the no. of black hats is greater than the no. of red hats. The professor keeps those hats on their heads and ask them tell me how many red and black hats the professor have? Obviously students can not talk to each other or no written communication, or looking into each other eyes; no such stupid options and no tricks.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Professor goes out and comes back after 20 minutes but nobody was able to answer the question. So he gave them 10 more minuets but the result was the same. So he decides to give them final 5 minutes. When he comes everybody was able to answer him correctly.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;So what is the answer? and why?&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Answer :&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;After 20 minutes :&lt;br /&gt;Lets assume that their is 1 hat of red color and 8 hats of black color.  The student with red hat on his head can see all 8 black hats, so he  knows that he must be wearing a red hat.&lt;br /&gt;Now we know that after first interval nobody was able to answer the prof that means our assumption is wrong. So there can not be 1 red and 8 black hats.&lt;br /&gt;&lt;br /&gt;After second interval of 10 minutes :&lt;br /&gt;Assume that their are 2 hats of red color and 7 hats of black color. The  students with red hat on their head can see all 7 black hats and 1 red  hat, so they know that they must be wearing a red hat.&lt;br /&gt;Now we know that after second interval nobody was able to answer the prof that means our assumption is again wrong. So there can not be 2 red and 7 black hats.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;After third interval of final 5 minutes :&lt;br /&gt;Now assume that their is 3 hats of red color and 6 hats of black color.  The students with red hat on their head can see all 6 black hats and 2  red hats, so they know that they must be wearing a red hat.&lt;br /&gt;Now we know that this time everybody was able to answer the prof that means our assumption is right. &lt;br /&gt;&lt;br /&gt;So there are 3 red hats and 6 black hats. &lt;br /&gt;&lt;br /&gt;Now as everybody gave the answer so there can be a doubt that only those 3 students know about it how everybody came to know ?&lt;br /&gt;Then here is what i think, the professor gave them FINAL 5 minutes to  answer, so other guys will think that the professor expects the answer  after 3rd interval (according to prof it must be solved after 3  intervals), so this is the clue for others.&amp;nbsp;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-8806092935892089775?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/8806092935892089775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=8806092935892089775' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/8806092935892089775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/8806092935892089775'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/hats-and-iit-students.html' title='Hats and IIT students'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/TGbWKDOG9JI/AAAAAAAAAJY/SpfBu4tCBlQ/s72-c/images.jpeg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7361712079495131383</id><published>2010-08-12T10:07:00.000-07:00</published><updated>2010-08-12T10:15:27.948-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Engineers and Managers Puzzle'/><title type='text'>Engineers and Managers Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/TGQpJ5sOq9I/AAAAAAAAAJQ/8am6_pCo3zM/s1600/ANZ-Bank-counter.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/TGQpJ5sOq9I/AAAAAAAAAJQ/8am6_pCo3zM/s320/ANZ-Bank-counter.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;u&gt;&lt;span style="font-size: large;"&gt;Engineers and Managers Puzzle&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In a city, The police has surrounded the Bank. There are 50 people in the building. Each person is either an engineer or a manager of the bank. All computer files have been deleted, and all documents have been shredded by the managers. The problem confronting the police is to separate the people into these two classes, so that all the managers are locked in a room&amp;nbsp; and all the engineers are freed. every people knows the status of all others. The interrogation consists entirely of asking person i if person j is an engineer or a manager. The engineers always tell the truth. What makes it hard is that the managers may not tell the truth. In fact, the managers are evil geniuses who are conspiring to confuse the interrogators.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; 1. Under the assumption that more than half of the people are engineers, can you find a strategy for the Police to find one engineer with at most 49 questions?&lt;br /&gt;&amp;nbsp;&amp;nbsp; 2. Is this possible in any number of questions if half the people are managers?&lt;br /&gt;&amp;nbsp;&amp;nbsp; 3. Once an engineer is found, he/she can classify everybody else. Is there a way to classify everybody in fewer questions?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Answer :&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Part 1: &lt;br /&gt;&lt;br /&gt;Here's an n-1 query solution to part 1. Maintain three sets of people: UNSEEN, STACK, and DISCARD. Initialize the process by picking one arbitrarily to be the STACK, everything else is UNSEEN. Repeat the following step until UNSEEN is empty:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pick an UNSEEN element x, remove it from UNSEEN. Ask the top of the STACK y about x. If y says "manager" pop y off the stack and DISCARD both x and y. If it says "engineer" add x to the top of the STACK.&lt;br /&gt;&lt;br /&gt;After all elements have been processed in this way (n-1 comparisons), the top of the stack must be an engineer.&lt;br /&gt;&lt;br /&gt;Why does this work? First observe that whenever we discard a pair, at least one of them is a manager. So among the rest of them (STACK and UNSEEN) a majority must still be engineers. So at the end, when UNSEEN is empty, there must be an engineer in the stack, therefore the top of the stack must be an engineer.&lt;br /&gt;&lt;br /&gt;This can be improved to 48 simply by stopping one earlier. When there's one UNSEEN left, if the stack is empty, that UNSEEN one is an engineer. Otherwise, the top of the stack must be an engineer.&lt;br /&gt;&lt;br /&gt;first step we can just throw out one person, and appy this algorithm to the remaining 49 obtaining 47 comparisons. This gives the optimal algorithm.&lt;br /&gt;&lt;br /&gt;This is optimal. The proof appears in the solution of homework assignment 7 of Steven Rudich's course 15-251 taught at CMU in the spring semester of 2002. See Solution 7.&lt;br /&gt;&lt;br /&gt;Part 2: If half or more of the people are managers, then the problem cannot be solved. The managers can ensure this simply by always lying. Now there's way to separate the two sets of people. Each one simply claims the others are Managers.&lt;br /&gt;&lt;br /&gt;Part 3: I don't know any better solution than to simply using the solution to Part 1 to identify everybody.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7361712079495131383?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7361712079495131383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7361712079495131383' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7361712079495131383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7361712079495131383'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/engineers-and-managers-puzzle.html' title='Engineers and Managers Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/TGQpJ5sOq9I/AAAAAAAAAJQ/8am6_pCo3zM/s72-c/ANZ-Bank-counter.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-2989580758343522190</id><published>2010-08-08T04:36:00.000-07:00</published><updated>2010-08-08T04:36:46.758-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lateral Thinking Puzzles'/><title type='text'>Lateral Thinking Puzzles</title><content type='html'>&lt;div style="text-align: justify;"&gt;Puzzle 1:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A man is trapped in a room. The room has only two possible exits: two doors. Through the first door there is a room constructed from magnifying glass. The blazing hot sun instantly fries anything or anyone that enters. Through the second door there is a fire-breathing dragon. How does the man escape?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Answer :&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;He waits until night time and goes out the first door.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Puzzle 2:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In a far away land, it was known that if you drank poison, the only way to save yourself is to drink a stronger poison, which neutralizes the weaker poison. The king that ruled the land wanted to make sure that he possessed the strongest poison in the kingdom, in order to ensure his survival, in any situation. So the king called the kingdom's pharmacist and the kingdom's treasurer, he gave each a week to make the strongest poison. Then, each would drink the other one's poison, then his own, and the one that will survive, will be the one that had the stronger poison.&lt;br /&gt;The pharmacist went straight to work, but the treasurer knew he had no chance, for the pharmacist was much more experienced in this field, so instead, he made up a plan to survive and make sure the pharmacist dies. On the last day the pharmacist suddenly realized that the treasurer would know he had no chance, so he must have a plan. After a little thought, the pharmacist realized what the treasurer's plan must be, and he concocted a counter plan, to make sure he survives and the treasurer dies. When the time came, the king summoned both of them. They drank the poisons as planned, and the treasurer died, the pharmacist survived, and the king didn't get what he wanted.&lt;br /&gt;What exactly happened there?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Answer :&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The treasurer's plan was to drink a weak poison prior to the meeting with the king, and then he would drink the pharmacist's strong poison, which would neutralize the weak poison. As his own poison he would bring water, which will have no effect on him, but the pharmacist who would drink the water, and then his poison would surely die. When the pharmacist figured out this plan, he decided to bring water as well. So the treasurer who drank poison earlier, drank the pharmacist's water, then his own water, and died of the poison he drank before. The pharmacist would drink only water, so nothing will happen to him. And because both of them brought the king water, he didn't get a strong poison like he wanted.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-2989580758343522190?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/2989580758343522190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=2989580758343522190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2989580758343522190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2989580758343522190'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/lateral-thinking-puzzles.html' title='Lateral Thinking Puzzles'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7855404542446241021</id><published>2010-08-08T04:26:00.000-07:00</published><updated>2010-08-08T04:26:10.627-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='The Gold Chain'/><title type='text'>The Gold Chain -Interview Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TF6SLyB6XCI/AAAAAAAAAIo/nCviLcyTdqg/s1600/m4s2-chain.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TF6SLyB6XCI/AAAAAAAAAIo/nCviLcyTdqg/s320/m4s2-chain.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;span style="font-family: Courier New,Courier;"&gt;The Gold Chain - Puzzle :&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New,Courier;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-family: Courier New,Courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Courier New,Courier;"&gt;A woman wants to buy a painting at an auction where you bid grams of gold instead of money.&amp;nbsp; She owns a gold chain made of 23 interlocking loops, each weighing 1 gram.&amp;nbsp; She wants to go to a jeweler before the auction to cut the minimum number of loops that would allow her to pay any sum from 1 to 23.&amp;nbsp; For example, she could pay a 13 gram price with a 12 link chain and a single link.&amp;nbsp; After much thought, she figures out a way to do it by cutting just 2 of the loops in the chain.&amp;nbsp; How many loops are in the pieces of chains that she has after the 2 cuts?&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Answer :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;"&gt;Make a cut in 4 th and loops of the Gold chain so you can get pieces of 1,1,3,6 and 12. from this you can weights from 1 to 23 grams.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TF6TZGlIs7I/AAAAAAAAAI4/AvD4C9JYv8g/s1600/m4s2-chain_ans01.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TF6TZGlIs7I/AAAAAAAAAI4/AvD4C9JYv8g/s320/m4s2-chain_ans01.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TF6Td7TS5ZI/AAAAAAAAAJA/BQIGCBBqdbQ/s1600/m4s2-chain_ans03.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TF6Td7TS5ZI/AAAAAAAAAJA/BQIGCBBqdbQ/s320/m4s2-chain_ans03.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TF6TZGlIs7I/AAAAAAAAAI4/AvD4C9JYv8g/s1600/m4s2-chain_ans01.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TF6TZGlIs7I/AAAAAAAAAI4/AvD4C9JYv8g/s320/m4s2-chain_ans01.gif" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TF6TO4l9gFI/AAAAAAAAAIw/MJW_eW0sj4w/s1600/m4s2-chain_ans06.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TF6TO4l9gFI/AAAAAAAAAIw/MJW_eW0sj4w/s320/m4s2-chain_ans06.gif" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TF6Te-MdLtI/AAAAAAAAAJI/WTeGxPULCgY/s1600/m4s2-chain_ans12.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TF6Te-MdLtI/AAAAAAAAAJI/WTeGxPULCgY/s320/m4s2-chain_ans12.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7855404542446241021?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7855404542446241021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7855404542446241021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7855404542446241021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7855404542446241021'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/gold-chain-interview-puzzle.html' title='The Gold Chain -Interview Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pxUNdWyjHeo/TF6SLyB6XCI/AAAAAAAAAIo/nCviLcyTdqg/s72-c/m4s2-chain.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-152134351509815130</id><published>2010-08-08T04:08:00.000-07:00</published><updated>2010-08-08T04:08:54.637-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dragon and Knight'/><category scheme='http://www.blogger.com/atom/ns#' term='Trilogy interview puzzle'/><title type='text'>Dragon and Knight - Trilogy interview puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TF6PBAN2NrI/AAAAAAAAAIg/8hIPuoj7ZkQ/s1600/the-dragon-knight-fantasy.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TF6PBAN2NrI/AAAAAAAAAIg/8hIPuoj7ZkQ/s400/the-dragon-knight-fantasy.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Dragon and Knight - Trilogy interview puzzle&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is another one famous puzzle asked in many interview puzzle. This was asked in Trilogy interview.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Lets consider a dragon and knight live on an island. That island has seven poisoned  wells, which is numbered 1 to 7. If you drink from a well, you can only save  yourself by drinking from a higher numbered well. The Well whose is number 7 is located at  the top of a high that mountain, so only the dragon can reach it.&lt;br /&gt;&lt;br /&gt;One day they decide that the island isn't big enough for the two of  them, and they have a duel. Each of them brings a glass of water to the  duel, they exchange glasses, and drink. After the duel, the knight lives  and the dragon dies.&lt;br /&gt;&lt;br /&gt;Why did the knight live? Why did the dragon die?&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Answer :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dragon knows that knight cant reach well 7. So he thinks that if i give  knight water from well 6 or 7, knight would die for sure. So he would  get water from well 6 or 7 for knight.&lt;br /&gt;&lt;br /&gt;Knight knew that no matter from which well he gives the water, dragon  will go and drink from well 7 and live. So he got normal water for  dragon and before duel drank water from well 1. &lt;br /&gt;&lt;br /&gt;When they exchanged glasses and drank water, dragon rushed to well 7 and  drank poison from it, thinking that it would cure the poison he just  drank (but he drank normal water), so dragon died. Knight on the other  hand already had poison from well 1 so what dragon gave him effectively  cured him. So he lived.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;comments if you have any other answers..&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-152134351509815130?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/152134351509815130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=152134351509815130' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/152134351509815130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/152134351509815130'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/dragon-and-knight-trilogy-interview.html' title='Dragon and Knight - Trilogy interview puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/TF6PBAN2NrI/AAAAAAAAAIg/8hIPuoj7ZkQ/s72-c/the-dragon-knight-fantasy.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-4717128346480094687</id><published>2010-08-08T03:51:00.000-07:00</published><updated>2010-08-08T03:51:21.795-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Blue-eyed Samurais'/><title type='text'>Blue-eyed Samurais Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TF6LpNZi8AI/AAAAAAAAAIY/Dir3un6BHHQ/s1600/Amazonian_tribe_1_674859c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TF6LpNZi8AI/AAAAAAAAAIY/Dir3un6BHHQ/s320/Amazonian_tribe_1_674859c.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A remote island contains a tribe whose members have either blue or brown eyes. Tribe members do not know the color of their eyes and if they learn it, they must kill themselves the same night. Every member of the tribe always behaves logically. So one day, a sailor visits the island and makes an observation that at least one of the members of the tribe has blue eyes. On the 10th night after that, all people with blue eyes kill themselves. How many blue-eyed people were there in the tribe?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&lt;b&gt;&lt;span style="font-size: large;"&gt;Solution :&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ten. The logic goes as follows. If there were only one person with blue eyes on the island, then he would see that no one else has blue eyes and will kill himself on the first night. If there were two people with blue eyes, then one of the people with blue eyes would see that the second blue-eyed person did not kill himself on the first night, leading him to conclude that since he sees no one else with blue eyes, he must be one of them and will kill himself on the second night. The other blue-eyed person will follow the same logic and also kill himself on the second night. The same idea applies to the rest of the problem.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Comments if you have any other answers &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-4717128346480094687?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/4717128346480094687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=4717128346480094687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/4717128346480094687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/4717128346480094687'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/blue-eyed-samurais-puzzle.html' title='Blue-eyed Samurais Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/TF6LpNZi8AI/AAAAAAAAAIY/Dir3un6BHHQ/s72-c/Amazonian_tribe_1_674859c.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-2290208987544493674</id><published>2010-08-06T11:28:00.000-07:00</published><updated>2010-08-06T11:28:52.734-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Image puzzles'/><title type='text'>Image Puzzles with Answers</title><content type='html'>Puzzle Images&lt;br /&gt;&lt;br /&gt;1.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxUC454UQI/AAAAAAAAAIQ/WUbf3juyWak/s1600/5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="73" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxUC454UQI/AAAAAAAAAIQ/WUbf3juyWak/s400/5.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;2.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxUAGs6IOI/AAAAAAAAAH4/MrvlhwnrHnQ/s1600/2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="66" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxUAGs6IOI/AAAAAAAAAH4/MrvlhwnrHnQ/s400/2.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;3.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxUBJMCNTI/AAAAAAAAAIA/3auCsxRyUak/s1600/3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="73" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxUBJMCNTI/AAAAAAAAAIA/3auCsxRyUak/s400/3.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;4.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxUB_4bcBI/AAAAAAAAAII/subs33wjHfc/s1600/4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="73" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxUB_4bcBI/AAAAAAAAAII/subs33wjHfc/s400/4.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;5.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxUC454UQI/AAAAAAAAAIQ/WUbf3juyWak/s1600/5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="73" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxUC454UQI/AAAAAAAAAIQ/WUbf3juyWak/s400/5.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-2290208987544493674?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/2290208987544493674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=2290208987544493674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2290208987544493674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2290208987544493674'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/image-puzzles-with-answers.html' title='Image Puzzles with Answers'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxUC454UQI/AAAAAAAAAIQ/WUbf3juyWak/s72-c/5.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7721172728684826599</id><published>2010-08-06T11:07:00.000-07:00</published><updated>2010-08-06T11:07:25.361-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Puzzle'/><category scheme='http://www.blogger.com/atom/ns#' term='Infosys puzzles'/><title type='text'>Infosys Interview puzzles with answers</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Logical Puzzles &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1.&amp;nbsp; A clock with the hours round the face in Roman block numbers, as illustrated in the sketch fell down and the dial broke into four parts. The numerals in each part in every case summed to a total of 20. Can you show how the four parts of the clock face was broken?&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOYdybXSI/AAAAAAAAAGo/i5C7_7wF1I4/s1600/1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOYdybXSI/AAAAAAAAAGo/i5C7_7wF1I4/s320/1.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;2. Shown in the sketch are 6 matches. Can you rearrange them to make nothing? &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxOZPDryAI/AAAAAAAAAGw/AfLK_cIRc9o/s1600/2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxOZPDryAI/AAAAAAAAAGw/AfLK_cIRc9o/s320/2.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3.&amp;nbsp; Here is a sketch: Can you rearrange the position of the numbers 1 to 10 so that the sum of any two adjacent numbers is equal to the sum of the pair of numbers at the opposite ends of the diameter?&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxOZ07DHWI/AAAAAAAAAG4/rRdxiJVoF9c/s1600/3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxOZ07DHWI/AAAAAAAAAG4/rRdxiJVoF9c/s320/3.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;4. Can you place 10 coins in such a way that they lie in 5 straight lines and on each line there are 4 coins. There are at least two solutions.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;5. Nine dots are arranged by 3 rows of 3 in the form of a square as shown in the sketch below:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxOaprodoI/AAAAAAAAAHA/pffXhcRmMdk/s1600/5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxOaprodoI/AAAAAAAAAHA/pffXhcRmMdk/s320/5.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Can you draw 4 straight lines, the second beginning where the first ends, the third beginning where the second ends and the fourth beginning where the third ends so that each dot is or at least one line?&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Answers&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;1.&amp;nbsp;&amp;nbsp; &lt;span id="goog_697837821"&gt;&lt;/span&gt;&lt;span id="goog_697837822"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxObcjm9QI/AAAAAAAAAHI/hbfGtP_Qf_w/s1600/11.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TFxObcjm9QI/AAAAAAAAAHI/hbfGtP_Qf_w/s320/11.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;2.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxOcFyilrI/AAAAAAAAAHQ/bEbXvBkf1Bw/s1600/21.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TFxOcFyilrI/AAAAAAAAAHQ/bEbXvBkf1Bw/s320/21.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;3.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOc3rFx2I/AAAAAAAAAHY/Vvb-LE3NNL8/s1600/31.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOc3rFx2I/AAAAAAAAAHY/Vvb-LE3NNL8/s320/31.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;4.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOd2MFGoI/AAAAAAAAAHg/VWcWRnseJ0Y/s1600/41.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOd2MFGoI/AAAAAAAAAHg/VWcWRnseJ0Y/s320/41.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;5.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOeaLLs_I/AAAAAAAAAHo/XfvCdtARLek/s1600/51.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOeaLLs_I/AAAAAAAAAHo/XfvCdtARLek/s320/51.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7721172728684826599?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7721172728684826599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7721172728684826599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7721172728684826599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7721172728684826599'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/08/infosys-interview-puzzles-with-answers.html' title='Infosys Interview puzzles with answers'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/TFxOYdybXSI/AAAAAAAAAGo/i5C7_7wF1I4/s72-c/1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1443280641883601941</id><published>2010-07-22T23:39:00.000-07:00</published><updated>2010-07-22T23:39:28.029-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Egg puzzle'/><title type='text'>Old Lady and her Eggs - Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TEk5F6foFRI/AAAAAAAAAGg/9DAdeuqfdFo/s1600/eggs_0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hw="true" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TEk5F6foFRI/AAAAAAAAAGg/9DAdeuqfdFo/s320/eggs_0.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;Old Lady and her Eggs&lt;/strong&gt; &lt;/span&gt;- Puzzle&lt;br /&gt;&lt;br /&gt;This puzzle can be solved based on simple math tactics.. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Puzzle&lt;/strong&gt; : &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Once upon a time,&amp;nbsp;There was an old lady has more number of eggs. She went to sell her vast quantity of eggs at the local market.&lt;br /&gt;When a small boy asked how many she had, she replied:&lt;br /&gt;Son, I can't count past 100 but I know that.&lt;br /&gt;If you divide the number of eggs by 2 there will be one egg left.&lt;br /&gt;If you divide the number of eggs by 3 there will be one egg left.&lt;br /&gt;If you divide the number of eggs by 4 there will be one egg left.&lt;br /&gt;If you divide the number of eggs by 5 there will be one egg left.&lt;br /&gt;If you divide the number of eggs by 6 there will be one egg left.&lt;br /&gt;If you divide the number of eggs by 7 there will be one egg left&lt;br /&gt;If you divide the number of eggs by 8 there will be one egg left.&lt;br /&gt;If you divide the number of eggs by 9 there will be one egg left.&lt;br /&gt;If you divide the number of eggs by 10 there will be one egg left.&lt;br /&gt;Finally. If you divide the Number of eggs by 11 there will be NO EGGS left.&lt;br /&gt;How many eggs did the old lady have?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1443280641883601941?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1443280641883601941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1443280641883601941' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1443280641883601941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1443280641883601941'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/07/old-lady-and-her-eggs-puzzle.html' title='Old Lady and her Eggs - Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/TEk5F6foFRI/AAAAAAAAAGg/9DAdeuqfdFo/s72-c/eggs_0.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-5518871210063972556</id><published>2010-07-16T23:01:00.000-07:00</published><updated>2010-07-16T23:03:12.966-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Einstein’s Riddle'/><title type='text'>Einstein’s Riddle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TEFGx-bMy_I/AAAAAAAAAGY/DU_mvdgSjZc/s1600/431322-54med.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hw="true" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TEFGx-bMy_I/AAAAAAAAAGY/DU_mvdgSjZc/s320/431322-54med.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Einstein's Riddle - Interview puzzles&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Einstein said that only 2% of the world could solve this problem. There are 5 houses in 5 different colors. In each house lives a person with a different nationality. The 5 owners drink a certain type of beverage, smoke a certain brand of cigar, and keep a certain pet. No owners have the same pet, smoke the same brand of cigar, or drink the same beverage. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Hints:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;· The Brit lives in the red house.&lt;br /&gt;· The Swede keeps dogs as pets.&lt;br /&gt;· The Dane drinks tea.&lt;br /&gt;· The green house is on the left of the white house.&lt;br /&gt;· The green homeowner drinks coffee.&lt;br /&gt;· The person who smokes Pall Mall rears birds.&lt;br /&gt;· The owner of the yellow house smokes Dunhill.&lt;br /&gt;· The man living in the center house drinks milk.&lt;br /&gt;· The Norwegian lives in the first house.&lt;br /&gt;· The man who smokes Blend lives next to the one who keeps cats.&lt;br /&gt;· The man who keeps the horse lives next to the man who smokes Dunhill.&lt;br /&gt;· The owner who smokes Bluemaster drinks beer.&lt;br /&gt;· The German smokes prince.&lt;br /&gt;· The Norwegian lives next to the blue house.&lt;br /&gt;· The man who smokes Blend has a neighbor who drinks water.&lt;br /&gt;Who owns the fish?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-5518871210063972556?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/5518871210063972556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=5518871210063972556' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5518871210063972556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5518871210063972556'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/07/einsteins-riddle.html' title='Einstein’s Riddle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/TEFGx-bMy_I/AAAAAAAAAGY/DU_mvdgSjZc/s72-c/431322-54med.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7746944585492329172</id><published>2010-07-08T04:24:00.000-07:00</published><updated>2010-07-08T04:24:53.436-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Image puzzles'/><title type='text'>Image puzzles with Answers - II</title><content type='html'>&lt;strong&gt;&lt;span style="font-size: large;"&gt;Image puzzles with Answers&lt;/span&gt;&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This puzzles are based on the images we need to find out the phrase. It shows the our identification based on the images. This is same as like the puzzles available in &lt;a href="http://interviewpuzzle.blogspot.com/2010/05/image-puzzles-with-answers.html"&gt;Image puzzles with Answers&lt;/a&gt;. The images are given below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/TDWz4oKa2-I/AAAAAAAAAFw/hkS1Z00kOlU/s1600/1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="104" rw="true" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/TDWz4oKa2-I/AAAAAAAAAFw/hkS1Z00kOlU/s640/1.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;2.&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/TDWz5Ob44aI/AAAAAAAAAF4/hUOQOQ8VgG0/s1600/2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="110" rw="true" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/TDWz5Ob44aI/AAAAAAAAAF4/hUOQOQ8VgG0/s640/2.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;3.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TDWz6vfXrJI/AAAAAAAAAGA/B0NNB3JLOdk/s1600/3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="110" rw="true" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TDWz6vfXrJI/AAAAAAAAAGA/B0NNB3JLOdk/s640/3.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;4.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/TDWz7SECb7I/AAAAAAAAAGI/o4pf_KkpdXE/s1600/4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="116" rw="true" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/TDWz7SECb7I/AAAAAAAAAGI/o4pf_KkpdXE/s640/4.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;5.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TDWz8NwWXmI/AAAAAAAAAGQ/YKIk3CIUazc/s1600/5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" rw="true" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TDWz8NwWXmI/AAAAAAAAAGQ/YKIk3CIUazc/s640/5.PNG" width="596" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Answers :&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; A)&amp;nbsp; An outside chance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b)&amp;nbsp;&amp;nbsp; Go for it&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c)&amp;nbsp; Highway Overpass&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; A)&amp;nbsp; Foreign Language&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b)&amp;nbsp;&amp;nbsp; Who’s in charge&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c)&amp;nbsp; Neon Lights&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; A)&amp;nbsp; I’m bigger than you&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b)&amp;nbsp; Platinum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c)&amp;nbsp;&amp;nbsp;Break in Custom&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;4.&amp;nbsp;&amp;nbsp; A) Ill in bed&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b)&amp;nbsp; Safety in Numbers&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c)&amp;nbsp; Read between the lines&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp;A)&amp;nbsp; Tip-toe through the tulips b)&amp;nbsp; Alice in Wonderland&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c) Merry go round&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7746944585492329172?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7746944585492329172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7746944585492329172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7746944585492329172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7746944585492329172'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/07/image-puzzles-with-answers-ii.html' title='Image puzzles with Answers - II'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/TDWz4oKa2-I/AAAAAAAAAFw/hkS1Z00kOlU/s72-c/1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1432550743201245721</id><published>2010-07-06T05:28:00.000-07:00</published><updated>2010-07-06T05:28:10.123-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Infosys puzzles'/><title type='text'>Infosys interview Puzzles with Answers</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Infosys interview puzzles with Answers&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 1&lt;/strong&gt; : &amp;nbsp;9 cards are there. u have to arrange them in a 3*3 matrix. cards are of 4 colors.they are red,yellow,blue,green. conditions for arrangement: one red card must be in first row or second row.2 green cards should be in 3rd column. Yellow cards must be in the 3 corners only. Two blue cards must be in the 2nd row. Atleast one green card in each row.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer&amp;nbsp;:&lt;/strong&gt; &lt;/div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yello&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Red&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Green&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Blue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Blue &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Green&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yellow Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yellow&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 2 :&lt;/strong&gt;&amp;nbsp;&amp;nbsp; In a soap company a soap is manufactured with 11 parts. For making one soap you will get 1 part as scrap. At the end of the day u have 251 such scraps. From that how many soaps can be manufactured?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt;&amp;nbsp; 22 + 2+ 1 = 25.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 3 :&lt;/strong&gt; There are five thieves, each loot a bakery one after the other such that the first one takes 1/2 of the total no. of the breads plus 1/2 of a bread. Similarly 2nd, 3rd,4th and 5fth also did the same. After the fifth one no. of breads remained are 3. Initially how many breads were there?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt;&amp;nbsp; 31&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 4 :&lt;/strong&gt; Two candles of equal lengths and of different thickness are there. The thicker one will last of six hours. The thinner 2 hours less than the thicker one. Ramesh light the two candles at the same time. When he went to bed he saw the thicker one is twice the length of the thinner one. For how long did Ramesh lit two candles .&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer &lt;/strong&gt;: 3 hours&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 5&lt;/strong&gt; : There are 5 persons who have won top 5 places in an event Olympics one of them asks all the 5 regarding their positions they reply as a: I am not the last b: c is in third place c: e is behind a d: b is in 1st place e: d is not the first find positions in order. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer&amp;nbsp; &lt;/strong&gt;:&amp;nbsp; bdcae&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 6&lt;/strong&gt; :&amp;nbsp; If one tyre of a car suddenly gets stolen…. and after sometime u find the tyre without the screws how will u make ur journey complete? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt; Open 3 screws, 1 from each tyre and fix the tyre.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 7&lt;/strong&gt; : How will you recognize the magnet &amp;amp; magnetic material &amp;amp; non-magnetic material?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer&lt;/strong&gt; : Drag one piece of material over another. There is no attractive force in the middle portion of the magnet. OR Get a piece of thread and tie up with the one bar and check for poles. If it iron bar then it moves freely and if it is magnetic bar then it fix in one direction according to poles.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 8&lt;/strong&gt; : You are given a cake; one of its corner is broken. How will u cut the rest into Two equal parts?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer &lt;/strong&gt;:&amp;nbsp; Slice the cake&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Puzzle 9&lt;/strong&gt; : What is the height of room if after entering the room with a watch ur head strikes a hanging bulb?&lt;br /&gt;&lt;strong&gt;Answer&lt;/strong&gt;: Oscillate the hanging bulb. Calculate the time period for one complete oscillation by Simple Harmonic Motion (SHM) of the handing bulb. Put it in the&lt;br /&gt;formula T=2 * 3.14 * (L/G)^1/2&lt;br /&gt;&lt;br /&gt;L will be the length of the hanging thread.&lt;br /&gt;Add the L with ur height to get the height of the room.&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;Drop it from the room and find the time at which it strikes the floor. Using physics formula s = (at^2)/2 (IM NOT SURE ABOUT THIS ONE)&lt;br /&gt;&lt;strong&gt;Puzzle&amp;nbsp;10 :&lt;/strong&gt; Can u make 120 with 5 zeros?&lt;br /&gt;&lt;strong&gt;Answer :&lt;/strong&gt;&amp;nbsp; Factorial (factorial (0)+factorial (0)+factorial (0)+factorial (0)+factorial (0)) = 120&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Puzzle 11&lt;/strong&gt; : &amp;nbsp;There are three people A, B, C. Liars are of same type and Truth speaking people are of same type. Find out who is speaking truth and who is speaking false from the following statements:&lt;br /&gt;&lt;br /&gt;a) A says: B is a liar.&lt;br /&gt;b) B says: A and C are of same type.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer &lt;/strong&gt;: lets assume A is speaking truth. It means B is a liar then it means A and C are not of same type.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 12 :&lt;/strong&gt; Ann, Boobie, Cathy and Dave are at their monthly business meeting.&amp;nbsp; Their occupations are author, biologist, chemist and doctor, but not&amp;nbsp; necessarily in that order.&amp;nbsp; Dave just told the biologist that Cathy was on her way with doughnuts.&amp;nbsp; Ann is sitting across from the doctor and next to the chemist. The&amp;nbsp; doctor was thinking that Boobie was a goofy name for parent's to choose,but didn't say anything. What is each person's occupation? &lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer:&lt;/strong&gt;&amp;nbsp; Since Dave spoke to the biologist and Ann sat next to the chemist and across the doctor, Cathy must be the author and Ann the biologist. The doctor didn't speak, but David did, so Bobbie is the doctor and Dave the chemist. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1432550743201245721?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1432550743201245721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1432550743201245721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1432550743201245721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1432550743201245721'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/07/infosys-interview-puzzles-with-answers.html' title='Infosys interview Puzzles with Answers'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1779639115643696202</id><published>2010-06-28T06:29:00.000-07:00</published><updated>2010-06-28T06:29:21.386-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lateral Thinking Puzzles'/><title type='text'>Paul Sloane's list of Classic Lateral Thinking Puzzles with Answers</title><content type='html'>&lt;strong&gt;&lt;span style="font-size: large;"&gt;The Puzzles&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Puzzle 1. The man in the Elevator&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;A man lives on the tenth floor of a building. Every day he takes the elevator to go down to the ground floor to go to work or to go shopping. When he returns he takes the elevator to the seventh floor and walks up the stairs to reach his apartment on the tenth floor. He hates walking so why does he do it? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This is probably the best known and most celebrated of all lateral thinking puzzles. It is a true classic. Although there are many possible solutions which fit the initial conditions, only the canonical answer is truly satisfying.&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Answer &lt;/strong&gt;: The man is (of course) a dwarf. Variants of this puzzle include the clue that on rainy days he goes up in the elevator to the tenth floor (he uses his umbrella!) &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Puzzle 2. The Man in the Bar&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;A man walks into a bar and asks the barman for a glass of water. The barman pulls out a gun and points it at the man. The man says 'Thank you' and walks out. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This puzzle has claims to be the best of the genre. It is simple in its statement, absolutely baffling and yet with a completely satisfying solution. Most people struggle very hard to solve this one yet they like the answer when they hear it or have the satisfaction of figuring it out. &lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;strong&gt;Answer :&lt;/strong&gt; The man had hiccups. The barman recognized this from his speech and drew the gun in order to give him a shock. It worked and cured the hiccups - so the man no longer needed the water. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The is a simple puzzle to state but a difficult one to solve. It is a perfect example of a seemingly irrational and incongruous situation having a simple and complete explanation. Amazingly this classic puzzle seems to work in different cultures and languages. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Puzzle 3. The Man who Hanged Himself&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Not far from Madrid, there is a large wooden barn. The barn is completely empty except for a dead man hanging from the middle of the central rafter. The rope around his neck is ten feet long and his feet are three feet off the ground. The nearest wall is 20 feet away from the man. It is not possible to climb up the walls or along the rafters. The man hanged himself. How did he do it? &lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Answer :&lt;/strong&gt; He climbed on a block of ice which has since melted. &lt;br /&gt;This one is often stated with the clue of a puddle of water, but surely this is too much assistance. It is one of several problems which depend on the change of state of water (snow or ice to water or steam). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Puzzle 4. Death in a Field&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;A man is lying dead in a field. Next to him there is an unopened package. There is no other creature in the field. How did he die? &lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt;&amp;nbsp;&amp;nbsp; The man had jumped from a plane but his parachute had failed to open. It is the unopened package. This is sometimes given with the following rather elegant clue - as he approached the centre of the field he knew he was going to die. This is another of the top classics which is right up there with 'The Man in the Bar'. If the solver is thinking along the wrong lines (i.e. in the two dimensions of the ground) then the lateral jump to the third dimension can be tough to make. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Puzzle 5. Anthony and Cleopatra&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Anthony and Cleopatra are lying dead on the floor of a villa in Egypt. Nearby is a broken bowl. There is no mark on either of their bodies and they were not poisoned. How did they die? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt;&amp;nbsp; Anthony and Cleopatra were goldfish whose bowl was knocked over by a clumsy dog.&amp;nbsp; This is one of a set of puzzles which deceive by using human names for animals. This is not a very satisfactory basis for a good puzzle but despite that, the puzzle has enduring popularity. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Puzzle 6. The Coal, Carrot and Scarf&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Five pieces of coal, a carrot and a scarf are lying on the lawn. Nobody put them on the lawn but there is a perfectly logical reason why they should be there. What is it? &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer :&lt;/strong&gt; They were used by children who made a snowman. The snow has now melted.&amp;nbsp; Another change of state puzzle. After this you should be on the look-out for them! &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 7. Trouble with Sons&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A woman had two sons who were born on the same hour of the same day of the same year. But they were not twins. How could this be so? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt; They were two of a set of triplets (or quadruplets etc.)&amp;nbsp; This simple little puzzle stumps many people. They try outlandish solutions involving test-tube babies or surrogate mothers. Why does the brain search for complex solutions when there is a much simpler one available? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle&amp;nbsp; 8. Push that Car&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A man pushed his car. He stopped when he reached a hotel at which point he knew he was bankrupt. Why? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Answer : He was playing Monopoly. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 9. The Arm of the Postal Service&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;One day a man received a parcel in the post. Carefully packed inside was a human arm. He examined it, repacked it and then sent it on to another man. The second man also carefully examined the arm before taking it to the woods and burying it. Why did they do this? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;This one probably has more variations than any other. A great one to puzzle out. It requires plenty of good questions. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt; The three men had been stranded on a desert island. Desperate for food, they had agreed to amputate their left arms in order to eat them. They swore an oath that each would have his left arm cut off. One of them was a doctor and he cut the arms off his two companions. They were then rescued. But his oath was still binding so he later had to have his arm amputated and sent to his colleagues. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;This is often told with a further twist whereby a doctor pays a tramp a large sum in order to amputate the tramp's arm which the doctor then sends to another man who inspects it etc. This variation can make for a long night of questioning! &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle 10. Heaven&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A man died and went to Heaven. There were thousands of other people there. They were all naked and all looked as they did at the age of 21. He looked around to see if there was anyone he recognised. He saw a couple and he knew immediately that they were Adam and Eve. How did he know? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt; He recognized Adam and Eve as the only people without navels. Because they were not born of women, they had never had umbilical cords and therefore they never had navels.&amp;nbsp; This one seems perfectly logical but it can sometimes spark fierce theological arguments! &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1779639115643696202?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1779639115643696202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1779639115643696202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1779639115643696202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1779639115643696202'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/06/paul-sloanes-list-of-classic-lateral.html' title='Paul Sloane&apos;s list of Classic Lateral Thinking Puzzles with Answers'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-8675648774170177222</id><published>2010-06-25T05:08:00.000-07:00</published><updated>2010-06-29T04:44:50.077-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mice puzzle'/><title type='text'>Mice Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/TCSbsrdotBI/AAAAAAAAAFo/Nkk6gLbEXkY/s1600/Mice.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="258" ru="true" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/TCSbsrdotBI/AAAAAAAAAFo/Nkk6gLbEXkY/s400/Mice.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;Mice Puzzle :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Do you Know Mice can multiply very fast… This puzzle based on the Mice multiplication. Consider an Adult mice can give birth once every month.&amp;nbsp;The baby mice grow into adult mice in just two months after they are also born. This is the condition for this puzzle. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Puzzle Question:&lt;/strong&gt; If you would buy a baby mouse just after it was born, how many mice would you have in 10 months?&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Answer : &lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Only One. You cannot have more mice if you start with one!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-8675648774170177222?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/8675648774170177222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=8675648774170177222' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/8675648774170177222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/8675648774170177222'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/06/mice-puzzle.html' title='Mice Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/TCSbsrdotBI/AAAAAAAAAFo/Nkk6gLbEXkY/s72-c/Mice.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-687646182008241106</id><published>2010-06-21T22:22:00.000-07:00</published><updated>2010-06-21T22:22:43.554-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google Interview puzzles'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Puzzle'/><category scheme='http://www.blogger.com/atom/ns#' term='2 Egg Puzzle Secrets'/><title type='text'>2 Egg Puzzle Secrets</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TCBC_g3ZOTI/AAAAAAAAAFg/ZZGZPESpiZM/s1600/egg.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" ru="true" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TCBC_g3ZOTI/AAAAAAAAAFg/ZZGZPESpiZM/s200/egg.gif" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;2 Egg Puzzle&lt;/span&gt;&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is another 2 egg puzzle same as like &lt;a href="http://interviewpuzzle.blogspot.com/2010/03/google-interview-puzzle-2-egg-problem.html"&gt;2 egg puzzle&lt;/a&gt; asked by google. Here the number of storey is different instead of 100 storey it is 36. The puzzle is given as &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Suppose that we wish to know which windows in a 36-story building are safe to drop eggs from, and which will cause the eggs to break on landing. We make a few assumptions: &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;An egg that survives a fall can be used again. &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;A broken egg must be discarded. &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;The effect of a fall is the same for all eggs.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;If an egg breaks when dropped, then it would break if dropped from a higher window. &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;If an egg survives a fall then it would survive a shorter fall. &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;It is not ruled out that the first-floor windows break eggs, nor is it ruled out that the 36th-floor windows do not cause an egg to break. &lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If only one egg is available and we wish to be sure of obtaining the right result, the experiment can be carried out in only one way. Drop the egg from the first-floor window; if it survives, drop it from the second floor window. Continue upward until it breaks. In the worst case, this method may require 36 droppings. Suppose 2 eggs are available. What is the least number of egg-droppings that is guaranteed to work in all cases?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Solution :&lt;/span&gt;&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The number of drop required is 8.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;First i have to start dropping the egg on 8th floor, if not breaks, then 15th floor, if not breaks 21st floor...&lt;/div&gt;&lt;div style="text-align: justify;"&gt;the series goes like this...&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8,15,21,26,30,33,35,36...&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;i.e (8), (8+7), (8+7+6), (8+7+6+5), ....(8+7+6+5+4+3+2+1)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;so in general,&lt;/div&gt;&lt;div style="text-align: justify;"&gt;the minimum value of N such that, &lt;/div&gt;&lt;div style="text-align: justify;"&gt;n(n+1)/2 &amp;gt;=36&lt;/div&gt;&lt;div style="text-align: justify;"&gt;so n= 8.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;let us assume it breaks in 20th floor...&lt;/div&gt;&lt;div style="text-align: justify;"&gt;put down from 8 th floor - will NOT be broken&lt;/div&gt;&lt;div style="text-align: justify;"&gt;put down from 15th floor - will NOT be broken&lt;/div&gt;&lt;div style="text-align: justify;"&gt;put down from 21st floor - it will be broken.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;then u have one egg remaining.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;start putting from 16th floor.. ie.. 16, 17,18,19, 20&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19th floor it will not be broken and&lt;/div&gt;&lt;div style="text-align: justify;"&gt;at 20th floor it will be broken.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;even for the worst case scenario the maximum number of droppings required is 8.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;so the answer is 8! &lt;/div&gt;&lt;br /&gt;Moshe Sniedovich from Department of Mathematics and Statistics, The University of Melbourne Parkville, Australia placed a paper in journal regarding this 2 egg problem. This is famous among math teachers. &lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;According to&amp;nbsp;that paper&amp;nbsp;they proposed the problem , problem introduction , Problem analysis Best case secnario , worst case secnario etc..&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Famous 2-egg puzzle from an OR/MS perspective and explore the structure of the optimal policies for this puzzle. It is shown that the puzzle provides a vivid environment for teaching/learning basic concepts related to decision making under uncertainty, including the differences and similarities between the Worst Case and Expected Value scenarios. The more general problem where N test eggs -rather than 2- are provided is also examined. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;In that paper the proposed solution for 2 egg with N storey buildings they also solved the problem for N egg for N story building in appendix. All the solution are math oriented. &lt;a href="http://archive.ite.journal.informs.org/Vol4No1/Sniedovich/Sniedovich.pdf"&gt;Click here&lt;/a&gt; to download the paper as pdf. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-687646182008241106?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/687646182008241106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=687646182008241106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/687646182008241106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/687646182008241106'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/06/2-egg-puzzle-secrets.html' title='2 Egg Puzzle Secrets'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pxUNdWyjHeo/TCBC_g3ZOTI/AAAAAAAAAFg/ZZGZPESpiZM/s72-c/egg.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1772746964708995467</id><published>2010-06-21T02:41:00.000-07:00</published><updated>2010-06-21T21:35:12.968-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Family and Dogs Puzzle'/><title type='text'>Family and Dogs Puzzle</title><content type='html'>&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/TCA8ezq-K4I/AAAAAAAAAFY/6JpxiIEzrSs/s1600/10_Amanda_and_Kate_walking_five_dogs.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="292" ru="true" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/TCA8ezq-K4I/AAAAAAAAAFY/6JpxiIEzrSs/s400/10_Amanda_and_Kate_walking_five_dogs.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Family and Dogs Puzzle :&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Consider&amp;nbsp;there are five&amp;nbsp;families&amp;nbsp;and their five dogs (each family member owned one of the dogs) were hiking when they encountered a river to cross. They rented a boat which could hold three living things people or dogs. Unfortunately, the dogs were tempermental: each was comfortable only with its owner and could not be near another (not even momentarily) unless its owner was present. Dogs could be with other dogs however. The crossing would have been impossible except that Lisa’s dog had attended a first-rate obedience school and knew how ro operate the boat. No other dogs were that well-educated. How was the crossing arranged and how many trips did it take?&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Solution is somewhat similar to &lt;a href="http://interviewpuzzle.blogspot.com/2010/06/river-and-boat-puzzle.html"&gt;River puzzle&lt;/a&gt; which is already present in this blog. Try to find&amp;nbsp;and &amp;nbsp;Comment your answers...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1772746964708995467?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1772746964708995467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1772746964708995467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1772746964708995467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1772746964708995467'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/06/river-and-boat-puzzle.html' title='Family and Dogs Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/TCA8ezq-K4I/AAAAAAAAAFY/6JpxiIEzrSs/s72-c/10_Amanda_and_Kate_walking_five_dogs.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7677790112626382521</id><published>2010-06-13T22:51:00.000-07:00</published><updated>2010-06-21T02:29:21.868-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Riddles'/><title type='text'>Interview Riddles</title><content type='html'>&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; These questions are riddles. What do you do if you get this type of question? First, assess what quality the interviewer is looking for. Secondly, decide whether or not you want to work for a company who’s famous at throwing you tricks. Some companies will ask you these kinds of questions to see if you’re prepared to handle off-the-wall kinds of questions and answers you may get when on the job. They also might want to assess how quickly you are on your feet. Or, they may want to see how you go through a line of thinking.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Frequently Asked famous Interview Riddles :&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. You wake up one morning and there’s been a power outage. You know you have 12 black socks and 8 blue ones. How many socks do you need to pull out before you’ve got a match?&lt;/div&gt;&lt;br /&gt;2. Why are manhole covers round?&lt;br /&gt;&lt;br /&gt;3. You’re trying to get to Truthtown. You come to a fork in the road. One road leads to Truthtown (where everyone tells the truth), the other to Liartown (where everyone lies). At the fork in the road is a man from one of those towns -- but which one? You get to ask him one question to discover the way. What’s the question?&lt;br /&gt;&lt;br /&gt;4. How many cubes are at the center of a Rubik’s Cube?&lt;br /&gt;&lt;br /&gt;5. You have two containers, one holds five gallons, the other holds three. You can have as much water as you want. Measure exactly four gallons of water into the five gallon container.&lt;br /&gt;&lt;br /&gt;6. The government is building a highway through your neighborhood and you’re forced to sell your home. How do you arrive at your asking price?&lt;br /&gt;&lt;br /&gt;7. There are eight balls, one of which is slightly heavier than the others. You have a two-armed scale, which you are allowed to use only twice. Find the ball that’s heavier.&lt;br /&gt;&lt;br /&gt;8. Calculate the number of degrees between the hour hand and the minute hand of a clock (nondigital) that reads 3:15.&lt;br /&gt;&lt;br /&gt;9. How many barbers are there in Chicago?&lt;br /&gt;&lt;br /&gt;10. You are in solitary confinement. It is Friday afternoon and you absolutely must have a cigarette. The only person who can give you one is the guard outside your cell. What do you do?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Interview Riddles - Answers&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. Pick three -- there are only two colors.&lt;br /&gt;&lt;br /&gt;2. Manhole covers are round so that they don’t fall into the manholes.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;3. To find the way to Truthtown, ask the man, “Which way is your hometown?” Then, go whichever way he points: If he’s from Liartown, he’ll point to Truthtown, and if he’s from Truthtown, he’ll point to Truthtown.&lt;/div&gt;&lt;br /&gt;4. There is only one cube at the center of a Rubik’s Cube.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;5. Fill up the three-gallon container and pour it into the five-gallon container. Do it again -- there will be one gallon left in the three-gallon container. Empty the five, pour in the one, fill the three again and pour it into the firve-gallon container -- you have four!&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;/div&gt;6. Calculate the price of your home using conventional valuation methods - but remember to throw in the&amp;nbsp; value you attach to your memories for however long you’ve lived there.&lt;br /&gt;&lt;br /&gt;7. Put three balls on each side of the scale. If the arms are equal, you know the heavy ball is one of the two remaining. If the arms are unequal, take the three balls on the heavier side, pick two and weigh them against each other.&lt;br /&gt;&lt;br /&gt;8. The hour hand will have moved one-fourth of an hour; therefore, there will be 7.5 degrees between the two hands.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;9. The variables you’ll want to consider are the population of Chicago and the percentage that’s&amp;nbsp; male; the number of haircuts the average male has per year divided by the number of days in the year, taking into account the number of days per year baber shops are open; and the number of haircuts an average barber can give per day. At the time of writing this up, there are 550 barber shops in Chicago; 6273 active barbers in Illinois; with 66% of the state’s population, Chicago has roughly 4140 barbers.&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;10. To get the guard to give you a cigarette (and this really is the preferred answer to this question), threaten to kill yourself by smashing your head against the wall of your cell. That gives you leverage with the guard - he’d be tied up by doing paperwork about your suicide, so he’d miss weekend time with his family (it’s Friday afternoon, remember?) -- so he’ll give you a cigarette.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7677790112626382521?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7677790112626382521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7677790112626382521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7677790112626382521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7677790112626382521'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/06/interview-riddles.html' title='Interview Riddles'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-2769375316400488978</id><published>2010-06-08T21:21:00.000-07:00</published><updated>2010-06-13T22:17:18.960-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MACHINE WEIGHING - Coin Puzzle'/><title type='text'>MACHINE WEIGHING - COIN Puzzle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TA8Wsl5GPoI/AAAAAAAAAFI/xvyW2ERU9Oc/s1600/splash_commem_coin_stack.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" qu="true" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TA8Wsl5GPoI/AAAAAAAAAFI/xvyW2ERU9Oc/s320/splash_commem_coin_stack.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;Coin Puzzle :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is another coin puzzle.&amp;nbsp; As per the puzzle you have 20 coin machines, each of which produce the same kind of coin. you know how much a coin is supposed to weigh. one of the machines is defective, in that every coin it produces weighs 1 ounce less than it is supposed to. you also have an electronic weighing machine. how can you determine which of the 20 machines is defective with only one weighing? (by one use, we mean you put a bunch of stuff on the machine and read a number, and that's it -- you not allowed to accumulate weight onto the machine and watch the numbers ascend, because that's just like multiple weighings). you are allowed to crank out as many coins from each machine as you like. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This puzzle is like another coins puzzle (&lt;a href="http://interviewpuzzle.blogspot.com/2010/03/microsoft-puzzle-box-of-defective-balls.html"&gt;Box of Defective balls&lt;/a&gt;...) But It's solution is somewhat different. In other coins puzzle you&amp;nbsp;can&amp;nbsp;weigh number of times. But here it is only once. Try to think differently and post&amp;nbsp;your answers..&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;Answer :&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In case of normal coin puzzle they ask number if times required to use the balance to find the answer. Here it is different. Here you can use only one time the balance.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The solution is to take the coins in the following order. Take one coin from the first machine, two coins from the second machine, three coin from the third mechine etc.. So that totally you can take &lt;br /&gt;(20 * (20+1) )/2 = 210 coins.&amp;nbsp;Lets consider each coins have 10 ounce weight except one machine coins. So totally you have 2100 ounce weight for 210 coins. If you weigh it now you can get less weight because one machine produces less weight. From the weight you can find the machine which produces less weight coins. Suppose the resultant weight is 2099 then the first machine is fault. If it is 2098 then second machine is fault. That is the fault machine number = 2100 -&amp;nbsp;Obtained weight from balance.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-2769375316400488978?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/2769375316400488978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=2769375316400488978' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2769375316400488978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2769375316400488978'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/06/machine-weighing-coin-puzzle.html' title='MACHINE WEIGHING - COIN Puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pxUNdWyjHeo/TA8Wsl5GPoI/AAAAAAAAAFI/xvyW2ERU9Oc/s72-c/splash_commem_coin_stack.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7326911068711371266</id><published>2010-06-05T01:06:00.000-07:00</published><updated>2010-06-05T01:12:21.237-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google Interview puzzles'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Puzzle'/><category scheme='http://www.blogger.com/atom/ns#' term='The warden and 23 prisoners'/><title type='text'>The Warden and 23 prisoners - Google interview puzzle</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/TAoFYpj71bI/AAAAAAAAAE4/6o_8dKntqsk/s1600/jail-cell.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/TAoFYpj71bI/AAAAAAAAAE4/6o_8dKntqsk/s400/jail-cell.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;The Warden and 23 prisoners&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle : &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;div class="problem" style="text-align: justify;"&gt;The warden meets with 23 new prisoners when they arrive. He tells them, "You may meet today and plan a strategy. But after today, you will be in isolated cells and will have no communication with one another.&amp;nbsp;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;"In the prison is a switch room, which contains two light switches labeled 1 and 2, each of which can be in either up or the down position. I am not telling you their present positions. The switches are not connected to anything.&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;"After today, from time to time whenever I feel so inclined, I will select one prisoner at random and escort him to the switch room. This prisoner will select one of the two switches and reverse its position. He must flip one switch when he visits the switch room, and may only flip one of the switches. Then he'll be led back to his cell. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;"No one else will be allowed to alter the switches until I lead the next prisoner into the switch room. I'm going to choose prisoners at random. I may choose the same guy three times in a row, or I may jump around and come back. I will not touch the switches, if I wanted you dead you would already be dead.&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;"Given enough time, everyone will eventually visit the switch room the same number of times as everyone else. At any time, anyone may declare to me, 'We have all visited the switch room.'&amp;nbsp;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;"If it is true, then you will all be set free. If it is false, and somebody has not yet visited the switch room, you will all die horribly. You will be carefully monitored, and any attempt to break any of these rules will result in instant death to all of you"&amp;nbsp;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div class="problem" style="text-align: justify;"&gt;What is the strategy they come up with so that they can be free?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Solution:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="solutions"&gt;The team nominates a leader. The group agrees upon the following rules:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="solutions"&gt;&amp;nbsp;&lt;/span&gt;                 &lt;/div&gt;&lt;div style="text-align: justify;"&gt;The leader is the only person who will announce that everyone has visited the switch room. All the prisoners (except for the leader) will flip the first switch up at their very first opportunity, and again on the second opportunity. If the first switch is already up, or they have already flipped the first switch up two times, they will then flip the second switch. Only the leader may flip the first switch down, if the first switch is already down, then the leader will flip the second switch. The leader remembers how many times he has flipped the first switch down. Once the leader has flipped the first switch down 44 times, he announces that all have visited the room.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                 &lt;/div&gt;&lt;div style="text-align: justify;"&gt;It does not matter how many times a prisoner has visited the room, in which order the prisoners were sent or even if the first switch was initially up. Once the leader has flipped the switch down 44 times then the leader knows everyone has visited the room. If the switch was initially down, then all 22 prisoners will flip the switch up twice. If the switch was initially up, then there will be one prisoner who only flips the switch up once and the rest will flip it up twice.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;                 &lt;/div&gt;&lt;div style="text-align: justify;"&gt;The prisoners can not be certain that all have visited the room after the leader flips the switch down 23 times, as the first 12 prisoners plus the leader might be taken to the room 24 times before anyone else is allowed into the room. Because the initial state of the switch might be up, the prisoners must flip the first switch up twice. If they decide to flip it up only once, the leader will not know if he should count to 22 or 23.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;                 &lt;/div&gt;&lt;div style="text-align: justify;"&gt;In the example of three prisoners, the leader must flip the first switch down three times to be sure all prisoners have visited the room, twice for the two other prisoners and once more in case the switch was initially up.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;!--hr&gt;               &lt;p class="problem-title"&gt;7 The Emperor - part deux&lt;/p&gt;&lt;p class="problem"&gt;You are the ruler of an empire and you are about              to have celebration tomorrow. The celebration is the most important              party you have ever hosted. You've got 1000 bottles of wine you were              planning to open for the celebration, but you find out that &lt;strong&gt;two&lt;/strong&gt; of              them are poisoned. &lt;/p&gt;&lt;p class="problem"&gt;The actual poison exhibits no symptoms until somewhere around the              23rd hour, then results in sudden death. &lt;/p&gt;&lt;p class="problem"&gt;You have thousands of prisoners at your disposal. &lt;/p&gt;&lt;p class="problem"&gt;What is the smallest number of prisoners you must              have to drink from the bottles to find the poisoned bottle?&lt;/p&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;                   &lt;td width="15" nowrap&gt;&amp;nbsp;&lt;/td&gt;                   &lt;td nowrap&gt;&lt;span class="nav"&gt;                     &lt;input type="text" name="wine2"&gt;                     &lt;input type="button" name="soln-7" value="Guess" onClick='var v=form.wine.value.toLowerCase(); if(v==20 || v =="twenty" )  Correct(this.name,v); else Incorrect(this.name,v);'&gt;               &lt;/span&gt;&lt;/td&gt;                   &lt;td width="15" nowrap&gt;&amp;nbsp;&lt;/td&gt;                   &lt;td nowrap&gt;&lt;a href="#" onClick="toggleFAQ('hint_7'); return false;"&gt;Show              Hint&lt;/a&gt;&lt;/td&gt;                   &lt;td width="15" nowrap&gt;&lt;/td&gt;                   &lt;td nowrap&gt;&lt;a href="#" onClick="toggleFAQ('soln_7'); return false;"&gt;Show Solution&lt;/a&gt;&lt;/td&gt;                 &lt;/tr&gt;&lt;/table&gt;&lt;div class="hint" id="hint_7" &gt;                  &lt;p&gt;&lt;span class="solution-hint-title"&gt;Hint: &lt;/span&gt;This puzzle is only twice as difficult as the first.&lt;span class="nav"&gt;                &lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="hint" id="soln_7" &gt;                  &lt;p&gt;&lt;span class="solution-hint-title"&gt;Answer: &lt;/span&gt;20.&lt;/p&gt;&lt;p&gt; Start off with the same solution as before. &lt;/p&gt;&lt;p&gt;Take the bottles of wine, and label them one through one thousand using binary code. If the first binary digit is a 1, then the first prisoner drinks from the bottle etc..&lt;/p&gt;&lt;p&gt;Now take the bottles of wine in the same order as before but this time label them from one thousand down to one using binary code. If the first binary digit in this second set of binary digits is a 1, then the eleventh prisoner samples the bottle of wine.&lt;/p&gt;&lt;table class="solutions" border="0" cellpadding="5"&gt;&lt;tr&gt;                      &lt;td align="right"&gt;&amp;nbsp;&lt;/td&gt;                     &lt;td align="center"&gt;Prisoner A&lt;/td&gt;                     &lt;td align="center"&gt;Prisoner B&lt;/td&gt;                     &lt;td align="center"&gt;Prisoner C&lt;/td&gt;                     &lt;td align="center"&gt;Prisoner D&lt;/td&gt;                   &lt;/tr&gt;&lt;tr&gt;                      &lt;td align="right"&gt;Bottle 1&lt;/td&gt;                     &lt;td align="center"&gt;0&lt;/td&gt;                     &lt;td align="center"&gt;0&lt;/td&gt;                     &lt;td align="center"&gt;1&lt;/td&gt;                     &lt;td align="center"&gt;1&lt;/td&gt;                   &lt;/tr&gt;&lt;tr&gt;                      &lt;td align="right"&gt;Bottle 2&lt;/td&gt;                     &lt;td align="center"&gt;0&lt;/td&gt;                     &lt;td align="center"&gt;1&lt;/td&gt;                     &lt;td align="center"&gt;0&lt;/td&gt;                     &lt;td align="center"&gt;1&lt;/td&gt;                   &lt;/tr&gt;&lt;tr&gt;                     &lt;td align="right"&gt;Bottle 3&lt;/td&gt;                     &lt;td align="center"&gt;1&lt;/td&gt;                     &lt;td align="center"&gt;0&lt;/td&gt;                     &lt;td align="center"&gt;1&lt;/td&gt;                     &lt;td align="center"&gt;0&lt;/td&gt;                   &lt;/tr&gt;&lt;tr&gt;                     &lt;td align="right"&gt;Bottle 4&lt;/td&gt;                     &lt;td align="center"&gt;1&lt;/td&gt;                     &lt;td align="center"&gt;1&lt;/td&gt;                     &lt;td align="center"&gt;0&lt;/td&gt;                     &lt;td align="center"&gt;0&lt;/td&gt;                   &lt;/tr&gt;&lt;/table&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;hr--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7326911068711371266?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7326911068711371266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7326911068711371266' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7326911068711371266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7326911068711371266'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/06/warden-and-23-prisoners-google.html' title='The Warden and 23 prisoners - Google interview puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pxUNdWyjHeo/TAoFYpj71bI/AAAAAAAAAE4/6o_8dKntqsk/s72-c/jail-cell.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-3964767241883910023</id><published>2010-05-24T21:16:00.000-07:00</published><updated>2010-05-24T21:21:09.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Find Age Of Children'/><title type='text'>Amazon interview puzzle - Find Age Of Children</title><content type='html'>&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;This is another famous puzzle asked in many IT company writtern tests and interviews. The puzzle is asked by amazon is given below.&amp;nbsp; This puzzle belongs to the category of &lt;a href="http://interviewpuzzle.blogspot.com/2010/05/puzzle-types.html"&gt;logic&amp;nbsp; puzzles&lt;/a&gt;.&amp;nbsp; &lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S_tOSXQqlFI/AAAAAAAAAEw/10gZExG4vfE/s1600/tpa_children_playing_100116.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" gu="true" height="266" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S_tOSXQqlFI/AAAAAAAAAEw/10gZExG4vfE/s400/tpa_children_playing_100116.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Amazon interview puzzle - Find Age Of Children&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A man walks into a bar, orders a drink, and starts chatting with the bartender. After a while, he learns that the bartender has three children. "How old are your children?" he asks. "Well," replies the bartender, "the product of their ages is 72." The man thinks for a moment and then says, "that's not enough information." "All right," continues the bartender, "if you go outside and look at the building number posted over the door to the bar, you'll see the sum of the ages." The man steps outside, and after a few moments he reenters and declares, "Still not enough!" The bartender smiles and says, "My youngest just loves strawberry ice cream." How old are the children? A variant of the problem is for the sum of the ages to be 13 and the product of the ages to be the number posted over the door. In this case, it is the oldest that loves ice cream. Then how old are they?&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Answer :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; First, determine all the ways that three ages can multiply together to get 72:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;72 1 1 (quite a feat for the bartender) &lt;br /&gt;36 2 1 &lt;br /&gt;24 3 1 &lt;br /&gt;18 4 1 &lt;br /&gt;18 2 2 &lt;br /&gt;12 6 1 &lt;br /&gt;12 3 2 &lt;br /&gt;9 4 2 &lt;br /&gt;9 8 1 &lt;br /&gt;8 3 3 &lt;br /&gt;6 6 2&lt;br /&gt;6 4 3 &lt;br /&gt;&lt;div style="text-align: justify;"&gt;As the man says, that's not enough information; there are many possibilities. So the bartender tells him where to find the sum of the ages--the man now knows the sum even though we don't. Yet he still insists that there isn't enough info. This must mean that there are two permutations with the same sum; otherwise the man could have easily deduced the ages. &lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The only pair of permutations with the same sum are 8 3 3 and 6 6 2, which both add up to 14 (the bar's address). Now the bartender mentions his "youngest"--telling us that there is one child who is younger than the other two. This is impossible with 8 3 3--there are two 3 year olds. Therefore the ages of the children are 6, 6, and 2. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Pedants have objected that the problem is insoluble because there could be a youngest between two three year olds (even twins are not born exactly at the same time). However, the word "age" is frequently used to denote the number of years since birth. For example, I am the same age as my wife, even though technically she is a few months older than I am. And using the word "youngest" to mean "of lesser age" is also in keeping with common parlance. So I think the solution is fine as stated.&lt;/div&gt;&lt;br /&gt;In the sum-13 variant, the possibilities are: &lt;br /&gt;11 1 1 &lt;br /&gt;10 2 1 &lt;br /&gt;9 3 1 &lt;br /&gt;9 2 2&lt;br /&gt;8 4 1 &lt;br /&gt;8 3 2 &lt;br /&gt;7 5 1 &lt;br /&gt;7 4 2 &lt;br /&gt;7 3 3 &lt;br /&gt;6 6 1 &lt;br /&gt;6 5 2 &lt;br /&gt;6 4 3 &lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The two that remain are 9 2 2 and 6 6 1 (both products equal 36). The final bit of info (oldest child) indicates that there is only one child with the highest age. This cancels out the 6 6 1 combination, leaving the childern with ages of 9, 2, and 2.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-3964767241883910023?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/3964767241883910023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=3964767241883910023' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3964767241883910023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3964767241883910023'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/05/amazon-interview-puzzle-find-age-of.html' title='Amazon interview puzzle - Find Age Of Children'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/S_tOSXQqlFI/AAAAAAAAAEw/10gZExG4vfE/s72-c/tpa_children_playing_100116.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-4772803417597817964</id><published>2010-05-19T21:06:00.000-07:00</published><updated>2010-06-05T00:33:51.837-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Puzzle Types'/><category scheme='http://www.blogger.com/atom/ns#' term='Induction Puzzles'/><title type='text'>Puzzle Types</title><content type='html'>&lt;b&gt;&lt;span style="font-size: large;"&gt;Induction Puzzles or Logical Puzzles:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Induction Puzzles are logic puzzles. In most cases, the puzzle's scenario will involve several participants with reasoning capability (typically people) and the solution to the puzzle will be based on identifying what would happen in an obvious case, and then repeating the reasoning that: "as soon as one of the participants realizes that the obvious case has not happened, they can eliminate it from their reasoning, so creating a new obvious case".&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Typical tell-tale features of these puzzles include any puzzle in which each participant has a given piece of information about all other participants but not themselves. Also, usually some kind of hint is given to suggest that the participants can trust each others intelligence.&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; Examples :&lt;/b&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. &lt;a href="http://interviewpuzzle.blogspot.com/2010/05/prisoners-and-hats-puzzle.html"&gt;Prisoners and hats puzzle&lt;/a&gt;. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. &lt;a href="http://interviewpuzzle.blogspot.com/2010/03/microsoft-puzzle-100-prisoners-in.html"&gt;100 Prisoners in Solitary cells&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Reference :&lt;/b&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. &lt;a href="http://en.wikipedia.org/wiki/Induction_puzzles"&gt;http://en.wikipedia.org/wiki/Induction_puzzles&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Dissection Puzzles&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A dissection puzzle, also called a transformation puzzle, is a tiling puzzle where a solver is given a set of pieces that can be assembled in different ways to produce two or more distinct geometric shapes. The creation of new dissection puzzles is also considered to be a type of dissection puzzle. Puzzles may include various restraints, such as hinged pieces, pieces that can fold, or pieces that can twist. Creators of new dissection puzzles emphasize using a minimum number of pieces, or creating novel situations, such as ensuring that every piece connects to another with a hinge.&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Examples : &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. &lt;a href="http://interviewpuzzle.blogspot.com/2010/05/stick-matches-image-puzzles.html"&gt;Stick Matches Image Puzzle&lt;/a&gt; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reference : &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. &lt;a href="http://en.wikipedia.org/wiki/Dissection_puzzle"&gt;http://en.wikipedia.org/wiki/Dissection_puzzle&lt;/a&gt;&lt;br /&gt;&lt;h1&gt;&lt;span style="font-size: large;"&gt;Lateral Thinking Puzzles&lt;/span&gt;&lt;/h1&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lateral thinking puzzles are often strange situations which require an  explanation. They are solved through a dialogue between the quiz master who sets  the puzzle and the solver or solvers who try to figure out the answer. The  puzzles as stated generally do not contain sufficient information for the solver  to uncover the solution. So a key part of the process is the asking of  questions. The questions can receive one of only three possible answers - yes,  no or irrelevant.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;When one line of enquiry reaches an end then another approach is needed,  often from a completely new direction. This is where the lateral thinking comes  in.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Some people find it frustrating that for any puzzle it is possible to  construct various answers which fit the initial statement of the puzzle.  However, for a good lateral thinking puzzle, the proper answer will be the best  in the sense of the most apt and satisfying. When you hear the right answer to a  good puzzle of this type you should want to kick yourself for not working it  out!&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This kind of puzzle teaches you to check your assumptions about any  situation. You need to be open-minded, flexible and creative in your questioning  and able to put lots of different clues and pieces of information together. Once  you reach a viable solution you keep going in order to refine it or replace it  with a better solution. This is lateral thinking!  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-4772803417597817964?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/4772803417597817964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=4772803417597817964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/4772803417597817964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/4772803417597817964'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/05/puzzle-types.html' title='Puzzle Types'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-3283818362006108190</id><published>2010-05-19T20:56:00.000-07:00</published><updated>2010-05-19T20:56:28.212-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Prisoners and hats puzzle'/><category scheme='http://www.blogger.com/atom/ns#' term='Induction Puzzles'/><title type='text'>Prisoners and hats puzzle</title><content type='html'>The prisoners and hats puzzle is an induction puzzle (a kind of logic puzzle) that involves reasoning about the actions of other people, drawing in aspects of Game theory. Generaly interview questions asked from math oriented. Companies expect that IT students have the backround knowledge of problem solving. This puzzle comee under game theory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Puzzle : Prisoners and three hats&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Four prisoners are arrested for a crime, but the jail is full and the jailer has nowhere to put them. He eventually comes up with the solution of giving them a puzzle so if they succeed they can go free but if they fail they are executed.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The jailer puts three of the men sitting in a line. The fourth man is put behind a screen (or in a separate room). He gives all four men party hats (as in diagram). The jailer explains that there are two red and two blue hats. The prisoners can see the hats in front of them but not on themselves or behind. The fourth man behind the screen can't see or be seen by any other prisoner. No communication between the men is allowed.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If any prisoner can figure out and say (out loud) to the jailer what colour hat he has on his head all four prisoners go free. The puzzle is to find how the prisoners can escape.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/S_SxcrSNVyI/AAAAAAAAAEg/YDFLLSrBlKs/s1600/hats.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/S_SxcrSNVyI/AAAAAAAAAEg/YDFLLSrBlKs/s320/hats.GIF" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;The solution&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For the sake of explanation let's label the prisoners in line order A B and C. Thus B can see A (and his hat colour) and C can see A and B.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The prisoners know that there are only two hats of each colour. So if C observes that A and B have hats of the same colour, C would deduce that his own hat is the opposite colour. However, If A and B have hats of different colours, then C can say nothing. The key is that prisoner B, after allowing an appropriate interval, and knowing what C would do, can deduce that if C says nothing the hats on A and B must be different. Being able to see A's hat he can deduce his own hat colour. (The fourth prisoner is irrelevant to the puzzle: his only purpose is to wear the fourth hat).&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Puzzle : Prisoners and Four - hats.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Now the same puzzle with different condition. Instead of two red and two blue hats there are 3 hats of one colour and only 1 hat of another, and the 3 prisoners can see each other i.e. A sees B &amp;amp; C, B sees A &amp;amp; C and C sees A &amp;amp; B. As like shown in diagram (D again not to be seen and only there to wear the last hat)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S_SyQ9umtKI/AAAAAAAAAEo/7FJyEuMP7PQ/s1600/hats.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S_SyQ9umtKI/AAAAAAAAAEo/7FJyEuMP7PQ/s320/hats.GIF" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;The solution&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There are two cases: &lt;br /&gt;&lt;div style="text-align: justify;"&gt;In first case, one of the three prisoners (in A, B, C) wears the single off-colour hat, thus the other two can easily deduce the colour of theirs. For example if A is single color then B can see that C and A have different color hats. From this he concludes that his color is not single so he shouts his color. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In second case, the three prisoners wear hats of the same colour, while D wears the off-colour hat. After a while, all four prisoners should be able to deduce that, since none of the others was able to state the colour of his own hat, D must wear the off-colour hat.&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Puzzle : Prisoners and Five - hats.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Another different condition. only three prisoners and five hats (supposedly two black and three white) are involved. The three prisoners are ordered to stand in a straight line facing the front, with A in front and C at the back. They are told that there will be two black hats and three white hats. One hat is then put on each prisoner's head; each prisoner can only see the hats of the people in front of him and not on his own's. The first prisoner that is able to announce the colour of his hat correctly will be released. No communication between the prisoners is allowed. After some time, only A is able to announce (correctly) that his hat is white. Why is that so?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;The solution&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Assuming that A wears a black hat.&lt;br /&gt;&lt;br /&gt;• If B wears a black hat as well, C can immediately tell that he is wearing a white hat after looking at the two black hats in front of him. &lt;br /&gt;&lt;br /&gt;• If B does not wear a black hat, C will be unable to tell the colour of his hat (since there is a black and a white). Hence, B can deduce from A's black hat and C's response that he (B) is not wearing a black hat (otherwise the above situation will happen) and is therefore wearing a white hat. &lt;br /&gt;&lt;br /&gt;This therefore proves that A must not be wearing a black hat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-3283818362006108190?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/3283818362006108190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=3283818362006108190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3283818362006108190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3283818362006108190'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/05/prisoners-and-hats-puzzle.html' title='Prisoners and hats puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pxUNdWyjHeo/S_SxcrSNVyI/AAAAAAAAAEg/YDFLLSrBlKs/s72-c/hats.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-2655537194960943114</id><published>2010-05-16T21:03:00.000-07:00</published><updated>2010-05-19T20:46:32.532-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hundred numbers in a sheet'/><title type='text'>Hundred numbers in a sheet puzzle</title><content type='html'>This is another one frequently asked puzzle in writtern test taken by IT companies. Anyone can easily understand and try to answer this puzzle. A simple logic is behind this puzzle try to find out.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S_C_8aBIWRI/AAAAAAAAAEY/3BOP-XW0ZWE/s1600/sheet_f.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S_C_8aBIWRI/AAAAAAAAAEY/3BOP-XW0ZWE/s320/sheet_f.jpg" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Puzzle&lt;/span&gt;&lt;/strong&gt; :&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;A sheet of paper has statements numbered from 1 to 100. Statement n says "exactly n of the statements on this sheet are false." Which statements are true and which are false? What if we replace "exactly" by "at least"? &lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Answer :&lt;/span&gt;&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In these 100 statements one and only one statement can be correct. That means 99 statements have to be incorrect and thus statement 99th is true&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If replaced by "at least", and the "real" number of false statements is x, then statements x+1 to 100 will be false (since they falsely claim that there are more false statements than there actually are). So, 100-x are false, ie. x=100-x, so x=50. The first 50 statements are true, and statements 51 to 100 are false. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;However, there is a hidden and incorrect assumption in this argument. To see this, suppose that there is one statement on the sheet and it says "One statement is false" or "At least one statement is false," either way it implies "this statement is false," which is a familiar paradoxical statement. We have learned that this paradox arises because of the false assumption that all statements are either true or false. This is the hidden assumption in the above reasoning. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;If it is acknowledged that some of the statements on the page may be neither true nor false (i.e., meaningless), then nothing whatsoever can be concluded about which statements are true or false.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This problem has been carefully contrived to appear to be solvable (like the vacuous statement "this statement is true"). By changing the numbers in some statements and changing "true" to "false," various circular forms of the liar's paradox can be constructed. A much more complicated version of the same problem is: &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1) At least one of the last two statements in this list is true.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2) This is either the first true or the first false statement in the list. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;3) There exist three consecutive false statements.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4) The difference beween the numbers of the last true statement and the first true statement is a factor of the unknown number. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;5) The sum of the numbers of the true statements is the unknown number. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;6) This is not the last true statement. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;7) Each true statement's number is a factor of the unknown number. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;8) The unknown number equals the percentage of these statements which are true. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;9) The number of different factors which the unknown number has (excluding 1 and itself) is more than the sum of the numbers of the true statements. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;10) There are no three cosecutive true statements. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;What is the number? &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The incorrect but plausible solution is: &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;By 2, either way 1 must be false, and then so must both 9 and 10. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6, if false, says "This is the last true statement", which gives a paradox, thus 6 must be true, and so must 7 and/or 8. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7 and 8 cannot both be true, as the number had to be a multiple of 6,7,8 , that is a multiple of 168 (by 7), and less than 100 (by 8) &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If 8 is false, then 3 is true (8,9,10 is false), if 8 is true, then 3 is false (3 cannot be true when both 6 and 8 are true, then there are no three consecutive statements left). &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;So we have either &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A) F X F X X T F T F F or B) F X T X X T T F F F &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;In A), 4 and 5 must be true (by false 10), and 2 may be true or false. So by 5 the number shall be either 27 (2+3+4+5+6+7) or 25 (3+4+5+6+7). None of these can fullfill 8, though, so A) is out leaving us with B) &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Now, (by 7) 3,6 and 7 are factors, the number must be a multiple of 42, as 2+3+4+5+6+7=27, 5 must be false. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;By false 10, 2 and 4 must be true, that is 5 shall be a multiple of the number. Now the number must be a multiple of 2,3,4,5,6 and 7, that is a multiple of 3*4*5*7=420. 420 has 22 different factors (2,3,4,5,6,7,10,12,14,15,20,21,28,30,35,42,60,70,84,105,140,210) and the sum 2+3+4+6+7 = 22, so the only multiple of 420 that fulfills false 9 is 420.&lt;/div&gt;&lt;br /&gt;If you know any other answers please comment here..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-2655537194960943114?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/2655537194960943114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=2655537194960943114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2655537194960943114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2655537194960943114'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/05/hundred-numbers-in-sheet-puzzle.html' title='Hundred numbers in a sheet puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S_C_8aBIWRI/AAAAAAAAAEY/3BOP-XW0ZWE/s72-c/sheet_f.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1072646562820663124</id><published>2010-05-11T21:01:00.000-07:00</published><updated>2010-05-16T20:54:23.700-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stick puzzles'/><category scheme='http://www.blogger.com/atom/ns#' term='Image puzzles'/><title type='text'>Stick Matches Image puzzles</title><content type='html'>&lt;strong&gt;&lt;span style="font-size: large;"&gt;Stick Matches Image puzzles.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;Move 1 stick from the image below to make a valid equation. (inequalities are not allowed).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-om4RgjOVI/AAAAAAAAAEI/rsfY9JvwcCw/s1600/stick.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-om4RgjOVI/AAAAAAAAAEI/rsfY9JvwcCw/s320/stick.PNG" tt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/S_C9xhMul9I/AAAAAAAAAEQ/fMGvJtKErxc/s1600/stick.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/S_C9xhMul9I/AAAAAAAAAEQ/fMGvJtKErxc/s320/stick.PNG" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1072646562820663124?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1072646562820663124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1072646562820663124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1072646562820663124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1072646562820663124'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/05/stick-matches-image-puzzles.html' title='Stick Matches Image puzzles'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/S-om4RgjOVI/AAAAAAAAAEI/rsfY9JvwcCw/s72-c/stick.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-3849705769923484694</id><published>2010-05-09T03:09:00.000-07:00</published><updated>2010-05-09T03:09:01.174-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google Interview puzzles'/><title type='text'>Google Interview puzzles with answers:</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S-aJNTG6WXI/AAAAAAAAAEA/9lXaoY3b_eM/s1600/Google.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S-aJNTG6WXI/AAAAAAAAAEA/9lXaoY3b_eM/s320/Google.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Google Interview puzzles with answers:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Puzzle 1:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The puzzle is if the shopkeeper can only place the weights in one side of the common balance. For example if shopkeeper has weights 1 and 3 then he can measure 1, 3 and 4 only. Now the question is how many minimum weights and names the weights you will need to measure all weights from 1 to 1000. This is a fairly simple problem and very easy to prove also. &amp;nbsp;Answer for this puzzle is given below.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Solution :&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This is simply the numbers 2^0,2^1,2^2 ... that is 1,2,4,8,16... So for making 1000 kg we need up to 1, 2, 4, 8, 16, 32, 64, 128, and 512. &amp;nbsp;Comments your suggestions or other answers.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;Puzzle 2:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; This is same as the above puzzle with the condition of placing weights on only side of the common balance being removed. You can place weights on both side and you need to measure all weights between 1 and 1000. For example if you have weights 1 and 3,now you can measure 1,3 and 4 like earlier case, and also you can measure 2,by placing 3 on one side and 1 on the side which contain the substance to be weighed. So question again is how many minimum weights and of what denominations you need to measure all weights from 1kg to 1000kg. Answer for this puzzle is given below.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Solution:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For this answer is 3^0, 3^1, 3^2... That is 1,3,9,27,81,243 and 729.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-3849705769923484694?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/3849705769923484694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=3849705769923484694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3849705769923484694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3849705769923484694'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/05/google-interview-puzzles-with-answers.html' title='Google Interview puzzles with answers:'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S-aJNTG6WXI/AAAAAAAAAEA/9lXaoY3b_eM/s72-c/Google.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-2388990007766133669</id><published>2010-05-04T08:23:00.000-07:00</published><updated>2010-05-11T20:51:45.239-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Image puzzles'/><title type='text'>Image puzzles with answers:</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Image puzzles with answers&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In these types of puzzles, a word is behind on the image. We need to find out the word from the image given. The images are not difficult but the images symbolically represent the words behind it. &amp;nbsp;Generally these types of puzzles are asked in general puzzle competitions. &amp;nbsp;But now few IT companies also asked these questions in their written test.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Example:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S-A7Lr6Lt3I/AAAAAAAAADQ/XNHmV_6BVfE/s1600/1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S-A7Lr6Lt3I/AAAAAAAAADQ/XNHmV_6BVfE/s320/1.JPG" /&gt;&lt;/a&gt;&amp;nbsp;From the above image we can easily read that “hi way pass” surrounded by red line. But the answer is “highway overpass” because the word “hiway” is above the word “pass” so make these two words to form the phrase “highway overpass”. Similarly try to answer the following images.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Image puzzles:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;1.&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-A7MApe1iI/AAAAAAAAADY/qzDcikVEXrM/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="72" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-A7MApe1iI/AAAAAAAAADY/qzDcikVEXrM/s400/2.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;2.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-A7M-zzFNI/AAAAAAAAADg/s51FGDJ2jhQ/s1600/3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="76" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-A7M-zzFNI/AAAAAAAAADg/s51FGDJ2jhQ/s400/3.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;3.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/S-A7N-HEukI/AAAAAAAAADo/FJ1TELuTI5s/s1600/4.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="65" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/S-A7N-HEukI/AAAAAAAAADo/FJ1TELuTI5s/s400/4.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;4.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-A7OoVU8UI/AAAAAAAAADw/AMyk98MxaH0/s1600/5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="67" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-A7OoVU8UI/AAAAAAAAADw/AMyk98MxaH0/s400/5.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;5.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-A7PUkZ9hI/AAAAAAAAAD4/ePjrp0pfYv4/s1600/6.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="67" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S-A7PUkZ9hI/AAAAAAAAAD4/ePjrp0pfYv4/s400/6.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Answers :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 .&amp;nbsp; a) painless operation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b)&amp;nbsp; Excuse me&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c) play in the yard&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.&amp;nbsp;&amp;nbsp; a) Life after death&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b) crossbox&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c) partly cloud&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3.&amp;nbsp;&amp;nbsp; a) An after though&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b) I'll be there in a minite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c) Tom apart&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4.&amp;nbsp;&amp;nbsp; a) One way or the other&amp;nbsp;&amp;nbsp; b) Too big too ignore&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c) Easy on the eyes&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.&amp;nbsp;&amp;nbsp; a) hitting below the belt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b) Lie in wait&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c) search high and low&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-2388990007766133669?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/2388990007766133669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=2388990007766133669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2388990007766133669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2388990007766133669'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/05/image-puzzles-with-answers.html' title='Image puzzles with answers:'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S-A7Lr6Lt3I/AAAAAAAAADQ/XNHmV_6BVfE/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1129252692822960920</id><published>2010-05-04T08:14:00.000-07:00</published><updated>2010-05-04T08:14:26.079-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Adobe Interview puzzles'/><title type='text'>Adobe Interview puzzles with answers</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;Adobe Interview puzzles with answers:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;The given puzzles are asked in many written exams conducted by varies IT companies like Google, Adobe, Amazon, yahoo, Microsoft etc…&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Adobe Interview Puzzles : &amp;nbsp;Weight Puzzle&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Puzzle 1&lt;/b&gt; : &amp;nbsp;(check this is already posted)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; There are 8 Balls available in a box, From that only one odd ball being heavier or Lighter. question is to find out the minimum number of weighings required to spot the odd heavier ball among 8 identically looking balls using a common balance.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution :&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This is a little trickier to solve.Let us name the 8 balls as A1,A2,A3,B1,B2,B3,C1 and C2.Now weigh with A1,A2,A3 on one side and B1,B2,B3 on the other side. If both weigh equal then the odd ball is among C1 and C2.Now we know that A's and B's are all normal ones we can weigh C1 with A1 and check whether C1 weighs the same as the normal ball. In this way, we can figure out in one weigh which of C1 and C2 is odd. Now if A's weighed more than B's then we know for sure C's are normal ones. Now let’s assume A's heavier than B's and we still don't know whether the odd is among A's or B's.&lt;br /&gt;We know A1 A2 A3 &amp;lt; B1 B2 B3&lt;br /&gt;Now we compare A1 B2 B3 to B1 C1 C2 . Now if the A1 B2 B3 is heavier than B1 C1 C2 Then it means the odd ball is among A1 and B1.If A1 B2 B3 is lighter than B1 C1 C2 then the odd ball is among B2 and B3.If A1 B2 B3 equal to B1 C1 C2 then odd ball is among A2 and A3.So we have zeroed down to 2 balls.Now its very easy as we can compare any of the normal ball with one of the 2 balls.So answer is 3,ie in 3 weighings we can find out the odd ball.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Puzzle 2:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; This is same like the above weight puzzle But instead of 8 balls here You are given 13 balls. The odd ball may be either heavier or lighter. &amp;nbsp;Find out the odd ball in 3 weightings.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Puzzle 3:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;You are given a cake; one of its corner is broken. How will u cut the rest into Two equal parts?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution :&lt;/b&gt;&lt;br /&gt;Slice the cake(Horigentally).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Puzzle 4 :&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; How it is possible to place four points that are equidistance from each other?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution :&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;place points in the shape of a pyramid.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1129252692822960920?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1129252692822960920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1129252692822960920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1129252692822960920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1129252692822960920'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/05/adobe-interview-puzzles-with-answers.html' title='Adobe Interview puzzles with answers'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7964439798769971844</id><published>2010-04-30T22:02:00.000-07:00</published><updated>2010-05-04T08:05:01.796-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Find House Address'/><title type='text'>Find House Address puzzle</title><content type='html'>&lt;div align="center"&gt;&lt;strong&gt;Find House Address puzzle&lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S9u1EvY8chI/AAAAAAAAADI/Ntww3whXl4M/s1600/house-address.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S9u1EvY8chI/AAAAAAAAADI/Ntww3whXl4M/s320/house-address.jpg" tt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Puzzle :&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is another one rarely asked puzzle in interviews. The puzzle is Sally and Sue have a strong desire to date Sam. They all live on the same street yet neither Sally nor Sue knows where Sam lives. The houses on this street are numbered 1 to 99. Sally asks Sam ”Is your house number a perfect square?” He answers. Then Sally asks”Is is greater than 50?” He answers again. Sally thinks she now knows the address of Sam’s house and decides to visit. When she gets there, she finds out she is wrong. This is not surprising, considering Sam answered only the second question truthfully. Sue, unaware of Sally’s conversation, asks Sam two questions. Sue asks ”Is your house number a perfect cube?”. He answers. She then asks”Is it greater than 25?”. He answers again. Sue thinks she knows where Sam lives and decides to pay him a visit. She too is mistaken as Sam once again answered only the second question truthfully. If I tell you that Sam’s number is less than Sue’s or Sally’s, and that the sum of their numbers is a perfect square multiplied by two, you should be able to figure out where all three of them live.&amp;nbsp;&lt;span class="Apple-style-span" style="color: #47443e; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 12px; line-height: 18px;"&gt;solution for this puzzle is given below. Write your comments.. and any different answers.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Answer :&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; As per the above puzzle Sally asks Sam "Is your house number a perfect square?". He answers. Then Sally asks "Is is greater than 50?". He answers again. Sally thinks she now knows the address of Sam's house and decides to visit. Since Sally thinks that she has enough information, I deduce that Sam answered that his house number was a perfect square greater than 50. There are two of these {64,81} and Sally must live in one of them in order to have decided she knew where Sam lives. When she gets there, she finds out she is wrong. This is not surprising, considering Sam answered only the second question truthfully. So Sam's house number is greater than 50, but not a perfect square. Sue, unaware of Sally's conversation, asks Sam two questions. Sue asks "Is your house number a perfect cube?". He answers. She then asks "Is it greater than 25?". He answers again. Observation: perfect cubes greater than 25 are {27, 64}, less than 25 are {1,8}. Sue thinks she knows where Sam lives and decides to pay him a visit. She too is mistaken as Sam once again answered only the second question truthfully. Since Sam's house number is greater than 50, he told Sue that it was greater than 25 as well. Since Sue thought she knew which house was his, she must live in either of {27,64}. If I tell you that Sam's number is less than Sue's or Sally's, Since Sam's number is greater than 50, and Sue's is even bigger, she must live in 64. Assuming Sue and Sally are not roommates (although awkward social situations of this kind are not without precedent), Sally lives in 81. and that the sum of their numbers is a perfect square multiplied by two, you should be able to figure out where all three of them live. Sue + Sally + Sam = 2 p^2 for p an integer 64 + 81 + Sam = 2 p^2 Applying the constraint 50 &amp;lt; Sam &amp;lt; 64, looks like Sam = 55 (p = 10). In summary, Sam = 55 Sue = 64 Sally = 81&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: #47443e; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 12px; line-height: 18px;"&gt;I hope all of you understand puzzle with answers.. If your are not understand comments your queries..&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7964439798769971844?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7964439798769971844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7964439798769971844' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7964439798769971844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7964439798769971844'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/find-house-address-puzzle.html' title='Find House Address puzzle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S9u1EvY8chI/AAAAAAAAADI/Ntww3whXl4M/s72-c/house-address.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-5149204087104346459</id><published>2010-04-24T07:01:00.000-07:00</published><updated>2010-04-30T21:56:13.489-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Aeroplane'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Puzzles'/><title type='text'>Microsoft interview puzzles  :  Aeroplane</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S9L5d4wYRgI/AAAAAAAAADA/TyUnqT_cRUI/s1600/aeroplane.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="267" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S9L5d4wYRgI/AAAAAAAAADA/TyUnqT_cRUI/s400/aeroplane.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Aeroplane.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;Puzzle :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The puzzle question is : On Bagshot Island, there is an airport. The airport is the homebase of an unlimited number of identical airplanes. Each airplane has a fuel capacity to allow it to fly exactly 1/2 way around the world, along a great circle. The planes have the ability to refuel in flight without loss of speed or spillage of fuel. Though the fuel is unlimited, the island is the only source of fuel.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;What is the fewest number of aircraft necessary to get one plane all the way around the world assuming that all of the aircraft must return safely to the airport? How did you get to your answer?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;Notes:&lt;/i&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;(a) Each airplane must depart and return to the same airport, and that is the only airport they can land and refuel on ground.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;(b) Each airplane must have enough fuel to return to airport.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;(c) The time and fuel consumption of refueling can be ignored. (so we can also assume that one airplane can refuel more than one airplanes in air at the same time.)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;(d) The amount of fuel airplanes carrying can be zero as long as the other airplane is refueling these airplanes. What is the fewest number of airplanes and number of tanks of fuel needed to accomplish this work? (we only need airplane to go around the world)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;solution for this puzzle is given below. Write your comments.. and any different answers.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Answer :&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As per the puzzle given ablove The fewest number of aircraft is 3! Imagine 3 aircraft (A, B and C). A is going to fly round the world. All three aircraft start at the same time in the same direction. After 1/6 of the circumference, B passes 1/3 of its fuel to C and returns home, where it is refuelled and starts immediately again to follow A and C.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;C continues to fly alongside A until they are 1/4 of the distance around the world. At this point C completely fills the tank of A which is now able to fly to a point 3/4 of the way around the world. C has now only 1/3 of its full fuel capacity left, not enough to get back to the home base. But the first "auxiliary" aircraft reaches it in time in order to refuel it, and both "auxiliary" aircraft are the able to return safely to the home base.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Now in the same manner as before both B and C fully refuelled fly towards A. Again B refuels C and returns home to be refuelled. C reaches A at the point where it has flown 3/4 around the world. All 3 aircraft can safely return to the home base, if the refuelling process is applied analogously as for the first phase of the flight. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;I hope all of you understand puzzle with answers.. If your are not understand comments your queries..&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-5149204087104346459?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/5149204087104346459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=5149204087104346459' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5149204087104346459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5149204087104346459'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/microsoft-interview-puzzles-aeroplane.html' title='Microsoft interview puzzles  :  Aeroplane'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S9L5d4wYRgI/AAAAAAAAADA/TyUnqT_cRUI/s72-c/aeroplane.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-3986608918687887880</id><published>2010-04-19T08:43:00.000-07:00</published><updated>2010-04-30T21:54:30.012-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Four People on a Rickety Bridge'/><title type='text'>Four People on a Rickety Bridge</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Four People on a Rickety Bridge&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S8x6GI8OPdI/AAAAAAAAAC4/A8SP2oCP4C0/s1600/golden-gate-bridge21.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S8x6GI8OPdI/AAAAAAAAAC4/A8SP2oCP4C0/s400/golden-gate-bridge21.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;About this Puzzle :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: large;"&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/strong&gt;&lt;span style="font-size: small;"&gt;This is one of the frequently asked puzzle in writtern test and interview conntected by top IT companies like Google, Yahoo, Microsoft , Adobe , Syemantec , Thought works , CA, Macafee etc..&amp;nbsp; The puzzle question and its answer is given below.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle Question :&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The puzzle is Four people need to cross a rickety bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person:&amp;nbsp; 1 min, 2 mins, 7 mins and 10 mins. What is the shortest time needed for all four of them to cross the bridge?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;solution for this puzzle is given below. Write your comments.. and any different answers.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Answer :&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Solution for the above puzzle is 17 minites. As per the puzzle to get everyone across in 17 minutes, we need get the two slowest people across together; otherwise we are wasting too much time. Once we get them across, how do we not make one of them walk back with the flashlight? Just have one of the faster people already there waiting to sprint the flashlight back across.&lt;/div&gt;person A: 1 minute&lt;br /&gt;person B: 2 minutes&lt;br /&gt;person C: 6 minutes&lt;br /&gt;person D: 10 minutes&lt;br /&gt;&lt;br /&gt;1. A &amp;amp; B cross. &amp;nbsp;total time: &amp;nbsp;2 minutes.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;C &amp;nbsp; &amp;nbsp; || A&lt;br /&gt;&amp;nbsp;D &amp;nbsp; &amp;nbsp; || B&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || flashlight&lt;br /&gt;&lt;br /&gt;2. B comes back. total time: &amp;nbsp;4 minutes.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;C &amp;nbsp; &amp;nbsp;|| A&lt;br /&gt;&amp;nbsp;D &amp;nbsp; &amp;nbsp;||&lt;br /&gt;&amp;nbsp;B &amp;nbsp; &amp;nbsp;||&lt;br /&gt;flashlight&lt;br /&gt;&lt;br /&gt;3. C &amp;amp; D cross. &amp;nbsp;total time: 14 minutes.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;B &amp;nbsp; &amp;nbsp;|| A&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;|| C&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;|| D&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flashlight&lt;br /&gt;&lt;br /&gt;4. A comes back. total time: 15 minutes.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;A &amp;nbsp; &amp;nbsp;|| C&lt;br /&gt;&amp;nbsp;B &amp;nbsp; &amp;nbsp;|| D&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; ||&lt;br /&gt;flashlight&lt;br /&gt;&lt;br /&gt;5. A &amp;amp; B cross. &amp;nbsp;total time: 17 minutes.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;|| A&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;|| B&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;|| C D&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flashlight&lt;br /&gt;&lt;br /&gt;Another valid solution is to have A bring the flashlight back in step 2.&lt;br /&gt;&lt;br /&gt;Q*** 10 10 2 1*** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;Q*** 10 9 2 1 *** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;Q*** 10 7 2 1 *** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;Q*** 10 7 2 1 *** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;Q*** 10 6 2 1 *** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;Q*** 10 5 2 1 *** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;Q*** 10 4 2 1 *** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;Q*** 10 3 2 1 *** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;Q*** 10 2 2 1 *** &amp;nbsp; &amp;nbsp;Sol- 17&lt;br /&gt;**Quick Sol**- Suppose a,b,c,d are the take time one can cross the bridge such that a&amp;gt;b&amp;gt;c&amp;gt;d or a&amp;gt;b=c&amp;gt;d or a=b&amp;gt;c&amp;gt;d or a=b=c&amp;gt;d or a=b=c=d&lt;br /&gt;Genreric Sol- a+3*c+d (independent of b. :) )&lt;br /&gt;&lt;div&gt;I hope all of you understand puzzle with answers.. If your are not understand comments your queries..&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-3986608918687887880?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/3986608918687887880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=3986608918687887880' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3986608918687887880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3986608918687887880'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/four-people-on-rickety-bridge.html' title='Four People on a Rickety Bridge'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/S8x6GI8OPdI/AAAAAAAAAC4/A8SP2oCP4C0/s72-c/golden-gate-bridge21.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-3529932339254812097</id><published>2010-04-18T06:02:00.000-07:00</published><updated>2010-04-18T06:02:35.593-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Defective balls'/><title type='text'>Find Defective ball</title><content type='html'>This puzzle is similar to the &lt;a href="http://interviewpuzzle.blogspot.com/search/label/A%20Box%20of%20Defective%20Balls"&gt;Defective balls&lt;/a&gt; asked by microsoft. In this case instead of 10 balls here 12 balls. The puzzle question and answers are given below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S8sCdRSuD1I/AAAAAAAAACw/OyoNvvsxz_k/s1600/balance_scales.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S8sCdRSuD1I/AAAAAAAAACw/OyoNvvsxz_k/s320/balance_scales.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle Question :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You have 12 identical balls. One of the balls is heavier OR lighter than the rest (you don't know which). Using just a balance that can only show you which side of the tray is heavier, how can you determine which ball is the defective, how many measurements required??&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Answer :&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comment your answers...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-3529932339254812097?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/3529932339254812097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=3529932339254812097' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3529932339254812097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3529932339254812097'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/find-defective-ball.html' title='Find Defective ball'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/S8sCdRSuD1I/AAAAAAAAACw/OyoNvvsxz_k/s72-c/balance_scales.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-5345806625041754733</id><published>2010-04-17T04:14:00.000-07:00</published><updated>2010-05-09T03:04:36.046-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Horse Race'/><title type='text'>Horse Race</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Horse Race&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S8mX6fVEEbI/AAAAAAAAACo/RYSJ11AytmU/s1600/horserace.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S8mX6fVEEbI/AAAAAAAAACo/RYSJ11AytmU/s400/horserace.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The puzzle is there are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 horses to find out their relative speed. At no point you can find out the actual speed of the horse in a race. Find out how many races are required to get the top 3 horses. The answer for this puzzle is given below.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Answer :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Seven.&lt;br /&gt;The first 5 to find the 3 fastest in each group and the sixth with the winners of each group.Now we know the fastest horse.&lt;br /&gt;The second fastest horse must either be the second fastest in the sixth race or the second fastest horse in the final winners first race.&lt;br /&gt;In the first case, the third fastest horse can either be the third fastest horse in the sixth race or the second fastest horse in either the fastest or second fastest horses first race.&lt;br /&gt;Otherwise the third fastest horse could either be the second fastest horse in the sixth race or the third fastest horse in the final winners first race.&lt;br /&gt;This makes for a total of five horses for the seventh, and final, race.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-5345806625041754733?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/5345806625041754733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=5345806625041754733' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5345806625041754733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5345806625041754733'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/horse-race.html' title='Horse Race'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/S8mX6fVEEbI/AAAAAAAAACo/RYSJ11AytmU/s72-c/horserace.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-1347337019470337953</id><published>2010-04-16T07:59:00.000-07:00</published><updated>2010-05-04T08:40:03.628-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Puzzles'/><category scheme='http://www.blogger.com/atom/ns#' term='Globe walker'/><title type='text'>Microsoft puzzle with answer : Globe Walker</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;Globe Walker&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S8h9_0LaaBI/AAAAAAAAACg/OtxBGRd9lbA/s1600/Global+Competence+Globe+Walker.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="297" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S8h9_0LaaBI/AAAAAAAAACg/OtxBGRd9lbA/s320/Global+Competence+Globe+Walker.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Puzzle&lt;/span&gt;&lt;/b&gt; : &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This is another one puzzle asked from Micrsoft. How many points are there on the globe where, by walking one mile south, then one mile east and then one mile north, you would reach the place where you started? Answer for this puzzle is given below.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Answer:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The trivial answer to this question is one point, namely, the North Pole. But if you think that answer should suffice, you might want to think again! &lt;br /&gt;&lt;div style="text-align: justify;"&gt;Let’s think this through methodically. If we consider the southern hemisphere, there is a ring near the South Pole that has a circumference of one mile. So what if we were standing at any point one mile north of this ring? If we walked one mile south, we would be on the ring. Then one mile east would bring us back to same point on the ring (since it’s circumference is one mile). One mile north from that point would bring us back to the point were we started from. If we count, there would be an infinite number of points north of this one mile ring.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;So what’s our running total of possible points? We have 1 + infinite points. But we’re not done yet!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Consider a ring that is half a mile in circumference near the South Pole. Walking a mile along this ring would cause us to circle twice, but still bring us to back to the point we started from. As a result, starting from a point that is one mile north of a half mile ring would also be valid. Similarly, for any positive integer n, there is a circle with radius&lt;/div&gt;&lt;div style="text-align: justify;"&gt;r = 1 / (2 * pi * n)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;centered at the South Pole. Walking one mile along these rings would cause us to circle n times and return to the same point as we started. There are infinite possible values for n. Furthermore, there are infinite ways of determining a starting point that is one mile north of these n rings, thus giving us (infinity * infinity) possible points that satisfy the required condition.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;So the real answer to this question is 1 + infinity * infinity = infinite possible points!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Visitors&amp;nbsp;can write your comments and different answers as you think..&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 17px;"&gt;&lt;b&gt;TRRKG8ESM7VM&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-1347337019470337953?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/1347337019470337953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=1347337019470337953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1347337019470337953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/1347337019470337953'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/microsoft-puzzles-with-answers-puzzles.html' title='Microsoft puzzle with answer : Globe Walker'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S8h9_0LaaBI/AAAAAAAAACg/OtxBGRd9lbA/s72-c/Global+Competence+Globe+Walker.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-3740985763346474182</id><published>2010-04-12T07:56:00.000-07:00</published><updated>2010-04-16T08:13:16.324-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='An Honest Man'/><title type='text'>An Honest Man and The Card</title><content type='html'>&lt;div align="center"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S8M0ZrJEXOI/AAAAAAAAACY/KW-7j07_Y7s/s1600/Honest+man+Holding+card.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="233" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S8M0ZrJEXOI/AAAAAAAAACY/KW-7j07_Y7s/s400/Honest+man+Holding+card.jpg" width="400" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Puzzle:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;strong&gt;An Honest Man &lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; An honest man holds a card with one of the three possible numbers on it “1”, “2” or “3”. You can ask one question and the man allowed to answer only “Yes”,”No” and “I don’t know”. The honest man obviously never lies. Which question would you ask to say with 100% certainty which number is on the card the honest man holds?&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Answer :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Question should be: "If I substract 2 from your number, and then take squery root, would the result be greater than zero?"&lt;br /&gt;&lt;br /&gt;Man's number 3 -&amp;gt; Sqrt(3-2)=Sqrt(1)=1, (1&amp;gt;0)==TRUE, so the answer is "YES"&lt;br /&gt;Man's number 2 -&amp;gt; Sqrt(2-2)=Sqrt(0)=0, (0&amp;gt;0)==FALSE, so the answer is "NO"&lt;br /&gt;Man's number 1 -&amp;gt; Sqrt(1-2)=Sqrt(-1)=i, (i&amp;gt;0)==???, so the answer is "I DON't KNOW"&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-3740985763346474182?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/3740985763346474182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=3740985763346474182' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3740985763346474182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/3740985763346474182'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/honest-man-and-card.html' title='An Honest Man and The Card'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S8M0ZrJEXOI/AAAAAAAAACY/KW-7j07_Y7s/s72-c/Honest+man+Holding+card.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-5423872920187926569</id><published>2010-04-10T02:57:00.000-07:00</published><updated>2010-06-21T21:33:30.564-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='River'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Puzzles'/><title type='text'>Microsoft Puzzles : River , Solders and the boat</title><content type='html'>This puzzle is asked by microsoft long ago in their interview. This puzzle is associated with how solders cross the river in a small boat. To solve this puzzle you do not need to be math genious simple thinking is enough. It is very simple puzzle. Try to solve this puzzle.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S8BLR8JyItI/AAAAAAAAACQ/egPDWy2aeuk/s1600/river+puzzle.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="262" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S8BLR8JyItI/AAAAAAAAACQ/egPDWy2aeuk/s400/river+puzzle.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Consider there are 10 soldiers on the one side of the river. They need to go to the over side of the rever. There is no bridge in the rever and no one can swin in the rever. One of the soldiers spots the boat with two boys inside. The boat is very small and the boys in the boats also very small. The boat can either hold two boys or one soldier. Now tell me how can all soldiers go to the other side of the river using this boat ?&lt;/div&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Answer :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; First you have the two boys take the boat to one side of the river and leave a boy on that side of the river. One boy takes the boat back to the other side and stands on the shore. Then a soldier gets in the boat and rides it to the other side. When he arrives on the other side, then the boy gets in the boat and takes it back to the other side and picks up the other boy. They ride back to the other shore and drop off one of the boys and continue this process until all the soldiers are on the other side of the river.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-5423872920187926569?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/5423872920187926569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=5423872920187926569' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5423872920187926569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5423872920187926569'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/microsoft-puzzles-river-solders-and.html' title='Microsoft Puzzles : River , Solders and the boat'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S8BLR8JyItI/AAAAAAAAACQ/egPDWy2aeuk/s72-c/river+puzzle.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-8768640160812808392</id><published>2010-04-05T08:55:00.000-07:00</published><updated>2010-04-10T02:50:50.044-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='4 Quarts of Water'/><title type='text'>4 Quarts of Water</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_pxUNdWyjHeo/S7oHYQ5B1wI/AAAAAAAAACI/UDnzo2jrzXY/s1600/glassware_wine_glass_wine_cup_water_mug_coffee_mug.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_pxUNdWyjHeo/S7oHYQ5B1wI/AAAAAAAAACI/UDnzo2jrzXY/s320/glassware_wine_glass_wine_cup_water_mug_coffee_mug.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle Question : 4 Quarts of Water&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you had an infinite supply of water and a 5 quart and 3 quart pails, how would you measure exactly 4 quarts? and What is the least number of steps you need?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Answer:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This question is very simple actually. Since we can’t hold 4 quarts in the 3 quart pail, we have to look to filling up the 5 quart pail with exactly 4 quarts. Lets count the steps as we move along&lt;br /&gt;&lt;br /&gt;1. Fill 3 quart pail ( 5p – 0, 3p – 3)&lt;br /&gt;2. Transfer to 5 quart pail (5p – 3, 3p – 0)&lt;br /&gt;3. Fill 3 quart pail ( 5p – 3, 3p – 3)&lt;br /&gt;4. Transfer to 5 quart pail (5p – 5, 3p – 1)&lt;br /&gt;5. Empty 5 quart pail (5p – 0, 3p – 1)&lt;br /&gt;6. Transfer to 5 quart pail (5p – 1, 3p – 0)&lt;br /&gt;7. Fill 3 quart pail ( 5p – 1, 3p – 3)&lt;br /&gt;8. Transfer to 5 quart pail (5p – 4, 3p – 0) We are done!!!&lt;br /&gt;&lt;br /&gt;That was easy right. Now for those who are mathematical and need everything solved in terms of a formula, here comes a little more mathematical solution.&lt;br /&gt;&lt;br /&gt;Now the general steps are to fill up the 3 quart pail and keep transferring to the 5 quart pail (empty if full) until we hit 4 quarts. Therefore, the total amount of water we filled in the 3 quart pail must be equal to 4 more than a multiple of 5 (since we discard 5 quarts of water at a time). From this, we can derive this formula.&lt;br /&gt;5n + 4 = 3m, where n and m are arbitrary positive integers&lt;br /&gt;n represents the number of times we had to empty the 5 quart pail and m represents the number of times we had to fill up the 3 quart pail.&lt;br /&gt;&lt;br /&gt;Now all we have to do is solve for the lowest set of positive integer solutions for {n,m}. {1, 3} is the lowest set. Some of the other solutions are {4, 8}, {7, 13}, {10, 18} and so on.&lt;br /&gt;&lt;br /&gt;&lt;div style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: white none repeat scroll 0% 0%; line-height: 170%;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-8768640160812808392?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/8768640160812808392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=8768640160812808392' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/8768640160812808392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/8768640160812808392'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/04/4-quarts-of-water.html' title='4 Quarts of Water'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pxUNdWyjHeo/S7oHYQ5B1wI/AAAAAAAAACI/UDnzo2jrzXY/s72-c/glassware_wine_glass_wine_cup_water_mug_coffee_mug.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-667460097049042881</id><published>2010-03-29T20:47:00.000-07:00</published><updated>2010-04-05T08:47:40.443-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='A Box of Defective Balls'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Puzzles'/><title type='text'>Microsoft puzzle - A Box of Defective Balls</title><content type='html'>&lt;span style="font-family: Verdana,sans-serif;"&gt;This puzzle is asked by many companies while taking interviews. It is another one of the famous puzzle.&amp;nbsp;The puzzle is given below..&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;Puzzle Question :&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/S7F0Vg2geHI/AAAAAAAAACA/qdTsEZYK1ck/s1600/balls.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" nt="true" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/S7F0Vg2geHI/AAAAAAAAACA/qdTsEZYK1ck/s320/balls.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;You have 10 boxes of balls (each ball weighing exactly10 gm) with one box with defective balls (each one of the defective balls weigh 9 gm). You are given an electronic weighing machine and only one chance at it. How will find out which box has the defective balls?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;Answer :&lt;/b&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For convenience sake, let’s name the boxes from 1 to 10. In order to solve this problem, you have to leverage the fact that you know exactly what each good ball is supposed to weigh and what each defective ball is supposed to weigh. Many of us instinctively will take one ball out of each box and try to find a way to make it work but the trick to take different number of balls from each box.&lt;br /&gt;The number of balls you pick from each bag is equal to the box number. For example, pick 1 ball from box 1, 2 balls from box 2 and so on. In total you will have 55 balls. If all of the boxes have good balls, then the total weight of these balls would be 550gm.&lt;br /&gt;If box 1 has defective balls, then the total weight should be 1gm less than expected (only one ball weighing 9 gm). If box 2 has defective balls, then the total weight should be 2gm less than expected (two balls weighing 9 gm). So once you weigh the set of chosen balls, find out the difference between the total weight and the expected weight. That number represents the box number which contains the defective balls.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-667460097049042881?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/667460097049042881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=667460097049042881' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/667460097049042881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/667460097049042881'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/03/microsoft-puzzle-box-of-defective-balls.html' title='Microsoft puzzle - A Box of Defective Balls'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pxUNdWyjHeo/S7F0Vg2geHI/AAAAAAAAACA/qdTsEZYK1ck/s72-c/balls.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-5883448730515648801</id><published>2010-03-25T08:55:00.000-07:00</published><updated>2010-03-29T20:38:03.506-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='7 Days work'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Puzzles'/><title type='text'>Gold for 7 Days of Work:  Asked by Microsoft</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pxUNdWyjHeo/S6uHNJzaR7I/AAAAAAAAAB4/S4P-vaujnGs/s1600/gold-bars.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_pxUNdWyjHeo/S6uHNJzaR7I/AAAAAAAAAB4/S4P-vaujnGs/s320/gold-bars.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;This puzzle is also asked by Microsoft. But this is famous puzzle asked by almost all companies nowadays interviews while recruiting people. This puzzle is not math oriented. By using simple analytic logic we can answer this puzzle.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Puzzle :&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Lets us consider someone working for you seven days. You have a Gold bar to pay him. You must pay the worker for their work at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker? (Assuming equal amount of work is done during each day thus requiring equal amount of pay for each day).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Answer :&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;The trick is not to try and how to cut in such a way to make 7 equal pieces but rather to make transactions with the worker. Make two cuts on the gold bar such that you have the following sizes of bars.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1/7, 2/7 and 4/7. For convenience sake, I would just refer to the bars as 1, 2 and 4.&lt;br /&gt;&lt;br /&gt;At the end of Day 1: Give Bar 1 (You- 2 and 4, Worker- 1)&lt;br /&gt;&lt;br /&gt;At the end of Day 2: Give Bar 2, Take back Bar 1 (You- 1 and 4, Worker- 2)&lt;br /&gt;&lt;br /&gt;At the end of Day 3: Give Bar 1 (You- 4, Worker- 1 and 2)&lt;br /&gt;&lt;br /&gt;At the end of Day 4: Give Bar 4, Take back Bar 1 and Bar 2 (You- 1 and 2, Worker- 4)&lt;br /&gt;&lt;br /&gt;At the end of Day 5: Give Bar 1 (You- 2, Worker- 1 and 4)&lt;br /&gt;&lt;br /&gt;At the end of Day 6: Give Bar 2, Take back Bar 1 (You- 1, Worker- 2 and 4)&lt;br /&gt;&lt;br /&gt;At the end of Day 7: Give Bar 1 (You- Empty, Worker- 1, 2 and 4)&lt;br /&gt;&lt;br /&gt;That should take care of everything.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-5883448730515648801?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/5883448730515648801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=5883448730515648801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5883448730515648801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5883448730515648801'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/03/gold-for-7-days-of-work-asked-by.html' title='Gold for 7 Days of Work:  Asked by Microsoft'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pxUNdWyjHeo/S6uHNJzaR7I/AAAAAAAAAB4/S4P-vaujnGs/s72-c/gold-bars.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-5380016044367049468</id><published>2010-03-25T08:50:00.000-07:00</published><updated>2010-03-29T20:36:39.476-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Three Ants on Triangle'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Puzzles'/><title type='text'>Microsoft interview Puzzle: Three Ants on Triangle</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pxUNdWyjHeo/S6uFOUPH7wI/AAAAAAAAABw/OkXbup23OfM/s1600/Three+Ants+on+Triangle.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_pxUNdWyjHeo/S6uFOUPH7wI/AAAAAAAAABw/OkXbup23OfM/s320/Three+Ants+on+Triangle.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;This puzzle is asked during interview by Microsoft while electing the people for their company. Now many companies ask this puzzle while recruiting the students.&amp;nbsp; This puzzle somewhat mathematical oriented. This interview puzzle is famously known as “Three Ants on Triangle” puzzle. People who know the concepts of probability can easily solve this puzzle.&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle Question:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Three ants are sitting at the three corners of an equilateral triangle. Each ant starts randomly picks a direction and starts to move along the edge of the triangle. What is the probability that none of the ants collide?&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Answer: &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;The ants can only avoid a collision if they all decide to move in the same direction (either clockwise or anti-clockwise). If the ants do not pick the same direction, there will definitely be a collision. Each ant has the option to either move clockwise or anti-clockwise. There is a one in two chance that an ant decides to pick a particular direction. Using simple probability calculations, we can determine the probability of no collision.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;P(No collision) = P(All ants go in a clockwise direction) + P( All ants go in an anti-clockwise direction) = 0.5 * 0.5 * 0.5 + 0.5 * 0.5 * 0.5 = 0.25&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="background: white; line-height: 170%; moz-background-clip: border; moz-background-inline-policy: continuous; moz-background-origin: padding;"&gt;&lt;b&gt;&lt;span style="color: #444444; font-family: &amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; font-weight: normal; line-height: 170%;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="background: white; line-height: 170%; moz-background-clip: border; moz-background-inline-policy: continuous; moz-background-origin: padding;"&gt;&lt;b&gt;&lt;span style="color: #444444; font-family: &amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; font-weight: normal; line-height: 170%;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="background: white; line-height: 170%; moz-background-clip: border; moz-background-inline-policy: continuous; moz-background-origin: padding;"&gt;&lt;b&gt;&lt;span style="color: #444444; font-family: &amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; font-weight: normal; line-height: 170%;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="background: white; line-height: 170%; moz-background-clip: border; moz-background-inline-policy: continuous; moz-background-origin: padding;"&gt;&lt;b&gt;&lt;span style="color: #444444; font-family: &amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; font-weight: normal; line-height: 170%;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="background: white; line-height: 170%; moz-background-clip: border; moz-background-inline-policy: continuous; moz-background-origin: padding;"&gt;&lt;b&gt;&lt;span style="color: #444444; font-family: &amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt; font-weight: normal; line-height: 170%;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-5380016044367049468?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/5380016044367049468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=5380016044367049468' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5380016044367049468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/5380016044367049468'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/03/microsoft-interview-puzzle-three-ants.html' title='Microsoft interview Puzzle: Three Ants on Triangle'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pxUNdWyjHeo/S6uFOUPH7wI/AAAAAAAAABw/OkXbup23OfM/s72-c/Three+Ants+on+Triangle.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7511823545290594231</id><published>2010-03-23T09:16:00.000-07:00</published><updated>2010-05-19T21:08:49.471-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Puzzles'/><title type='text'>Microsoft Puzzle : 100 Prisoners in Solitary Cells</title><content type='html'>&lt;div style="font-family: Verdana,sans-serif; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: center;"&gt;&lt;b&gt;100 Prisoners in Solitary Cells&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;Puzzle :&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: justify;"&gt;100 prisoners are stuck in the prison in solitary cells. The warden of the prison got bored one day and offered them a challenge. He will put one prisoner per day, selected at random (a prisoner can be selected more than once), into a special room with a light bulb and a switch which controls the bulb. No other prisoners can see or control the light bulb. The prisoner in the special room can either turn on the bulb, turn off the bulb or do nothing. On any day, the prisoners can stop this process and say “Every prisoner has been in the special room at least once”. If that happens to be true, all the prisoners will be set free. If it is false, then all the prisoners will be executed. The prisoners are given some time to discuss and figure out a solution. How do they ensure they all go free?&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;Answer :&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: justify;"&gt;Since this is the only way they will EVER get out of that prison, they decide to work together and make a plan. They select one prisoner (Bob, easier to refer) as the counter.&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: justify;"&gt;Every time any prisoner is selected other than Bob, they follow these steps. If they have never turned on the light bulb before and the light bulb is off, they turn it on. If not, they don’t do anything (simple as that). Now if Bob is selected and the light bulb is already on, he adds one to his count and turns off the bulb. If the bulb is off, he just sits there meditates or whatever he wants to. The day his count reaches 99, he calls the warden and tells him “Every prisoner has been in the special room at least once”.&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: justify;"&gt;So how does this solution work? Every time a prisoner enters the room first, he turns on the bulb if it is off. This way every prisoner turns on the bulb only once. When Bob enters and sees the bulb on, he knows that one new prisoner has entered the room so he adds one to his count. So when his counter reaches 99, he knows the rest of them have all been in the special room and obviously, he has been in the special room.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7511823545290594231?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7511823545290594231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7511823545290594231' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7511823545290594231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7511823545290594231'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/03/microsoft-puzzle-100-prisoners-in.html' title='Microsoft Puzzle : 100 Prisoners in Solitary Cells'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-2030634470271687471</id><published>2010-03-23T09:14:00.000-07:00</published><updated>2010-03-23T09:18:05.998-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Puzzles'/><title type='text'>Is Your Husband a Cheat? : Puzzle Asked by Microsoft</title><content type='html'>&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Microsoft Riddle : &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This puzzle is asked by Microsoft while selecting the people for their company. This puzzle or Riddle is famous for interviewers while they taking interviews.&amp;nbsp;&amp;nbsp;&amp;nbsp; This puzzle is famously known as "Is Your Husband a Cheat". Visitors of this page can try to answer this puzzle.&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: center;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&amp;nbsp;Is Your Husband a Cheat?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;Puzzle&lt;/b&gt; : A certain town comprises of 100 married couples. Everyone in the town lives by the following rule: If a husband cheats on his wife, the husband is executed as soon as his wife finds out about him. All the women in the town only gossip about the husbands of other women. No woman ever tells another woman if her husband is cheating on her.&amp;nbsp; So every woman in the town knows about all the cheating husbands in the town except her own. It can also be assumed that a husband remains silent about his infidelity. One day, the mayor of the town announces to the whole town that there is at least 1 cheating husband in the town. What do you think happens?&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;Answer&lt;/b&gt; :&amp;nbsp; Stumped? Let’s solve this methodically. Say there was only 1 cheating husband in the town. There will be 99 women who know exactly who the cheater is. The 1 remaining woman, who is being cheated on, would have assumed there are no cheaters. But now that the mayor has confirmed that there is at least one cheater, she realizes that her own husband must be cheating on her. So her husband gets executed on the day of the announcement.&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;Now let’s assume there are 2 cheaters in the town. There will be 98 women in the town who know who the 2 cheaters are. The 2 wives, who are being cheated on, would think that there is only 1 cheater in the town.&amp;nbsp; Since neither of these 2 women know that their husbands are cheaters, they both do not report their husbands in on the day of the announcement. The next day, when the 2 women see that no husband was executed, they realize that there could only be one explanation – both their husbands are cheaters. Thus, on the second day, 2 husbands are executed.&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;Through induction, it can be proved that when this logic is applied to n cheating husbands, they all die on the n th day after the mayor’s announcement.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-2030634470271687471?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/2030634470271687471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=2030634470271687471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2030634470271687471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/2030634470271687471'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/03/is-your-husband-cheat-puzzle-asked-by.html' title='Is Your Husband a Cheat? : Puzzle Asked by Microsoft'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6149692539226863505.post-7028985889585454047</id><published>2010-03-16T05:52:00.000-07:00</published><updated>2010-05-13T01:31:47.233-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Puzzle'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Puzzle'/><title type='text'>Google Interview Puzzle : 2 Egg Problem...</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_pxUNdWyjHeo/S5-Gl3OoyzI/AAAAAAAAAAU/_D4vb_w3als/s1600-h/2eggs.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5449222059180215090" src="http://1.bp.blogspot.com/_pxUNdWyjHeo/S5-Gl3OoyzI/AAAAAAAAAAU/_D4vb_w3als/s320/2eggs.jpg" style="cursor: pointer; display: block; height: 178px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;This Puzzle is asked by Google while they had an interview to a select student&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;for their company. Then many companies asked this Puzzle during their&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;interview or written test in campus. This puzzle is famously known as 2 Egg&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Problem. The puzzle is given below. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Puzzle : Two Egg Problem:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana; font-size: small; line-height: 25px;"&gt;* You are given 2 eggs.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;* You have access to a 100-storey building.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;* Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;* You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;* Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;If you are one of the people who likes to solve a puzzle before seeing the answer you must quit the blog now and come back later for checking the answer.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black; text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;Now that this is a Google interview question I am taking the normal "Interview-Style" of solving a problem. Simply saying thinking aloud through the solution from worst to the best correcting the flows optimizing the solution or taking the 5-minute hard thinking acting pause to a problem, which you know already and just want to make your interviewer think that you are a challenge lover.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: #5a5949; font-size: medium; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: #5a5949; font-size: medium; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: #5a5949; font-size: medium; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;Answer :&lt;/span&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="color: #5a5949; font-size: medium; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Let x be the answer we want, the number of drops required.&lt;br /&gt;&lt;br /&gt;So if the first egg breaks maximum we can have x-1 drops and so we must always put the first egg from height x. So we have determined that for a given x we must drop the first ball from x height. And now if the first drop of the first egg doesn’t breaks we can have x-2 drops for the second egg if the first egg breaks in the second drop.&lt;br /&gt;&lt;br /&gt;Taking an example, lets say 16 is my answer. That I need 16 drops to find out the answer. Lets see whether we can find out the height in 16 drops. First we drop from height 16,and if it breaks we try all floors from 1 to 15.If the egg don’t break then we have left 15 drops, so we will drop it from 16+15+1 =32nd floor. The reason being if it breaks at 32nd floor we can try all the floors from 17 to 31 in 14 drops (total of 16 drops). Now if it did not break then we have left 13 drops. and we can figure out whether we can find out whether we can figure out the floor in 16 drops.&lt;br /&gt;&lt;br /&gt;Lets take the case with 16 as the answer&lt;br /&gt;&lt;br /&gt;1 + 15 16 if breaks at 16 checks from 1 to 15 in 15 drops&lt;br /&gt;1 + 14 31 if breaks at 31 checks from 17 to 30 in 14 drops&lt;br /&gt;1 + 13 45 .....&lt;br /&gt;1 + 12 58&lt;br /&gt;1 + 11 70&lt;br /&gt;1 + 10 81&lt;br /&gt;1 + 9 91&lt;br /&gt;1 + 8 100 We can easily do in the end as we have enough drops to accomplish the task&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now finding out the optimal one we can see that we could have done it in either 15 or 14 drops only but how can we find the optimal one. From the above table we can see that the optimal one will be needing 0 linear trials in the last step.&lt;br /&gt;&lt;br /&gt;So we could write it as&lt;br /&gt;&lt;br /&gt;(1+p) + (1+(p-1))+ (1+(p-2)) + .........+ (1+0) &amp;gt;= 100.&lt;br /&gt;&lt;br /&gt;Let 1+p=q which is the answer we are looking for&lt;br /&gt;&lt;br /&gt;q (q+1)/2 &amp;gt;=100&lt;br /&gt;&lt;br /&gt;Solving for 100 you get q=14.&lt;br /&gt;So the answer is: 14&lt;br /&gt;Drop first orb from floors 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100... (i.e. move up 14 then 13, then 12 floors, etc) until it breaks (or doesn't at 100).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #5a5949; font-size: medium; line-height: 25px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;SE5NFN73424Q&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6149692539226863505-7028985889585454047?l=www.techinterviewpuzzles.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.techinterviewpuzzles.com/feeds/7028985889585454047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6149692539226863505&amp;postID=7028985889585454047' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7028985889585454047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6149692539226863505/posts/default/7028985889585454047'/><link rel='alternate' type='text/html' href='http://www.techinterviewpuzzles.com/2010/03/google-interview-puzzle-2-egg-problem.html' title='Google Interview Puzzle : 2 Egg Problem...'/><author><name>Interview Puzzles</name><uri>http://www.blogger.com/profile/16290304124116073117</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pxUNdWyjHeo/S5-Gl3OoyzI/AAAAAAAAAAU/_D4vb_w3als/s72-c/2eggs.jpg' height='72' width='72'/><thr:total>5</thr:total></entry></feed>
