tag:blogger.com,1999:blog-20938158916719241322024-03-21T06:11:56.485+05:30The Riddle SpotArnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.comBlogger62125tag:blogger.com,1999:blog-2093815891671924132.post-43366169279108295632011-07-19T14:48:00.008+05:302011-07-21T14:43:33.189+05:30GameBoard<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc3kxAWa3WJIbFsapSzcfQxmonSKGVxXWEapoUx_VXTviy0wBhovNfVlmEiYaJeLAh6f-zMCGdXAa3nvh30bMlpqc6GiJDoQnBSQcIZe-nbGEuAKcNh1AjETCBkcRZYlELI3TPlk167yXX/s1600/GameBoard.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 290px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc3kxAWa3WJIbFsapSzcfQxmonSKGVxXWEapoUx_VXTviy0wBhovNfVlmEiYaJeLAh6f-zMCGdXAa3nvh30bMlpqc6GiJDoQnBSQcIZe-nbGEuAKcNh1AjETCBkcRZYlELI3TPlk167yXX/s320/GameBoard.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5630991736772806018" /></a><br /><span class="Apple-style-span" style="font-family:arial;">A simple "Conway's Game of Life" Board using a trivial over-the-weekend framework. </span><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span"><br /></span><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;">Works at-least...<br /><br /><br /></span></div><div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><span class="Apple-style-span" style="font-family:arial;"><a href="https://sites.google.com/site/tumbleddowntoearth/home/downloads/GameBoard.zip">Download</a></span></div></div></div>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-18981901881339604462010-09-21T19:48:00.002+05:302010-09-21T19:54:24.267+05:30RECEME - Remote Command Execution through eMail Exchange<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.codeproject.com/KB/applications/receme/screenshot.GIF"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 298px; height: 202px;" src="http://www.codeproject.com/KB/applications/receme/screenshot.GIF" border="0" alt="" /></a><div style="text-align: left;"><span class="Apple-style-span" style="font-size: small; "><b>A service concept is implemented here for seamless & connectionless computation from anywhere to anywhere</b></span></div><div><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: small;"><br /><b>RE</b>mote <b>C</b>ommand <b>E</b>xecution through e<b>M</b>ail <b>E</b>xchange or <b>RECEME </b>successfully attempts to solve the problem of remote code execution. The proposed solution executes any .Net runnable code on a computer(where the service application is up and running) in the form of a 'ICommand'.</span></span></div><div><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: small;"><br />The commands can be fired from any other location by sending an email/twit/(or any other mode in principle eg sms/phone/etc) to the connected communication client (email-box in the current implementation).<br /><br /><a href="http://www.codeproject.com/KB/applications/receme.aspx" target="_blank">more at codeproject.com...</a></span></span></div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span"><br /></span></div><div><span class="Apple-style-span"><br /></span></div>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-54275116319421861712009-12-13T10:36:00.004+05:302009-12-13T10:39:18.261+05:30#60<span class="Apple-style-span" style="font-family:arial;"><b>WinHooksDemo</b><br /><br />Capture mouse click/move points and a small area around it as image.<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvOR5SZfqUs7CvcM7pcffeU8dzQ9uLifu_Fe-mlbfywc8AfHLunPGzrbBOeJylx2C6qaYXRq7SZ5NUZYpyLBxbhutBbcFZ8HU-_0zuHFsHpnxlWe09Akhyphenhyphen9Uj6ULDafIOM_4E_ZGG9q1JO/s1600-h/winhook.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 300px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvOR5SZfqUs7CvcM7pcffeU8dzQ9uLifu_Fe-mlbfywc8AfHLunPGzrbBOeJylx2C6qaYXRq7SZ5NUZYpyLBxbhutBbcFZ8HU-_0zuHFsHpnxlWe09Akhyphenhyphen9Uj6ULDafIOM_4E_ZGG9q1JO/s320/winhook.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5414582946652165266" /></a><span class="Apple-style-span" style="font-family:arial;"><br /><br /><br /></span><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><a href="http://arnab.i.googlepages.com/WinHooksDemo.zip">Download</a></span></div>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-25196145364562824412009-12-13T10:26:00.005+05:302009-12-13T10:33:55.238+05:30#59<b><span class="Apple-style-span" style="font-family:arial;">DicomPuppy</span></b><span class="Apple-style-span" style="font-family:arial;"><br /><br />A short Dicom Searcher/Sorter/Reporting tool helps to find dicom files from a dicom database of huge size. Files with specific attributes can be found and sorted in a notepad/excel, which can then be used to look for exact values.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWrErZuTcOmDu8hvZ3RhNFd304cvcRwm2QnI3Is9HCPvjYolhyprq8A9PPw1Rd_EW3RRBPazx8XaVWX9tLYbKBeQZpz4LgW5DE1-qO1Tn0MpNLlzPOcSkCyhYDypzoTKc6SPmUENjP_xuk/s1600-h/DicomPuppy.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 225px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWrErZuTcOmDu8hvZ3RhNFd304cvcRwm2QnI3Is9HCPvjYolhyprq8A9PPw1Rd_EW3RRBPazx8XaVWX9tLYbKBeQZpz4LgW5DE1-qO1Tn0MpNLlzPOcSkCyhYDypzoTKc6SPmUENjP_xuk/s320/DicomPuppy.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5414581449792498210" /></a><br /><br /><br /></span><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family:arial;"><a href="http://arnab.i.googlepages.com/DicomPuppy.zip">Download</a></span></div>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-68742118873127335492009-12-12T17:33:00.004+05:302009-12-13T10:26:21.051+05:30#58PROBLEM: Game of life<br /><br />The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, live or dead. Every cell interacts with its eight neighbours, which are the cells that are directly horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:<br /><br /> 1. Any live cell with fewer than two live neighbours dies, as if by loneliness.<br /> 2. Any live cell with more than three live neighbours dies, as if by overcrowding.<br /> 3. Any live cell with two or three live neighbours lives, unchanged, to the next generation.<br /> 4. Any dead cell with exactly three live neighbours comes to life.<br /> 5. Any dead cell with age > 3 dies (additional rule). Every generation creates an age for the cells<br /><br />The initial pattern constitutes the 'seed' of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed — births and deaths happen simultaneously, and the discrete moment at which this happens is sometimes called a tick. (In other words, each generation is a pure function of the one before.) The rules continue to be applied repeatedly to create further generations.<br /><br />Problem.<br />The inputs below represent the cells in the universe as X or - . X is a alive cell. - is a dead cell or no cell . The below inputs provide the provide pattern or initial cells in the universe . The output is the state of the system in the next tick (one run of the application of all the rules) , represented in the same format.<br /><br /><a onclick="expandcollapse('ANSWER58')" href="javascript:void(0);">Answer:</a> <ul class="texthidden" id="ANSWER58"><span style="font-family:courier new;"><a href="http://arnab.i.googlepages.com/GameOfLife.zip" target="_blank">Source code [ZIP] (C#)</a> </span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com1tag:blogger.com,1999:blog-2093815891671924132.post-75429976389642879472008-09-09T22:54:00.004+05:302008-09-09T23:09:10.910+05:30#57<span style="font-weight: bold;">ScreenShot</span><br />with mouse cursor (shape and position)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh5.ggpht.com/arnab.i/SMa0L3OnQMI/AAAAAAAABtk/Ucq6P4xslIY/s800/screenshot.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 525px; height: 301px;" src="http://lh5.ggpht.com/arnab.i/SMa0L3OnQMI/AAAAAAAABtk/Ucq6P4xslIY/s800/screenshot.jpg" alt="" border="0" /></a><br /><br />Windows default screenshot generator (using print-screen) does not capture the mouse position and shape. This is a nifty tool to capture the mouse shape and position using basic win32.<br /><br />Keep pressing F7 and the images are dumped in C:\<br /><br />---------- Source available on request<br /><br /><a onclick="expandcollapse('ANSWER57')" href="javascript:void(0);">Download</a> <ul class="texthidden" id="ANSWER57"><span style="font-family:courier new;"><span style="font-family:courier new;"><a href="http://arnab.i.googlepages.com/ScreenShot.zip" target="_blank">Binaries</a></span></span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-15787686110568886912008-03-07T18:49:00.008+05:302009-12-12T17:39:03.714+05:30#56<span style="font-family:verdana;">PROBLEM : MARS ROVERS<br /><br />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 therovers so that their on-board cameras can get a complete view of thesurrounding terrain to send back to Earth.<br /><br />A rover's position and location is represented by a combination of x and yco-ordinates and a letter representing one of the four cardinal compasspoints. The plateau is divided up into a grid to simplify navigation. Anexample position might be 0, 0, N, which means the rover is in the bottomleft corner and facing North.<br /><br />In order to control a rover, NASA sends a simple string of letters. Thepossible letters are 'L', 'R' and 'M'. 'L' and 'R' makes the rover spin 90degrees left or right respectively, without moving from its current spot.'M' means move forward one grid point, and maintain the same heading.<br /><br />Assume that the square directly North from (x, y) is (x, y+1).<br /><br />INPUT:<br />The first line of input is the upper-right coordinates of the plateau, thelower-left coordinates are assumed to be 0,0.<br /><br />The rest of the input is information pertaining to the rovers that havebeen deployed. Each rover has two lines of input. The first line gives therover's position, and the second line is a series of instructions tellingthe rover how to explore the plateau.<br /><br />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.<br /><br />Each rover will be finished sequentially, which means that the second roverwon't start to move until the first one has finished moving.<br /><br />OUTPUT<br />The output for each rover should be its final co-ordinates and heading.<br /><br />INPUT AND OUTPUT<br />Test Input:<br />5 5<br />1 2 N<br />LMLMLMLMM<br />3 3 E<br />MMRMMRMRRM<br /><br />Expected Output:<br />1 3 N<br />5 1 E<br />========== </span><br /><a onclick="expandcollapse('ANSWER56')" href="javascript:void(0);">Answer:</a> <ul class="texthidden" id="ANSWER56"><span style="font-family:courier new;"><a href="http://arnab.i.googlepages.com/MarsRover.zip" target="_blank">Source code [ZIP] (C#)</a> </span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com8tag:blogger.com,1999:blog-2093815891671924132.post-50748809264513640192007-09-21T17:48:00.000+05:302007-09-21T18:01:06.902+05:30#55<span style="font-family:verdana;">In the mathematical discipline of linear algebra, the Strassen algorithm, named after Volker Strassen, is an algorithm used for matrix multiplication. It is asymptotically faster than the standard matrix multiplication algorithm, but slower than the fastest known algorithm, and is useful in practice for large matrices.<br /><br />Volker Strassen published the Strassen algorithm in 1969. Although his algorithm is only slightly faster than the standard algorithm for matrix multiplication, he was the first to point out that Gaussian elimination is not optimal. His paper started the search for even faster algorithms such as the Winograd algorithm in 1980 (which uses 7 binary multiplications, but 15 binary additions instead of 18 with the Strassen algorithm), and the more complex Coppersmith–Winograd algorithm published in 1987.<br /><br />http://en.wikipedia.org/wiki/Strassen_algorithm<br /></span><br /><br /><a onclick="expandcollapse('ANSWER55')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER55"><span style="font-family:courier new;"><a href="http://www.geocities.com/sando4all/blogdownloads/algo.txt" target="_blank">http://www.geocities.com/sando4all/blogdownloads/algo.txt</a><br /></ul></span><br /><br /><span style="font-family:courier new;"></span>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-1484393262339106052007-05-22T16:41:00.000+05:302007-05-24T15:44:11.334+05:30#54<div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://dodownload.filefront.com/3899727//040ee14f96d4b7c32d79fc6746156d57913d632bac7de9df14b42a34886c9d3f3a97e06c498567ef"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh3.google.com/image/arnab.i/RlUaxuVD9eI/AAAAAAAAAUY/NvFjzfGrecg/s800/solvethis.jpg" /></a></div><br /><br /><a href="http://dodownload.filefront.com/3899727//040ee14f96d4b7c32d79fc6746156d57913d632bac7de9df14b42a34886c9d3f3a97e06c498567ef"><span style="font-family:courier new;">http://dodownload.filefront.com/3899727//040ee14f96d4b7c32d79fc6746156d57913d632bac7de9df14b42a34886c9d3f3a97e06c498567ef</span></a><br /><br /><span style="font-family:verdana;">This is a car maze puzzle ... </span><br /><span style="font-family:verdana;">(you need powerpoint or a pps reader to play it)</span><br /><span style="font-family:Verdana;"></span><br /><br /><a onclick="expandcollapse('ANSWER54')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER54"><br /><span style="font-family:verdana;">RIGHT -> RIGHT -> DOWN -> UP -> UP -> DOWN -> RIGHT -> DOWN -> LEFT -> LEFT -> LEFT -> RIGHT -> UP -> LEFT -> DOWN -> DOWN -> RIGHT -> RIGHT -> RIGHT -> RIGHT<br /><br /><em>The directions are relative to the player and not relative to the car.<br /></em></span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-24622591120040990312007-05-22T08:49:00.000+05:302007-05-22T08:56:25.622+05:30#53<div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh3.google.com/image/arnab.i/Rk1kFuVD8iI/AAAAAAAAAM0/tYHV896ymf8/s800/lateral-thinking-1.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh3.google.com/image/arnab.i/Rk1kFuVD8iI/AAAAAAAAAM0/tYHV896ymf8/s800/lateral-thinking-1.jpg" /></a></div><br /><br /><a onclick="expandcollapse('ANSWER53a')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER53a"><br /><div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh3.google.com/image/arnab.i/Rk1kFuVD8mI/AAAAAAAAANU/OxWxJkNrNU0/s800/lateral-thinking-ans-1.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh3.google.com/image/arnab.i/Rk1kFuVD8mI/AAAAAAAAANU/OxWxJkNrNU0/s800/lateral-thinking-ans-1.jpg" /></a></div></ul><br /><br /><div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh3.google.com/image/arnab.i/Rk1kFuVD8jI/AAAAAAAAAM8/FJEpbzJJbb8/s800/lateral-thinking-2.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh3.google.com/image/arnab.i/Rk1kFuVD8jI/AAAAAAAAAM8/FJEpbzJJbb8/s800/lateral-thinking-2.jpg" /></a></div><br /><br /><a onclick="expandcollapse('ANSWER53b')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER53b"><br /><div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh4.google.com/image/arnab.i/Rk1kO-VD8nI/AAAAAAAAANc/2yKvIOt23oc/s800/lateral-thinking-ans-2.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh4.google.com/image/arnab.i/Rk1kO-VD8nI/AAAAAAAAANc/2yKvIOt23oc/s800/lateral-thinking-ans-2.jpg" /></a></div></ul><br /><br /><div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh3.google.com/image/arnab.i/Rk1kFuVD8kI/AAAAAAAAANE/zuC0DkA80IA/s800/lateral-thinking-3.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh3.google.com/image/arnab.i/Rk1kFuVD8kI/AAAAAAAAANE/zuC0DkA80IA/s800/lateral-thinking-3.jpg" /></a></div><br /><br /><a onclick="expandcollapse('ANSWER53c')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER53c"><br /><div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh4.google.com/image/arnab.i/Rk1kO-VD8oI/AAAAAAAAANk/ETOzSoL5rss/s800/lateral-thinking-ans-3.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh4.google.com/image/arnab.i/Rk1kO-VD8oI/AAAAAAAAANk/ETOzSoL5rss/s800/lateral-thinking-ans-3.jpg" /></a></div></ul><br /><br /><div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh3.google.com/image/arnab.i/Rk1kFuVD8lI/AAAAAAAAANM/-Z-LKOOy2qE/s800/lateral-thinking-4.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh3.google.com/image/arnab.i/Rk1kFuVD8lI/AAAAAAAAANM/-Z-LKOOy2qE/s800/lateral-thinking-4.jpg" /></a></div><br /><br /><a onclick="expandcollapse('ANSWER53d')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER53d"><br /><div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh4.google.com/image/arnab.i/Rk1kO-VD8pI/AAAAAAAAANs/mltXo-r1iNw/s800/lateral-thinking-ans-4.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://lh4.google.com/image/arnab.i/Rk1kO-VD8pI/AAAAAAAAANs/mltXo-r1iNw/s800/lateral-thinking-ans-4.jpg" /></a></div></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-66083486416642155532007-05-10T12:15:00.000+05:302007-05-10T12:28:16.719+05:30#52<span style="font-family:verdana;"><em>Brain Teasers</em><br /><br />1. A man gave one son 10 cents and another son was given 15 cents. What time is it? </span><br /><span style="font-family:verdana;"><br /><a onclick="expandcollapse('ANSWER52a')" href="javascript:void(0);">Answer:</a><br /><br /><br /></span><span style="font-family:verdana;"></span><span style="font-family:verdana;"><ul class="texthidden" id="ANSWER52a">1:45. The man gave away a total of 25 cents. He divided it between two people. Therefore, he gave a quarter to two.</ul>2. If I were in Hawaii and dropped a bowling ball in a bucket of water which is 45 degrees F, and dropped another ball of the same weight, mass, and size in a bucket at 30 degrees F, them at the same time, which ball would hit the bottom of the bucket first? Same question, but the location is in Canada?<br /><br /><a onclick="expandcollapse('ANSWER52b')" href="javascript:void(0);">Answer:</a><br /><br /><br /><ul class="texthidden" id="ANSWER52b">Both questions, same answer: the ball in the bucket of 45 degree F water hits the bottom of the bucket last. Did you think that the water in the 30 degree F bucket is frozen? Think again. The question said nothing about that bucket having anything in it. Therefore, there is no water (or ice) to slow the ball down</ul><br />3. What is the significance of the following: The year is 1978, thirty-four minutes past noon on May 6th.<br /><br /><a onclick="expandcollapse('ANSWER52c')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER52c">The time and month/date/year are 12:34, 5/6/78.</ul><br /><br /><br />4. The Elder Twin - One day Kerry celebrated her birthday. Two days later her older twin brother, Terry, celebrated his birthday. Why?<br /><br /><a onclick="expandcollapse('ANSWER52d')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER52d">At the time she went into labor, the mother of the twins was travelling by boat. The older twin, Terry, was born first early on March 1st. The boat then crossed a time zone and Kerry, the younger twin, was born on February the 28th. Therefore, the younger twin celebrates her birthday two days before her older brother.</ul><br />5. Trouble with Sons - 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?<br /><br /><a onclick="expandcollapse('ANSWER52e')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER52e">They were two of a set of triplets (or quadruplets etc.) This puzzle stumps many people.</span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-55744095221970066302007-05-08T10:45:00.000+05:302007-05-08T10:50:18.702+05:30#51<span style="font-family:verdana;">What is the smallest <a href="http://en.wikipedia.org/wiki/Quine" target="_blank">quine</a> you've found so far ?</span><br /><br /><a onclick="expandcollapse('ANSWER51')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER51"><span style="font-family:courier new;">int main(){char c[]="int main()%c{%cchar c[]=%c%s%c;%cprintf(c,10,10,34,c,34,10,10,10);%c}%c";printf(c,10,10,34,c,34,10,10,10);}</span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-4906122559447351402007-05-08T10:43:00.000+05:302007-05-08T10:45:18.191+05:30#50<span style="font-family:verdana;">Check out a need coding for multidimesional arrays: </span><br /><br /><a onclick="expandcollapse('ANSWER50')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER50"><span style="font-family:courier new;">for(int i=0; i <>>a[i/n][i%n]; </span><br /><span style="font-family:verdana;">You can generalize this to whatever size and way you wanna :D </span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-62830758164091614332007-05-08T10:37:00.000+05:302007-05-08T10:39:26.660+05:30#49<span style="font-family:verdana;">Caps off code</span><br /><br /><a onclick="expandcollapse('ANSWER49a')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER49a"><span style="font-family:courier new;">void main(){ *(char far *)1047 &= 191; }</span></ul><span style="font-family:verdana;"></span><br /><span style="font-family:verdana;">Caps on code</span><br /><br /><a onclick="expandcollapse('ANSWER49b')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER49b"><span style="font-family:courier new;">void main(){ *(char far *)1047 = 64; }</span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-10870788061612092802007-05-08T10:27:00.000+05:302007-05-08T10:35:22.061+05:30#48<span style="font-family:verdana;">1. Printing "Hello World" without using a single semi colon in C:</span><br /><br /><a onclick="expandcollapse('ANSWER48a')" href="javascript:void(0);">Answer:</a><br /><br /><ul class="texthidden" id="ANSWER48a"><span style="font-family:verdana;">This is an age old problem, and most people have known it by now.<br /><br /><span style="font-family:courier new;">main(){if(printf("hello world")){}}<br /></span><br />check I havnt used a semi colon :D<br /></span></ul><span style="font-family:verdana;"><br />2. Ever thought of finding the greatest of 2 numbers without using using any comparison operators ?</span><br /><br /><a onclick="expandcollapse('ANSWER48b')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER48b"><span style="font-family:verdana;"><br />Same old problem. Basically a little maths:<br /><br /></span><span style="font-family:courier new;">a = 10;<br />b = 5;<br /><br />c = [(a + b) + abs(a - b)]/2;// c will hold the greater of a and b<br />d = [(a + b) - abs(a - b)]/2;// d will hold the lesser of a and b<br /></span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-36329983936479074262007-05-08T10:23:00.000+05:302007-05-08T10:26:21.728+05:30#47<span style="font-family:verdana;">What is the “condition” such that .. this snippet of code prints HelloWorld!! </span><br /><span style="font-family:verdana;"></span><br /><span style="font-family:courier new;">if condition </span><br /><span style="font-family:courier new;">printf(”Hello); </span><br /><span style="font-family:courier new;">else </span><br /><span style="font-family:verdana;"><span style="font-family:courier new;">print(”World!!);</span> </span><br /><span style="font-family:verdana;"></span><br /><a onclick="expandcollapse('ANSWER47')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER47"><br /><span style="font-family:verdana;">This problem ... tampered my senses a lot .. and after asking a lot of people ... i could manage a very ordinary solution ... And still not satisfied with that ... I look for a solution ... where the condition would be suh that both parts get executed.. though its a falacy or WRONG in the words of compiler .. The current irritating solution is: </span><br /><span style="font-family:verdana;"></span><br /><span style="font-family:courier new;">if ( printf(”Hello”)<0)><br /><span style="font-family:courier new;">printf(”Hello”); </span><br /><span style="font-family:courier new;">else </span><br /><span style="font-family:verdana;"><span style="font-family:courier new;">printf(”World!!);</span> </span><br /><span style="font-family:verdana;"></span><br /><span style="font-family:verdana;">There seems to be another solution by writing just one more line:</span><br /><span style="font-family:verdana;"></span><br /><span style="font-family:courier new;">#define else ;</span><br /></span><span style="font-family:courier new;"></span><br /></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-16866026082478596392007-05-03T08:57:00.000+05:302007-05-03T09:00:00.377+05:30#46<p><span style="font-family:verdana;">What number comes next in the sequence: 10, 9, 60, 90, 70, 66?<br /><br />A) 96<br />B) 1000000000000000000000000000000000\<br />0000000000000000000000000000000000\<br />000000000000000000000000000000000<br />C) Either of the above<br />D) None of the above<br /></span></p><br /><a onclick="expandcollapse('ANSWER46')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER46"><p><span style="font-family:verdana;">This can be looked up and found to be sequence A052196 <a href="http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=A052196">http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=A052196</a></span><span style="font-family:verdana;"> in the On-Line Encyclopedia of Integer Sequences, which gives the largest positive integer whose English name has n letters. For example, the first few terms are ten, nine, sixty, ninety, seventy, sixty-six, ninety-six A more correct sequence might be ten, nine, sixty, googol, seventy, sixty-six, ninety-six, googolplex. And also note, incidentally, that the correct spelling of the mathematical term "googol" <a href="http://mathworld.wolfram.com/Googol.html">http://mathworld.wolfram.com/Googol.html</a> differs from the name. The first few can be computed using the NumberName function in Eric Weisstein's MathWorld packages <a title="http://mathworld.wolfram.com/packages/" href="http://mathworld.wolfram.com/packages/">http://mathworld.wolfram.com/packages/</a> </span></p></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-60149177937834568502007-05-03T08:51:00.000+05:302007-05-03T08:53:52.086+05:30#45<p><span style="font-family:verdana;">1<br />1 1<br />2 1<br />1 2 1 1<br />1 1 1 2 2 1<br /><br /><em>What's the next line?</em><br /></span></p><br /><a onclick="expandcollapse('ANSWER45')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER45"><p><span style="font-family:verdana;">312211.<br /><br />This is the "look and say" sequence in which each term after the first describes the previous term: one 1 (11); two 1s (21); one 2 and one 1 (1211); one 1, one 2, and two 1's (111221); and so on. See the look and say sequence <a href="http://mathworld.wolfram.com/LookandSaySequence.html">http://mathworld.wolfram.com/LookandSaySequence.html</a> </span><span style="font-family:verdana;">entry on MathWorld for a complete write-up and the algebraic form of a fascinating related quantity known as Conway's constant <a href="http://mathworld.wolfram.com/ConwaysConstant.html">http://mathworld.wolfram.com/ConwaysConstant.html</a></span></p></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-17324818037476818992007-05-02T11:34:00.001+05:302007-05-03T08:51:06.290+05:30#44<p><span style="font-family:verdana;">The following number is the only one of its kind.<br />8,549,176,320<br />Can you figure out what is so special about it?<br /></span></p><br /><a onclick="expandcollapse('ANSWER44')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER44"><p><span style="font-family:verdana;">It's the only number that has all the digits arranged in alphabetical order.</span></p></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-79617023850091879742007-04-27T10:05:00.000+05:302007-04-27T10:18:11.263+05:30#43<div align="left"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/168/474207727_272da3a9d9_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/168/474207727_272da3a9d9_o.jpg" border="0" /></a> <span style="font-family:verdana;">Join these five figures to form a square</span><br /><a onclick="expandcollapse('ANSWER43')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER43"><span style="font-family:verdana;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/227/474195356_149a584c56_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/227/474195356_149a584c56_o.jpg" border="0" /></a><br /></span></ul></div>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-74659623145334787462007-04-27T09:50:00.000+05:302007-04-27T09:52:31.934+05:30#42<p><span style="font-family:verdana;">There are 100 light bulbs lined up in a row in a long room. Each bulb has its own switch and is currently switched off. The room has an entry door and an exit door. There are 100 people lined up outside the entry door. Each bulb is numbered consecutively from 1 to 100. So is each person.<br />Person No. 1 enters the room, switches on every bulb, and exits. Person No. 2 enters and flips the switch on every second bulb (turning off bulbs 2, 4, 6, …). Person No. 3 enters and flips the switch on every third bulb (changing the state on bulbs 3, 6, 9, …). This continues until all 100 people have passed through the room.<br />What is the final state of bulb No. 64? And how many of the light bulbs are illuminated after the 100th person has passed through the room? <br /></span></p><br /><a onclick="expandcollapse('ANSWER42')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER42"><br /><p><span style="font-family:verdana;">Right first the answers: Light Bulb 64 is on. The total number of bulbs which are on including #64 is 10.<br />First think who will operate each bulb, obviously person #2 will do all the even numbers, and say person #10 will operate all the bulbs that end in a zero. So who would operate for example bulb 48:<br />Persons numbered: 1 & 48, 2 & 24, 3 & 16, 4 & 12, 6 & 8 ........<br />That is all the factors (numbers by which 48 is divisible) will be in pairs. This means that for every person who switches a bulb on there will be someone to switch it off. This willl result in the bulb being back at it's original state.<br />So why aren't all the bulbs off?<br />Think of bulb 36:-<br />The factors are: 1 & 36, 2 & 13, 6 & 6<br />Well in this case whilst all the factors are in pairs the number 6 is paired with it's self. Clearly the sixth person will only flick the bulb once and so the pairs don't cancel. This is true of all the square numbers.<br />There are 10 square numbers between 1 and 100 (1, 4, 9, 16, 25, 36, 49, 64, 81 & 100) hence 10 bulbs remain on.<br /> </span></p></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com1tag:blogger.com,1999:blog-2093815891671924132.post-78829004605398339892007-04-27T09:25:00.000+05:302007-04-27T09:42:28.024+05:30#41<div align="left"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/177/474170213_257ab2a6fe_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/177/474170213_257ab2a6fe_o.jpg" border="0" /></a> <span style="font-family:verdana;">1) Choose and mark 6 of the following 24 boxes so that on each row and each column there are an even number of marks.</span><br /><a onclick="expandcollapse('ANSWER41a')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER41a"><span style="font-family:verdana;">There are several possible answers. If you know how many, please tell me. Here are some of the possibilities:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/194/474157362_e95dbc4943_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/194/474157362_e95dbc4943_o.jpg" border="0" /></a><br /></span></ul></div><br /><br /><div align="left"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/197/474170225_10b28fb0a4_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/197/474170225_10b28fb0a4_o.jpg" border="0" /></a> <span style="font-family:verdana;">2) What figure comes next?</span><br /><a onclick="expandcollapse('ANSWER41b')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER41b"><span style="font-family:verdana;">Each figure is built from a number. The first is constructed using a 1 and the mirrored image of a one, pasted together. The same goes for the second figure which is a 2 and a 2 mirrored, pasted together. And so on. So the answer is a 6 with it's mirrored image, pasted together<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/171/474157388_9eb68b82e5_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/171/474157388_9eb68b82e5_o.jpg" border="0" /></a><br /></span></ul></div><br /><br /><div align="left"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/172/474170241_0479128854_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/172/474170241_0479128854_o.jpg" border="0" /></a> <span style="font-family:verdana;">3) Draw four straight lines through all nine points without lifting your pen and without retracing.</span><br /><a onclick="expandcollapse('ANSWER41c')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER41c"><span style="font-family:verdana;"><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/167/474157304_ac55148192_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/167/474157304_ac55148192_o.jpg" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/214/474157322_8f3ad2160b_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/214/474157322_8f3ad2160b_o.jpg" border="0" /></a><br /></span></ul></div><br /><br /><div align="left"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/172/474170249_68eedcca90_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/172/474170249_68eedcca90_o.jpg" border="0" /></a> <span style="font-family:verdana;">4) Draw six straight lines through all sixtien points without lifting your pen and without retracing.</span><br /><a onclick="expandcollapse('ANSWER41d')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER41d"><span style="font-family:verdana;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/223/474157352_5c3478a722_o.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/223/474157352_5c3478a722_o.jpg" border="0" /></a><br /></span></ul></div>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-62815353993045172012007-04-26T14:31:00.000+05:302007-04-26T14:38:33.576+05:30#40<div align="left"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/214/473325991_30e48602d2_o.jpg"><span style="font-family:verdana;"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 300px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="http://farm1.static.flickr.com/214/473325991_30e48602d2_o.jpg" border="0" /></span></a></div><div align="left"><span style="font-family:verdana;">1)</span></div><div align="left"><span style="font-family:verdana;">You are a traveller and come to an inn. You want to stay for 7 days and you have a chain of 7 links. The innkeeper says you can stay at his inn if you pay one link of your chain per day. You cannot pay in advance. What is the minimum number of links you have to cut in order to stay the 7 days?</span></div><div align="left"><br /><a onclick="expandcollapse('ANSWER40a')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER40a"><br /><span style="font-family:verdana;">On the 1st day you cut the third link and give that link. On the second day you take it back and give the first 2 links. The third day you give the first and the second two links. On the 4th day you take all back and give the remaining 4 links connected. So in this way you just need to make 1 CUT.</span></ul></div><br /><div align="left"><span style="font-family:verdana;"></span></div><div align="left"><span style="font-family:verdana;">2)<br />Minimum how many cuts would you make to create this link chain?</span></div><div align="left"><br /><a onclick="expandcollapse('ANSWER40b')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER40b"><br /><span style="font-family:verdana;">3.</span><span style="font-family:verdana;">Cut the 2nd link and join 1->2->3. Then cut the 6th link and join 5->6->7. Then cut the 4th link to join the prev 2 chains.</span> </ul></div>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-43263859721573862572007-04-26T12:08:00.000+05:302007-04-26T12:09:17.433+05:30#39<span style="font-family:verdana;">Consider the number 3 0 2 5. It satisfies several interesting properties:<br />It has four digits<br />All four digits are different </span><br /><br /><span style="font-family:verdana;">If we take the number that is the first two digits and sum it with the number that composes the last two digits, its square is the original number: (30+25)2=3025. </span><br /><span style="font-family:verdana;">The original riddle asked you to find another such number. There is exactly one other, so altogether two. If the requirement that the digits be different is omitted, a third possibility presents itself. Finally, two more solutions enter into the game if we allow the four digits to include leading zeros, so all in all, five solutions to the relaxed version of this riddle.<br />It is this relaxed riddle that we want to consider. The riddle this month is composed of two questions. Answer both to be considered a solver. </span><br /><br /><span style="font-family:verdana;">Question 1:</span><br /><span style="font-family:verdana;">If the relaxed version of the riddle is asked in an arbitrary base, b, instead of in base 10, how many solutions is it going to have, as a function of b?<br />Question 2:</span><br /><span style="font-family:verdana;">Consider the strict (original) version of the riddle, but, once again, asked in base b instead of in base 10. Will there be an answer for every b≥4? Prove your claim. </span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;"><em>I am still to solve this</em></span>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0tag:blogger.com,1999:blog-2093815891671924132.post-59166308070037664082007-04-26T11:37:00.000+05:302007-04-26T14:28:49.728+05:30#38<em><span style="font-family:verdana;">Some more Liar and Knight with same rules:</span></em><br /><span style="font-family:verdana;"></span><br /><span style="font-family:verdana;">1)</span><br /><span style="font-family:verdana;">You come up to two strangers: A and B who are either a liar and a knight, both liars or both knights. A says "Either I am a liar or he is a knight." Who<br />is who in this situation? </span><br /><br /><a onclick="expandcollapse('ANSWER38a')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER38a"><br /><span style="font-family:verdana;">Both of them are knights</span><br /><br /><span style="font-family:verdana;">If A is a liar, his whole statement is false, which means; its not true that (A is a liar AND B is a knight). A is not a liar because his statement would make it a logical paradox.</span></ul><br /><br /><span style="font-family:verdana;">2)</span><br /><span style="font-family:verdana;">You again come up to two strangers: A and B who are either a liar and a knight, both liars or both knights. A says "At least one of us is a liar." Who<br />is who in this situation? </span><br /><br /><a onclick="expandcollapse('ANSWER38b')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER38b"><br /><span style="font-family:verdana;">A is a knight, B is a liar. </span><br /><span style="font-family:verdana;"></span><br /><span style="font-family:verdana;">If A is a liar then his statement is false and neither of them is a liar, so A is not a liar. Thus A is a knight.</span></ul><br /><br /><span style="font-family:verdana;">3)</span><br /><span style="font-family:verdana;">A stranger comes up to three people: A, B, and C who are liars, knights, or any combination of the two. The stranger asks A "Are you a knight or a liar?" He mumbled and the stranger did not understand what the answer was. The stranger then asked B "What did A say?" B says "A says he is a liar." Then C says "Don't believe B he is a liar." Who is who in the situation?<br /></span><br /><a onclick="expandcollapse('ANSWER38c')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER38c"><br /><span style="font-family:verdana;">B is a liar, C is a knight and A cannot be determined.</span><br /><br /><span style="font-family:verdana;">The statement that B said cannot be true since it would be a logical paradox for anyone to say I am a liar. this means B is a liar and the statement C makes comes right. So C is a knight</span></ul><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">4)</span><br /><span style="font-family:verdana;">A stranger comes up to three people: A, B, and C who are liars, knights, or any combination of the two. A says: "We are all liars." B says: "One of us is a knight." Who is who? </span><br /><a onclick="expandcollapse('ANSWER38d')" href="javascript:void(0);">Answer:</a><br /><ul class="texthidden" id="ANSWER38d"><br /><span style="font-family:Verdana;">A is a liar B is a knight C is a liar.</span><br /><br /><span style="font-family:Verdana;">If A is telling the truth then all of them are liars, which would force him to lie, but he is saying a true statement, so contradiction and A is a liar. Know A ia a liar means not all three are liars. If Bis telling the truth, he is thr knight and C is a liar, and that would corelate with A's statement. If B is lying, he is a liar. Now if C is a knight, B's statement would be true, but that can't happen since B is a liar. If C is a liar, A's statement would be true, but that can't happen since A is a liar.</span></ul>Arnab Palhttp://www.blogger.com/profile/12618321401321748431noreply@blogger.com0