tag:blogger.com,1999:blog-75034645770470931712024-03-06T03:27:10.642+05:30Random thoughts.Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-7503464577047093171.post-23217809010473493292016-07-31T01:01:00.000+05:302017-04-08T12:09:17.607+05:30Solving hard problems with time travel!<div dir="ltr" style="text-align: left;" trbidi="on">
<script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); </script> <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"> </script>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
If you find the title a tad bit cheesy and link-baitish, in my defence I would say that this <i>is</i> really exciting stuff. Stuff with <i>time travel</i> and <i>cats</i>! OK, maybe one cat. <span style="font-size: x-small;">Who is also, probably, not relevant to the plot.</span><br />
<br />
In a recent discussion on algorithm run-times, I seemed to faintly recall how you could <i>solve NP complete problems if you could do time-travel</i>. Yes, <u>time travel</u>. Sure enough, some amount of Googling later, I found the relevant arguments by <a href="https://en.wikipedia.org/wiki/Hans_Moravec" target="_blank">Hans Moravec</a>. Here is an <a href="https://www.frc.ri.cmu.edu/~hpm/project.archive/general.articles/1991/TempComp.html" target="_blank">article</a> by him. He also discusses this in his book - <i><a href="http://www.amazon.com/Robot-Mere-Machine-Transcendent-Mind/dp/0195136306" target="_blank">Robot: Mere Machine to Transcendent Mind</a> </i>; unfortunately, I could not find an affordable copy. I present the arguments from a small portion of the article in this post.<br />
<br />
Here's a high-level flow of what we're going to talk about:<br />
<ul style="text-align: left;">
<li>We discuss interesting modifications you can make to certain simple circuits if you could travel in time.</li>
<li>Then we see how those modifications can be used to solve certain kinds of problems.</li>
<li>And then we build on those ideas to solve some super tough algorithmic problems.</li>
</ul>
<br />
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">Circuits with feed back loops </span></h3>
<div style="text-align: left;">
<i>Logic gates</i> take as inputs binary signals - each a 0 or a 1 - and produce a binary output. We are interested in the<br />
<br />
<ol style="text-align: left;">
<li><i>amplifier </i>(or <i><a href="http://www.allaboutcircuits.com/textbook/digital/chpt-3/buffer-gate/" target="_blank">buffer</a></i>), which does not change the input signal, and </li>
<li>the <i>inverter</i> or the <i>NOT </i>gate which inverts the input. </li>
</ol>
<br />
Both these gates take in only one input. The following figure shows how they are represented - the fat end is the input and the pointed end is the output. The NOT gate looks like an amplifier with a, um, snot-nose.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmAVoGqLoYWep517YDv7N2Vr64DwBeWhdtamjvawGPRxek87WESl2pxIATFuck53XT1mA1L5ErXcon08UHvxXIqOFJ2SXyXgzQ4_9Or79wgaZG_MaZZyHleCkBErRdShtxz_v4ZnbBV9DS/s1600/all_gates.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="189" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmAVoGqLoYWep517YDv7N2Vr64DwBeWhdtamjvawGPRxek87WESl2pxIATFuck53XT1mA1L5ErXcon08UHvxXIqOFJ2SXyXgzQ4_9Or79wgaZG_MaZZyHleCkBErRdShtxz_v4ZnbBV9DS/s320/all_gates.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 1. The <i>amplifier</i> and <i>NOT</i> gates</span></td></tr>
</tbody></table>
<br />
<span style="font-family: inherit;">There is a </span><i style="font-family: inherit;">time-delay</i><span style="font-family: inherit;"> between the consuming of an input and producing the output (typically in nanoseconds). </span> We will denote this by \(\Delta t\).<br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Consider what would happen if, after sending in an initial input signal, we immediately connect the output to the input and hold that configuration. This arrangement is known as a <i>feedback loop</i>. This is shown below for the NOT gate; the amplifier circuit looks similar. Note the device labelled "measure" - we're interested in measuring output at this point in the circuit.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL4XE9CEUfWBoBZs_1_bPQNlETh2ZSr98aqu9l-VrVoVO07-swxSAAuGk-P7n7ruJntxVxC_GaZsp1A2vieN3vC5v7vKbF1KtctsRPc0sVWjtnuHfG52y9n6cAigi7VIZyKkoDCt6HltX8/s1600/pos_delay_not_circuit.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL4XE9CEUfWBoBZs_1_bPQNlETh2ZSr98aqu9l-VrVoVO07-swxSAAuGk-P7n7ruJntxVxC_GaZsp1A2vieN3vC5v7vKbF1KtctsRPc0sVWjtnuHfG52y9n6cAigi7VIZyKkoDCt6HltX8/s320/pos_delay_not_circuit.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 2. A feedback loop with the NOT gate</span></td></tr>
</tbody></table>
<span style="font-family: inherit;">The case for the amplifier seems pretty non-controversial: if we started with an input of 1, the output would be 1, which again feeds in, again becomes the output, and so on. All 1s. No problem.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">The case for the NOT gate does not seem so simple. Say, we start with a signal of value 1 i.e. the first input to the gate is a 1. This is transformed into a 0 after \(\Delta t\). This 0 immediately becomes the new input (we assume no delays in the wire, the only delay is in the gate), and another </span>\(\Delta t\)<span style="font-family: inherit;"> later 1 is the new output. Which then becomes the new input leading to an output of 0 another </span>\(\Delta t\) later. <span style="font-family: inherit;">It looks like after every duration equaling </span>\(\Delta t\)<span style="font-family: inherit;">, the output <i>switches </i>state i.e. it alternates between 1 and 0, starting with a 0. How rapidly this switching happens depends on the time delay - smaller values of </span>\(\Delta t\) lead to faster switching<span style="font-family: inherit;">. </span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">This is illustrated below. </span>We start observing our feedback circuit at time \(t_1\). <span style="font-family: inherit;">The readings obtained by the measuring device are shown as solid circles, <b><span style="color: #6aa84f;">green</span> </b>for <b><span style="color: #6aa84f;">1</span></b> and <span style="color: red;"><b>red </b></span>for <b><span style="color: red;">0</span></b>. Intervals of length \(\Delta t\) are marked. The signal value in the wire between these intervals of measurement is also shown - as adjacent colored rectangles under the time axis. After each duration of length </span>\(\Delta t\), the output becomes the new input immediately - this is shown by small tight loops with the appropriate color.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh_GFeCEw37ONSFqYSqH4SnNTo3eJqLfEOhWjUT93a7lvdsq1yNMKOrpLUQg89bsjOAjL1q__10c58MlSV_P7BMw6s-Pnm9WqKJMS3jof6IEn0q4Ciui8g2c4vCqK_0RLyfQxFYhvLcBHX/s1600/pos_delay_span_scheme.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="467" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh_GFeCEw37ONSFqYSqH4SnNTo3eJqLfEOhWjUT93a7lvdsq1yNMKOrpLUQg89bsjOAjL1q__10c58MlSV_P7BMw6s-Pnm9WqKJMS3jof6IEn0q4Ciui8g2c4vCqK_0RLyfQxFYhvLcBHX/s640/pos_delay_span_scheme.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 3. Behavior with positive time delay</span></td></tr>
</tbody></table>
The timeline for the amplifier holds no surprises. For the NOT gate, we see a green rectangle giving way to a red circle and a red loop; denoting inversion of the signal, and this inverted signal becoming the new input. This alternation goes on because of how the circuit is built i.e. the alternation exists <i><b>by construction</b></i>.<br />
<br />
What would you measure if the speed of switching becomes <i>infinitely</i> fast? 0? 1? Or something midway like 0.5?</div>
<h3 style="text-align: left;">
<span style="font-weight: normal;"><br /></span></h3>
<h3 style="text-align: left;">
<span style="font-weight: normal;">Time travel</span></h3>
<div>
<div style="font-weight: normal;">
<span style="font-family: inherit;">Before we answer that question, let's first ask how do you make the switching infinitely fast. And I am not using the term "infinitely" merely as a metaphor.</span><br />
<span style="font-family: inherit;"><br /></span>
One way is time-travel.Which, of course, is as easy as taking a stroll in the park. If you could send signals into the past, you could add a <i>negative time delay </i>unit in the circuit (reminds me of <i><a href="http://wiki.lspace.org/mediawiki/Reannual_plant" target="_blank">reannual plants</a>. </i>Terry Pratchett anyone?). The role of this unit is simple on paper - carry its input unchanged to a time in the past.<br />
<br />
With a unit like this plugged into the circuit, as shown in the following figure, what are the implications?</div>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnJ2XmGHXQVXXhvGGaXu9S6tiqGRZjzMdwARLL0lwbCrjzYiul8o8qYgf72t5KBqmaFFk23iYfuC7nqg2v5Q1UvyQQxie71mGzo3l-kkXLlpzEQuX4TmyefG0BYWDZMNDrq4Te030uFG9r/s1600/neg_delay_not_circuit.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnJ2XmGHXQVXXhvGGaXu9S6tiqGRZjzMdwARLL0lwbCrjzYiul8o8qYgf72t5KBqmaFFk23iYfuC7nqg2v5Q1UvyQQxie71mGzo3l-kkXLlpzEQuX4TmyefG0BYWDZMNDrq4Te030uFG9r/s320/neg_delay_not_circuit.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 4. Negative delay!!!</span></td></tr>
</tbody></table>
Consider a negative delay that conveys the signal back to the instant \(t_1\). In case of the NOT circuit, you might see yourself reasoning in this manner: "1 goes in, 0 comes out, which goes into the past implying that 1 hadn't gone in, 0 had. So 1 should come out. Which, alas, goes into the past and becomes the original input, and so 0 indeed should be the output ...".<br />
<br />
Clearly we need a diagram for the sake of sanity.<br />
<br />
The following figure shows the timeline in the spirit of the previous diagrams. But the negative delay causes interesting differences. We again start monitoring our circuit at \(t_1\) and start with a 1/green signal (<i>iteration 1</i> in the diagram). Till the gate is done inverting the signal i.e. in the interval from \(t_1\) to \(t_1+\Delta t\), we see the 1 signal in the wire - represented by the green rectangle. At \(t_1+\Delta t\), we measure a 0 - red circle - and this signal feeds back into the gate as the new input <i>in the past</i> i.e. as if 0 <i>was the the input to begin with</i>. The diagram shows the input arc stretching back to just around \(t_1\).</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div style="font-weight: normal;">
<div class="separator" style="clear: both; font-weight: normal; text-align: center;">
</div>
<div class="separator" style="clear: both; font-weight: normal; text-align: center;">
</div>
<div class="separator" style="clear: both; font-weight: normal; text-align: center;">
</div>
<div class="separator" style="clear: both; font-weight: normal; text-align: center;">
</div>
<div class="separator" style="clear: both; font-weight: normal; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="font-weight: normal; margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCkS-ZxiSw38f-5S7eGUzQpsApfW_KmakD4I_PxkD4_vYiBwE5NbomprmoT7VPKcdTpJgQjeOWmrKm_XLWxDJ1ripih_Kr998XP8YTZ88Vk7LGqEHczefv_mzI9QTama_2WH6Gw13-uzoA/s1600/neg_delay_span.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCkS-ZxiSw38f-5S7eGUzQpsApfW_KmakD4I_PxkD4_vYiBwE5NbomprmoT7VPKcdTpJgQjeOWmrKm_XLWxDJ1ripih_Kr998XP8YTZ88Vk7LGqEHczefv_mzI9QTama_2WH6Gw13-uzoA/s400/neg_delay_span.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 5. Quantum superposition for the NOT gate</span></td></tr>
</tbody></table>
<div style="font-weight: normal;">
Beyond this, iteration 2 begins and a similar sequence of steps execute and lead to future iterations. While in Fig 3, the iterations progressed from left-to-right on the time axis, here they all are observed within the same time span, \(t_1\) to \(t_1+\Delta t\) - hence they are shown stacked vertically. The mind-warping catch here is that like before, <i><b>by construction</b></i>, <i>all</i> these iterations <i>will</i> happen and hence you will have an infinite number of <i style="font-weight: normal;">both </i>0s and 1s, from different iterations, as legal values of the measurement at \(t_1+\Delta t\). All of them supposed to show up at the same precise instant.</div>
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
So, what does the device measure?</div>
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
<div style="font-weight: normal;">
Say hello to the interesting notion of <a href="http://www.physicsoftheuniverse.com/topics_quantum_superposition.html" style="font-style: italic;" target="_blank">quantum superposition</a>. The idea is that at the subatomic level entities can be in multiple states <i>simultaneously</i>. Here, the signal, which we assume to be a result of phenomena at the subatomic level, is <i>both</i> a 0 and a 1. Quantum mechanics also tells us that superposition exists <i>until</i> we <i>measure</i> the signal which leads to <i>decoherence</i> or its<i> collapse</i>: this is geek-speak for "one state is forced on the entity when we measure its state".</div>
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="font-weight: normal; margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXvBmvQF3Fe8Bqx0Fu3C39pa1cncpe3Czh5ZOTWpuqiqo2nekMuCEDchajqy0ClPh8oxoWgctTwQd6BxuxzMHLnlOxR3KiyZoYTd2rueY2aEdQhVSzRcjQ01ke5p71jEwqc7OudSZSDP0H/s1600/schrodingers_cat.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXvBmvQF3Fe8Bqx0Fu3C39pa1cncpe3Czh5ZOTWpuqiqo2nekMuCEDchajqy0ClPh8oxoWgctTwQd6BxuxzMHLnlOxR3KiyZoYTd2rueY2aEdQhVSzRcjQ01ke5p71jEwqc7OudSZSDP0H/s320/schrodingers_cat.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 6. A cat as promised.</span><span style="font-size: small;">Because I used the word "quantum" and I like cats.</span></td></tr>
</tbody></table>
<div style="font-weight: normal;">
Here's where I ask you to ignore the specifics of what constitutes the "signal" and the "measuring device". Note how I haven't mentioned the signals are <i>electrical</i> in nature. I want you to think of all this time-travel business logically - 1/0 signals maybe represented by positive/negative electrical charges, by light beams of opposite polarization, or something else entirely. As the original article by Moravec points out, what you end up measuring, using the device that suspiciously looks like an <i>ammeter </i>(it is not, its a symbolic measurement device), depends a lot on these specifics.</div>
<div style="font-weight: normal;">
<br /></div>
<span style="font-weight: normal;">But we <i>are</i> going to assume a few things; we are going to assume<i> </i>is the measurement shown by the device is an <i>aggregate</i> property of the stuff that constitutes the signal over its different iterations. So individual entities in this stuff can be either in a state of 0 or 1, and the device reports a value that's a <i>average </i>of these values. If a lot of these entities are at a value 0, you read a value close to 0. If 50% of them are at a value 0 and the remaining 50% are at 1, you read </span><b>0.5</b> off the device.<br />
<div style="font-weight: normal;">
<br /></div>
In our case, when the device tries to probe each of these entities to see if they are a 0 or 1, the afore-mentioned quantum collapse occurs. Some entities manifest as a 0, some as 1. In what ratio? Given the circuit setup, we have no reason to believe one state is produced more than the other - so we have an exact ratio of 50:50. <b>And the device measures 0.5</b>.<br />
<br />
You good? You aren't looking at me like this right now?<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghWNGxIyekwzJCs0Te_iKNrKO0qXQwAYMK8JSiATW_3uVInuZNVIDu6vC8v5lQPQC3kZQOoN93aiAA7-F6kaWjsibtpQ9Un8dMFvcuu8wZGyhLdfBbuG3ERXYrlMJk_8w9XOSovPWkw42V/s1600/leo_suspicious.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghWNGxIyekwzJCs0Te_iKNrKO0qXQwAYMK8JSiATW_3uVInuZNVIDu6vC8v5lQPQC3kZQOoN93aiAA7-F6kaWjsibtpQ9Un8dMFvcuu8wZGyhLdfBbuG3ERXYrlMJk_8w9XOSovPWkw42V/s320/leo_suspicious.jpg" width="320" /></a></div>
<br />
<br />
<div style="font-weight: normal;">
<br /></div>
</div>
</div>
</div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">Iterative problem solving</span></h3>
<div>
You're probably thinking "All fine, but wasn't this guy schmoozing about problem-solving a while back?" - fret not, we are getting to that bit now.</div>
<div>
<br /></div>
<div>
There are many problems where a solution is arrived at by using an iterative algorithm. We will, in general, represent the problems we are interested in, in the following manner: find the value of \(x\) that minimizes \(f(x)\). Some common steps that such an iterative algorithm take are:<br />
<br />
<ol style="text-align: left;">
<li>The solution to the problem is arrived at via multiple iterations. Every iteration makes a new estimate of the solution.</li>
<li>To start with, before iteration 1, we <i>assume</i> our estimate of the solution is an arbitrary value \(x_0\).</li>
<li>Iteration \(i\), takes in the current guess \(x_{i-1}\), and uses it to come up with a new guess \(x_i\). In most cases, the new guess is also a better guess i.e. \(f(x_{i-1}) \geq f(x_i)\). Here, \(i=1, 2, 3, ...\)</li>
<li>The solution to the problem, denoted by \(x^*\), where \(f(x^*)\) is the minimum value for \(f(x)\), is a <i>fixed point </i>of the algorithm: an iteration that consumes \(x^*\) also produces \(x^*\). So, if we find the solution in iteration \(k\), i.e. \(x_k = x^*\), then \(x_k = x_{k+1} = x_{k+2} = x_{k+3}=... x^*\).</li>
</ol>
<div>
Now let's go back to the circuits we have been talking about. What if, instead of the NOT gate, we had a complicated bit of circuitry that performed an iteration for us i.e. it performed Step 3 above? We would get the ball rolling by inputting \(x_0\), this would produce \(x_1\), which would produce \(x_2\), and so on, till we reach \(x^*\). Beyond this point the circuit only produces \(x^*\). The measuring device measures the current value of \(x_i\) in an iteration in this modified setup. Adapting the previous diagram, this is what would happen:</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid4MAMWRLG8Vc61kd5z7BPHOBmXj0oavde8Cvt_JFhXkAR3A433iUvJ_4QeBcl1T8RRXnQtmEdQUnRzOEMbUsM0Crfrp4xBDXGa5m-8zuX5dXynQ8dQH7eSfK8pC8PAlvCsEj0ltY_x2U1/s1600/fixed_point_span.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid4MAMWRLG8Vc61kd5z7BPHOBmXj0oavde8Cvt_JFhXkAR3A433iUvJ_4QeBcl1T8RRXnQtmEdQUnRzOEMbUsM0Crfrp4xBDXGa5m-8zuX5dXynQ8dQH7eSfK8pC8PAlvCsEj0ltY_x2U1/s400/fixed_point_span.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 7. Stabilizing at the fixed point , x*</span></td></tr>
</tbody></table>
<span style="font-weight: normal;">Here's the million dollar question - what would the device show? We measured 0.5 in the previous case; what would it read now?</span><br />
<span style="font-weight: normal;"><br /></span>
<span style="font-weight: normal;">Remember we assumed that the device reports the average of everything it sees. Here, it sees a bunch of different values of \(x_i\) to begin with, but once we hit \(x^*\), we only get this value from that point onward; we see an <i>infinitude</i> of \(x^*\) values. What is the average of a set of numbers that has an infinite number </span>\(x^*\), and a finite number of other values? Yes, the device would measure \(x^*\).<br />
<br />
Take a while to think about what we've achieved. We start the circuit at \(t_1\) with some arbitrary \(x_0\) as input, and \(\Delta t\) time later the device coolly reads out the final answer \(x^*\). All the iterations that we are supposed to wait for ... are gone. Poof! The iterations are hidden from our sense of time, thanks to our hypothetical ability to travel in time. <br />
<br />
<h4 style="text-align: left;">
Problems with no answers</h4>
This is a good place to discuss what happens when an iterative algorithm does not find an answer to a problem. There is no \(x^*\), and hence the algorithm keeps generating a bunch of values ad-infinitum. It is important that our measuring device indicates this state of "no-answer", to help us distinguish from cases where there is an answer. For ex, it is <i>bad</i> if \(x\) can be any number, and the iterative algorithm somehow gets stuck with generating 3 specific values in a round-robin fashion, and our device shows us the average of these 3 numbers. We would be misled into believing this to be the answer.<br />
<br />
Whether a measuring device can do justice here depends on the implementation. In the specific case of the problem that we see in the next section, we will, fortunately, have a way to recognize these "no-answer" results. <br />
<br /></div>
<h3 style="text-align: left;">
<span style="font-weight: normal;">Solving NP complete problems</span></h3>
<div>
<span style="font-weight: normal;">Finally, with all that elaborate setup, we are ready for the pièce de résistance.. We take our mechanism one step further now and look at how it can be used to solve the <i><a href="https://en.wikipedia.org/wiki/NP-completeness" target="_blank">NP-complete</a> (NPC) </i>problems. This class of problems is of significant interest in the computer science community.</span></div>
<div>
<span style="font-weight: normal;"><br /></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-weight: normal;">The hallmark of NPC problems are that there is no known fast algorithm to solve them. If there are are \(K\) candidate solutions to a problem, then you would need to enumerate each of these \(K\) possible solutions to identify the best - no shortcuts. In fact, efficient solutions have so notoriously resisted discovery that there is a <a href="http://www.claymath.org/millennium-problems/p-vs-np-problem" target="_blank">million dollar prize</a> for anyone who finds one. I wasn't kidding when I said we are going to solve hard problems. </span><br />
<span style="font-weight: normal;"><br /></span>
<span style="font-weight: normal;">As an aside, another interesting characteristic of NPC problems are that if you know how to efficiently solve one particular NPC problem, you can adapt that solution to solve <i>any</i> NPC problem. I mention this now since although we are going to pick up one NPC problem for illustration, let's be aware that all NPC problems are taken care of.<br /><br />A popular example of a NPC problem is the <i><a href="https://en.wikipedia.org/wiki/Travelling_salesman_problem" target="_blank">Travelling Salesman Problem</a> (TSP)</i>. A salesman is to visit each of \(n\) cities, starting at a particular city, and come back to the starting city; and he must pick a route that is the shortest. Fig 8 shows 4 cities A,B, C and D, and the distances between them.</span></div>
<div>
<span style="font-weight: normal;"><br /></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyHxmb02-sUyG8StJ3Wiv0yDQ0uy4ILZXM9E-KwOoFuSRvLwqta5PE3rfteJBYdZkDrPNXByRWv9B7j_eH7pxvANSh0o-0htNAKQLWR1-oOCPdsWT0Wn6BuYPhXfNb7_gIi7rZrjrJuYez/s1600/600px-Weighted_K4.svg.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyHxmb02-sUyG8StJ3Wiv0yDQ0uy4ILZXM9E-KwOoFuSRvLwqta5PE3rfteJBYdZkDrPNXByRWv9B7j_eH7pxvANSh0o-0htNAKQLWR1-oOCPdsWT0Wn6BuYPhXfNb7_gIi7rZrjrJuYez/s320/600px-Weighted_K4.svg.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 8. Travelling Salesman Problem. Source:[1]</span></td></tr>
</tbody></table>
<div>
<span style="font-weight: normal;">Some possible routes and their lengths are:</span></div>
<div>
<ul style="text-align: left;">
<li>A-B-D-C-A, 108</li>
<li>A-C-B-D-A, 141</li>
<li>A-B-C-D-A, 97 </li>
</ul>
</div>
<div>
<span style="font-weight: normal;">It so happens that 97 is the best you can do here. What makes this problem NPC is that the only way to solve this problem is to enumerate all 4! = 24 routes and identify the shortest one. For \(n\) cities this is \(n!\) possibilities (which is your K here), and while it works out for the above example with \(n=4\), the number of possible routes increases really fast with increasing \(n\). </span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://imgs.xkcd.com/comics/np_complete.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="414" src="https://imgs.xkcd.com/comics/np_complete.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">This wouldn't have been, umm, "complete" without a xkcd comic strip.</span></td></tr>
</tbody></table>
<span style="font-weight: normal;"><br /></span>
<span style="font-weight: normal;">To give you an idea: if I wanted to solve this problem for just the districts within the state of Karnataka, India - which has 30 districts - I will need to look through 30! routes. That is \(2.6 \times 10^{32}\) routes! Add to it the districts in the state of Maharashtra, for a total of 66 districts, we are now looking \(66! = 5 \times 10^{92}\) routes. You know why that is scary? - the number of atoms in the visible universe is \(\sim 10^{81}\). Good luck with finding the best route.</span><br />
<span style="font-weight: normal;"><br /></span>
<span style="font-weight: normal;">But we are not going to worry because we have time-travel on our side ;)</span></div>
<div>
<span style="font-weight: normal;"><br /></span></div>
<div>
<span style="font-weight: normal;">To retrofit our setup from the last section, we think of the solution estimates \(x_i\) as routes, and \(f(x_i)\) as returning the length of a route \(x_i\). We also add a new component to the setup - a knob that can be set to a number, say \(d\). The problem-solving circuitry, which performs the iteration in Step 3, is programmed to work in the following manner in iteration \(i\):</span></div>
<div>
<ol style="text-align: left;">
<li>If for the input route \(x_{i-1}\), we have \(f(x_{i-1}) \leq d\), output the same route i.e. show \(x_{i-1}\) as output. </li>
<li>Else, generate the <i>next</i> permutation \(x_i\) and return this. Here, the "next" permutation is given by some ordering like the alphabetical ordering.</li>
</ol>
</div>
<div>
<span style="font-weight: normal;">Clearly, if there is a route possible that has length less than or equal to \(d\), its a fixed point for the algorithm - all iterations beyond the iteration when it first sees such a route, keep returning this route. The measuring device, which now sees an infinitude instances of this route, would only display this route. If such a route does not exist - maybe because its too small a number, for ex \(d=10\) for Fig 8 - then the system becomes "unsteady" in the sense that all permutations sort of show up for the device to measure. If the device has a 16-segment display to show routes, we would probably see "weird" characters in the display due to multiple symbols trying to appear on top of each other.</span><br />
<span style="font-weight: normal;"><br /></span>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG9deZIdm_5gt_f7u7RFwuo12Vm3GwJwmL3Z616CLvGwnykg4KlrPDFQQRxsbakljE9oQiqGRrdqGlFG5FQVo8qb1vZLVvviF8IqsQxyZWafcLwgP7G4C1X2O1pS1VBDyDKZ3CkQrDoVGb/s1600/16-Segment-LED-2400px.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG9deZIdm_5gt_f7u7RFwuo12Vm3GwJwmL3Z616CLvGwnykg4KlrPDFQQRxsbakljE9oQiqGRrdqGlFG5FQVo8qb1vZLVvviF8IqsQxyZWafcLwgP7G4C1X2O1pS1VBDyDKZ3CkQrDoVGb/s320/16-Segment-LED-2400px.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mayday ... Mayday ... Mayday! Source: [2]</td></tr>
</tbody></table>
<span style="font-weight: normal;">This is how we solve this problem then: we start by holding the knob at a small value, where we presumably see an "unsteady" state. We keep turning it up slowly, till we see a proper route. The minimum \(d\) for which this happens is our answer. This is easy (and fast) to get right by trial and error.<br /><br />Finer details:</span><br />
<br />
<ol style="text-align: left;">
<li>For TSP, you can always start with \(d=0\).</li>
<li>How large can \(d\) be? There is a easy heuristic to determine this. Pick any route at random and calculate its length, say \(d'\) - this is how large you need \(d\) to ever be. Why? If you have not picked the shortest route, which is likely, then you will find your solution much before hitting \(d'\), when you work your way up from \(d=0\). If, by chance, you have picked the shortest route, then you will find your solution when your knob is exactly at \(d'\). In either case, you don't need to go beyond \(d'\).</li>
<li>The elephant-in-the-room question: in what increments should you increase \(d\)? This depends on the precision of the numbers in the problem. In the above TSP example, all distances are integers, and hence the shortest distance will also be an integer - hence you could turn up the knob in units of \(1\) when moving from \(d=0\) to \(d=d'\). In the generic case, if your distances have 2 significant digits after the decimal, like 54.25 km, then it makes sense to move up in increments of \(0.01\). <br />Is this fast? Yes, <i><b>very</b></i>! For every position of the knob, you have your answer, or lack of it - the "unsteady" state - in \(\Delta t\) time. In this \(\Delta t\) time, all the circuit is doing is calculating the length of a route, which is a bunch of look-ups and sums; on a modern computer this would take much less than a second. A human would see an answer instantaneously for the knob held at a particular position.</li>
<li>Come to think of it, since you have an upper bound \(d'\) now, you don't have to even move up linearly from \(d=0\) to \(d=d'\). You can do a <i><a href="https://en.wikipedia.org/wiki/Binary_search_algorithm" target="_blank">binary search</a>. </i>This is a significant savings. If the number of decimal numbers you were exploring between two integers is \(p\) (\(p=1\) in the TSP example, and \(p=100\) for the example with 2 significant digits after the decimal), then instead of holding the knob at \(pd'\) positions, you can make do with only \(O(\log pd')\) positions. </li>
<li>Of course, the "knob" here is symbolic. In a simpler life, you can always have a program turn the metaphorical knob. </li>
</ol>
<span style="font-weight: normal;">Pretty cool, right? The <a href="http://www.frc.ri.cmu.edu/~hpm/project.archive/general.articles/1991/TempComp.html" target="_blank">original</a> article is a lot more detailed and talks about a few more problem-solving use-cases if you're interested.</span><br />
<span style="font-weight: normal;"><br /></span>
<span style="font-weight: normal;"><br /></span>
<span style="font-weight: normal;"><br /></span></div>
<div>
<span style="font-weight: normal;"><br /></span></div>
<div>
<span style="font-weight: normal;">[1] </span><span style="text-align: center;">By Sdo - self-made using xfig, CC BY-SA 2.5, <a href="https://commons.wikimedia.org/w/index.php?curid=715485">https://commons.wikimedia.org/w/index.php?curid=715485</a></span><br />
<span style="text-align: center;">[2] <a href="https://openclipart.org/detail/179999/16-segment-led">https://openclipart.org/detail/179999/16-segment-led</a></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-weight: normal;"><br /></span></div>
</div>
</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com1tag:blogger.com,1999:blog-7503464577047093171.post-7309275961487771262015-12-19T16:22:00.000+05:302015-12-20T09:33:06.029+05:30Clustering: ELKI over Weka<div dir="ltr" style="text-align: left;" trbidi="on">
I think I have found my favorite tool when it comes to <a href="https://en.wikipedia.org/wiki/Cluster_analysis" target="_blank">clustering</a> - <a href="http://elki.dbs.ifi.lmu.de/" target="_blank">ELKI</a>. Lots of algorithms, minimal interface, and well implemented. I have a few cribs about the UI/UX, but overall its one of the best options out there. It also helps that it has a great implementation of one of my favorite algorithms - <a href="https://en.wikipedia.org/wiki/OPTICS_algorithm" target="_blank">OPTICS</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1F2VEJKc_OrgFOL56G4IbdzcbQxINTai6pT7VDNt7eyCq3fq1ZZZ3h3Q0Siol_9BtJ7XqyMwKTZ_83XDWboUFhUUxtp7a1KNR69V3a8cbSzg2VumHDlkjRdKTblhisdpqCLMe3C8Hq9Bt/s1600/elki_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1F2VEJKc_OrgFOL56G4IbdzcbQxINTai6pT7VDNt7eyCq3fq1ZZZ3h3Q0Siol_9BtJ7XqyMwKTZ_83XDWboUFhUUxtp7a1KNR69V3a8cbSzg2VumHDlkjRdKTblhisdpqCLMe3C8Hq9Bt/s1600/elki_logo.png" /></a></div>
<br />
If you are in the habit of using <a href="http://www.cs.waikato.ac.nz/ml/weka/" target="_blank">Weka</a>, for small tasks or maybe because you started off with it, be wary of using it for clustering. Recently,I had to use Weka for cluster analysis for legacy reasons, and I am far from being a happy customer. This short post provides some instances where Weka and ELKI gave different results on a problem.<br />
<br />
<h3 style="text-align: left;">
DBSCAN</h3>
The following images show the clusters discovered in the same dataset using <i>eps </i>= 0.5 and <i>minpts </i>= 5 (these are parameters to the <a href="https://en.wikipedia.org/wiki/DBSCAN" target="_blank">DBSCAN </a>algorithm). The original dataset has 31 clusters. Different clusters discovered are represented by different colours.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcO_xuVOKeh98AZa73lqR07viMNAaw2U_WlaeF4QjyGDFwSo0et2Sbsy8A11TkIEblWA7vueR0gwsUqygiEUeLMH-vDA3W29jerWEheDSLJ2G4Z29B_P3xMs_fHh8tSdguA-bAMtO14ZVz/s1600/d31_weka_elki.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcO_xuVOKeh98AZa73lqR07viMNAaw2U_WlaeF4QjyGDFwSo0et2Sbsy8A11TkIEblWA7vueR0gwsUqygiEUeLMH-vDA3W29jerWEheDSLJ2G4Z29B_P3xMs_fHh8tSdguA-bAMtO14ZVz/s640/d31_weka_elki.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Left: Weka - 1 cluster, right: ELKI - 24 clusters</td></tr>
</tbody></table>
As you can see, for the same settings of parameters Weka thinks of the whole dataset as one cluster, while ELKI discovers 24 clusters. In fact this happens to be true for a range of these parameters. The following heatmaps show the number of clusters as <i>eps</i> and <i>minpts</i> are varied.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi07psmla966fZz4uRiYJRL0SsDIF7ZRxEYL7onrYU6YK4UK3OrL9GfeqLdJf9MeofOhqIGLyjKaGJ5ltzV-A_KyFap4UQwn2nor55JUXwBIx3QNqpzfgoAbyqVSaoBWBU5nlJO5JBRHlEl/s1600/d31_weka_elki_numc.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi07psmla966fZz4uRiYJRL0SsDIF7ZRxEYL7onrYU6YK4UK3OrL9GfeqLdJf9MeofOhqIGLyjKaGJ5ltzV-A_KyFap4UQwn2nor55JUXwBIx3QNqpzfgoAbyqVSaoBWBU5nlJO5JBRHlEl/s640/d31_weka_elki_numc.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: x-small;">Number of clusters. Left: Weka, right: ELKI</span></td></tr>
</tbody></table>
Weka sees a maximum of 2 clusters - as denoted by the white strip to the extreme left of the plot. ELKI sees quite some variation - at the bottom left there are around 3000 clusters, while for the rest of the plot it is close to 1 (I know it looks like 0, but the shades for 0 and 1 aren't distinguishable visually and the minimum number of clusters can be 1).<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
If you think about it what ELKI reports makes sense - at <i>some</i> setting of the parameters you would expect each point in the dataset to be a cluster. Since there are 3100 points in this dataset, ELKI sees as many clusters in the bottom left corner. Hence, Weka seems to report incorrect results.<br />
<br />
I tried comparing Weka and ELKI on another dataset, this time comparing <a href="http://nlp.stanford.edu/IR-book/html/htmledition/evaluation-of-clustering-1.html" target="_blank">cluster purity</a> for a range of parameters. Again, in the case of Weka we see that the purity doesn't vary much, whereas for ELKI it varies over a wide range (as you'd expect).<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJQNNGRF15A7yKQp2u7oRKR1dZv0WsK-Ay-H9QjeH9x_RqPHYqRVEUMpYxetmhjnubKWKG7w4swYezyyCD5b2mByJYiUkw9OFK4RDx8XO4rupuU1j78Iuwx4d3PYr81gE0NqumFxVVqRll/s1600/flames_weka_elki_purity.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJQNNGRF15A7yKQp2u7oRKR1dZv0WsK-Ay-H9QjeH9x_RqPHYqRVEUMpYxetmhjnubKWKG7w4swYezyyCD5b2mByJYiUkw9OFK4RDx8XO4rupuU1j78Iuwx4d3PYr81gE0NqumFxVVqRll/s640/flames_weka_elki_purity.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cluster purity. Left: Weka, right: ELKI</td></tr>
</tbody></table>
The responses to this <a href="http://stackoverflow.com/questions/23634614/running-dbscan-in-elki" target="_blank">question</a> on <i>stackoverflow </i>suggest that this happens in Weka because automatic normalization of distances is imposed. Even if this is true, the implementation is incorrect - normalization here should not be a default and the documentation does not warn you.<br />
<br />
<h3 style="text-align: left;">
k-means</h3>
<div>
I was a little surprised that the k-means implementation in Weka is buggy. This is one of the simpler algorithms out there!</div>
<div>
<br /></div>
<div>
On the same dataset I've used above, running k-means with k=32 doesn't terminate. It does not terminate <i>even when</i> you set the maximum number of iterations to 500. I had the clustering run for around 40 min before I decided to kill it.</div>
<div>
<br /></div>
<div>
ELKI gave me this in under a second:</div>
<div>
<br /></div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilu5WEcaIP5N15A9Ns2GZNbtVM16_bsVAxhRSF5dksufwDWEtL1ftX-CnC6fZeQL7Qnoq_A1oonii46t1Qd_Rt_qkFSttR3eVSF9Dn-O_9KPN7i-gZmE4SsotwWkP68aRBjY2j54Knxwat/s1600/d31_kmeans_elki.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilu5WEcaIP5N15A9Ns2GZNbtVM16_bsVAxhRSF5dksufwDWEtL1ftX-CnC6fZeQL7Qnoq_A1oonii46t1Qd_Rt_qkFSttR3eVSF9Dn-O_9KPN7i-gZmE4SsotwWkP68aRBjY2j54Knxwat/s400/d31_kmeans_elki.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">k-means, with k = 32</td></tr>
</tbody></table>
<div style="text-align: left;">
<span style="font-size: small; font-weight: normal;">Unlike the problems with DBSCAN, this problem seems to be dataset-specific. For a bunch of datasets I tried, k-means worked as expected.</span></div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
Performance</h3>
<div>
I guess a discussion on performance is moot if your results are incorrect. But here are some numbers (from the ELKI website) further strengthening the case for ELKI. I have highlighted DBSCAN and OPTICS since those were the algorithms I was interested in. The other numbers are equally impressive.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcJeGPP3hB6-m3EMdmpT1F-F-zb0dRKZDseidFNSKxfbDVqoiXWcI35uDntgDoBuu8k_q8GZLUdypaO-QLpmfl6W3ilYfw9YdK1KTKOtZA9y2SL658YrEh_R1oZuyUSb5nqLgddXuwdlpR/s1600/elki_benchmarksUntitled.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="610" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcJeGPP3hB6-m3EMdmpT1F-F-zb0dRKZDseidFNSKxfbDVqoiXWcI35uDntgDoBuu8k_q8GZLUdypaO-QLpmfl6W3ilYfw9YdK1KTKOtZA9y2SL658YrEh_R1oZuyUSb5nqLgddXuwdlpR/s640/elki_benchmarksUntitled.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">ELKI Benchmarks</td></tr>
</tbody></table>
<br />
With this we come to end of this short post. If you haven't used ELKI yet, I hope I have convinced you to give it a shot!</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-46826031707014353622015-08-17T07:02:00.003+05:302015-08-17T15:12:47.435+05:30Mori and Pop Girl - how do you fight someone who knows the future?<div dir="ltr" style="text-align: left;" trbidi="on">
I recently came across the book <a href="http://www.amazon.com/Watchmaker-Filigree-Street-Natasha-Pulley/dp/1620408333" target="_blank">The Watchmaker of Filigree Street</a>. While it is an enjoyable read overall, the bit that interested me is a particular skill of one of the lead characters "Mori". Mori can see the future. Moris' faculties are so sensitive that people do not have to <i>do </i>things to make a particular future feasible, they only need to <i>intend</i> to do certain things. Mori would know what future would be led to if those intentions were executed. Also, since there are multiple possibilities about how the future can roll out, Mori is good at guessing only when one of the possibilities seem dominant. For example, Mori can guess that a dice is about to fall, but he cannot guess what face it would show because the outcome is truly random.<br />
<br />
Now switch to the movie <a href="http://www.imdb.com/title/tt0465580/?ref_=nv_sr_1" target="_blank">Push (2009)</a>, starring Chris Evans when he still wasn't Captain America. About mutants with different kinds of superpowers. We are introduced to this category called <i>Watchers. </i>Watchers can see the future. Here too, we have the notion of many possible futures, and what a Watcher sees changes based on what happens in the present. We meet the "Pop Girl", a powerful Watcher, who, like Mori, needs only people to decide on doing something before she can see the relevant future.<br />
<br />
(You are a computer geek if you thought of the word "stack" just because I have said 'push' and 'pop' in the same paragraph. Like I did. ;) )<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN67SVoUK4BfHUusOwvYG49jDoVQUxSfbY3f_65pfMDI0uI5M2fug_jAqS6iSogF3mS0HaTjxY-z4fycj-JHBVPXkiNNQI6Ihkm5FRCVfQGKgXOyX0DqOjuBYmvgjoDpEtb4xy7XgrxE2s/s1600/mont1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN67SVoUK4BfHUusOwvYG49jDoVQUxSfbY3f_65pfMDI0uI5M2fug_jAqS6iSogF3mS0HaTjxY-z4fycj-JHBVPXkiNNQI6Ihkm5FRCVfQGKgXOyX0DqOjuBYmvgjoDpEtb4xy7XgrxE2s/s1600/mont1.png" /></a></div>
<br />
The reason I mention these characters together are both stories have people with no clairvoyant powers whatsoever trying to outsmart them. I think this is an interesting setup. Think about it - your enemy is prescient; when you even <i>think</i> of a strategy to fight them, they <i>already know</i>. How do you fight someone like that?<br />
<br />
Interestingly, both stories deal with this differently:<br />
<br />
<ol style="text-align: left;">
<li><b>Mori vs Grace</b>: Grace relies on randomness. When she travels she allows coin flips to do a lot of the decision-making. In a particular part in the story she needs a package to be carried by a device (trying hard to avoid spoilers here) - and she succeeds because the device has the capability to occasionally move randomly. Mori knows something is up, even that there is a package on the move, but he is at a loss to guess precisely. Remember, how he can see dice falling, but can't guess outcomes? This is exactly what happens now.</li>
<br /><br />
<li><b>Pop Girl vs Nick</b>: Nick relies on not knowing the plan or having his team know of the plan till the very last moment. <i>Knowing</i> the plan leads to intentions, and intentions lead to the Pop Girl seeing the future. So if you have a plan that is already set in motion, but <i>you</i> have nothing to do with it since you do not know about it yet, Pop Girl does not see it as <i>a future you are involved in</i>.<br /><br />How does Nick pull this off? He thinks up a plan - on the other side Pop Girl starts seeing a future - writes letters to the members in his team, including himself, detailing out the part of the plan they are to execute, with instructions to everyone to read their letters at predetermined times. Pop Girl does not see the whole plan yet. Nick then has <i>his</i> memory wiped out starting from the time when he thought of the plan. The memory-erasure is done by another kind of mutant - who is also instructed to hand over the self-addressed letter to Nick just after the erasure session. <br /><br />Once Nicks' memory is gone, so are his intentions around the now forgotten plan - and Pop Girl stops seeing a definitive future for Nick or his team. At a later point in time, when everyone has seen his or her part of the plan, it is possibly too late for the Pop Girl to do anything (she can tune into a future immediately, she cannot translocate immediately). Note that, just reading at a few instructions in a letter is probably not potent enough as realizing how they fit into the overall plan - blind instructions do show you some kind of a future, but your understanding of how the whole thing works, which lead to very specific intentions, are better fodder for Pop Girl. This adds another layer of vagueness that a Watcher must contend with. </li>
</ol>
<div>
Both stories leave many questions unanswered, and having to do with playing around with time, (possibly) has loopholes. For example:<br />
<ul style="text-align: left;">
<li>Moris' visions of the future where he has picked up a new skill imbues him with those skills <i>now</i>. So if in the future he is to speak flawless English, he starts speaking English now. How very <a href="https://en.wikipedia.org/wiki/Grandfather_paradox" target="_blank">Grandfather Paradox</a>-y!</li>
<li>Why doesn't Pop Girl fall back to using her visions from the time before Nick had himself erased? Also, erasing would have been an intention - so she would have known that her visions before the erasing were good to go on with.</li>
</ul>
<br />
I am sure one can come up with possible explanations. But leaving details aside, and thinking of these ideas as only high-level suggestions instead of fleshed-out strategies, I liked how two different approaches - <b>randomness</b> and <b>"just-in-time" plans</b> were explored in the stories.</div>
</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com1tag:blogger.com,1999:blog-7503464577047093171.post-70661963898119749872014-08-16T14:21:00.000+05:302017-09-15T01:14:05.221+05:30kNN classifier - in one line of Python. Fits into a Tweet.<div dir="ltr" style="text-align: left;" trbidi="on">
Recently, I conducted a session on Python where I walked through implementing a kNN classifier. Close to the end of the session, we got to how succinct Python can be, and I proceeded to reduce our code to the absolute minimum number of lines possible. The impromptu code-golfing exercise led me to an interesting realization - you can write a kNN classifier <i>in one line of Python.</i> A line short enough (<b>126 characters</b>) to <i>fit into a tweet</i>!<br />
<br />
Yep, I checked:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgQORVTxdO6Xw3VPTo5Nyov62joLGADACEnI5YQ7lYFiGa7U6y5hcsi_iP79Jjpik98S8TI81rxSjFuECSSs16uwREv4BBTvyCmD0FVwg6PTOK8vSFm3OCENfY460-p0093a1zs1CZD4O6/s1600/knn_tweet_cropped.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="90" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgQORVTxdO6Xw3VPTo5Nyov62joLGADACEnI5YQ7lYFiGa7U6y5hcsi_iP79Jjpik98S8TI81rxSjFuECSSs16uwREv4BBTvyCmD0FVwg6PTOK8vSFm3OCENfY460-p0093a1zs1CZD4O6/s1600/knn_tweet_cropped.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 1. A tweet-sized classifier.</span></td></tr>
</tbody></table>
<br />
In retrospect, this does not seem surprising given certain features of the language. Its just one of those things you don't normally think about; you wouldn't want to implement an algorithm in one, potentially confusing, line. Frankly, you <i>shouldn't</i>. In the interest of the sanity of the poor souls who might need to read your code someday.<br />
<br />
But notwithstanding coding etiquette, we are going to take a look at this since a one-liner k-NN is, well, pretty awesome! <pats back=""></pats><br />
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
</h3>
<div style="text-align: left;">
In the next couple of sections I provide some context to the problem and the solution. I have made these sections collapsible (doesn't seem to work with the mobile version of the site), since they are not the focus of the post. If you already know what a <i>kNN classifier</i> is, and understand <i>Python maps/lambdas</i>, <b><i><span style="background-color: white;">skip ahead to the section "<a href="http://www.quipu-strands.blogspot.in/2014/08/knn-classifier-in-one-line-of-python.html#setup">Initial setup</a>"</span></i></b>. </div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
What is a kNN classifier?</h3>
(<a class="displayText" href="javascript:toggle(0);" id="displayText" name="displayText">show</a>)
<br />
<div class="toggleText" id="toggleText" name="toggleText" style="display: none;">
<div style="text-align: left;">
A <a href="http://en.wikipedia.org/wiki/Statistical_classification" target="_blank"><i>classifier</i></a> looks at a data point provided to it and declares it to belong to a particular <i>class</i>. A common example of this is a <i>spam classifier</i>, which scans through the text of a mail and declares it to be belonging to one of these classes: <i>spam</i> or <i>no-spam</i>. If you use Gmail, you have already seen a very powerful spam classifier in action - using a classifier is how Gmail <i>knows </i>what goes into your spam folder.<br />
<br />
A classifier is initially presented with data points <i>along</i> with their correct labels - so that it can identify associative patterns between the data points and the labels. This dataset is known as <i>training data</i>. For ex, in the case of spam, a classifier might note that words like <i>free</i>, <i>lottery </i>etc<i>. </i>strongly correlate to a mail being a spam mail. Once the training phase is done, the classifier is ready to tag unseen instances, known as <i>test data points</i>, . Beyond the training phase, the classifier may not need to keep the training data set around - instead, it can solely rely on using the patterns it has learned. <br />
<br />
The <a href="http://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm" target="_blank">kNN classifier</a>, however, is a <i>lazy</i> classifier - it does not bother with learning associative patterns. It keeps <i>all</i> of the training dataset around (at least, the simplest avatar of the classifier does so) , and for a test point, finds points similar to it in the training dataset, and outputs the dominant label among the similar points. This is where it derives its name from - its classification is based on the labels of the <b><u>k</u> <u>n</u></b>earest <u><b>n</b></u>eighbours of the test point. </div>
<div style="text-align: left;">
<br />
I can almost describe the philosophy of the kNN classifier with this pithy quote:<br />
<blockquote class="tr_bq">
<i>You are the company you keep.</i></blockquote>
<br />
<br />
In machine learning, a data point is typically described as a <i>vector</i> of <i>features </i>(also known as <i>attributes </i>or<i> dimensions). </i>For ex, to describe a mail, the features of interest might be the the presence or absence of certain words; these could be my features:<br />
<ol style="text-align: left;">
<li>has the word <i>free</i></li>
<li>has the word <i>lottery</i></li>
<li>has the word <i>weekend </i> </li>
</ol>
<i> </i>And a mail described by the vector <i>[1,1,0]</i>, would have the words <i>free</i> and <i>lottery</i> in it - indicated by the <i>1s</i> - but would not have the word <i>weekend</i>, as indicated by the <i>0</i>. <br />
<i> </i><br />
The number of features is termed as the <i>dimensionality</i> of the data. In the above toy example, we were dealing with 3-dimensional vectors.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Given that every data point is depicted by a n-dimensional vector, we can plot the point a n-dimensional coordinate system. Yes, we can't <i>see </i>stuff beyond 3-dimensions, but in theory, we can think of a data point being plotted so. This helps us visualize what a kNN does. In the following figure the coloured points belong to the training dataset - some have the label <span style="color: red;">red</span>, some have <span style="color: #6aa84f;">green</span>. We want to find the label for the test point, shown with a "?". If we assume <i>k = 3</i> (smaller circle), the dominant label is <span style="color: red;">red <span style="color: black;">(</span>red <span style="color: black;">to</span> <span style="color: #6aa84f;">green</span><span style="color: black;">:: 2:1), and that is what we declare. If <i>k = 5</i>, <span style="color: #6aa84f;">green</span> dominates </span></span><span style="color: red;"><span style="color: black;"><span style="color: red;"><span style="color: black;">(</span>red <span style="color: black;">to</span> <span style="color: #6aa84f;">green</span><span style="color: black;">:: 2:3) and that is what we declare as the result.</span></span></span></span></div>
<h3 style="text-align: left;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvzMyZ4h_KYCuGudKxefBl5jJc0s0P3ZnFtBi463pfrjH59llnR12FxoJjbPn9w5Ks9JJMWkor1nGR1IajDf1uF0lnHF4Fgj3R7MpFkVuuukiOKNXv7OdbnwOfw1IqRlfDH3S_ldHN65Z_/s1600/knn.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvzMyZ4h_KYCuGudKxefBl5jJc0s0P3ZnFtBi463pfrjH59llnR12FxoJjbPn9w5Ks9JJMWkor1nGR1IajDf1uF0lnHF4Fgj3R7MpFkVuuukiOKNXv7OdbnwOfw1IqRlfDH3S_ldHN65Z_/s1600/knn.png" width="254" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">Fig 2. The kNN classifier</span></td></tr>
</tbody></table>
</h3>
<div>
The above figure helps make a significant point - the accuracy of a kNN classifier depends on <i>k</i>. We won't worry about the right value of <i>k</i> in this post - we'll assume <i>k </i>is provided to us.<br />
<br />
Note that, in the figure above, we implicitly assumed that the neighbours of a points are defined by the <a href="http://en.wikipedia.org/wiki/Euclidean_distance" target="_blank"><i>Euclidean distance</i></a> - the distance one gets between 2 points when measuring with a ruler. But a different way of measuring distances/similarities may make sense for a problem.<br />
<br />
So what does the algorithm for kNN classification look like? A naive implementation would have the following steps: <br />
<ol style="text-align: left;">
<li>Calculate the similarity of the test point with each of the training points</li>
<li>Get the labels of the k most similar points</li>
<li>Declare the label of the test point to be the majority vote label </li>
</ol>
<div style="text-align: left;">
The one-liner I am interested must implement the above steps.</div>
</div>
</div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
A quick primer on maps and lambdas</h3>
(<a class="displayText" href="javascript:toggle(1);" id="displayText" name="displayText">show</a>)
<br />
<div class="toggleText" id="toggleText" name="toggleText" style="display: none;">
<div>
<i>map()</i> is one of the key constructs that make the one-liner possible. This is what a simple map() call looks like:</div>
<blockquote class="tr_bq">
<span style="color: #a64d79;">map( <i>function</i>, <i>iterable</i>)</span></blockquote>
<div>
The map() call takes two arguments - a <i>function</i> as the first argument, and an <i>iterable</i> as its second argument. An iterable is anything that can be iterated on, like a list; for our purposes we would exclusively consider lists. As the name might suggest, map() creates a <i>mapping</i> of all items in the provided list using the function passed in as its first argument - the mapped version of the elements are returned as a new list.<br />
<br /></div>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCmREAdW08jOyBr4DWSJb8_GIoct15q6eq7okTUV1M3e23j20Jq221fb8He3hv2j4VXY6qyo_LrSW-2XPM8lIixJKwAynHU_QcqU9krBMZgKnYwz1tru1dMdIc9_epEu9p4kSwmjFmBMV8/s1600/mapdrawing.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCmREAdW08jOyBr4DWSJb8_GIoct15q6eq7okTUV1M3e23j20Jq221fb8He3hv2j4VXY6qyo_LrSW-2XPM8lIixJKwAynHU_QcqU9krBMZgKnYwz1tru1dMdIc9_epEu9p4kSwmjFmBMV8/s1600/mapdrawing.png" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 3. A map() call</span></td></tr>
</tbody></table>
For a general version of the call, <a href="https://docs.python.org/2/library/functions.html#map" target="_blank">consult the docs</a>.</div>
<div>
<br /></div>
<div>
As an example, consider the list of integers <i>a = [4, 1, 2]</i>. Consider the function call: <i>map(str, a)</i>. Here, I am passing the in-built function "<i>str()</i>" - which converts its argument into a string - as the first argument. This returns a new list <i>['4', '1', '2']</i>. This consists of mapped versions of elements in the old list - string representations of the integers. Note that we pass in the function <i>name</i> as the first argument - <i>str</i> - and not <i>str(). </i>The latter would just pass the result of the function<i> call</i> (a blank string in this case).</div>
<br />
While map() is a handy construct in itself, it seems that the first argument to it - the mapping function - must be defined elsewhere. For ex, in the above example, we used str(), which is defined in the standard libraries. Fortunately, it turns out that this is not the only possibility, thanks to <i>lambda expressions</i>.<br />
<br />
A simple lambda expression looks like this:<br />
<blockquote class="tr_bq">
<span style="color: #a64d79;">lambda [<i>parameter list</i>]: <i>function body</i></span></blockquote>
Think of a <i>lambda</i> as a function that is defined on the fly. The parameter list specifies the parameters that go into the function, and the result of executing the function body (specified on the <a href="http://stackoverflow.com/questions/1233448/no-multiline-lambda-in-python-why-not" target="_blank">same line</a>) is returned as a result of the expression. Again, for a detailed explanation, <a href="https://docs.python.org/2/reference/expressions.html#lambda" target="_blank">consult the docs</a>.<br />
<br />
For ex, the line <i>lambda x: x*x</i> defines a function that takes one argument <i>x</i>, and returns its product with itself. Note that the lambda does not have a function name (unless you assign a lambda expression to a variable). Thus, its a "use-and-throw" function - its exists where it is defined, and since it has no name, it cannot be called later. The reason why its so valuable is that it can be used as a valid function, including in calls to map().<br />
<br />
Consider, again, the list of integers <i>a = [4, 1, 2]</i>. And consider this map call: <i>map(lambda x: x*x, a)</i>. This returns <i>[16, 1, 4] </i>since the lambda expression serves as the mapping function.<br />
<br />
There are a bunch of functions in Python, other than map(), that accept functions as arguments and using lambdas with these can often help you write elegant and concise code. For ex, the function <i><a href="https://docs.python.org/2/library/functions.html#filter" target="_blank">filter()</a> </i>has a function signature similar to map():<br />
<blockquote class="tr_bq">
<span style="color: #a64d79;">filter( <i>function</i>, <i>iterable</i>)</span></blockquote>
The output of the filter is a list that contains only those values from the original list (its second argument) that return a non-null value when the supplied function (the first argument) is called on them. For ex, <i>filter(lambda x: x%2==0, a)</i> would return <i>[4, 2] </i>- elements from the original list that are divisible by 2 - since the lambda expression returns <i>True </i>for even integers. We will meet yet another such function, <i>max()</i>, while analysing the one-liner.</div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
<a href="https://www.blogger.com/null" id="setup">Initial setup</a></h3>
<div>
I will assume that these variables are defined for us:<br />
<ol style="text-align: left;">
<li><b>train</b> - is a list with the training data. Every element in this list is a <i>tuple</i> with the first entry as the feature vector and the second entry as the label. So, if I had the following 4-dimensional data-points in my training data:
<ol>
<li>[2, 4, 3, 5], label = 0</li>
<li>[5, 7, 4, 7], label = 1</li>
<li>[6, 8, 2, 3], label = 1</li>
<li>[5, 7, 2, 4], label = 0</li>
</ol>
then <i>train = [([2, 4, 3, 5], 0), ([5, 7, 4, 7], 1), ([6, 8, 2,3], 1), ([5, 7, 2, 4], 0)]</i>.</li>
<li><b>sim(x, y) </b>- the similarity function. Takes two data-points as arguments and returns a numeric value for similarity. For our example, we use the <a href="http://en.wikipedia.org/wiki/Dot_product" target="_blank"><i>dot-product</i></a> as a measure of similarity. The dot-product of two vectors <i>[a, b, c]</i> and <i>[p, q, r]</i> is <i>a*p + b*q + c*r.</i></li>
<li><b>k </b>- the number of nearest neighbours we need the labels from. For our example, we will assume <i>k = 3</i>. </li>
<li><b>test </b>- the test data point, which we are interested in classifying. This is a list of the feature values. We use <i>[1, 2, 3, 4]</i> as an example test point.</li>
<li>I am also assuming that the Python <a href="https://docs.python.org/2/library/collections.html" target="_blank">collections</a> module is imported into the current namespace i.e. this statement "<i>from collections import *</i>" has been executed (I know this sounds like cheating, but hold on judging me till you have read the next section ...)</li>
</ol>
Note that 1-4 are external to the classifier and have to be provided anyway - I am just fixing the variable names and structures. <br />
<br /></div>
<h3 style="text-align: left;">
The One (line ...)</h3>
<div style="text-align: left;">
And finally, [drum roll] the magic incantation ...<br />
<blockquote class="tr_bq">
<span style="background-color: #cccccc;"><span style="font-family: "arial" , "helvetica" , sans-serif;">max(Counter(map(<wbr></wbr>lambda x: x[1], sorted(map(lambda x: (sim(x[0], test), x[1]), train))[-k:])).items(), </span><span style="font-family: "arial" , "helvetica" , sans-serif;">key = lambda x:x[1])[0]</span></span></blockquote>
<br />
If I were to decompose the above line into logical steps, this is how I would go about it:<span style="color: #eeeeee;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: black;"></span></span></span></div>
<div>
<ol style="text-align: left;">
<li><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #eeeeee;">max(Counter(map(</span><wbr></wbr><span style="color: #eeeeee;">lambda x: x[1], sorted(</span>map(lambda x: (sim(x[0], test), x[1]), train)<span style="color: #cccccc;"><span style="color: #eeeeee;">)[-k:])).items(), </span></span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;">key = lambda x:x[1])[0]</span></li>
<li><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #eeeeee;">max(Counter(map(</span><wbr></wbr><span style="color: #cccccc;"><span style="color: #eeeeee;">lambda x: x[1],</span> </span>sorted(<span style="color: #999999;">map(lambda x: (sim(x[0], test), x[1]), train)</span>)[-k:]<span style="color: #eeeeee;">)).items(), </span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;">key = lambda x:x[1])[0]</span></li>
<li><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #cccccc;"><span style="color: #eeeeee;">max(Counter(</span><span style="color: black;">map(</span></span><wbr></wbr><span style="color: #cccccc;"><span style="color: black;">lambda x: x[1],</span> </span><span style="color: #999999;">sorted(<span style="background-color: white;">map(lambda x: (sim(x[0], test), x[1]), train)</span>)[-k:]</span><span style="color: #cccccc;"><span style="color: black;">)</span><span style="color: #eeeeee;">).items(), </span></span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;">key = lambda x:x[1])[0]</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: black;"><span style="color: #eeeeee;">max(</span>Counter(<span style="color: #999999;">map(</span><wbr></wbr><span style="color: #999999;">lambda x: x[1], sorted(map(lambda x: (sim(x[0], test), x[1]), train))[-k:])</span>).items()<span style="color: #eeeeee;">, </span></span><span style="color: #eeeeee;">key = lambda x:x[1])</span></span><span style="color: #eeeeee;">[0] </span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;"><br /></span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: black;">max(<span style="color: #999999;">Counter(map(</span><wbr></wbr><span style="color: #999999;">lambda x: x[1], sorted(map(lambda x: (sim(x[0], test), x[1]), train))[-k:])).items()</span>, key = lambda x:x[1])</span></span><span style="color: #eeeeee;"><span style="color: black;">[0]</span> </span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;"><br /></span></li>
</ol>
</div>
<div>
<br />
<br />
<h3 style="text-align: left;">
Explanation</h3>
<br />
<u><b>Step 1: Get all similarities, keep the labels around</b><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #eeeeee;"> </span></span></u><br />
<br />
<span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #eeeeee;">max(Counter(map(</span><wbr></wbr><span style="color: #eeeeee;">lambda x: x[1], sorted(</span>map(lambda x: (sim(x[0], test), x[1]), train)<span style="color: #cccccc;"><span style="color: #eeeeee;">)[-k:])).items(), </span></span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;">key = lambda x:x[1])[0]</span><br />
<br />
In the first step, we call a map with the training data. The lambda expression returns a <i>tuple</i> with the first entry <i>sim(x[0], test)</i> and the second entry as <i>x[1]</i>. Consider the fact that <i>train</i> is a list of tuples itself, and thus the argument to the lambda is a tuple. For ex the first time the lambda function is called is with the argument <i>([2, 4, 3, 5], 0)</i>. Thus, for the lambda, <i>x[0]</i> is <i>[2, 4, 3, 5]</i> and <i>x[1]</i> is <i>0</i>. Hence, the first entry of the returned tuple is the similarity of the training data point to the <i>test</i> data point, while the second entry is the label of the training data point.<br />
<br />
Given the sample <i>train</i> and <i>sim</i>, this first step produces the following list:<br />
<blockquote class="tr_bq">
<i>[(39, 0), (59, 1), (40, 1), (41, 0)]</i></blockquote>
As a side-note, it is quite interesting that the dot-product can itself be written as a lambda using the <a href="https://docs.python.org/2/library/functions.html#zip" target="_blank"><i>zip()</i></a> function:<br />
<blockquote class="tr_bq">
<i>lambda list_1, list_2: sum(map(lambda x: x[0]*x[1], zip(list_1, list_2)))</i></blockquote>
<br />
<br />
<br />
<u><b>Step 2: Find the top k points</b></u><br />
<br />
<span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #eeeeee;">max(Counter(map(</span><wbr></wbr><span style="color: #cccccc;"><span style="color: #eeeeee;">lambda x: x[1],</span> </span>sorted(<span style="color: #999999;">map(lambda x: (sim(x[0], test), x[1]), train)</span>)[-k:]<span style="color: #eeeeee;">)).items(), </span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;">key = lambda x:x[1])[0]</span><br />
<br />
We now sort whatever we got out of the last step in decreasing order of similarity. We use the <a href="https://docs.python.org/2/library/functions.html#sorted" target="_blank"><i>sorted()</i></a> function for this purpose. Since it sorts tuples, and we have not mentioned a key, it sorts on the first index of the tuple - the <i>similarity</i> to the <i>test</i> point. By default, sort happens in increasing order, so the output so far looks like this:<br />
<blockquote class="tr_bq">
<i>[(39, 0), </i><i><i>(40, 1), (41, 0), </i>(59, 1)]</i></blockquote>
You can sort in decreasing order too - by passing in the argument <i>reverse=True</i>, but that's more keystrokes :)<br />
<br />
Now, we extract the tuples with the highest <i>k </i>similarities using <i>[-k:]</i>. The "-" in the list indexing notation in Python implies the counting is done from the tail of the list - here, we get the portion of the list starting with the <i>kth</i> element from the tail of the list till the last element. This gives us the tuples with the <i>k</i> highest similarities. Thus, this is the output of this step:<br />
<blockquote class="tr_bq">
<i>[(40, 1), (41, 0), (59,1)]</i></blockquote>
<br />
<br />
<br />
<u><b>Step 3: Get the labels for these top k points</b></u><br />
<br />
<span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #cccccc;"><span style="color: #eeeeee;">max(Counter(</span><span style="color: black;">map(</span></span><wbr></wbr><span style="color: #cccccc;"><span style="color: black;">lambda x: x[1],</span> </span><span style="color: #999999;">sorted(<span style="background-color: white;">map(lambda x: (sim(x[0], test), x[1]), train)</span>)[-k:]</span><span style="color: #cccccc;"><span style="color: black;">)</span><span style="color: #eeeeee;">).items(), </span></span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;">key = lambda x:x[1])[0]</span><br />
<br />
Since we have the tuples corresponding to the top-k similar points, we really don't need to keep the similarities around any more. Another map() call does the trick - look at the lambda expression here: it only returns the value at index 1 of the tuple. Therefore, as output from this step, we have just the labels:<br />
<blockquote class="tr_bq">
<i>[1, 0, 1]</i></blockquote>
<br />
<br />
<br />
<b><u>Step 4: Get label frequencies</u> </b><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #eeeeee;"> </span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: black;"><span style="color: #eeeeee;">max(</span>Counter(<span style="color: #999999;">map(</span><wbr></wbr><span style="color: #999999;">lambda x: x[1], sorted(map(lambda x: (sim(x[0], test), x[1]), train))[-k:])</span>).items()<span style="color: #eeeeee;">, </span></span><span style="color: #eeeeee;">key = lambda x:x[1])</span></span><span style="color: #eeeeee;">[0] </span></span><span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;"> </span><br />
<span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<br />
We now need to find the label with the highest frequency of occurrence in the k closest points. We use the <i>Counter</i> data-structure from the <i>collections </i>module. The Counter is a special kind of <i>dict</i> which, when initialized with a list, uses the unique elements in the list as keys and the frequency of their occurrence as the corresponding value.<br />
<br />
Thus, <i>Counter([1,1,2,3,2,2,1])</i> gives me the dict <i>{1: 3, 2: 3, 3: 1}. </i>This is exactly what we need. Initializing a Counter with the output of the last step - <i>[1, 0, 1]</i> - gives us this dict:<br />
<blockquote class="tr_bq">
<i>{1: 2, 0: 1}</i></blockquote>
<b> </b>Calling <i>items()</i><b> </b>on a dict returns a list of tuples, each of whose 1st entry is a key, and the 2nd entry is the corresponding value. Hence, the output of this step is:<br />
<blockquote class="tr_bq">
<i>[(0, 1), (1, 2)]</i></blockquote>
Time to address the elephant in the room, I guess :) You could argue that using something from a module does not make for a strict one-liner. And in a sense that is true. I <i>could</i> have avoided using Counter, and instead, used tricks like <a href="http://stackoverflow.com/questions/2161752/how-to-count-the-frequency-of-the-elements-in-a-list" target="_blank">these</a>. Technically, we would have still ended up with an one-liner, but Counter expresses our objective in a clear manner. Thus, not using Counter <i>does not mean</i> that you cannot have an one-liner, only that the result won't be pretty.<br />
<br />
Note that since I am calling Counter directly, my import should be "<i>from collections import *</i>". If you want a cleaner namespace, you might want to do "<i>import collections</i>" and refer to Counter as "<i>collections.Counter</i>"<br />
<br />
Really close now ...<br />
<br />
<br />
<br />
<u><b>Step 5: Get the most common label</b><span style="color: black; font-family: "arial" , "helvetica" , sans-serif;"><span style="color: #eeeeee;"> </span></span></u><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: black;">max(<span style="color: #999999;">Counter(map(</span><wbr></wbr><span style="color: #999999;">lambda x: x[1], sorted(map(lambda x: (sim(x[0], test), x[1]), train))[-k:])).items()</span>, key = lambda x:x[1])[0]</span></span><span style="color: #eeeeee;"> </span></span><br />
<span style="color: #eeeeee; font-family: "arial" , "helvetica" , sans-serif;"></span></div>
<div>
<br />
All that is left now is to extract the label with the highest frequency. That's easy with the <a href="https://docs.python.org/2/library/functions.html#max" target="_blank"><i>max()</i></a> function in Python. Note that our tuples (output from the last step) have the label as the first entry and the frequency of the label as the second entry. Hence, in the max() call, we provide the <i>key</i> argument which finds the maximum valued element in the list <i>based on the second entries in the tuples.</i> Yes, with a lambda expression. They really do get around. Thus, max() returns me this:<br />
<blockquote class="tr_bq">
<i>(1,2)</i></blockquote>
Of which, I extract the label by specifying the index - <i>[0]. </i>This gives me my final answer:<br />
<blockquote class="tr_bq">
<i>1 </i> </blockquote>
</div>
<div>
And this ... is the label we are looking for [melodramatic bow] :)</div>
<div>
<br />
<br />
<h3 style="text-align: left;">
Regression and a related hack</h3>
<div style="text-align: left;">
While I was writing this post, I realized that the one-liner for <i><b>kNN based regression is </b><b>actually shorter - 92 characters</b></i>.
Also, purer - does not rely on modules that need importing. In a
regression problem we are interested in predicting continuous values -
as against discrete labels in classification problems. For ex you may
want to determine the <i>price</i> of a piece of real estate based on features like <i>proximity to a hospital, distance from an airport, proximity to industries</i> etc. The training data has prices per data point instead of labels.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
In kNN based regression, you would look at the values of the k neighbours and return their average.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Here goes:</div>
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<span style="background-color: #cccccc;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: red;">sum(</span>map(lambda x: x[1], sorted(map(lambda x: (sim(x[0], test), x[1]), train))[-k:])<span style="color: red;">)/(1.0*k)</span></span></span></blockquote>
</blockquote>
If
you understand the classifier, understanding this should be easy. The
portion in black is the same as the corresponding part in the
classifier. The part in <span style="color: red;">red</span> is specific to
regression. Note that I need multiply "1.0" to the denominator to make
sure Python does not perform an integer round-off in the division.<br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Now, here is an interesting relationship between kNN regression and classification - if you have only two labels, <i>0</i> and <i>1</i>, <i>then if you average the labels and round-off, it is equivalent to majority voting.</i> For example, consider some sample outputs from Step 3 above:<br />
<br />
<table align="center" border="1" bordercolor="black" cellpadding="3" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><b>Top k labels</b></td> <td style="text-align: center;"><b>Avg of labels</b></td><td style="text-align: center;"><b>Avg rounded</b></td><td style="text-align: center;"><b>Majority vote</b></td></tr>
<tr><td style="text-align: center;">1, 0, 1</td> <td style="text-align: center;">0.67</td><td style="text-align: center;">1</td><td style="text-align: center;">1</td></tr>
<tr><td style="text-align: center;">0,0,1,0</td> <td style="text-align: center;">0.25</td><td style="text-align: center;">0</td><td style="text-align: center;">0</td></tr>
<tr><td style="text-align: center;">1,1,0,0,1</td> <td style="text-align: center;">0.6</td><td style="text-align: center;">1</td><td style="text-align: center;">1</td></tr>
</tbody></table>
<br /></div>
<br />
This does not work with more than two labels.<br />
<br />
Thus, as long as the labels in the classification problems are the numbers <i>0 </i>and <i>1</i> , we can use this following expression:<br />
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<span style="background-color: #cccccc;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="color: red;">int(round<span style="color: black;"><span style="color: red;">(</span>sum(</span></span>map(lambda x: x[1], sorted(map(lambda x: (sim(x[0], test), x[1]), train))[-k:])<span style="color: red;"><span style="color: black;">)/(1.0*k)</span>))</span></span></span></blockquote>
</blockquote>
<br />
The portion in black is the expression for regression we saw earlier. The part in <span style="color: red;">red </span>is needed for classification. <a href="https://docs.python.org/2/library/functions.html#round" target="_blank"><i>round()</i></a> is a built-in in Python which does not need us to import anything (yay!); however, since it returns a float, we explicitly need to cast to <i>int</i> (bummer...).<br />
<br />
This version of the one-line classifier is 104 characters long.</div>
<div>
</div>
<div>
</div>
<div>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
</h3>
<h3 style="text-align: left;">
Conclusions</h3>
<div style="text-align: left;">
A final tally of character counts in the various one-liners. Additionally, mentioned in parentheses, are the sizes we would see if we weren't worried about readability i.e. one letter variable names, no spaces:<br />
<ul style="text-align: left;">
<li>kNN classification - <b>126 </b>characters (<b>107</b>)</li>
<li>kNN regression - <b>92</b> characters (<b>77</b>)</li>
<li>kNN classification hack - <b>104</b> characters (<b>89</b>) </li>
</ul>
<br />
Pretty impressive numbers - my respect for Python just went up a notch!<br />
<br />
I am pretty sure these are not the only implementations of the one-liners possible. For starters, you might favour <a href="https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions" target="_blank"><i>list comprehensions</i></a> over map(), do away with the <i>Counter</i> to create a 'purer' one line etc. If you have something interesting, let me know in a comment!</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Although, great as an intellectual challenge, I don't think the one-liner is suitable for serious use. Good classification libraries may have optimized implementations for kNN - for ex using <i><a href="http://en.wikipedia.org/wiki/K-d_tree" target="_blank">kd trees</a></i> or <a href="http://en.wikipedia.org/wiki/Ball_tree" target="_blank"><i>ball trees</i></a> - which are preferable. For example, <a href="http://scikit-learn.org/stable/modules/neighbors.html" target="_blank">this library</a>.</div>
<div style="text-align: left;">
<br /></div>
</div>
<h3 style="text-align: left;">
</h3>
</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-22062500121827586672014-06-15T14:01:00.001+05:302014-08-17T16:05:21.615+05:30Machine Learning - what it is, what is not<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
In 2007, when I had begun dipping my toes into Machine Learning (ML), the area was little known. When people asked me what I worked on, I usually had to begin by explaining what ML is. Occasionally, I would say Artificial Intelligence (AI) to save on the explanation. In fact,<i> I</i> wasn't sure then whether I wanted to do my research in ML or move to something more mainstream, like Databases or Algorithms (I didn't move). So I find the semi-celebrity status ML has gained over the last 6 years interesting, to say the least.<br />
<br />
Unfortunately, I think the new-found fame has worked both ways; while it is nice to see ML being recognized, I also notice what seems to be the makings of a bubble: there is a sudden demand for ML skills, mismatched expectations of what ML can do for an organization (mismatched wrt the effort that they are willing to put in), a notion of how delightfully easy making good models are (for all the good work MOOCs are doing, this is a sad side-effect).<br />
<br />
In this rather long post, I want to set right a few of those misleading first-impressions. This post is for you if you haven't got your hands dirty with using ML on real-world problems yet - for ex. if you are new to the area, or, maybe you are planning to start a data science team but have no/little prior experience in the area.<br />
<ol style="text-align: left;"><br />
<li><b>Do the math. Literally.</b> Let's say you want to build the fastest car in the world. Would you be able to do so if you are scared of studying the machinery under the hood? Obviously not. Machine Learning involves a fair amount of mathematics. <b>If you want to be good, train yourself to understand the math. </b>And to extend to the general case, know the underlying algorithm where (much) math is not involved.<br /><br />
I have seen people think along these lines: <i>Let’s pick one of the libraries/tools available and do some ML. I don’t really care what goes on inside the algorithms - I can do pretty well without the math.</i><br /><br />
In the <i>right context</i>, this way of working is fine. I have done this a few times myself. The right context here is that you don’t have the time to invest in learning, or time for implementing some custom algorithm yourself, but you do want <i>some</i> prediction capability.<br /><br />
Where this starts becoming a problem is when you start seeing this stopgap solution as a solution - you tend a <i>mismatched</i> expectation that this is going to lead you to the best possible solution for your problem. Or is always going to work. Acknowledge that, with this approach, you are only going to get something that <i>works</i> – where “works” could mean anything from “just about works” to “works perfectly”. And you may not have much control where your solution falls in this spectrum.<br /><br />
The only way to be really good is to know the math so that you can pick the right algorithms and squeeze the last bit of performance out of them. </li>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg02fNyHnXNRliJ5sqkXMZVWt9VSsMwN2vvT60WSA1_SSd5uiiRDNV7fd6W25qG-3c-qMrYWVTP9CiBcouyQTaXTYYAAvAEptXItu3538x5MiX5svFvZxdG4eoka3V0pypYKE0hWLVPBIGi/s1600/jenniferconnelly-confused.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><br />
<br />
<div>
<b><br /></b></div>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5fwWnby6uUsq9pKe79saBbe4Zv9qW3srZrTAAzOtH6_EwwZCvcT8Tzoc7QLyiP9T7awGpKE_Oa1D2fiogNl1H1ZNozf6r-_ksIAqKuI5PIR3KYVL3yBRuXv_P9fKeNhXSx19Yq0i0jTky/s1600/understandingvsmath.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5fwWnby6uUsq9pKe79saBbe4Zv9qW3srZrTAAzOtH6_EwwZCvcT8Tzoc7QLyiP9T7awGpKE_Oa1D2fiogNl1H1ZNozf6r-_ksIAqKuI5PIR3KYVL3yBRuXv_P9fKeNhXSx19Yq0i0jTky/s1600/understandingvsmath.png" height="283" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Confidential: path to enlightenment</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<li><b>Humans can beat your algorithms.</b> This should not really be surprising. Take the task of searching for an image similar to one given to you. Today, you can almost always outperform a computer. Try out <a href="http://images.google.com/" target="_blank">Google Search by Image</a> to see what I mean - the best results are the ones that are identical or very similar to your input. Or appear on same/similar pages as your input. Beyond that, the results go haywire.<br /><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXQlw5FPQV0-SKo6RwJZiVxDF9VQS9gkFe53I4tB5dO_LefE5bcfWAROrXFcwYX-fsJN57QO7KX2onWvlhXUNVlfadCN3mWqwwxI_JYsPIgTes3OPW2Hia2ZTjEceB7j0Uhh2-59egItQJ/s1600/jenniferconnelly.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXQlw5FPQV0-SKo6RwJZiVxDF9VQS9gkFe53I4tB5dO_LefE5bcfWAROrXFcwYX-fsJN57QO7KX2onWvlhXUNVlfadCN3mWqwwxI_JYsPIgTes3OPW2Hia2ZTjEceB7j0Uhh2-59egItQJ/s1600/jenniferconnelly.png" height="316" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: x-small;">Google, Logan Lerman and Jennifer Connelly are different people.</span></td></tr>
</tbody></table>
Look at the results of a search for <a href="http://www.imdb.com/name/nm0000124/">Jennifer Connelly</a>. The image I used in the left screenshot seems to be a popular one - it appears on multiple websites that have articles about her or her wallpapers. The <i>visually similar images </i>returned as part of the search results are quite accurate. In fact, 5 of the 9 results seem to be from the same interview/session. But if I pick an image that is not so popular, as in the screenshot on the right, Google throws in a few dudes in its results.<br /><br />This is not just one cherry-picked pathological example; here is what <a href="http://research.microsoft.com/en-us/um/people/szeliski/" target="_blank">Richard Szeliski</a>, a noted researcher in the field of computer vision, has to say:</li>
<br />
<blockquote class="tr_bq">
It may be many years before computers can name and outline all of the objects in a photograph with the same skill as a two year old child.
</blockquote>
<b>You use machine learning <i><u>not</u></i> because you can do better than humans (in some cases this may be true).</b> <b>You use ML when the scale that a computer can handle is more important than the accuracy a human can provide.</b> You are good at image search, but can you sift through a billion images in a second?<br />
<br />
Applying ML to a real-world problem implies you are willing to sacrifice some accuracy to be able to handle scale. Scale might be important to you because it makes business sense. For example, if you wanted to set up image search as a service, would you rather be handling a 1000 customers a day with 100% accuracy (a hired staff working behind the scenes) or 1 million customers with 70% accuracy? This is really a trick question - there is no clear answer here - depends on your objectives, business model, etc. - my point is that there is a case to be made for scale.<br />
<br />
Sometimes your ability to handle scale can also indirectly improve your accuracy. An example:
<br />
<ul>
<li>You create a search engine that is not accurate as humans but can crawl the whole internet to give you good enough results to begin with.</li>
<li>This makes it a very popular tool – because at least your tool can look at the whole of the vast WWW.</li>
<li>As more and more people use it you keep noting which links people click among the ones you have provided as the search result. </li>
<li>You start ranking higher the ones clicked most. And lo! – now you have something that progressively starts approximating human search behavior.</li>
</ul>
<br />
<br />
Moral of the story - <b>know when to invest in ML</b>. More importantly, <b>set your expectations right about the returns on the investment.</b><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2d2GhyphenhyphenMuvoMH9_AYjV-hxz6mgUtQ8GfAIeGAX7CRaFuTMLqLvRLicicpKYJRcxZOXuPQdd9jjeoKuv4DB38-6eQbE2TPsZOU1m_r260tQ7dXuNx2A_OetrblugKZ4OJcJNBSLc5OKeKEg/s1600/cokepepsi.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2d2GhyphenhyphenMuvoMH9_AYjV-hxz6mgUtQ8GfAIeGAX7CRaFuTMLqLvRLicicpKYJRcxZOXuPQdd9jjeoKuv4DB38-6eQbE2TPsZOU1m_r260tQ7dXuNx2A_OetrblugKZ4OJcJNBSLc5OKeKEg/s1600/cokepepsi.jpg" height="187" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: x-small;">And this is not a glass of pepsi</span></td></tr>
</tbody></table>
<br />
<br /></div>
</ol>
</div>
</div>
</div>
</div>
</div>
<ol start="3">
<li><b>Patterns detected by many algorithms <i>cannot</i> be conveniently interpreted.</b> Take <i>Artificial Neural Networks (ANN)</i>, <i>Support Vector Machines (SVM)</i>, and <i>Random Forests (RF)</i>. These are well established algorithms that are known to do well on a variety of problems but , in general, the model they learn <i>cannot</i> be represented as easy-to-understand rules. Say, you are trying to predict estate prices based on various factors like the average income in the locality, proximity of the estate to important landmarks in a city, the number of hospitals and schools in the locality etc. If you use a SVM on the problem, in most cases, you <i><u>won't</u></i> be able to infer something like this from the model:<br />
<i>The price of the estate is directly proportional to the number of hospitals within a 3km radius of the estate</i>.<br /><br />
This often leads to confusion on these lines:<br />
<i> How can we trust this black-box model when we really don’t know what it is doing? </i>
<br /><br />Some thoughts:<ul>
<li>Decouple the following ideas: (1) "can be easily interpreted by humans", (2) "reliable". Algorithms like ANNs etc have a strong theoretical base - if you want to understand what the model spits out, the way to do it is not to look for rules, but to go back and look at this theory. Yes, the paradigm <i>is</i> different - instead of picking out rules from a model and looking at them saying "<i>Yes, this one looks reasonable"</i>, the idea is to have a proof that says that <i>whatever</i> comes out the learning phase, under certain circumstances, has such-and-such error bounds and would perform in such-and-such manner.
<br /><br />
This is, in a way, reliable in a much more objective<i> </i>manner - the proof puts down what's to be expected in black and white. <!--Also, why does something you can interpret must be right? Or be the most optimal solution? Remember, you are modelling on millions of data instances - what you think is reasonable might be only true for the small sample you've scrutinized. Conversely, why does something you cannot interpret must be wrong? Or not be optimal?-->
<br /><br />
One of the ideas used by the <a href="http://www2.research.att.com/~volinsky/netflix/" target="_blank">winning team</a> of the famous <a href="http://www.netflixprize.com/" target="_blank">Netflix prize</a> was <a href="http://en.wikipedia.org/wiki/Restricted_Boltzmann_machine" target="_blank">Restricted Boltzman Machines</a>. Not exactly very interpretable and yet it raked in a hefty $1M prize. Reconsider - do you really need interpretability? :)
</li>
<br /><br />
<li>
Interpretability offers you a comfort zone. Convince yourself to step out of it because we have a simple test to measure accuracy - and that's what really matters. Keep a <i>test set</i> of data that is not used by the algorithm to train. Find out how accurate the algorithm is on this data. This is as reliable and objective as it gets.<br /><br />
I guess what I am driving at is whenever you find yourself not comfortable with a model that cannot be interpreted, ask yourself whether you really need to interpret it. And the answer cannot be <i>"for my own comfort"</i>. Isn't high accuracy sufficient? <i>Isn't a good model better than an interpretable but not-so-good a model?</i> In some cases, you might really need models which need to be explained - perhaps, to your clients, as part of your findings - this is probably the only time you should start seriously thinking about interpretability.
<br /><br />
</li>
</ul>
<b>
Worry about interpretability when you really need it. Don't expect a good model to be also conveniently interpretable.</b><br />
<br />
</li>
<li><b>Use the right metrics. </b><br /><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBY3umD261Foxav90rCggtvSsPkjNzWOkoNsU3GIQdWbX42lYT696w2llvFHf6OYKO8jKEkfFGEwMWcwodlSrpDQu9q50Zr2zyjCsEJGsL6J9skClihtMF_mUnK4CNwfEgrjUGO5_LkiPn/s1600/AWEJackCompassFountainSearch.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBY3umD261Foxav90rCggtvSsPkjNzWOkoNsU3GIQdWbX42lYT696w2llvFHf6OYKO8jKEkfFGEwMWcwodlSrpDQu9q50Zr2zyjCsEJGsL6J9skClihtMF_mUnK4CNwfEgrjUGO5_LkiPn/s1600/AWEJackCompassFountainSearch.jpg" height="133" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://pirates.wikia.com/wiki/Jack_Sparrow%27s_compass" target="_blank">Source</a></td></tr>
</tbody></table>
Do you remember the compass that Captain Jack Sparrow uses in <a href="http://www.imdb.com/title/tt0325980/" target="_blank">Pirates of the Caribbean</a>? The needle points to whatever the person using the compass wants most. The compass is a fantastic tool, but useless, if you don't know what you want.
<br /><br />
ML is like the compass, but it helps you a lot better if you can express exactly what you want to measure.<br /><br />Sorry for butting in a cheesy analogy. Hopefully, it would help me make my point.<br /><br />
Consider this problem: you are running a car dealership. You make a convincing sales pitch to everyone who walks into your store. Additionally, for certain customers, who are among the ones who have agreed to fill in some kind of a form (where you ask them about their income, current mode of transport, name of place of work, age,etc), you throw in something extra: you let them borrow a trial car for a day, with fuel expenses paid. You believe that this set of customers will make a purchase with some cajoling.<br /><br />How do you pick this set of people? Let's say you train a ML model based on the information entered in the form, to make the binary prediction: <i>likely to purchase </i>(we call these our<i> positive </i>labels) or <i>not likely to purchase </i>( <i>negative</i> labels)<i>.</i> You make the trial-car offer to people your model assigns positive labels to. Clearly, a lot rides on the performance of this algorithm.<br /><br />
Let's assume that, typically, 5% of the people visiting your store buy a car. Lets look at some metrics you may consider to assess the value of your model:<br /><br />
<ol type="a">
<li>How about good old <i>accuracy</i>? This measures the percentage of predictions you get correct overall. If I have a model that <i>only </i>predicts "<i>not likely to purchase"</i> I would be wrong only 5% of the time. So, my model is 95% accurate! That should normally be great, but it makes no sense for my business since my model doesn't identify anyone as a potential purchaser anymore. </li>
<li>We are interested in people who are likely to buy - so lets use a model that has a high accuracy in predicting a positive label for people with a positive label in our data. Now, you could have a model that <i>always</i> says "<i>likely to purchase"</i>, which will give you a 100% accuracy within the group of positively labelled people. This is no good either - think about all those free trials you would be giving away to the 95% who aren't going to buy!</li>
<li>Obviously, we need a way to <i>balance</i> out the problems we just saw. We want whoever the model calls out to be a potential purchaser to be really a potential purchaser, so we don't miss the people we can sell to. But, this should not happen at the cost of identifying non-purchasers as purchasers - because then we would be just giving away way too many free trials. </li>
</ol>
<br /><br />
A good metric to be used here is the <i><a href="http://en.wikipedia.org/wiki/F1_score" target="_blank">F1-score</a>, </i>which is defined in terms of<i> </i><a href="http://en.wikipedia.org/wiki/Precision_and_recall" target="_blank"><i>precision</i>, <i>recall</i></a>. In our context: $$Precision = \frac{people \; identified \; as \; positives/purchasers \; who \; are \; actually \; purchasers}{people \; identified \; as \; purchasers}$$
<br />$$Recall = \frac{people \; identified \; as \; negatives/purchasers \; who \; are \; actually \; purchasers}{actual \; purchasers}$$ $$F1= \frac{2 \cdot Precision \cdot Recall}{Precision+Recall}\;$$
<br />Note how points <i>a</i> and <i>b</i> (from the previous list) are taken care of by <i>precision </i>and <i>recall</i>. In particular, look at how the F1 score penalizes <i>both </i>low precision and low recall. For clarity, plots of F1 (z-axis) as a function of precision and recall (x and y axes) accuracy are shown below. The four plots correspond to the same relationship, but show the plot from different perspectives. Swatches of the same color represent approximately the same F1 score. Observe that the plotted surface seems "taped" to the x and y axes, signifying that if any of precision or recall is zero, the F1-score is zero.<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdVvoKCNP0aMHqwJ5bVGXQbf9lNO6SYSZ0vtrMJwklR2V3XuRky1O_WPCJapoi-Z2RHccH7ggCE23EzejCdk0IFF5oTjs6XEaMC-HvYsbQX8LNLBHkj-LyXdVDpnFXtYeV-jF30tZvJDYo/s1600/f1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdVvoKCNP0aMHqwJ5bVGXQbf9lNO6SYSZ0vtrMJwklR2V3XuRky1O_WPCJapoi-Z2RHccH7ggCE23EzejCdk0IFF5oTjs6XEaMC-HvYsbQX8LNLBHkj-LyXdVDpnFXtYeV-jF30tZvJDYo/s1600/f1.png" height="438" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">F1 score as a function of precision and recall</td></tr>
</tbody></table>
<br /><b>Picking the right metric is important to make sure that your ML model is solving a problem that translates into value for you. </b>There are a host of standard metrics you can pick from - ex <i>F-score</i>, l<i>ift</i>, <i>ROC Area</i>, <i>average precision</i>, <i>precision/recall</i>, <i>break-even point</i>, <i>squared error</i>, <i>cross-entropy</i>. Of course, you might want to consider using a custom metric if that suits you well.<br /><br />
</li>
<li><b>Always have a baseline.</b> Some problems are harder than others. Whether 90% accuracy is good, <i>depends on the problem</i>.
<br /><br />
My favorite example is <a href="http://en.wikipedia.org/wiki/Sentence_boundary_disambiguation" target="_blank">Sentence Boundary Disambiguation</a> (SBD) - the task is to identify elements/tokens in a given text that indicate sentence boundaries i.e. points where a sentence ends. Here, a token of text is anything not a whitespace. For example, the text (a quote by Leonardo Da Vinci):<br /><br />
<i>In rivers, the water that you touch is the last of what has passed and the first of that which comes; so with present time.</i> <br /><br />
has 28 tokens; 25 words and 3 punctuation symbols. We need to identify which tokens among these 28 represent sentence boundaries. There is only one in this sentence - the "." at the end. This is a <i>binary classification</i> problem - for each token, we only need to specify whether it is a sentence boundary or not. The catch here is that a boundary indicators have other uses too - for ex "." is also used for abbreviations - and also, there is more than one sentence boundary indicator - "?", "!", etc.
<br /><br />
Is a model with a F1-score of 90% a good model for this task? Lets start by looking at some very simple "models" and how they perform. In the table below, I have listed 4 such very-non-ML-ish models for the SBD task, and their performance on text from the <i><a href="http://en.wikipedia.org/wiki/Brown_Corpus" target="_blank">Brown corpus</a>. </i>Performance is characterized by precision, recall and F1 scores (a positive label for a token is when we identify it as indicating a sentence boundary).<br /><br /><br />
<table align="center" border="1" bordercolor="black" cellpadding="3" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><b>Description of Model</b></td><td style="text-align: center;"><b>Precision</b></td><td style="text-align: center;"><b>Recall</b></td><td style="text-align: center;"><b>F1-score</b></td></tr>
<tr><td style="text-align: left;">Sentence boundary if element is "."</td><td style="text-align: center;">100.0</td><td style="text-align: center;">86.06</td><td style="text-align: center;">92.51</td></tr>
<tr><td style="text-align: left;">If element is one of "?", ".", "!"</td><td style="text-align: center;">94.35</td><td style="text-align: center;">91.54</td><td style="text-align: center;">92.92</td></tr>
<tr><td style="text-align: left;">If element is "." and it hasn't occurred as one of last 3 elements</td><td style="text-align: center;">100.0</td><td style="text-align: center;">84.97</td><td style="text-align: center;">91.87</td></tr>
<tr><td style="text-align: left;">If element is one of "?", ".", "!" and none of the last 3 elements are "?", "." or "!"</td><td style="text-align: center;">94.26</td><td style="text-align: center;">84.58</td><td style="text-align: center;">89.16</td></tr>
</tbody></table>
<br /><br />
As you can well see, <i>it is hard <u>not</u> to score around 90%</i> on this task! And I wrote the code that generated the above data <i>while </i>writing this post - all 4 models in about 50 lines of Python.<br /><br />A baseline tells you how effective an absolute commonsensical model is. This helps you better guide your efforts: do you want to spend time implementing a model that literature says would give you 95% accuracy? When there is something reasonably good you can do in a short time? Is your accuracy of 60% necessarily a bad score? - not if you have a reasonable baseline that gives you 30%. How far have you come from your baseline accuracy with your current model? - if its not much you may want to revisit your hypotheses about data so that you can pick a better model. <b>For all real problems, having a reasonable baseline is a must</b>.</li>
<br />
<li><b>Try it out. </b>Models make various implicit or explicit assumptions about the underlying data - for ex about what the separation boundary between the classes looks like, the size of the data set, the distribution of noise, whether sequence matters, etc. Since you wouldn't have all the information about your data that can indeed help you validate these assumptions (if you knew so much you probably wouldn't be <i>modeling</i> the data), you might end up using a model that doesn't suit your data. And the only way to know (at least, in most cases) that there is a mismatch<b> </b>is by actually trying it out on the data. <b style="font-style: italic;">Building a good model can be an extremely empirical process. </b>So, be careful to be not become complacent only because a model looks good on paper. It might not work the same way for your data.<br /><br /> </li>
<li><b>Bias-Variance tradeoff, dimensionality and cross-validation. </b>These are topics that deserve longer discussions and I am not going to talk about them much here. I fear that a short discussion would either confuse or impart a false sense of security. If you work with real data, I cannot stress enough the importance, and relevance, of learning about the <i>bias-variance tradeoff</i>, <i>the effects of dimensionality</i> and the <i>practice of cross-validation</i>. What I am going to do, however, is give you a teaser of the pitfalls that you are vulnerable to if you are unaware of these ideas.<br /><br /><div class="separator" style="clear: both; text-align: center;">
</div>
Say, your friend comes to you with data to be classified. You have, at your disposal, implementations of the <i>Naive Bayes </i>algorithm and <i>C4.5</i> - a type of <i>decision tree.</i>You know nothing about how the data was generated but your friend tells you that he is almost sure that the data has a complex separation boundary between the positive and negative classes. So, which algorithm do you use? Clearly C4.5, right? Since, it is well known that it can come up with complex boundaries while Naive Bayes can only get you linear boundaries.<br /><br />
Here's the surprising bit: <i><span style="color: red;">You can do worse than the Naive Bayes classifier.</span></i> <i><u><span style="color: red;">Even though the data is not linearly separable.</span></u></i><br /><br />
What did you miss? You forgot to take into account the fact that Naive Bayes has a high <i>bias </i>and decision trees suffer from <i>high variance</i>. And as a result, <i>size of the dataset </i>affects their relative performance.<br /><br />
Something with a <i>high bias </i>is very rigid in its idea of the separation boundary between the positive and negative classes. Naive Bayes comes up with a separation boundary that is a line - throwing more data will only help it find a better line, but it cannot find anything non-linear i.e. say if the optimal separation boundary looks like a circle, well, you are out of luck.
<br /><br />
A <i>high variance </i>classifier can find complex boundaries but is sensitive to the <i>precise</i> distribution of points. This is a problem because data may be often contaminated with <i>noise </i>i.e. instances in your data set that are not consequence of the phenomena you want to study/model. In the sales car pitch problem discussed previously, the forms in which people filled in an incorrect age would result in noise.<i> </i>A high variance classifier would try to find a separation boundary which correctly labels the noisy points too. This is not a smart thing to do since the noise that you saw on the <i>training data </i>(data used to build our model) may not show up in the <i>test data</i> (data on which we are making our predictions based on the model built on training data) - its noise after all - leading to inaccurate predictions. <br /><br />The figure below shows these problems. In the left panel, which shows the training data, we can see how a high variance model overfits and finds a boundary that includes the noisy green points - which exist far inside the "red region". The high bias classifier is unaffected, but then, it is also a bad model, since the ideal boundary seems quadratic. In the right panel, we see that in the test data the noisy points are absent, and instead, there are red points present in the region as we might expect. The high variance model predicts everything in this region as green however - since that is what it has learnt from the training data. The high bias model, labels a lot of the green points as red, because it could never fit the data correctly in the first place. That it was not affected by noise is an artifact of its general inflexibility. <br /><br />Also note that even the ideal boundary misclassifies one red point (bottom left-most) - the lesson is no one is expected to get everything right, we are merely in the business of minimizing errors.<br /><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4lym7XqrRBh75_B-IULv-E-gn0dlQra3AtuyF4cbGH1PFt9WIo3FoQT4c-L1FgTpagR0dvp_bTT94XnYR0XMVib3OxoYfr3D5Da4kLvA8TsGn7b14gF1oaLGZgQqY56cD5F3TylkWpVlM/s1600/bias_variance_test.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4lym7XqrRBh75_B-IULv-E-gn0dlQra3AtuyF4cbGH1PFt9WIo3FoQT4c-L1FgTpagR0dvp_bTT94XnYR0XMVib3OxoYfr3D5Da4kLvA8TsGn7b14gF1oaLGZgQqY56cD5F3TylkWpVlM/s1600/bias_variance_test.png" height="400" width="278" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Training Data</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzWi9ZjTqTja6PUItQXGzEFCZOzNRWaelbj0sm2s5EK7PxKkn17YsYBk30axW32jvTFyQQjJn_DL9azLCOnnlORHCmlStHrX8EHTqID5JEJdPDBdkbsFMRVw-6DET4UWuYgXkkyugY1m3L/s1600/bias_variance_train.png" height="400" style="margin-left: auto; margin-right: auto;" width="277" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Test Data</td></tr>
</tbody></table>
<br /><br />
The graph below shows how the accuracies of our models change as size of the dataset increases. With low training data, the high variance decision tree classifier fits noise - so much as that the Naive Bayes model, which is downright <i>wrong </i>for this data (remember the data in the example is not linearly separable) outperforms it. A high amount of data effectively <i>tames</i> the decision tree to focus on the dominant patterns in the data only (i.e. not noise) and its performance becomes better. We also discussed that throwing more data at a high-bias classifier doesn't help things much - accordingly, we see that the Naive Bayes line plateaus after a while, whereas, more data definitely helps the decision tree become progressively better.<br /><div class="separator" style="clear: both; text-align: center;">
<br /></div>
</li>
</ol>
</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh38MWhbSRwgaABZw6vDVNwb8_9jO6ju9h9QKYVTOJyXcRU7xBtMLPYTO6hFxBDp6GQSdKra5UHejx48KaiHMw0eivQg9np_og1DawZGp48IvFdAw1GdH705efzUKvWrzv5UvNTvaJ3eADY/s1600/bias-variance.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh38MWhbSRwgaABZw6vDVNwb8_9jO6ju9h9QKYVTOJyXcRU7xBtMLPYTO6hFxBDp6GQSdKra5UHejx48KaiHMw0eivQg9np_og1DawZGp48IvFdAw1GdH705efzUKvWrzv5UvNTvaJ3eADY/s1600/bias-variance.jpg" height="263" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Accuracy of Naive Bayes vs Decision tree, as a function of dataset size. <a href="http://homes.cs.washington.edu/~pedrod/papers/cacm12.pdf" target="_blank">Source</a>.</td></tr>
</tbody></table>
</div>
<br /></div>
This scenario should tell you that some of what you think of as well-informed decisions can turn out to be catastrophically wrong (<i>duh! life!</i>) - what is a better classifier can depend on how much data you have (among other things). Now, go read up on these topics as much as you can :)
</div>
<br />
<ol start="8">
<li><b>Literature survey is important. </b>If you are new to ML you may have those moments when it seems you've hit upon an original idea to solve a problem. I will be harsh here and tell you that its <i>most likely</i> not as original as you think it is. ML has been around for a while - research on neural networks started in the late 50s! - and in the last couple of decades in that time, the field has adopted a reeling pace in its development. What that means for you is that most common "use-cases", and many not so common ones, have been thought about, and solutions published or patented. <br /><br />One way I like to put this is, to be original, you are now competing with people <i>across space and time</i>. In your class in school, for an idea to seem brilliant, you had to only come up with something that didn't strike your 30 odd or so peers in a given amount of time. Here, however, your peer group is composed of every living human being who is working on ML (and would publish/patent) - they are distributed across the globe and some of them probably have the luxury of dedicating more time to solving ML problems than you do. And this is only the <i>space</i> part. Your competitors are <i>also</i> the people who contributed research to the discipline in the last 50-60 yrs. This is the <i>time</i> part. Needless to say, with such a massive demographic that spans space and time, for something to <i>be original</i> is tough. Especially so if you are unaware of what existing literature consists of. <br /><br />
The moral here is that when you come across a problem, do your literature survey first. <b><i>Chances are are your problem has already been studied.</i></b> Even if that's not the case, a good literature survey can provide a logical/mathematical structure to tease your problem into, enabling quick and systematic progress. <i>Don't reinvent the wheel. </i>And remember that <a href="http://scholar.google.co.in/" target="_blank">Google Scholar</a> and <a href="http://citeseerx.ist.psu.edu/" target="_blank">CiteSeerX</a> are your friends.<br /><br />
I feel our approach to approaching ML problems (or, really, any problem) should be in the same spirit of humility with which <a href="http://en.wikipedia.org/wiki/Edsger_W._Dijkstra">E.W.Dijkstra</a>, computer scientist extraordinaire and a Turing award winner, suggested we approach problems in computer programming: <br /><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjMOToCVusb8SvGvRb7lF94IpyMEXLDwxLj_jPoyN5cGyuxjSBx10lNn0IZRqXoboL5k-NCXUmxPulUEyRHI9IY9XX_Vg5wobYSiY279tsDNzeMVOS3i3ipTAlOoZGVK9f8hSHaBOTnG9/s1600/edsger_dijkstra1.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjMOToCVusb8SvGvRb7lF94IpyMEXLDwxLj_jPoyN5cGyuxjSBx10lNn0IZRqXoboL5k-NCXUmxPulUEyRHI9IY9XX_Vg5wobYSiY279tsDNzeMVOS3i3ipTAlOoZGVK9f8hSHaBOTnG9/s1600/edsger_dijkstra1.jpg" height="167" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="background-color: white; text-indent: 32px;"><span style="font-size: x-small;">Edsger W. Dijkstra</span></span></td></tr>
</tbody></table>
<br />
<i>We shall do a much better programming job, provided that we approach the task with a full appreciation of its tremendous difficulty, provided that we stick to modest and elegant programming languages, provided that we respect the intrinsic limitations of the human mind and approach the task as Very Humble Programmers. </i><span style="font-size: x-small;">( Source: <a href="http://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html" target="_blank">The Humble Programmer</a> )</span><br /><br /><br /> </li>
<br />
<br /><br /><br />
<li><b>Working with data is a lot of dirty work. </b>This point is especially directed to people who want to move into Data Mining or Machine Learning job profiles. In most (not all) of these case there is the glamorous notion involved that they will be working on cool learning algorithms all day. Truth is, working with data can be <i>hard and inelegant</i>. And sometimes, <i>plain boring. </i>All those algorithms ML teaches you can be applied <i>only if</i> you have captured the required data in the first place, cleaned it up (data capturing is hardly every perfect and bereft of noise) and transformed it into a format that your ML tools can use. This is not pretty work and takes up most of your time. This is often the 'straw that breaks the camels back', so to speak - people who were enamored with working on ML, become disgruntled with the area, when they are faced up-close with these aspects of their job.
<br /><br />
My advice to people who want to move into this line of work is <b><i>set your expectations right</i></b>. Find someone whose day job is using ML, preferably in the workplace you are interested in, and ask him what his daily routine consists of. <br /><br />
The following awesome <a href="http://explosm.net/" target="_blank">CnH</a> comic strip aptly sums up my sentiments - only replace "science" with "ML":
<br /> <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVU5RrFdJenymmZgGDFydKhWtisJFHfsad7EcJ7TDUQ4LdpS117rG8mQ6IVulxSXu9eTGUGHWRlkJMrYQZLmerF90dxzkisSMnuVR77CjzYoz3kqugZYVq6bVCtedSnieEU0ePZqHwkRaE/s1600/CnH_science.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVU5RrFdJenymmZgGDFydKhWtisJFHfsad7EcJ7TDUQ4LdpS117rG8mQ6IVulxSXu9eTGUGHWRlkJMrYQZLmerF90dxzkisSMnuVR77CjzYoz3kqugZYVq6bVCtedSnieEU0ePZqHwkRaE/s1600/CnH_science.png" height="520" width="640" /></a></div>
</li>
<li><b>Solutions evolve.</b> It is interesting that although we take a matured approach of iterative development for software, in the case of modeling data, a similar mindset is not as prevalent. We tend to commit mistakes of both omission and commission. Either we give the problem too little attention and expect the first few tries to completely nail it, or we tend to get into a purist-academic research mode where we don't want to commit to a solution until we deem it perfect. I feel that the s/w model of iterative development fits very nicely with how ML models should be built in the industry:
<ul>
<li> You need to have a long-term commitment to your data modeling problem. Don't expect to dedicate 2 days to your problem and get a model that is optimal, robust, processor friendly, has low data complexity, etc. </li>
<li> Don't get <i>stuck</i> trying to come up with the best model in the first go. <i><b><u>Think versions</u></b></i>. Keep revisiting your solution and making it better. This has the added advantage that your first (few) version(s) will help set up a proper <i>workflow/pipeline/interface</i> i.e. in a product or a service your model is presumably one component of and the first (few) model(s) can help you smooth out the various kinks around how it precisely plugs in into the larger system. </li>
</ul>
<br /><br />
</li>
<li><b>The man inside the machine is not going away soon. </b><i>(Warning - this is a subjective viewpoint)</i><b> </b>Although the last few years has seen immense progress in the field of ML (I am occasionally still surprised that voice based search is a reality and runs off my mobile phone) we are not yet at a place where we can let algorithms learn from data in cruise-control mode. You need human involvement to pick the best algorithm from the plethora available out there if you want anything to be done in a reasonable amount of time. I have heard people lament that whole learning process is not "automatic" i.e. you can't throw whatever data you have into a black-box and out comes an optimal model. But then the problem we are solving is <i>so complex</i>!
<br /><br />
Different phenomena produce data that have different underlying idiosyncrasies, and to model these effectively, many learning algorithms <i>come halfway</i> by making some assumptions of their own so they don't have to rediscover everything from scratch. How, then, is the right algorithm to be matched to the problem, accounting for your various constraints like time, accuracy, computational resources, etc? The missing element is <i>you</i> - you need to pick the right algorithm for your problem, much like picking the right key from a keychain for a lock. <br /><br />In theory, yes, you could have an algorithm that loops through all possible separation boundaries to pick an optimal one - but there are an infinite (this is not an exaggeration) number of them out there, and you would need forever to solve a single problem. So that you don't have to suffer through this rigmarole, you rely on the experience and judgement of a (good) data scientist to pick a promising subset to try out, from the universe of models. Unless there is a major theoretical revolution in the field, say on a Newtonian or Einsteinian scale, or alternatively, parallel processing becomes far more parallel and affordable, enough so that we can brute force our way out, in the general case the need for human involvement stays. </li>
</ol>
<br />
<div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<i>Phew!</i><br />
<br />
<br /></div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com1tag:blogger.com,1999:blog-7503464577047093171.post-38774164860644553402013-12-25T00:30:00.001+05:302014-01-03T16:50:07.722+05:30A play<div dir="ltr" style="text-align: left;" trbidi="on">
Going through some old documents I came across my first attempt at writing a play. Maybe a little embarrassing now, but I am afraid I will lose the document sooner or later. This is for the record. I remember that I couldn't settle on a name for the play, and the file that I found is called "ytbn" - short for "yet to be named". As far as I remember, it never was named.<br />
<br />
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:TargetScreenSize>800x600</o:TargetScreenSize>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="0" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Introduction: </b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The play is an incident in a society that dictatorially enforces
conformance of deeds and ideas. This society is loosely fashioned after the
society portrayed by George Orwell in his book, “1984”.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Characters:</b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The salesman (our protagonist)</div>
<div class="MsoNormal">
The shopkeeper</div>
<div class="MsoNormal">
Merry, assistant to the shopkeeper</div>
<div class="MsoNormal">
Agents of the government</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The curtains open to
melancholy setting of a neighborhood. It is evening. Our protagonist, a
salesman, walks on a street lined with shabby looking houses. He, apparently,
is new to the neighborhood, since he walks slowly and allows his eyes to
inspect every signboard that he notices. Shortly he comes near a lamp post and
is momentarily shocked to see two men, dressed in black overcoats standing
beneath it. Their surreptitious presence makes him pause, but with a voluntary
effort he resumes his pace, to stop again after a few brisk strides. He has
found what he was looking for. His eyes travel over the signboard of a shop.
The shop is small, and almost looks as if it has been forcefully tucked into an
incredibly narrow space between two houses by a superhuman cause. The sign
reads, “The Curio Shop”. Without further deliberation the salesman walks in.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;"><span style="mso-tab-count: 1;"> </span>The shop is dimly lit. In the
prevailing semi-darkness it is difficult to see any merchandise that the shop
might deal in. Presently a person appears and addresses the salesman.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
New character/<b>Shopkeeper</b>: Good evening! I am the shopkeeper.
How may I help you? <i style="mso-bidi-font-style: normal;">(Smiles pleasantly)</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Salesman</b>: I am a salesman. I am looking for a few things <i style="mso-bidi-font-style: normal;">(clears his throat)</i> that I might find
here – so I have been told.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: <i style="mso-bidi-font-style: normal;">(Pleasantly
smiling)</i> Yes, of course! We sell quite a few things here that are hard to
come by otherwise.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">He gently sways his
hand in a gesture of welcome towards his left. The light adjusts to reveal an
array of mantelpieces.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: <i style="mso-bidi-font-style: normal;">(Continuing,
with unmistakable excitement in his voice)</i> Mantelpieces like these, Sir, I
assure you, you will find nowhere. We also have some exquisite furniture, and
certain other things I would like to show you, should you have the leisure to
look at them!</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Salesman</b>: <i style="mso-bidi-font-style: normal;">(Shuffles
his feet and looks uncomfortable) </i>Er..yes. <i style="mso-bidi-font-style: normal;">(Pauses) </i>But this is not what I came here for.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: <i style="mso-bidi-font-style: normal;">(Narrowing
his eyes, but keeping his smile intact)</i> I am not sure what you are talking
about. Perhaps, you would want to quote a reference?</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Salesman</b>: Frank.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: <i style="mso-bidi-font-style: normal;">(Pauses,
but quite commendably still holds his smile)</i> Ah, yes. This way please.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The shopkeeper leads
the salesman to a wall in an inner room. Placing his palms together on the
wall, he gently slides them towards himself. A faint click… a hidden door!</i></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The door opens to
reveal another badly lit room, the contents of which are not immediately
visible.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: Before we enter ….<i style="mso-bidi-font-style: normal;">(looks about himself)…</i>Merry! Merry!</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">Another man appears,
He is unremarkable in any other way but for the calmly morose expression he
wears. </i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: <i style="mso-bidi-font-style: normal;">(To the
salesman) </i>This is Merry, my assistant.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">Merry looks at the
guest but doesn’t attempt a smile. It is almost as if Merry and the shopkeeper
complement each other as far as their expressions go. The shopkeeper is a
perfect salesman with a ready smile at his disposal. He seems almost incapable
of any other expression, something that can be said equally well for Merry, who,
however, is a picture of gloom. They are like two poles of emotions in a
balanced conversation, embodied apart.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: Merry would watch the shop while we are inside.
I apologize for my earlier behavior. You are obviously aware of how things
stand today. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The salesman, the
shopkeeper and Merry stop mid-air in their actions, as another part of the
stage lights up to depict their thoughts at the moment. Here we see a bonfire
of books and paintings, tended by men wearing black overcoats. Nearby, a
person, presumably the owner of the property that feeds the spiteful fire, is
being forcefully dragged away by more men in black overcoats. He resists, but
his face is painfully calm, proclaiming that this was inevitable, and he knew
that such a day must arrive. This distressing sight stays for a moment and then
vanishes, with the portion of the stage returning to darkness, as our three
characters become animate again.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The shopkeeper and
salesman walk into the newly revealed room while Merry stays outside. Inside
the room, we now see shelves lined with transparent masks.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: <i style="mso-bidi-font-style: normal;">(Smiling)</i>
These masks, as you would know, have no features, only expressions. When you
wear them, they take on the features of the face underneath, but the expression
is theirs. A happy mask makes you look happy; a sad mask makes you look sad. <i style="mso-bidi-font-style: normal;">Always.</i> </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The salesman reaches
inside his pocket to draw out his purse to pay the shopkeeper.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: <i style="mso-bidi-font-style: normal;">(Smiling) </i>Which
one will it be then?</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><i>Salesman</i></b>: The one that smiles, of course.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">Taking down a mask
from the shelf, the shopkeeper wraps it in a piece of brown paper.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: Here it is. Please hide it well when you carry
it outside. Our shop is already being watched.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The salesman and the
shopkeeper leave the inner room and the sliding door is pushed back into place.
Merry, with his unchanging morose look, who has been waiting at the other side,
disappears as soon as they return.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The salesman carefully
tucks the wrapped parcel into his jacket and makes to leave the shop.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Salesman</b>: Thank you!</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Shopkeeper</b>: You are welcome! But be very discreet about this
little affair.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">Smiling a knowing
smile, the salesman walks out. He makes brisk pace on his way back. As he nears
the lamp post, he spots the two men in black overcoats still present. Distracted,
he tries to take a quick step, and trips and falls. The brown package is thrown
away from his person due to the impact. The wrapping was not well done, and a
part of the mask is now clearly visible in the package, which is now lying on
the ground.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The men become
suddenly alert, and lose no time to run to the shop after they notice the now
ill-guised contents of the package. The salesman is paralyzed with fear, and
not knowing how to react to this new development, watches panic stricken in the
direction of the shop.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i style="mso-bidi-font-style: normal;">The men disappear into
the shop. Awhile later Merry and the shopkeeper are brutally dragged outside into
the street. As they shout, scream and their limbs flail wildly in the air, the
salesman notices that the shopkeeper can’t help but still smile pleasantly.
Merry, too, like a vivid contradiction to the world around him, to the reaction
of his body and his very name, wears a mask of calm moroseness.</i></div>
<div class="MsoNormal">
<br /></div>
<div align="center" class="MsoNormal" style="text-align: center;">
CURTAIN</div>
<div class="MsoNormal">
<br /></div>
</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-43842456079786976372013-04-07T22:26:00.000+05:302016-07-30T22:49:39.766+05:30Thoughts on Online Learning<div dir="ltr" style="text-align: left;" trbidi="on">
When online learning became a reality for me with <a href="http://ocw.mit.edu/index.htm" target="_blank">MIT OpenCourseware</a>, I was excited. I could watch <a href="http://ocw.mit.edu/courses/mathematics/18-06sc-linear-algebra-fall-2011/index.htm" target="_blank">Gilbert Strang teach Linear Algebra</a> for free and learn at my pace. So when <a href="https://www.coursera.org/" target="_blank">Coursera</a> and <a href="https://www.udacity.com/" target="_blank">Udacity</a> were launched I was as happy as the next guy, if not more. I work with Machine Learning at my job and it is extremely valuable to me that I can watch related videos online, for free, with the content taught by some of the most prominent researchers/practitioners in their respective areas.<br />
<br />
But it doesn't seem to have worked out very well for me. And apparently not for a lot of other people either. Personally, I am back to reading books. With a year of Coursera/Udacity behind us, I am seeing articles, <a href="http://rein.pk/online-educations-dirty-secret-awful-retention/" target="_blank">like </a><a href="http://qz.com/65408/the-dirty-little-secret-of-online-learning-students-are-bored-and-dropping-out/" target="_blank">these</a>, discussing shortfalls. In this post, I want to discuss where these fell short <i>for me</i>.<br />
<br />
To be clear this is an <i>extremely</i> subjective article discussing things from my point of view. One that is <b>not </b>called "What's wrong with online learning?".<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: large;">What<span style="font-size: large;"> I find</span> missing</span><span style="font-size: small;"> </span></h3>
<div style="text-align: left;">
<span style="font-size: small;">My first two online courses were Linear Algebra by Gilbert Strang offered by <a href="http://ocw.mit.edu/courses/mathematics/18-06sc-linear-algebra-fall-2011/index.htm" target="_blank">MIT Open Courseware</a> and Machine Learning taught by Andrew Ng offered by <a href="http://see.stanford.edu/see/lecturelist.aspx?coll=348ca38a-3a6d-4052-937d-cb017338d7b1" target="_blank">Stanford Engineering Everywhere</a>.When I had initially started going through the material, I wasn't doing much beyond watching the lectures and occasionally scribbling notes. Although the courses filled me with an immediate sense of achievement, I realized that my ability to recall finer details later was essentially<i> broken</i>. In most cases, when coming across a concept elsewhere, I could relate to it at a high level - but to dwell on the workings was difficult, and I often had to go back to the videos for a quick revision.</span></div>
<div style="text-align: left;">
<br />
At this point, other problems would crop up - videos are not text books that you remember the layouts of. That makes skimming and visually searching difficult. They don't have indexes that can facilitate quick look-ups. I would typically narrow down to a specific couple of videos (one - if lucky) and then rummage about with the playbar till I found what I was looking for. Not to mention I needed a computer and my video lectures around for that. Thus, not only was I unable to recall specifics, but digging them out was no walk in the park either. <br />
<br />
To fix this, I re-visited the lectures and prepared extensive notes this time. That worked out amazingly well for me - I remembered most of the stuff, and had a ready reference to consult (my notes).<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUmBUq3JcW2arJtSyzfm3ON8nXfHRYP-KvPY-MGCFrnZ5aQiCJjGFb8OanITn4fqoO5GrnNjOiYFJQzmps5L7RCoCiMd4zd4yHJKbmfsqaUg7Ci8vi_AqpcKl2p0qwsv-5pPXxjdNFA5aA/s1600/ML-notes.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUmBUq3JcW2arJtSyzfm3ON8nXfHRYP-KvPY-MGCFrnZ5aQiCJjGFb8OanITn4fqoO5GrnNjOiYFJQzmps5L7RCoCiMd4zd4yHJKbmfsqaUg7Ci8vi_AqpcKl2p0qwsv-5pPXxjdNFA5aA/s400/ML-notes.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 1. Notes from Machine Learning</span></td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
But these came at the cost of a huge amount of learning time - if a particular video lecture was an hour long, listening to it <i>and</i> making notes seemed to take roughly twice that time, assuming I took detailed notes, and not merely wrote down what I heard/saw but phrased it in my own words.<br />
<br />
Given that I was never much of a note-taker in class, and still did well on most of my courses, I had to wonder - why is it different now? Here are a few things I missed in my online learning experience:<br />
<ol style="text-align: left;">
<li>Active participation in the learning - in classes, I could ask questions. Equally important - others could ask questions. All during the class. The opportunity to ask questions worked to my benefit in two significant ways: <br /><br />
<ul>
<li>It kept me engaged. At some level, it felt as if the class was collectively and organically working towards <i>discovering</i> something</li>
<br />
<li>It prevented <a href="http://en.wikipedia.org/wiki/Technical_debt" target="_blank"><i>technical debt</i></a>. Usually that term is used in the context of software development, but I feel it is equally applicable here. One shoe doesn't fit all - so if the material prepared by the lecturer falls short in satisfying a student he can immediately ask a question to satisfy his information need. With video lectures, I had to make a note to Google up something later. You could pause the video and do that instantly. Or, you could let these pile up and attend to them later. Either way, that wasn't the best of experiences for me for subjects I really cared about.</li>
</ul>
</li>
<li> Learning in a class for the want of a better term, is an <i>immersive experience</i>. This helps recall and motivation. You remember more than just the content from the class - you remember people, places, a comment that made you laugh, etc. Sometimes, these help recall stuff better. You also see real people sitting next to you trying to be good at the same thing as you. If you want to discuss a specific concept with them, it is easier verbally than posting on a forum. There is collective motivation to learn and communication with peers is easy.</li>
<li>If you want to go back to revising something you can refer to your notes, the lecturer's notes or the textbook the class is following. With video lectures this is <i>tough</i>.</li>
</ol>
In a nutshell, for online courses, I don't think the content registers too well because they don't do great on the first couple of fronts. And what doesn't register, should at least be easily searchable - unfortunately, that doesn't happen either.<br />
<br />
I mentioned I have moved back to text books. Why am I learning better with them? With regards to the first two factors I think textbooks actually do <i>worse</i> than online learning. But they do way better when it comes to ease of revisiting stuff - and that ease aids reinforcing of material which sort of makes up, over a period of time, for the relatively lacking engagement.<br />
<br />
It hit me when I started taking the course on <a href="https://www.coursera.org/course/pgm" target="_blank">Probabilistic Graphical Models</a>
by Daphne Koller. The lectures were detailed -I loved them- but the
need for taking detailed notes increased too. Given my full-time job it
was becoming difficult - I was not sure how long I could keep up.</div>
<div style="text-align: left;">
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0_dpTpHEqPbwVtqKgaKo64E07h36L0x05-KcNYL6rhFO_EhI8Iw-KbODOvR0Mwwmg4lbhifR1Y8z-EPd6dFNcXU7hjbY_yd4Z3MmWm46PmbuTtmox6dCOuTQvIMObqpRNFU1t5zm8TD-/s1600/bayesian+network.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0_dpTpHEqPbwVtqKgaKo64E07h36L0x05-KcNYL6rhFO_EhI8Iw-KbODOvR0Mwwmg4lbhifR1Y8z-EPd6dFNcXU7hjbY_yd4Z3MmWm46PmbuTtmox6dCOuTQvIMObqpRNFU1t5zm8TD-/s400/bayesian+network.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 2. Notes <span style="font-size: small;">f</span>rom Probabilistic Graphical Models</span></td></tr>
</tbody></table>
<br />
One weekend I ended up with a sprained
neck trying to take notes for a bunch of lectures. I gave up, re-enrolled
when the course was offered the next time, only to again drop out for similar reasons. The
gamification (deadlines) made me feel stupid and was demotivating. I realized that this wasn't sustainable for me and went back to books.<br />
<br />
To sum up the comparison, textbooks provide me with a medium I can easily
revisit, and the time I am not spending creating this easily searcheable
medium - which I would <u><i>have</i></u> to for video lectures i.e. take extensive notes - makes up for the other benefits video lectures have to offer.<br />
<br />
<h3 style="text-align: left;">
<span style="font-size: large;">Po<span style="font-size: large;">ss<span style="font-size: large;">ible</span></span> <span style="font-size: large;">s</span>olutions</span></h3>
<div style="text-align: left;">
<span style="font-size: small;">To be frank, I don't know what changes would make <span style="font-size: small;">onlin<span style="font-size: small;">e courses better for me</span></span></span>. It's hard to know without actually trying. Personally, I should probably focus on only one course at a time and accept the fact that it is going to take me much more than the stipulated time to finish it.<br />
<br />
However, if I were to take <i>guesses</i> as to what might make courses better, this would be my list:<br />
<ol style="text-align: left;">
<li>Make lectures more interactive - this would promote engagement. Interaction in courses exist - the operative word is "more". Better engagement would help better recall and drive down the need for extensive note taking. Note that this does not completely do away with the need for taking notes - but only eliminates the need to do it in painstakingly copious amounts.
<br /> <br />
Interaction is one way to promote engagement. There might be others too. Perhaps, something on the lines of what the <a href="http://headfirstlabs.com/">Head First</a> guys did for programming? They made reading programming books as easy as reading story books. Is there a way to make watching video lectures as effortless as watching a movie? Or, playing a game - like <a href="http://www.jacobsschool.ucsd.edu/news/news_releases/release.sfe?id=1347">this</a> experiment from UCSD.
</li>
<li>Make them searchable - <i>somehow</i>. Find a way so I can revisit the course for specific topics with ease. Transcribe the speech of the lecturer and index the video timeline with words from the transcription if that's what it takes! </li>
<li>I like how <a href="http://erikdemaine.org/" target="_blank">Erik Demaine</a> prepares his courses.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtDZ226LgjNJpZb8jBFjP__bV5Kl-A6tdrZKCUOSQzZODOH40ZGz-y7xPaV5Hnpg7a2aH0AAZJSMV8T_EsYsgR7ejnlygrIk8b-98R8iIXiOJqFLxnz7hb5F0lzCRV039sKiB4S9GNrM4Q/s1600/erik.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtDZ226LgjNJpZb8jBFjP__bV5Kl-A6tdrZKCUOSQzZODOH40ZGz-y7xPaV5Hnpg7a2aH0AAZJSMV8T_EsYsgR7ejnlygrIk8b-98R8iIXiOJqFLxnz7hb5F0lzCRV039sKiB4S9GNrM4Q/s400/erik.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Fig 3. Geometric Folding Algorithms by Erik Demaine</span></td></tr>
</tbody></table>
<br />
Fig 3. is from his course on <a href="http://courses.csail.mit.edu/6.849/fall12/lectures/L01.html">Geometric Folding Algorithms</a>. There is a lecture video on the page, there is a frame with handwritten notes in it (shown in a black box) and there is another frame with slides in it (shown in a red box). The video, the notes and the slides are <i>synchronized</i>: when Erik moves ahead with his lecture, the slides and notes change pages too. <br /><br />
This helps the learner <i>associate </i>textual content - notes/slides - that can be searched (probably easier after printing) with the actual lectures. This is a clever way of maintaining the engagement videos give us, and making the content easy to revisit later without actually revisiting the video. All depends on how strong you can make the association between the text content and the video in the presentation.
<br /><br />
<a href="http://www.infoq.com/">InfoQ</a> and <a href="http://videolectures.net/">videolectures.net</a> do this to some extent too.
</li>
</ol>
</div>
</div>
<h3 style="text-align: left;">
</h3>
</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com18tag:blogger.com,1999:blog-7503464577047093171.post-1803749157719016692012-11-05T09:12:00.002+05:302016-07-30T22:53:39.830+05:30Jensen's Inequality<div dir="ltr" style="text-align: left;" trbidi="on">
<script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); </script> <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"> </script>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<i>[This post might not be rendered properly in Safari ]</i><br />
<br />
<a href="http://en.wikipedia.org/wiki/Jensen%27s_inequality" target="_blank">Jensen's inequality</a> finds widespread application in mathematical proofs. However, in spite of its popularity, an intuitive explanation of it, that I have come across a few times, doesn't seem to be as popular. The purpose of this post is to present this mostly-visual explanation in brief.<br />
<br />
I am not sure when this argument originated, or by whom, but Google turns up this <a href="http://nctuocw.sjtu.edu.cn/new/course/fourier/supplement/jensen%20inequality.pdf" target="_blank">paper</a>* - even if this is not the original argument it is a good reference.<br />
<br />
This post doesn't come anywhere close to a comprehensive discussion of the inequality. It's deliberately sketchy wrt a lot of mathematical details - in fact, I formally state the inequality only near the end of this post. It attempts to provide a <i>feel</i> of the inequality, and no more.<br />
<h4>
<b>Center of mass</b></h4>
If you know what a CM is, you should skip ahead to the next section.<br />
<br />
For our purposes, we can think of the center of mass of an object as that one point where you could hold it up from. In Fig 1, the finger is placed at the center of mass of the toy bird. Fig 2 shows a baseball bat held up at the center of mass of the bat.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5wj3woQhV0s3UuqBR8T3kmz5FMPMjgChdDqno6K9uOExkbNF0rdtavyXl23_iWXKPPtcj1mIKoWYG9ObjkGKtn1YuVDQckaX6SR5aYw8VnQ1FUUdKIc9uC_SqhH1c5dLA9jDly6KUXMHf/s1600/220px-Bird_toy_showing_center_of_gravity.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5wj3woQhV0s3UuqBR8T3kmz5FMPMjgChdDqno6K9uOExkbNF0rdtavyXl23_iWXKPPtcj1mIKoWYG9ObjkGKtn1YuVDQckaX6SR5aYw8VnQ1FUUdKIc9uC_SqhH1c5dLA9jDly6KUXMHf/s200/220px-Bird_toy_showing_center_of_gravity.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 1 (<a href="http://en.wikipedia.org/wiki/Center_of_mass" target="_blank">Source</a>)</td></tr>
</tbody></table>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMxM6fvsU_NFS6BZFSibT5gvVwOIAuk9Dz3IbTDS8CgfYtkHvFB9TYDnRhxka4hgDf4ffZ543_xkpFotJxhVq7JQMcjYImmFhgIYEOzzrDLRksHSQ2bdugVglxv3gnixy_HyvLgkxDTXrL/s1600/bat2findcofm800.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMxM6fvsU_NFS6BZFSibT5gvVwOIAuk9Dz3IbTDS8CgfYtkHvFB9TYDnRhxka4hgDf4ffZ543_xkpFotJxhVq7JQMcjYImmFhgIYEOzzrDLRksHSQ2bdugVglxv3gnixy_HyvLgkxDTXrL/s200/bat2findcofm800.jpg" width="200" /></a> </td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 2 (<a href="http://www.exo.net/~pauld/activities/baseball/batcofm.htm" target="_blank">Source</a>)</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
We wouldn't be looking at the CMs of bodies like the toy bird or a baseball bat, but of groups of disconnected masses, like in Fig 3; here, a mass is represented by a black circle, with a larger mass represented by a larger circle. If the disconnected-ness of the masses seems confusing, you could assume that the masses are affixed to a Plexiglas sheet of negligible weight, shown in gray, as in Fig 4.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG-Vq216FEqDkd8mjbfqtW9D7MTrVjfeGHN2a15iZw3ImxU0qYGMoUk53TByeEDeVDIF_t0pw_5fzpjGo3XLaL-rW0kKfLm25aUjvuLjf6zzYIyeXSfZwcJxRpdijySGAAfR_CPjFC0ZgE/s1600/masses.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG-Vq216FEqDkd8mjbfqtW9D7MTrVjfeGHN2a15iZw3ImxU0qYGMoUk53TByeEDeVDIF_t0pw_5fzpjGo3XLaL-rW0kKfLm25aUjvuLjf6zzYIyeXSfZwcJxRpdijySGAAfR_CPjFC0ZgE/s200/masses.png" width="141" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 3</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSECu6OUJW2yRz_IboxOiyNQUBk0oQG1kg85tRfOFivPkyXcMhsOQRfafVEj4fpRD7mXMpx1ZRBAj5gCl-eEPf4-ie-ihyOgoV8v1zLJ1ND999FwRbwzcf8n9Lg183vpuvgQGwu0-nohK4/s1600/masses_plexiglas.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSECu6OUJW2yRz_IboxOiyNQUBk0oQG1kg85tRfOFivPkyXcMhsOQRfafVEj4fpRD7mXMpx1ZRBAj5gCl-eEPf4-ie-ihyOgoV8v1zLJ1ND999FwRbwzcf8n9Lg183vpuvgQGwu0-nohK4/s200/masses_plexiglas.png" width="141" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 4</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Now, look at Figures 5,6 and 7 - or just Fig 5 if you're in a hurry :) . <span style="background-color: white; color: #333333; font-family: "georgia" , serif; font-size: 13px; line-height: 20.78333282470703px;">The green dot approximately marks the CM of the masses. </span>The red dots are placed at points where the CM <i>cannot</i> be. The following diagrams are intended to exercise your intuition of CM - make sure that where you think the CM should be is close to the green dot. In other words, you could hold up the mass-Plexiglas arrangement -much like the toy bird from Fig 1 - by placing it on a finger at the green dot. Also, verify that the red dots look like extremely unlikely locations of the CM to you i.e. if you held up the system at a red dot you would have excess weight on one side and the system would topple.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbPcLzxyithkrtgubyc3_Ueo-arJl3boNtvXI3IF3IdbboT85N6pBAs3fOs94U7dRoaFZYluDuNfG7nIzF1zrlFs82hhNYhY1IucA8LjCQGhFcz9FKRc7g6pct7yB9M2L64w5R_rtip4mP/s1600/cm_example_1.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbPcLzxyithkrtgubyc3_Ueo-arJl3boNtvXI3IF3IdbboT85N6pBAs3fOs94U7dRoaFZYluDuNfG7nIzF1zrlFs82hhNYhY1IucA8LjCQGhFcz9FKRc7g6pct7yB9M2L64w5R_rtip4mP/s200/cm_example_1.png" width="141" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 5</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSvF3REZCP4Oz7LUaoWca8vnQ-QzOK52ugEengwUNlONUH_OODd8d8coqj8VXEo3eSfMbRhG6PQO5FDOvGc82nDwQoV4HfVHaV-Kj42hJ8qk9NHTw44LICE0b_-0BqvNZImjnbwLb0vf58/s1600/cm_example_1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSvF3REZCP4Oz7LUaoWca8vnQ-QzOK52ugEengwUNlONUH_OODd8d8coqj8VXEo3eSfMbRhG6PQO5FDOvGc82nDwQoV4HfVHaV-Kj42hJ8qk9NHTw44LICE0b_-0BqvNZImjnbwLb0vf58/s200/cm_example_1.png" width="141" /></a> </td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 6</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfy5D-HDKhFLm4Zu71L348ga8Nh8Smh9cfuM3lVVDBKgpSoRcXbSDSUnIqBJJhcv1OaWFfRD_9a535aySxW3gxmq0dr40Nl80xS4IcG9j8cpN3y9w-XBFH-ivkU0YK4M5vzvjqqNJiktfR/s1600/cm_example_3.png" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfy5D-HDKhFLm4Zu71L348ga8Nh8Smh9cfuM3lVVDBKgpSoRcXbSDSUnIqBJJhcv1OaWFfRD_9a535aySxW3gxmq0dr40Nl80xS4IcG9j8cpN3y9w-XBFH-ivkU0YK4M5vzvjqqNJiktfR/s200/cm_example_3.png" width="141" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 7</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
A red dot outside of the mass-Plexiglas system challenges you to think that the CM doesn't lie within the system at all.<br />
<br />
Let's briefly walk through the example in Fig 5. The red dot at the center could have been the CM if the masses were equal; since they are not, it's slightly shifted toward the larger mass. The red dots at the edge of the Plexiglas and on the medium-sized mass can't clearly work: there is simply too much weight on one side and so if you held up the arrangement here it definitely would topple over. The red dot outside can't possibly work either - <i>all </i>mass is on one side of it; there is no way you could keep the whole thing in balance at this point (assuming there was a way to hold up the whole thing at this point - maybe via an extension of the Plexiglas sheet).<br />
<br />
This should be the basic takeaway from the exercise:<br />
<ol style="text-align: left;">
<li>The CM occurs inside the area enclosed by the masses i.e. inside the shaded region. </li>
<li>It's closer to relatively larger masses. </li>
</ol>
<br />
Before we move on, we need to look at expression for the coordinates of the CM - lets refer to it as \((x_{cm}, y_{cm})\) - in terms of the various masses and their locations. We need to do this so that we can write down the final expression in its mathematical form. We do not discuss <i><a href="http://en.wikipedia.org/wiki/Derivation_of_the_center_of_mass" target="_blank">how</a></i> we arrive at this equation though.<br />
<br />
If our masses are \(m_1, m_2, ..., m_n\) and they are placed at coordinates \((x_1, y_1), (x_2, y_2), ... (x_n, y_n)\) respectively, then:<br />
$$x_{cm} = \frac{\sum_{i=1}^{i=n} m_i x_i}{\sum_{i=1}^{i=n}m_i }$$<br />
$$y_{cm} = \frac{\sum_{i=1}^{i=n} m_i y_i}{\sum_{i=1}^{i=n}m_i }$$<br />
<ul style="text-align: left;">
</ul>
Essentially, the coordinates are the weighted average of the coordinates of the masses.<br />
<br />
<br />
<br />
<b>Jensen's inequality</b><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibalxa-Z8Rz9-o2LZwzgZxmJiIAmruhi2wFUJlABKAviLXe98txOEGVQ5cJ0AlA5e052ZM-nozPe86dSDQnJ3Am94X4b62H6QkFTDiOO7j0ws8qhiM6rOm85lOhYKTJx4zZENny5c62AYu/s1600/concave.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibalxa-Z8Rz9-o2LZwzgZxmJiIAmruhi2wFUJlABKAviLXe98txOEGVQ5cJ0AlA5e052ZM-nozPe86dSDQnJ3Am94X4b62H6QkFTDiOO7j0ws8qhiM6rOm85lOhYKTJx4zZENny5c62AYu/s400/concave.png" width="282" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 8</td></tr>
</tbody></table>
<br />
<b><br /></b>
<b><br /></b>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Take a look at the curve of the function f(x) in Fig. 8. This is a <i>concave</i> function because were you to stand on the x-axis and look up at it, you would see a concave curve (a <i>convex</i> function maybe described in an analogous manner). Assume that masses are placed at points A,B,C,D and these weigh \(m_1\),\(m_2\), \(m_3\) and \(m_4\) respectively. Where is the CM of the system? - quite likely somewhere near P; at any rate, somewhere in the shaded region which, importantly,<i> is bounded by the function - f(x) - from</i> <i>above</i>. The coordinates of the CM -\((x_{cm}, y_{cm})\) - are marked in the figure.<br />
<ul>
</ul>
Now, what can we say about the value \(f(x_{cm})\)? It is on the curve f(x), as shown by point Q. But, since the curve f(x) bounds the shaded region from <i>above</i>, it is <u>obvious</u> that \(f(x_{cm}) > y_{cm}\): obvious since this is as good as saying Q is higher than P. <i>This is the heart of the inequality</i> - this is pretty much what Jensen's inequality states.<br />
<br />
<span style="background-color: white;">Thus, in our interpretation, Jensen's inequality makes explicit a simple relationship between the y-coordinate of the CM and the value of a function at its x-coordinate.</span><br />
<br />
Beyond this point, all steps merely take us to a standard representation.<br />
<br />
<b><br /></b>
<b><br /></b>
<b>Standard form</b><br />
<b><br /></b>
So far, we have<b> </b> \(f(x_{cm}) > y_{cm}\).<br />
<br />
Here are the coordinates of the CM:<br />
$$x_{cm} = \frac{m_1 x_1 + m_2 x_2 + m_3 x_3 + m_4 x_4}{m_1 + m_2 + m_3 + m_4}$$<br />
$$y_{cm} = \frac{m_1 y_1 + m_2 y_2 + m_3 y_3 + m_4 y_4}{m_1 + m_2 + m_3 + m_4}$$<br />
Substituting the values for \(x_{cm}\) and \(y_{cm}\) we obtain:<br />
$$f(\frac{m_1 x_1 + m_2 x_2 + m_3 x_3 + m_4 x_4}{m_1 + m_2 + m_3 + m_4}) > \frac{m_1 y_1 + m_2 y_2 + m_3 y_3 + m_4 y_4}{m_1 + m_2 + m_3 + m_4}$$<br />
Next, we replace all \(y_i\) with the corresponding \(f(x_i)\) in the RHS - this gives us the inequality for our case:<br />
$$f(\frac{m_1 x_1 + m_2 x_2 + m_3 x_3 + m_4 x_4}{m_1 + m_2 + m_3 + m_4}) > \frac{m_1 f(x_1) + m_2 f(x_2) + m_3 f(x_3) + m_4 f(x_4)}{m_1 + m_2 + m_3 + m_4}$$<br />
<div>
In the general case, for a concave curve, this is what the inequality looks like:</div>
<div>
$$f(\frac{\sum_{i=1}^{i=n}m_i x_i}{\sum_{i=1}^{i=n} m_i}) \geq \frac{\sum_{i=1}^{i=n} m_i f(x_i)}{\sum_{i=1}^{i=n} m_i}$$where \(\forall m_i, m_i \geq 0\)<br />
<br />
Often, we are interested in cases where \(\sum_{i=1}^{i=n}m_i=1\). The inequality, then, simplifies to:<br />
$$f(\sum_{i=1}^{i=n}m_i x_i) \geq \sum_{i=1}^{i=n} m_i f(x_i)$$where \(\forall m_i, m_i \geq 0\) <i>and</i> \(\sum_{i=1}^{i=n}m_i = 1\)<br />
<br />
Similar arguments can be made for convex curves. We end up with the "\(\geq\)" symbol being reversed in the inequality.</div>
<br />
Done. Really.<br />
<br />
<br />
<br />
* <span style="font-size: x-small;">The author of the paper, Tristan Needham, has the favorably reviewed book "<a href="http://www.amazon.com/Visual-Complex-Analysis-Tristan-Needham/dp/0198534469" target="_blank">Visual Complex Analysis</a>" to his credit. As with other books on my To-Read list I hope to get to it <i>someday</i>.</span><br />
<br /></div>
</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com4tag:blogger.com,1999:blog-7503464577047093171.post-50218788648853321962011-11-09T10:44:00.242+05:302012-12-05T09:15:20.249+05:30The Best Card Trick<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: 100%;">... is the title of an article </span></span><a href="http://courses.csail.mit.edu/6.042/spring10/cardTrick.pdf" style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">[PDF] </a><span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: 100%;">from the </span></span><span style="font-family: Georgia, serif; font-size: 100%; font-style: italic; font-variant: normal; font-weight: normal; line-height: normal;">Mathematic</span><span style="font-family: Georgia, serif; font-size: 100%; font-style: italic; font-variant: normal; font-weight: normal; line-height: normal;">al Intelligencer</span><span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; line-height: normal;"><span style="font-size: 100%;"> I recently came across that, well, discusses a namesake card trick. As it turned out, the somewhat presumptuous title notwithstanding, the trick happens to be pretty interesting. Not to mention it gives me enough material to </span></span>to gab about and break out of my posting hiatus (before slipping into another :) ). So, here we go ...<br />
<span style="font-family: Georgia, serif; font-size: 16px;"><br /></span>
<br />
<div dir="ltr" style="font-family: Georgia, serif; font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; text-align: left;" trbidi="on">
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: bold; line-height: normal;">A bit of history </span><br />
<br />
<span style="font-size: 100%;">The original article offers close to 1.5 pages of history if you are interested - consider this section a "tl;dr"-ed version.</span></div>
<div dir="ltr" style="font-family: Georgia, serif; font-family: Georgia, serif; font-size: 100%; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; text-align: left;" trbidi="on">
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: 100%;"><br /></span></span></div>
<div dir="ltr" style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-weight: normal; text-align: left;" trbidi="on">
<ul>
<li style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-family: Georgia, serif; font-size: 100%;"><span style="font-size: 100%;">The trick appeared in the book </span></span><span style="font-family: Georgia, serif; font-size: 100%; font-style: italic;">Math Miracles</span><span style="font-family: Georgia, serif; font-size: 100%;"><span style="font-size: 100%;"> by Wallace Lee, where it is credited to William Fitch Cheney Jr., a.k.a. "Fitch".</span></span></li>
<li><span style="font-family: Georgia, serif; font-size: 100%;">The article is by Michael Kleber.</span></li>
</ul>
</div>
<div dir="ltr" face="Georgia, serif" size="3" style="font-family: Georgia, serif; font-size: 100%; font-variant: normal; font-weight: normal; line-height: normal; text-align: left;" trbidi="on">
<br />
Here's where I would have ideally ended this section (a <i>bit</i> of history: check) but Fitch having been the interesting character that he had been, it would be unfair if I didn't mention the following facts about him before we move on:<br />
<br />
<ol style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<li style="font-style: normal;">If a name like "Fitch" inspires the image of an ordinary performer of card tricks, or worse still, a street magician, you couldn't be more wrong - Fitch was awarded the first PhD in mathematics from MIT in 1927. </li>
<br />
<li>As a teacher, Fitch seems to have been unusually entertaining: </li>
<br /><span style="font-style: italic;">"... he enjoyed introducing magic effects into the classroom, both to illustrate points and to assure his students' attentiveness</span><span style="font-style: italic;">. He also trained himself to be ambidextrous (although naturally left-handed), and amazed his classes with his ability to write equations simultaneously with both hands, meeting in the center at the "equals" sign."</span><br /><ol style="font-style: normal;"> --- from a description of Fitch by his son, Bill Cheney</ol>
</ol>
<br />
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: bold; line-height: normal;">Trick, and a mathematical treat</span><br />
<br />
To appreciate how the trick works under the hood, lets start by looking at it from the point of view of the audience. <span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">If you were at the receiving end of the trick this is what you would see:</span><br />
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<br />
(1) The magician holds out a normal deck of 52 cards to you, and asks you to pick 5 cards.<br />
<br />
(2) You do so and hand them over to his assistant.<br />
<span style="font-size: 100%;"><br /></span></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<span style="font-size: 100%;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Say, this is what you pick:</span><br />
<div style="text-align: left;">
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimz2ek__RN47mn5WpO6iK_PLCddjYPPTbc0yMhvMmaXqydbi5Su1ELrbpS3Vy76RJIl7RAMWuv_dnXlI_RlmJC9cH369fFpJ-7M7_Br172EDLm0_ylhd0O99t7btMbYS8J9X0HKjOApRIj/s1600/youselect.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5673041114551586258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimz2ek__RN47mn5WpO6iK_PLCddjYPPTbc0yMhvMmaXqydbi5Su1ELrbpS3Vy76RJIl7RAMWuv_dnXlI_RlmJC9cH369fFpJ-7M7_Br172EDLm0_ylhd0O99t7btMbYS8J9X0HKjOApRIj/s320/youselect.png" style="cursor: pointer; display: block; height: 83px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a></div>
(3) Of the 5 cards handed over to her, she hands 4 of them to the magician. Say, these:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCmZ8e7AF8_K9_tDN2mEzeBcKdS3bdqmBKGi4sprihmY5CREZW3_-PwKpZj5nCJaRIi_VRy50YH5yzss8EPjODSsr_RKJj2WBZGmGzZjoLnsbNfPaV7i8-khc80QqvKv302Uj6ltURuNfN/s1600/assistant.png"></a><br />
<div>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Q-II963z8rxaEc3Z3mq90p8a-pKx5ItAAueiTtKiqq6fX6RvtUymB2s3pQCsPsmxcSggY3LRGJ2YMA3vNRkSkPkteiBzcSuge9XNHmnBR6r1gMm1QieFoACidWO7m-SM0jRls0Ks5J1g/s1600/assistant.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5687250062533347778" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Q-II963z8rxaEc3Z3mq90p8a-pKx5ItAAueiTtKiqq6fX6RvtUymB2s3pQCsPsmxcSggY3LRGJ2YMA3vNRkSkPkteiBzcSuge9XNHmnBR6r1gMm1QieFoACidWO7m-SM0jRls0Ks5J1g/s320/assistant.png" style="cursor: pointer; display: block; height: 117px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a></div>
<br />
(4) He looks at the 4 cards handed to him, and with <span style="font-style: italic;">< insert favorite dramatic gesture here ></span> announces the 5th card you had selected.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF8w_UYdLcD0QRxJymko0YfDZKotAcJYkcuyVMLbDIqKhg4cr7Fw82afsX2ta2hRIuFPegqrmTd3vK0Rd_UL2Z9Sy4Hp_2ELmb6RX0ez1hyphenhypheneT73c4q6PdgI0CLdeedz__AnZG6eyfo0az4/s1600/5thcard.png"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLgk_epsjHuXQ2RnORom7ZdtOnGkyLfbHWBLsKD3YzX76_bHthzsdASkkZVFurxAEl49EonoBerIR8e0WBE96vdHmHBCyOvz9OE0D9YQh_fFxKueOe5T21Wa6MjLdczgyYF9QNH98bWMwS/s1600/5thcard.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5687250992283167570" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLgk_epsjHuXQ2RnORom7ZdtOnGkyLfbHWBLsKD3YzX76_bHthzsdASkkZVFurxAEl49EonoBerIR8e0WBE96vdHmHBCyOvz9OE0D9YQh_fFxKueOe5T21Wa6MjLdczgyYF9QNH98bWMwS/s320/5thcard.png" style="cursor: pointer; display: block; height: 104px; margin: 0px auto 10px; text-align: center; width: 77px;" /></a></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<br /></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<br /></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
Take a while to think about what happened here. Assuming a normal, well-shuffled deck and no underhand techniques, the objective of the magician seems to be to look at 4 cards, handed to him by his assistant, and infer the 5th. With absolutely no prior knowledge of the selection on part of the magician (in other tricks this is typically arranged for by using a deck with more cards of one kind than another, or stacking it up in some particular way etc), how exactly is the assistant to indicate the rank and suit of the 5th card using the 4 cards she hands over?<br />
<i><br /></i></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
What<i style="font-style: normal;"> </i>messages<span style="font-style: normal;"> </span><i>can</i><span style="font-style: normal;"> you pass with 4 cards ?</span></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<i><br /></i></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-variant: normal; font-weight: normal; line-height: normal;">
<div style="font-style: normal;">
A possible way seems to be arranging 4 cards in a way that identifies the 5th card i.e. you could use the <i>ordering</i> of 4 cards to encode the suit and rank of the 5th card.</div>
<br />
<div style="font-style: normal;">
But there is a catch here - 4 cards can be arranged in 4! = 24 different ways, whereas the 5th card could be any one of the remaining 52 - 4 = 48 cards. Apparently we do not have enough arrangements of 4 cards to indicate the 5th card. One card more, and we would have been good to go - but, the technique doesn't seem workable as-is.</div>
<div style="font-style: normal;">
<br /></div>
<div>
In essence, the trick is not a <i style="font-style: normal;">sleight-of-hand</i>-ish<i style="font-style: normal;"> </i>trick - it boils down to <i>compressing and conveying information</i>. Fitch being a mathematician probably has something to do with this.</div>
</div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<br /></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
So,w<i style="font-style: normal;">hich</i> 4 cards does the assistant hand over to the magician? And how do these indicate the 5th card?<br />
<!--And what is special about these chosen 4 - do they have more information carrying capacity (to indicate the left-over card) than any other 4 cards in a randomly selected set of 5 cards? --><br /></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<br /></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<b>The workings</b></div>
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<br /></div>
<div style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<span style="font-style: normal;">We saw how we fall short when we try to use orderings for our purpose; this is where the trick gets interesting. Instead of abandoning the approach completely, it looks deeper at the kind of objects we are dealing with. Each </span>card is marked with a suit and a rank<i style="font-style: normal;"> - </i>can these attributes help us in squeezing in more information? Apparently, yes:</div>
<div style="font-style: normal;">
<ol style="font-family: Georgia, serif; font-size: 100%; font-variant: normal; font-weight: normal; line-height: normal;">
<li style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">Since there are just 4 suits, but you have picked 5 cards, there are <span style="font-style: italic;">at least</span> 2 cards of the same suit in your selection (Hello, <a href="http://en.wikipedia.org/wiki/Pigeonhole_principle">pige</a><a href="http://en.wikipedia.org/wiki/Pigeonhole_principle">onhole principle</a>!). In the above example these are 3 ♠ and 10 ♠ . As per a convention decided upon by the assistant and the magician, the assistant holds back one of the cards with a repeated suit, and in the arrangement of cards he hands to the magician, he positions the other card of the suit as the first card. Looking at the first card, the magician now only needs to guess the rank of the unseen card - the suit is same as that of the first one.<br /><br />Look at the cards in step 3 above; 10 ♠ is the first card handed over. The magician knows that the 5th card is also a spade.<br /><br />But with the first card used to reveal just the suit, we have only 3 cards left to guess the rank of the 5th card. Which can take on 13 values. But 3 cards can be arranged in only 3! = 6 ways.<br /><br />Ouch. Again.</li>
<br />
<li><span style="font-style: normal;"><span style="font-size: 100%;">Since our strategy is already piggybacking on the repeating of suits, it's worth asking, </span>among<span style="font-size: 100%;"> the cards with the repeated suit, is there a good way to pick the card the assistant would be sliding into the first position?</span></span><br /><br /><span style="font-style: normal;"><span style="font-size: 100%;">In the above example, this is equivalent to asking, between 3 ♠ and 10 ♠, which card should be put in the first position?</span></span><br /><br /><span style="font-style: normal;"><span style="font-size: 100%;">Is there an optimal choice here? Optimal in a way that helps us to work around he limitation we encountered above i.e. can choosing the 1st card wisely, lets us use just 3 cards to indicate the rank of the 5th card ?</span></span><br /><br /><span style="font-style: normal;"><span style="font-size: 100%;">Turns out, the answer is yes. Here's a short, math-savvy hint: </span></span><a href="http://en.wikipedia.org/wiki/Modular_arithmetic" style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">modular arithmetic</a><span style="font-style: normal;"><span style="font-size: 100%;">.</span></span><br /><br /><span style="font-style: normal;"><span style="font-size: 100%;">In simple words, here, this means that we do not directly indicate the rank of the 5th card, but we indicate what number you should add to the rank of the 1st card to obtain the rank of the 5th card. Except that we agree to a way of handling the addition when it goes beyond 13 - in such cases, we simply start counting at 1 again.</span></span><br /><br /><span style="font-style: normal;"><span style="font-size: 100%;">This can be easily understood by imagining the ranks to be laid out in a circle. Adding </span></span><span style="font-family: Georgia, serif; font-size: 100%; font-style: italic; font-variant: normal; font-weight: normal; line-height: normal;">x</span><span style="font-style: normal;"><span style="font-size: 100%;"> to a number </span></span><span style="font-family: Georgia, serif; font-size: 100%; font-style: italic; font-variant: normal; font-weight: normal; line-height: normal;">y</span><span style="font-size: 100%;"> here is equivalent to going <i>x</i> steps around the circle, clockwise, starting from <i style="font-style: normal;">y</i></span><span style="font-style: normal;"><span style="font-size: 100%;">.</span></span></li>
<br /><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHOKH9iICzdBJTwa0yJaBWqftTPOzr08j-V5GrnKTbJHorKg73W8S0jF19gVfYUuAsLyKkndSfb23wD3wRrdpxAlBMff6Jw41fDcSynBCGtWhoWCTMZ85jH9yN6IIPgMzaiY1025PU5X7p/s1600/all_ranks.png" style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5687243289285119634" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHOKH9iICzdBJTwa0yJaBWqftTPOzr08j-V5GrnKTbJHorKg73W8S0jF19gVfYUuAsLyKkndSfb23wD3wRrdpxAlBMff6Jw41fDcSynBCGtWhoWCTMZ85jH9yN6IIPgMzaiY1025PU5X7p/s320/all_ranks.png" style="cursor: pointer; display: block; height: 314px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a></ol>
<ol style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-style: normal;">So, 10+5 is 2. 13 + 1 is 1. And, of course, 2 + 3 is 5.<br /><br />How does this help in working around our earlier limitation? Consider the <span style="font-style: italic;">shorter distance</span> between any 2 points on the circle - its </span><i>never</i><span style="font-style: normal;"> greater than 5. This means that of 2 points in this circle, I could always pick a point, so that you wouldn't need to add a number more than 6 to reach the other point. This is important since the remaining 3 cards - the ones at positions 2nd, 3rd and 4th - can be arranged in 6 different ways.</span></ol>
<ol style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">Take the points 3 and 10 for example (the ranks of our cards with the suit ♠ ). If you were given 3, you would need to add 7 to get to the point 10. But if you were given the point 10, you would need to add 6 to get to the point 3. This is why the assistant passes 10 <span style="font-size: 100%;">♠ to the magician in our example, and not 3</span><span style="font-size: 100%;"> </span><span style="font-size: 100%;">♠ (and arranges the other cards to indicate the number - 6 - to be added; we'll get to the arrangement in a while)</span><span style="font-size: 100%;">. </span></ol>
<ol style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">Thus, it turns out that if we pick right the card of the repeated suit to be given to the magician, the ordering of 3 cards is sufficient to indicate the rank of the unseen card. This completes our strategy.</ol>
<br />
Here, to implement point 2, one could follow any system to encode numbers by orderings, as long as the magician and his assistant have agreed upon it. A simple way could be to use the ordering of suits and ranks used in the game of <i>bridge</i>:<br />
<ol>
<li>Ordering of suits, highest to lowest: ♠, ♥, ♦, ♣ </li>
<br />
<li> Within a suit, ordering of ranks, highest to lowest: Ace (A), King (K), Queen (Q), Joker (J), 10, 9, 8, 7, 6, 5, 4, 3, 2.</li>
</ol>
For our cards in positions 2nd to 4th ( 8 ♥, K ♦, A ♣), this implies the following encoding for all possible arrangements (assuming a "lower" ordering corresponds to a lower number):<br />
<ul><br />
<li> A ♣, K ♦, 8 ♥ → 1</li>
<br />
<li> A ♣, 8 ♥, K ♦ → 2</li>
<br />
<li> K ♦, A ♣, 8 ♥ → 3</li>
<br />
<li> K ♦, 8 ♥, A ♣ → 4</li>
<br />
<li> 8 ♥, A ♣, K ♦ → 5</li>
<br />
<li> 8 ♥, K ♦, A ♣ → 6</li>
</ul>
Thus, looking at the ordering of these 3 cards, our magician adds "6" to the rank of the first card, which is 10. This tells him that the 5th card has a rank 3 (remember he already knows that the suit is a ♠).<br />
<br />
<br />
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: bold; line-height: normal;">In summary</span><br />
<br />
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: 100%;">The following image tries to sum up the reasoning of the magician:</span></span><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9IoFp4kxR9yV1cxQhtzo-IGGIei5KTZwVRewm8YN9KPwJsAmbzyCO42GgujBY7vSMFiArEJcpzLrjwOKrt-nkOmgqpDErh2xOvbUXXzFnOfSfOj0o8s4Y2tmV_s83kzc8zuzwXIPzh77W/s1600/cardtrick_summarized.png" style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5688303755034087330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9IoFp4kxR9yV1cxQhtzo-IGGIei5KTZwVRewm8YN9KPwJsAmbzyCO42GgujBY7vSMFiArEJcpzLrjwOKrt-nkOmgqpDErh2xOvbUXXzFnOfSfOj0o8s4Y2tmV_s83kzc8zuzwXIPzh77W/s400/cardtrick_summarized.png" style="cursor: pointer; display: block; height: 204px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><br />
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: 100%;">You can blame Google for the crummy resizing.</span></span><br />
<br />
<br />
<span style="font-style: normal;"><b><i>Stage advice</i></b></span> <span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: bold; line-height: normal;">...</span><br />
<br />
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: 100%;">Some practical advice from the article if you are indeed planning on performing the trick:</span></span><br />
<ol style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><br />
<li>If trying to determine what number the ordering of the 2nd, 3rd and 4th cards corresponds to in the manner discussed, seems a little clumsy, the author of the article suggests his own variation.<br /><br /><i>"... place the smallest card in the left/middle/right position to encode 12/34/56 respectively, placing medium before or after large to indicate the first or second number in each pair"</i><br /><br />As an example, the ordering "A ♣, 8 ♥, K ♦" would imply a rank of 2, since the smallest card, A ♣, is in the first position (so this is either rank 1 or 2) and the medium card, K ♦, follows the large card, 8 ♥ (which makes it rank 2).</li>
<br />
<li style="font-style: normal;">This one, straight from Fitch. If you are repeating the trick to an audience, say for more than a few times, there is the risk that someone would notice that one of the cards with a repeated suit is always in the first position. In such a case, place the card that indicates the suit in the (i mod 4)<sup>th</sup> position for the i<sup>th</sup> performance (we assume position "0" indicates the 4<sup>th</sup> position).<br /><br />Thus, for the 1<sup>st</sup> performance this card is in position 1, for the 2<sup>nd</sup> performance this is in position 2, for the 7<sup>th</sup> performance, assuming your audience is still around and awake, this goes in at position 3 (since, 7 mod 4 = 3).</li>
</ol>
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: bold; line-height: normal;">Generalization</span><br />
<br />
<span style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: 100%;">If you go through the various steps above, the ideas involved seem to just about fit in: simple ordering seems deficient? - repeated suit to the rescue; 3 cards are insufficient to indicate a rank? - modular arithmetic alert.</span></span><br />
<br />
A <span style="font-size: 100%;">happy-go-lucky </span><span style="font-size: 100%;">patchwork of clever ideas as it were...</span></div>
<div style="font-style: normal;">
<br /></div>
<div style="font-style: normal;">
... which, well, really is fair game. However, the key contribution of the article is that it convinces you this is not all that there is to it: it analyzes these seemingly ad-hoc steps rigorously and suggests extensions of the trick. Unfortunately, this is not something I will go into, in this post, since I want to keep it fairly non-technical. For those who are interested, going through the original article is strongly recommended. I intend to follow-up this post with another one focused only on the generalizations, at a later point in time.<br />
<!-- <span style=" font-variant: normal; font-weight: normal; line-height: normal; font-style: normal; font-family:Georgia, serif;font-size:100%;"><span style="font-size:100%;">Remember the feeling when you think you're out of money and then find some in your trouser pockets? Something like that.</span></span><br />--><br />
<div style="font-family: Georgia, serif; font-size: 100%; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh_3oH2jsIz0kMpJiorRHl3CFBprik3L74BmqMRWaJDLooeNFmSvCJN_pIW8N3hF0i5l24xyDvgVLHAw2yh2gyNIocwraaWYsT0m2ndedgod-bfEXryaujmqW0rUs_frMlavVp6iQ-0pZS/s1600/assistant.png"></a></div>
<br /></div>
</div>
</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-41636713503374576052009-11-06T17:47:00.013+05:302012-02-17T19:31:02.038+05:30The Perfect Murder<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlTb8nF5m-5FB1hW9I4_oohNwDkcOXeObkp6FTToxDrUabRa-unzACk1pUILqQwYQDrFbymOv2CM3RCaOsA-uZY4w1GumhJqmeXDMJbd9W18SgFWi3UxM-fv5yPCTrJxAVJ24lJcd7LpCZ/s1600-h/cocktail_sticksAlastairLevy.jpg"><img style="cursor: pointer; width: 375px; height: 472px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlTb8nF5m-5FB1hW9I4_oohNwDkcOXeObkp6FTToxDrUabRa-unzACk1pUILqQwYQDrFbymOv2CM3RCaOsA-uZY4w1GumhJqmeXDMJbd9W18SgFWi3UxM-fv5yPCTrJxAVJ24lJcd7LpCZ/s320/cocktail_sticksAlastairLevy.jpg" alt="" id="BLOGGER_PHOTO_ID_5400966814814862274" border="0" /></a><br /><br /><br />A murder mystery is solved when the detective notices a circumstance that stands out from the rest. If circumstances were cocktail sticks, this is the perfect murder; given their flawless conformance - no one cocktail stick stands out! - our detective is at a loss to discover the culprit.<br /><br /><br /><span style="font-size:85%;">Source Of Image: <a href="http://www.alastairlevy.net/">alastairlevy.net</a></span>Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-70942135147995162072009-09-19T20:05:00.006+05:302012-10-28T22:31:18.450+05:30Boom mike in FRIENDS<div dir="ltr" style="text-align: left;" trbidi="on">
From the 12th episode of Season 8 - "The One Where Joey Dates Rachel". Notice how the boom mike moves across the wall clock above the whiteboard.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjTynCX66PVdlAwP8h3do9dk2fjGEnOMFktQTKKTdKpdfh6BuEuK1bOnIVuPNt34vRTdVCVUqhEWiYQ0odMvdmXK95YyfNAXCcwCGGdHh8XtV4GSv_zFIILsCqZtQtHqvO29ThaFCr2TxW/s1600-h/vlcsnap-2009-09-19-19h50m50s102.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5383188337820463970" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjTynCX66PVdlAwP8h3do9dk2fjGEnOMFktQTKKTdKpdfh6BuEuK1bOnIVuPNt34vRTdVCVUqhEWiYQ0odMvdmXK95YyfNAXCcwCGGdHh8XtV4GSv_zFIILsCqZtQtHqvO29ThaFCr2TxW/s320/vlcsnap-2009-09-19-19h50m50s102.png" style="cursor: pointer; height: 234px; width: 320px;" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5M5iRsCRuzRoFOLejzdb9vtBEBa4amiZ77yrjfSlIoXH1SsyyoxbFoQ0teH2L_33KtzKrtltwm5IO62VMmLL5kXVfyCwMgxgwatmv7o43luEY2gktBbZg5iPMFHfrMmYLKnvSzrPzJiMS/s1600-h/vlcsnap-2009-09-19-19h53m25s117.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5383188345393001810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5M5iRsCRuzRoFOLejzdb9vtBEBa4amiZ77yrjfSlIoXH1SsyyoxbFoQ0teH2L_33KtzKrtltwm5IO62VMmLL5kXVfyCwMgxgwatmv7o43luEY2gktBbZg5iPMFHfrMmYLKnvSzrPzJiMS/s320/vlcsnap-2009-09-19-19h53m25s117.png" style="cursor: pointer; height: 234px; width: 320px;" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikZOHGnFvLCqofImz7rnn2NNwx5v74TYiX5qbu58znq_v1UAC24IK2B-wQ4s6B3kdR3xEkSRQjU8IBopKokZNvmDwPDg7TIVTGHd6MbwNrLauqaCOfcO6VyCFzHLBrBNi_U3cMy7gF7vjZ/s1600-h/vlcsnap-2009-09-19-19h52m03s67.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5383188359997742626" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikZOHGnFvLCqofImz7rnn2NNwx5v74TYiX5qbu58znq_v1UAC24IK2B-wQ4s6B3kdR3xEkSRQjU8IBopKokZNvmDwPDg7TIVTGHd6MbwNrLauqaCOfcO6VyCFzHLBrBNi_U3cMy7gF7vjZ/s320/vlcsnap-2009-09-19-19h52m03s67.png" style="cursor: pointer; height: 234px; width: 320px;" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTZnsdpcmCzJHIMQJsEyhAQZzRUJhhVMcpTd2uG1bam0dMCyBv-sqkTSjpuymxcEFEtq_OyeKI_YdncZ84dFumYkE5BG7VDJPSQHFihvCgmTOFFvJy4xpl29Krl2KFpz5H2a-arzR0yn8h/s1600-h/vlcsnap-2009-09-19-19h50m52s128.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5383188356110001138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTZnsdpcmCzJHIMQJsEyhAQZzRUJhhVMcpTd2uG1bam0dMCyBv-sqkTSjpuymxcEFEtq_OyeKI_YdncZ84dFumYkE5BG7VDJPSQHFihvCgmTOFFvJy4xpl29Krl2KFpz5H2a-arzR0yn8h/s320/vlcsnap-2009-09-19-19h50m52s128.png" style="cursor: pointer; height: 234px; width: 320px;" /></a><br />
<br />
<br />
( I must really, <i>really</i>, look for better things to post :) )</div>
Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-65202236039730969382009-09-17T16:02:00.008+05:302012-08-20T13:34:15.004+05:30Eccentricities<span style="font-weight: bold;">(1) Don’t think laptops are a good idea for me</span> : I am more of a pen (rather pencil – see (2)) and paper person, who likes to write out ideas on paper first. I tend to code only when I am pretty sure of the structure of my code. I don't use my editors as my scratchpad (python/ruby are changing that a little now... Ah! I almost sense you asking whether I was living under a rock until now? Unfortunately, yes - under one called Java). And when you know what you are going to write it usually doesn't take a lot of time -for which I can arrange for being in front of my desktop.<br /><br /><span style="font-weight: bold;">(2) Pencils</span>: Use pencils to take notes, write exams with pencils. Maybe I like the sound graphite makes when it moves on paper. Or the feel of it. Maybe since I hold my writing instruments vertically pens tend to run out of ink temporarily; or tear paper when I try to write fast. Maybe I hate the many scratches I would have to make with a pen when working on a rough idea - erasing out parts to replace them with better ones is so much more convenient. Maybe I hate turning pages (because the scratches are now an ugly collective clutter) when working on an idea - it affects my flow.<br /><br /><span style="font-weight: bold;">(3) Math</span>: Like math. Maybe the world is not such a deterministic place as it is when I am staring at a math problem in the small universe of a notebook page in front of me. I like the way it challenges me. Maybe I like the way it makes me feel about the world : despite its superficial lack of structure problems can be broken into predictable smaller sub-problems.<br /><br /><span style="font-weight: bold;">(4) Rains</span>: I just get lost when it rains.Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-18489325371972888172009-01-23T08:38:00.006+05:302011-11-27T12:54:24.560+05:30The 'inverted' AppleThis first picture is a still from the movie "What Women Want", which I took while watching it. The second picture, is from Google Image search. Note how Apple has changed the orientation of its logo. Or was it just one bad bunch of Apples?<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAVMsGNMBDhgqEJkdZ7tTE7kAP30Oa8FOhiCmbrVVTXOGgWyFr6wcAhVchRuWNR-splKNSlH96-zzj8uk-OcTEJ67eTlaiouc-i2qs1EYShz24I6bEmypoku8ehREUsMCNAT-HB78ZwjCO/s1600-h/vlcsnap-7672.png"><img style="cursor: pointer; width: 315px; height: 174px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAVMsGNMBDhgqEJkdZ7tTE7kAP30Oa8FOhiCmbrVVTXOGgWyFr6wcAhVchRuWNR-splKNSlH96-zzj8uk-OcTEJ67eTlaiouc-i2qs1EYShz24I6bEmypoku8ehREUsMCNAT-HB78ZwjCO/s320/vlcsnap-7672.png" alt="" id="BLOGGER_PHOTO_ID_5294321346745987714" border="0" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXMADodmhujiZxpmPe_8RmwWsAFoOr5KPSnlnz1RqoKpLRAu28LtpvnRTsjP7gIvVwYqhuh1YbYZxRhfRzp3puFJl-o0jdRODyYVpYYnXN6glwFbkdejBfxDuwnxx4CALpiw7orBTJks7c/s1600-h/MacBook-Air-1.jpg"><img style="cursor: pointer; width: 320px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXMADodmhujiZxpmPe_8RmwWsAFoOr5KPSnlnz1RqoKpLRAu28LtpvnRTsjP7gIvVwYqhuh1YbYZxRhfRzp3puFJl-o0jdRODyYVpYYnXN6glwFbkdejBfxDuwnxx4CALpiw7orBTJks7c/s320/MacBook-Air-1.jpg" alt="" id="BLOGGER_PHOTO_ID_5294321601271336930" border="0" /></a>Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-45269508500857620172008-12-14T12:21:00.059+05:302012-09-05T11:13:27.213+05:30Apocrypha Redux<span style="color: rgb(0, 0, 0);font-family:arial;"><br /><span style="font-size:100%;">I recently came across this interesting book “<a href="http://www.blogger.com/www.amazon.com/Mathematical-Apocrypha-Redux-Anecdotes-Mathematicians/dp/0883855542">Mathematical Apocrypha Redux</a>”, by Steven Krantz which, as per the cover page, is about “More Stories and anecdotes of Mathematicians and the Mathematical” (the word “more” is used as this is a sequel to the book “Mathematical Apocrypha”, by the same author). Lots of interesting stories, and some not so, but I singled out the following few (often, abridged and restated) for this post:</span></span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:100%;"><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgxWfHAXD1ymo88uAPLeMpmSNUSYxWwLp3uTEUgPF0D1zOnCQGAOrZN3bT6O2WHLqlZz6VQUl9oZwfa8a1GiT40A_pW1B1g5vSpsyQTOmz6Wet5C527n21V1kLlMRgMCKrOo30Hwmo_XTv/s1600/frasier.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgxWfHAXD1ymo88uAPLeMpmSNUSYxWwLp3uTEUgPF0D1zOnCQGAOrZN3bT6O2WHLqlZz6VQUl9oZwfa8a1GiT40A_pW1B1g5vSpsyQTOmz6Wet5C527n21V1kLlMRgMCKrOo30Hwmo_XTv/s200/frasier.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5784561395491024978" /></a></span><span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:100%;">(1</span><span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:100%;">)</span><span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">The daughter of mathematician Lee Neuwirth, Bebe Neuwirth, played Frasier Crane’s wife in the popular television shows Frasier and Cheers (thanks to Frasier, I can’t enjoy any other sitcom as </span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">much – Frasier has definitely raised the bar).</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /><br /><br /><br /><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(2)</span><span style="color: rgb(0, 0, 0);font-family:times new roman;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">It is not very widely known that Knuth’s first publication was for the MAD magazine (MAD Magazine 33 (June 1957),36-37). It was called “The Potrzebie system of weights and measures”. The article parodied the established system of weights and measures that we all use. For example, it proposed the fundamental units of length and force to the thickness of MAD Magazine #26 and "whatmeworry" respectively. It also suggested the "yllion" notation for large numbers: one myllion is one myriad myriad (l0<sup>8</sup>) and one centyllion is 10<sup>2102</sup>. "Potrzebie" is a word that publisher William Gaines lifted from a Polish aspirin bottle; it is the locative form of a Polish noun meaning "need."</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /><br /><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(3)</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">Erdos had a friend working on harmonic analysis in Oxford, England. The poor man was hopelessly schizophrenic. When Erdos once visited him, the fellow just opened the door of his office a little bit and said, "Please come another time and to another person."</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /><br /><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(4)</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">John von Neumann (1903-1957) once owned a dog named "Inverse". Rene Descartes (1596-1650) owned a dog named "Monsieur Orat," which means "Mr. Scratch".</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /><br /><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(5)</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">Of the many incidents of mathematicians over thinking mundane life, this takes the cake. Or bread rather. Henri Poincare (1854-1912) was in the habit of buying a 1 kilo loaf of bread daily from a local baker. After a year of record keeping, he determined a normal distribution of the weights of the loaves with mean at 950gms. He called the police and informed them of the dishonesty on the part of the local baker. The cautious baker began serving him the biggest loaf in their store for the next year. He was clearly surprised therefore, when, after a year, Poincare again summoned the police : his records, this time, showed a bell-shaped curve with the minimum at 950 grams but truncated on the left side.</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /><br /><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(6)</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">This is an old one. Niels Bohr (1885-1962) had a horseshoe nailed outside his house, over his door. One day, when asked incredulously by a friend whether he really believed that the thing would bring him luck, he replied, "I don't. But, I understand that it brings you luck whether you believe it or not."</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /><br /><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(7)</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">Q: What do you get when you cross a mosquito with a mountain climber?</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">A: Silly! You can't cross a vector and a scaler.</span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /><br />(8)<br />This one is of potentially immense practical use to me (and fellow researchers I am sure). Often, after a presentation on an abstract subject, when the speaker requests enthusiastically for questions from the audience, he is greeted by embarrassing silence (due to the fact that no one but the speaker has the remotest idea of what is going on). As a remedy for such situations, Desmond MacHale, a author and a mathematician, has compiled the following set of questions, which a member of the audience might confidently put forth to the speaker, irrespective of whether he understands the subject matter or not:<br /><br /></span><ul style="font-family:arial;"><li><span style="color: rgb(0, 0, 0);font-size:100%;"> <span style="color: rgb(0, 0, 0);">Can you produce a series of counterexamples to show that if any of the conditions of the main theorem are dropped or weakened, then the theorem no longer holds? What inadequacies of the classical treatment of this subject are now becoming obvious?</span></span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> Can your results be unified and generalized by expressing them in the languag e of Cat egory Theory?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> Isn't there a suggestion of Theorem 3 in an early paper of Gauss?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> Isn't the constant 4.15 in Theorem 2 suspiciously close to 4n/3?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> I'm not sure I understand the proof of Lemma 3-could you outline it for us again?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> Are you familiar with a joint paper of Besovik and Bombialdi which might explain why the converse of Theorem 5 is false without further assumptions?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> Why not get a graduate student to perform the horrendous calculations mentioned in Theorem 1 in the case n = 4?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> Could you draw us a simple diagram to show what the situation looks like for n = 2?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> What textbook would you recommend for someone who wishes to get students interested in this area?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> When can we expect your definitive textbook on this subject?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> Why do you think there was such a flurry of activity in this area around the turn of the century and then nothing until your paper of 1979?</span></li><li style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);font-size:100%;"> What are the applications of these results? </span></li></ul><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(9)<br />When Emmy Noether (1882-1935) applied for the position of a faculty member at Gottingen, she faced a lot of opposition – as part of then prevalent prejudices against women. David Hilbert (1862- 1943), strongly defended her stance, and is known to have uttered the following words when addressing the council of the university: : "I do not see why the sex of the candidate should be an argument against her appointment as Privatdozent; after all, we are not a bath-house ..."<br /><br /><br />(10)<br />When Bertrand Russell had, by his second wife, a first child, a friend accosted him with,"Congratulations, Bertie! Is it a girl or a boy?" Russell replied, "Yes, of course, what else could it be?"<br /><br /><br /></span><span style=";font-family:arial;font-size:100%;"><a href="http://yeskarthi.wordpress.com/" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 134px; height: 88px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5OqCpAyZTzrgqrlqbwoyMgGtjJXJudHPY4HmssPTZNw9_-BTpH8k093brPrYLremGer_wA4oEOIoS7s92YU0yMtp51i87n4AhqSPh_GRfU3GEUZ-avEb13nX7VkXIRNUe3yKNkvJ2Bj9B/s320/konigsberg.gif" alt="" id="BLOGGER_PHOTO_ID_5280047748946991362" border="0" /></a></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(11)<br />That the bridges of Konigsberg were studied by Euler, which led to the foundations of graph theory and topology, is a popular mathematical trivia. Lesser known is the name of the seven bridges: Kramer, Schmiede, Holz, Hohe, Honig, Kottel, and Grone..<br /><br /><br /><br />(12)<br />During class one day, while Lowell Coolidge (1873-1954), a member of the Harvard math faculty in the 1930s, twirled his watch on its chain, the chain broke and the fob watch flew out the window. Coolidge exclaimed, "Ah, gentlemen, a perfect parabola."<br /><br />Coolidge was a geometer.<br /><br /><br />(13)<br />A student of Plato (428 B.c.-348 B.C.) once asked the great master, "What practical use do these theorems serve? What is to be gained from them?" Plato's answer was immediate and peremptory. He turned to one of his slaves and said, "Give this young man an obol [a small Greek coin] that he may feel that he has gained something from my teachings. Then expel him."<br /><br /></span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">(14)</span><span style=";font-family:arial;font-size:100%;"><a href="http://www.wcg.org/" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 133px; height: 119px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikKzK2CHh0U07rXjxbsGY_kYM3kZ4hUQYNdzlygl2if62RL_KSg6VbN48CFYPdDI2y-rLpHq7MCh3790xKhfxrI8_F4h7oLLTHpL90G__nDvLAjax5qZAwBGlWaPFVFCZRWmAEOLOZixC4/s320/dice.gif" alt="" id="BLOGGER_PHOTO_ID_5280050758244331554" border="0" /></a><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">Does God play dice with the universe?</span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br />"God does not play dice with the universe." - Albert Einstein</span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">"Who are you to tell God what to do?" - Niels Bohr</span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">"God not only plays dice, but sometimes throws them where they cannot be seen." - Stephen Hawking<br /><br /><br />(15)</span><span style=";font-family:arial;font-size:100%;"><a href="http://math.sfsu.edu/" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 188px; height: 141px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHyGroUQanVDcUYHlHx1-PfpxAMHTNyChsljZ57BQ7CqUrHJaUikrWIL7aZVDbKFoR_ju9q7zTl5pQ4a2-XDpkhPIoSNddq3ZeJl9aLu_hs2Uu4zINVUiEEAevcgc18wpQoWLWEarBpwWx/s320/simpsonsfermat.jpg" alt="" id="BLOGGER_PHOTO_ID_5280048166882364914" border="0" /></a><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">The episode “Treehouse of Horror”, from the sixth season of Simpsons, revealed the following counterexample to Fermat’s Last Theorem:</span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">Take your TI -83 calculator and compute</span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">[1782 <sup>12</sup> + 1841<sup>12</sup> ]<sup>(1/12)</sup></span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">You will find the answer to be 1922. Thus<br />1782<sup>12</sup> + 1841<sup>12</sup> = 1922<sup>12</sup> .<br /><br />Why do you think this works?(<span style="font-style: italic;">Think about the round off error</span>)<br /><br /><br /><br />(16)<br />John Horton Conway was once asked to find the next number in the sequence:<br />1 3<br />1 1 1 3<br />3 1 1 3<br />1 3 2 1 1 3<br />1 1 1 3 1 2 2 1 1 3<br /><br />Conway gave up after a couple of weeks worth effort. But you might want to try it … its not as difficult as it might seem- its just, well, a bit different. Hint: This sequence is called the “Look and say sequence”. The next few lines describe the solution in white font – select it to view it.<br /><br /><span style="color: rgb(255, 255, 255);">You read a number aloud, grouping identical consecutive digits together. This gives you the next number in the sequence. For ex we start with “1 3”. We read this number aloud by saying “1 one , followed by 1 three”. So the next number in the sequence becomes “1 1 1 3”. We now read this aloud, saying “3 ones (followed by) 1 three” – so the next number becomes “3 1 1 3”.And so on. Although Conway did fail to initially understand the sequence, he subsequently contributed a lot of ideas to aid in understanding certain properties of this sequence (and other such sequences, often called “atomic sequences”).</span><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br />(17)<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdqaLZiIhedtzBynz43mCuvrRmH43rob1r18aIsQpHvPMNddliO6tU80H-XMSWDqhoT1XXJH-23pTO_RVxH2xA0PAhQI49L6KYZhr-1suXvrOu8uy-AFsbb_nCD-4k-ZnUlEDS0-Ijd_6a/s1600/kb.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 64px; height: 64px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdqaLZiIhedtzBynz43mCuvrRmH43rob1r18aIsQpHvPMNddliO6tU80H-XMSWDqhoT1XXJH-23pTO_RVxH2xA0PAhQI49L6KYZhr-1suXvrOu8uy-AFsbb_nCD-4k-ZnUlEDS0-Ijd_6a/s400/kb.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5784562857286466658" /></a>The trivia game ‘Six Degrees of Kevin Bacon’ is based on the small world assumption, and consists of trying to connect any actor to Kevin Bacon through his her roles with him, or with someone who has acted with him, or through any number of such intermediary actors.<br /></span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br />Surprisingly, Paul Erdos has a Bacon number of 4. This is the provenance:</span><span style=";font-family:arial;font-size:100%;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-iCmujghH7_o2UKPHOzGcJ0JNOT1qyD2rEE1ORgff4zPlHPJWc5xxH2-G7e0CGoR4Eq8RJAfggaL0QapQciMvWCSf8gT9g1voFUooJuI_iMV1f9MS8y1dMvOJWi-_N1pqtKRWLs8L7ogw/s1600/paulerdos.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 131px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-iCmujghH7_o2UKPHOzGcJ0JNOT1qyD2rEE1ORgff4zPlHPJWc5xxH2-G7e0CGoR4Eq8RJAfggaL0QapQciMvWCSf8gT9g1voFUooJuI_iMV1f9MS8y1dMvOJWi-_N1pqtKRWLs8L7ogw/s200/paulerdos.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5784559584729629330" /></a></span><ul style="font-family:arial;"><li><span style="color: rgb(0, 0, 0);font-size:100%;">Paul Erdos was in N is a Number (1993) with Gene Patterson</span></li><li><span style="color: rgb(0, 0, 0);font-size:100%;">Gene Patterson was in Bo x of Moon Light (1996) with John Turturro;</span></li><li><span style="color: rgb(0, 0, 0);font-size:100%;">John Turturro was in Cradle Will Rock (1999) with Tim Robbins</span></li><li><span style="color: rgb(0, 0, 0);font-size:100%;">Robbins was in Mystic River (2003) with Kevin Bacon</span></li></ul><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">This Bacon number would come down to 3 once "Frost/Nixon" is released (slated to be released on 26th December,2008):<br /></span><ul style="font-family:arial;"><li><span style="color: rgb(0, 0, 0);font-size:100%;"> Erdős was in N is a Numbe r with Gene Patterson.</span></li><li><span style="color: rgb(0, 0, 0);font-size:100%;"> Patterson was in Box of Moon Light (1996) with Sam Rockwell.</span></li><li><span style="color: rgb(0, 0, 0);font-size:100%;"> Sam Rockwell will be in Frost/Nixon (2008) with Kevin Bacon</span></li></ul><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br />Both the above linkages are disputed because the Gene Patterson in “N is a Number” might not be the same as the Gene Patterson in “Box of Moon Light” (1996)<br />Again, quite interestingly, Pope John Paul II has a Bacon umber of 3. Here’s how:<br /></span><ul style="font-family:arial;"><li><span style="color: rgb(0, 0, 0);font-size:100%;">Pope John Paul II was in Padre Pio — Tra cielo e terra (2000) with Giovanni Lombardo Radice.</span></li><li><span style="color: rgb(0, 0, 0);font-size:100%;"> Giovanni Lombard o Radice was in The Omen (2006) with Vee Vimolmal</span></li><li><span style="color: rgb(0, 0, 0);font-size:100%;"> Vee Vimolmal was in Where the Truth Lies (2005) with Kevin Bacon </span></li></ul><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">It turns out that apparently only 12% of all actors cannot be linked to Kevin Bacon at all. You can check whether an actor/actress is linked to Kevin Bacon here : http://oracleofbacon.org – for starters you might want to check out the Bacon numbers for Sachin Tendulkar, Aishwarya Rai and Amitabh Bachchan :).<br /><br />The game also defines the concept of a “center of the Hollywood Universe” to be a person with a very low average “personality” number – which is calculated as the weighted average of the degree of separation of all the people that link to that particular person. The current best centre is Rod Steiger, followed by Christopher Lee, Dennis Hopper and Donald Sutherlannd. Karen Black is the highest ranked female center in the list.<br /><br /><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br /><br />(18)<br />Joe Kohn likes to say that there is no such thing as strong coffee. There are only weak men.<br /><br />(19)<br />Jon von Neumann was once on a train and found that he was quite hungry. He asked the conductor to send the man with the sandwich tray to his seat. The busy and impatient conductor said, "I will if 1 see him." Johnny's reply was, "This train is linear, isn't it?"<br /><br />(20)<br />W. Sierpinski (1882-1969) was once asked by his wife to watch their trunks when they were moving. She had pointed out that there were 10 trunks – but was surprised when Sierpinski told her upon her return, that there were only nine. And he promptly justified it by counting the trunks aloud: “Zero, one, two …”<br /><br />(21)<br />Paul Erdos was an itinerant scholar. He never owned nor rented a home, didn't have a driver's license, didn't have a credit card. He habitually would show up on the doorstep of a friend or a collaborator-anywhere in the world!-declare that "My brain is open. "-and expect to be fed and housed and clothed. His motto was, "Another roof, another proof"<br /><br /><br />(22)<br />A popular modem off-Broadway musical is entitled Fermat s Last Tango.<br />It is quite extraordinary in that (i) it is about serious mathematics and (ii) it actually has lines that formulate serious mathematical thoughts.<br /></span><span style=";font-family:arial;font-size:100%;"><a href="http://www.matematicasulweb.eu/" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 225px; height: 137px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq_IyITnz_dGjTpQGsw3UDlcora0AGa0f2D_5Y3cPnY1-Y3H8cNHRpqs4h0rRRnHsNZGueneNkGBllGZf2wthCSOqEnmtR4j1DVTXQhOVZdhsc14w3cZONmU27zTYZhuVauxAsPxFapQtF/s320/fermat-wiles.jpg" alt="" id="BLOGGER_PHOTO_ID_5280060796000056850" border="0" /></a><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;">Some examples are:</span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><span style="font-style: italic;">I knew, I swore,</span></span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"> <span style="font-style: italic;">That elegant symmetry</span></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"> </span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><span style="font-style: italic;">Of x squared plus y squared</span></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"> </span><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><span style="font-style: italic;font-size:100%;">Is square of z</span><span style="font-size:100%;"><br /></span><span style="font-style: italic;font-family:arial;font-size:100%;">Could not be repeated if n were three,<br /></span> <span style="font-style: italic;font-family:arial;font-size:100%;">Or more!</span><span style="font-size:100%;"><br /><br />At one point, Fermat himself appears, singing :<br /></span><span style="font-style: italic;font-family:arial;font-size:100%;">Elliptical curves, modular forms,</span> <span style="font-style: italic;font-family:arial;font-size:100%;"><br />Shimura- Taniyama,</span><span style="font-size:100%;"><br /></span><span style="font-style: italic;font-family:arial;font-size:100%;">It's all made up, it doesn't exist,<br /></span> <span style="font-style: italic;font-family:arial;font-size:100%;">Algebraic melodrama!</span><span style=";font-family:arial;font-size:100%;"><br /><br /><br />(23)<br />And finally, a compilation of the "inside interpretation" of various things said in the mathematical community (I think its just not the mathematical community - these are true for any research community :) ):</span><br /></span><br /><table style="font-family: arial;" border="1" cellpadding="2" cellspacing="0"><tbody><tr><td align="left"><b>What's <i>Said</i></b></td><td><b>What's <i>Meant</i></b></td></tr><tr><td border="0"> This is trivial.</td> <td border="0"> I forget the proof . </td></tr><tr><td border="0"> This is obvious. </td> <td border="0"> You forget the proof. </td></tr><tr><td border="0"> This is a calculation. </td> <td border="0"> Let's all forget the proof. </td></tr><tr><td border="0"> Send me your preprints. </td> <td border="0">Please go away. </td></tr><tr><td border="0"> Send me your reprints. </td> <td border="0"> Please stay away. </td></tr><tr><td border="0">Read my book. </td> <td border="0"> I don't know. </td></tr><tr><td border="0"> That problem is intractable. </td> <td border="0"> I can't do the problem so neither can you. </td></tr><tr><td border="0"> He's one of the great living mathematicians. </td> <td border="0"> He's written five papers and I've read two of them. </td></tr><tr><td border="0"> What are some applications of your theorem? </td> <td border="0"> What is your theorem? </td></tr><tr><td border="0"> I don't understand that step. </td> <td border="0"> You goofed. </td></tr><tr><td border="0"> How do you reconcile your theorem with this example? </td> <td border="0"> You're dead. </td></tr><tr><td border="0"> Your theorem contradicts my theorem. </td> <td border="0"> I'm dead. </td></tr><tr><td border="0"> Where do you teach? </td> <td border="0"> Do you have a job? </td></tr><tr><td border="0"> Your talk was very interesting. </td> <td border="0"> I can't think of anything to say about your talk. </td></tr><tr><td border="0">Have you had many students? </td> <td border="0"> Do you have any social diseases? </td></tr><tr><td border="0"> I read one of your papers. </td> <td border="0"> I wrapped fish with one of your papers. </td></tr></tbody></table><span style=";font-family:arial;font-size:100%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:100%;"><br />On the whole, the book is more than an engrossing read if you are interested in mathematics and mathematicians - with around 300 pages of anecdotal trivia, that's hard to come across otherwise, its a rare treat.</span><br /><br /><span style=";font-family:arial;font-size:85%;"><br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"><br />Sources:<br />“<a href="http://www.blogger.com/www.amazon.com/Mathematical-Apocrypha-Redux-Anecdotes-Mathematicians/dp/0883855542">Mathematical Apocrypha Redux</a>”, by Steven Krantz<br />http://www.en.wikipedia.org<br />michaelweening.spaces.live.com/blog/cns!97D2E88D450D7724!1783.entry<br /></span><span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"><span style="font-size:85%;"><br /></span><br /></span>Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com17tag:blogger.com,1999:blog-7503464577047093171.post-12170767016923622382008-08-13T16:03:00.011+05:302008-08-13T18:22:24.566+05:30STARS in The Dark KnightThe Dark Knight is an interesting movie owing to more than one reason and someday I will probably post about it again. For now I would like to share <a href="http://en.wikipedia.org/wiki/Fulton_surface-to-air_recovery_system">this</a> interesting article in Wikipedia I recently came across. About a system called <span style="font-weight: bold;">Fulton surface-to-air recovery system (STARS)</span> used to retrieve persons from the ground used by the US Navy and Air Force. What has this to do with The Dark Knight? Remember the part where Batman abducts Lau in a neat action sequence, hooking themselves to an airplane using a balloon? That's inspired by STARS.<br /><br />Here's a video of the skyhook system in action:<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/PErEsNhDmo8&color1=11645361&color2=13619151&hl=en&fs=1"><param name="wmode" value="transparent"><param name="allowFullScreen" value="true"><embed src="http://www.youtube.com/v/PErEsNhDmo8&color1=11645361&color2=13619151&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent" width="425" height="344"></embed></object><br /><br /><br />(The video looks only at the hoisting people - doesn't show how the balloon 'hooks')<br /><br />The movie is absolutely awesome. Thanks to Nolan , Bale and Ledger: Batman movies have risen beyond being mere popcorn flicks.Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-8034921320480228012008-07-17T23:46:00.012+05:302008-08-11T19:27:54.593+05:30Random thoughtsA few days that were:<br /><br />(1) I go out for long walks every now and then. And I really do it without any definite plans. So there was this time when I did so and met an old gentleman talking a walk through a forest-like patch of trees by a river here. We got talking casually (initiated by myself asking for directions - I was lost :) ), and then he told us a bit about his life in the Royal Air Force before he retired , and a bit of this and that, and believe it or not I finished my 'chance meeting' with him only around after like 2 hrs. Incredible how two strangers, from two different agegroups (he was 70 if I remember right!), from different nationalities (he was Scottish) got along for little reason.<br />I get along with everyone :)<br /><br />(2) Went out for this long walk in the city with my professor. Really had no plans about where we were headed- just kept walking, following roads and ending up finally in a gazebo near the main city square. We talked about many things, mostly about generative models :P . But it was a great walk - as walks mostly are.<br /><br />(3) Visited Ballater with Raghu and my professor. For a moderate trek and walk. Beautiful place.<br /><br />(4) Sitting on the banks of a river is such a wonderful way to spend your time. You tend to get lost, caught in the sights and sounds that just so much exclusively belong to a flowing river. Maybe your mind then comes closest to being 'thought-less' or void. And you actually give up a little bit of yourself. (A friend said she has found a flat near the sea - and that would help her cogitate. Interesting. She is employed. I am still a student. And probably that's why I just have a river :) )<br /><br /><br />(5) Quite a few people own dogs here. And they look so cute. I was walking on this road and there was this collared puppy that ran ahead of its owner, which I just had to bend down and pat :).<br /><br />(And cute reminds me I had walked into this Disney store a few weeks back, and simply had to buy this delightfully attractive doll of Ratatouille - he sits on my table now, with fake cheese in his hands and a comical smile adorning his face)<br /><br />(6) I tried running - and could successfully run. This must be after a little more than 2 years that I have been able to do so. I guess (and hope) that my slip-disc is finally healing.<br /><br />(7) After a few funny turn of events at my lab now I am 'officially' working with a lot of mathematics. I am happy about that.<br /><br />(8) The <a href="http://www.computercookingcontest.net">'cooking contest'</a> was a big surprise. There was this international contest where they hand you something like 800 odd recipes, and you write artificially intelligent agent to sit atop it and 'learn' in a general way what those recipes are supposed to 'mean'. So if a user asks for a recipe(by characterizing certain attributes of it) that isn't present in the database, the agent is supposed to 'make' one on the fly and present it to the user. We made it to the finals ! (I had little hope, and I am genuinely surprised :))<br /><br /><br />(9) Have been coding on and off for sometime now. For little or no definite purpose. Worked on some interesting problems in the last few days. Currently reading "Do Androids dream of electric sheep?". I was tricked into abandoning "Grapes of Wrath" midway by someone! :)<br /><br /><br />(10) My cooking is still as terrible as ever. Or maybe its just only slightly better than before. (Our agent -see (8)- has probably better culinary sense than me.)<br /><br /><br />(11) Saw some really good movies at the <a href="http://www.youtube.com/ytscreeningroom">YouTube Screening Room.</a><br /><br /> And found this really interesting video too, that represents logic-gates with dominoes:<br /><br /> <span style="text-decoration: underline;"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/SudixyugiX4&hl=en&fs=1"><param name="allowFullScreen" value="true"><embed src="http://www.youtube.com/v/SudixyugiX4&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></span>Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com0tag:blogger.com,1999:blog-7503464577047093171.post-18633266852263046742008-06-05T15:01:00.041+05:302008-06-08T17:53:20.736+05:30Thousand words and moreI thought looking at the results of Google Image search for a few 'abstract' words would be interesting. So I wrote a screen scraping script in Ruby (this language is just great - the force is definitely deep with this one) that reads in search terms from a file and collects the searched images and their links from the first page of the image search results. The images were subsequently resized using <a href="http://www.imagemagick.org/">ImageMagick</a>. My list was:<br /><br /><span style="font-style: italic; color: rgb(153, 51, 153);">Always, Bliss, Blossom, Blue, Bubble, Death, Delirium, Destiny, Dreams, Eternity, Fantastic, Happiness, Hilarious, Hope, If, Liberty, Life, Love, Nothingness, Rainbow, Smile, Sunflower, Sunshine, Time</span><br /><br />And below are some of the results. The images are clickable - they lead you to the www links Google obtained them from. Note that Google returns 21 search results(images) on its first page in its default setting. In some cases I could'nt retrieve the images due to various technical snags that I was too lazy to spare any attention for. I am just putting up 5 or less per search word, in no particular order - ones that appeal to me or stand out in some way (and post censoring :) ) - you could ask me if I were a tyrant and I would say 42. So lets just get going:<br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Always:</span><span style="font-style: italic; color: rgb(102, 51, 102);"><br /><br /></span><span style="text-decoration: underline;"> </span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://imagecache2.allposters.com/images/pic/FRL/M100380%7EForever-and-Always-Posters.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoSrQZ-snIfgqYW3spEXrSIMLttq4dPrb2aFZBSSnFVdtU43qLOqWvgh4J5YtwO6hM_oBn2dj0-6VhYJv7goUsl8CyhXOIesT8qKW_CLCk_6mrVZtcn6946dlPczB63OXYXhRUmp1XjlDe/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208379506375630994" border="0" /></a><span style="text-decoration: underline;"> </span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://http//static.flickr.com/32/100659113_007609ffca.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSFqd4doBerhGKwglx0tAUxewWS4HgcJSiForFSyBd5Ydk4JMshStYLg9YJ18eStbSO-RkWaNoMWr9yoZ002qRb7k0Cx8ERyHSxrvxMMAiQOxrTuJNeY6RukL9mmWzdN1cYIxRKQdDa_hZ/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208379514241161282" border="0" /></a> <span style="text-decoration: underline;"></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://http//www.factorycity.net/sfx/always_use_protection.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiih0bDOar2AAsGSlOAYTG7fWSyawti8fwkl9D9C-1PSPvuYc4Lj-g8Hx8Nlj6CKAYoolBh_qgG_-0hRPWFQmYoJ0TbqWycxsqhOPA111-FLwlHBiCM3VnrWkm1uQ6zDcGRNJTUysp1z_7P/s320/c6.jpg" alt="" id="BLOGGER_PHOTO_ID_5208379512499456114" border="0" /></a><span style="text-decoration: underline;"> </span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://http//www.ophea.net/ophea/Ophea.net/images/CVF_AlwaysChangingENG_26AU05_1.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGG7nVo3N58C4xPm9_WAg5hUGeHfACfxjbJiPrv8IhF6jG5YiP0PfAlJKnpvPSLC6Vg_b4YnuqG-5qFwra3HB1RS8jPdedXrnCbCG96sG3trodBlCFnFbCCjLZgvRTLL2I4IaajNaU5pir/s320/c13.jpg" alt="" id="BLOGGER_PHOTO_ID_5208379516765178594" border="0" /></a><span style="font-style: italic; color: rgb(102, 51, 102);"><br /></span><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Bliss:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.e-wallpapers.info/wp-content/uploads/2006/12/sunset_bliss_mod_v2_by_altezza69.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfNnpznYjls4z29JvuJQRTiIC1CFIZugFnRpZUhljsDxYMpTE_NZYTRJ6b9g5hECQG9S9UwSCYzV-LYlkzPeCTU1IPI1QVUYYLKdLADj6DfP28Dg2iMEwWn4R6aAgugkY-vYFiuvNyfd87/s320/c6.jpg" alt="" id="BLOGGER_PHOTO_ID_5208385487017145426" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi50fACcbkH5ksWuR703GvlvXt-9jZF6qL3vB3UVSicLtwGE_MV9OY667LTXZHS25Q6C9Q7HMnK1GlqtfpHgHh9gRuPwaF1ZwXcDlMsmpN1BC4SYyHN-KNyEMEztfmLdGmgaxGHaHE5jlu6/s1600-h/c7.jpg"></a><a href="http://rtmulcahy.files.wordpress.com/2007/05/lm-bliss-little-guy-large.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi50fACcbkH5ksWuR703GvlvXt-9jZF6qL3vB3UVSicLtwGE_MV9OY667LTXZHS25Q6C9Q7HMnK1GlqtfpHgHh9gRuPwaF1ZwXcDlMsmpN1BC4SYyHN-KNyEMEztfmLdGmgaxGHaHE5jlu6/s320/c7.jpg" alt="" id="BLOGGER_PHOTO_ID_5208385497771339842" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVtgApD62tk_cP-w6XMtY6XokI2ab4LdHwLeqxECoAs_8fghXkZ-BlRp3X0uwUI_wpvKdESXjlfPZb3JPXrXNMSuXj_T6GxHmwjy9Nr4SzsymLxHRnMtjoIlU9cXLJdnDDXblJQUVuCKub/s1600-h/c10.jpg"></a><a href="http://www.theartoflewismoorcroft.co.uk/landscape/images/bliss.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVtgApD62tk_cP-w6XMtY6XokI2ab4LdHwLeqxECoAs_8fghXkZ-BlRp3X0uwUI_wpvKdESXjlfPZb3JPXrXNMSuXj_T6GxHmwjy9Nr4SzsymLxHRnMtjoIlU9cXLJdnDDXblJQUVuCKub/s320/c10.jpg" alt="" id="BLOGGER_PHOTO_ID_5208385500742863682" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.monkeysfist.co.za/images/2007/03/bliss.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq9aDZuXU6qHwj4l4tgdOY85C6dkszcITIm-WMEmi3MfBT9ps-O2tASMQ4WGN0npkFhwM5cnHhmcOckajjng203b9hyPU-w_ud7XndpAd3jfPKbSB55P5GVKnZtj6C2xqcHpV4lGgsAEo2/s320/c11.jpg" alt="" id="BLOGGER_PHOTO_ID_5208385508020989458" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.supershareware.com/images/screenshot/Free_Bliss_Screensaver-32643.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw0Cg5tl8nwTTEOmIFLe0OiuJX3li8oRKpBAbc6HwQn9in4DYVVrtFFcWdo0BU8Im-r-G4KUynNI0ZkMa_o87alV9thIf0yIQKo9b14SWqc0q9YTGPsai8CeReRU_mTDNSqekyzS9KcafT/s320/c19.jpg" alt="" id="BLOGGER_PHOTO_ID_5208385516754283330" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq9aDZuXU6qHwj4l4tgdOY85C6dkszcITIm-WMEmi3MfBT9ps-O2tASMQ4WGN0npkFhwM5cnHhmcOckajjng203b9hyPU-w_ud7XndpAd3jfPKbSB55P5GVKnZtj6C2xqcHpV4lGgsAEo2/s1600-h/c11.jpg"></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Blossom:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.thedctraveler.com/wp-content/uploads/2007/03/jefferson-memorial-at-cherry-blossom-time.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8LQ74S_htA9aomff-ergXryJmxvckugcaeRjLoyHWf_ZMQugkrB-GwMpHZF2SOnbQLHtxOHeMxLODJ2h7CrzDdLyNhZJelWRVFxN8fKOVWehzAoWjUb68779OA91NACyWeZpRuoves_rM/s320/c4.JPG" alt="" id="BLOGGER_PHOTO_ID_5208386761745073986" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRvBWfa5mUJGM22h9Zshslm7EEUxQORpc6SciMOePc8lvVCmVuTvRMsnpWccys_qw0Y_Q1ZyMT1GO2ootYELOebjTugk59MQZRCkbRuoFc5FPO6WC23AW59H9OCVgd2SCjjPw8-V3_zgR-/s1600-h/c6.jpeg"></a><a href="http://www.nysf.edu.au/%7Erado/photos/20031100blossom_by_Lake_Ginninderra.jpeg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRvBWfa5mUJGM22h9Zshslm7EEUxQORpc6SciMOePc8lvVCmVuTvRMsnpWccys_qw0Y_Q1ZyMT1GO2ootYELOebjTugk59MQZRCkbRuoFc5FPO6WC23AW59H9OCVgd2SCjjPw8-V3_zgR-/s320/c6.jpeg" alt="" id="BLOGGER_PHOTO_ID_5208386769433393298" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i1.trekearth.com/photos/5853/cherry_blossom.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_hXdBAr9F59oc8N5KJTaHYIg8It6N8fv5pj3EtphdQWMkjTnd18sfblsJkBtClcL-WjaepfW0mbcA4ZscGQBWMocf041LcpFHVTizZCsNsd1AriFkHm7Wq2BqsmKWuNxLM4cT5KAHP6JM/s320/c10.jpg" alt="" id="BLOGGER_PHOTO_ID_5208386768825558610" border="0" /></a><br /><br /><br /><span style="color: rgb(102, 51, 102);"><br /><br />Blue:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.lightningsafety.noaa.gov/images/Bolt_blue_Prentice1.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDOZCY-O1anXscRBFuUYUXO9Bh7afl7V7HXirzWY-wb5p2VYZ_aSDOVVs-EWs9bwpj-G0LpVu4r6fqU9eFJNlPfCFIsOZqVwAf1t4l-4Vtye3d1i4tvZ3Fn5KqIh3BuVh7y7KlPOh8j4Zl/s320/c2.jpg" alt="" id="BLOGGER_PHOTO_ID_5208387335809225010" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj8Xp7K_vhbTfwqahgcpbtv89dVQONzO7Lg7RmVrVIeUozxQiP0eFogVZY-kValQyTQDiV0UAjB6l-FmL1FZL_c5tV9WF9ZfU9hrrMVU_Lbq5y6aFuvA7pCKLEiSNuu8nzi-kD8M1DRR4O/s1600-h/c3.jpg"></a><a href="http://animals.nationalgeographic.com/staticfiles/NGS/Shared/StaticFiles/animals/images/primary/blue-whale.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj8Xp7K_vhbTfwqahgcpbtv89dVQONzO7Lg7RmVrVIeUozxQiP0eFogVZY-kValQyTQDiV0UAjB6l-FmL1FZL_c5tV9WF9ZfU9hrrMVU_Lbq5y6aFuvA7pCKLEiSNuu8nzi-kD8M1DRR4O/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208387337264445778" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSLjyJoSOiWPGE4cDC4WOprDtSssjSs773FywJ6CqbmKFl9d2S-7F288Tn0caHKDpFYVzuDydqWROtYAmKohciOi9BXLRYiTyIc9MA8ojlizMBElIvS4AY5HnR2m4JMRpLMW5EqeWM-Prj/s1600-h/c4.jpg"></a><a href="http://www.fs.fed.us/wildflowers/pollinators/pollinator-of-the-month/images/karnerblue/male_karner_blue_lg.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSLjyJoSOiWPGE4cDC4WOprDtSssjSs773FywJ6CqbmKFl9d2S-7F288Tn0caHKDpFYVzuDydqWROtYAmKohciOi9BXLRYiTyIc9MA8ojlizMBElIvS4AY5HnR2m4JMRpLMW5EqeWM-Prj/s320/c4.jpg" alt="" id="BLOGGER_PHOTO_ID_5208387337560146562" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ibiblio.org/jimmy/folkden/php/images/Old_Blue_DC.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX3lgnt8PBzpo1oo3zTp51l4KeQpZ6j03KZkM-w3x1wagCXUfdtny20IbO4U-TWeWAd3mnyeTqBdGqQ-NuzJfcBZybf1E8dbdRSvKfHRlqOTmOUM-0Re10oUmS30iGH0xbT6dRt3oV7wes/s320/c14.jpg" alt="" id="BLOGGER_PHOTO_ID_5208387338122663730" border="0" /></a><br /><span style="color: rgb(102, 51, 102);"><br /><br /><br /><br />Bubble:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.cgarena.com/freestuff/tutorials/max/bobbybubble/bubby_bubble_HREZ.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjftQ6wIRlmCCdRUJfGNV5s_6rq8mrtatfD9SDF26Iv-rqYg7beh3s3kbNiy9FCE2lL33v_bsYAlhK1kkH3jH9i02nA9aQHaVGXjPp7ysAUJR7I4TAZ1IaEQjrBCxT42aFpQNluBAFrOatU/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388003855323106" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAOZmTkvM0kbjflzFcscV9nSfQlVbXK3oJUvoGFrJR317uoZ4KQoNJTCok0bg1-or6pgEhIYVlwoVLsZVWtMcbvSZH27o1HqtKsBmpPis5VpRzVYnppTVBMvFGKpbYEQfJ8mAYVsPTRBOl/s1600-h/c5.jpg"></a><a href="http://content.answers.com/main/content/wp/en/e/e6/Soap_Bubble_-_foliage_background_-_iridescent_colours_-_Traquair_040801.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAOZmTkvM0kbjflzFcscV9nSfQlVbXK3oJUvoGFrJR317uoZ4KQoNJTCok0bg1-or6pgEhIYVlwoVLsZVWtMcbvSZH27o1HqtKsBmpPis5VpRzVYnppTVBMvFGKpbYEQfJ8mAYVsPTRBOl/s320/c5.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388009043425746" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqqMQxZ3i0kjGV5ha_VE-_OOhEOpk_ZHwLvdTt6zfnkf0TJ-8iAf34NVGtSjN_w45bDQbVBdM9rPIKFhit3XeaTSwxOCzwl1xM6vS_WLk_ZEc1IlwR-2Mhn87kzaUu9RqhJIGBXAkj75Tn/s1600-h/c9.jpg"></a><a href="http://firstrung.co.uk/dbimgs/bubbles_big.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqqMQxZ3i0kjGV5ha_VE-_OOhEOpk_ZHwLvdTt6zfnkf0TJ-8iAf34NVGtSjN_w45bDQbVBdM9rPIKFhit3XeaTSwxOCzwl1xM6vS_WLk_ZEc1IlwR-2Mhn87kzaUu9RqhJIGBXAkj75Tn/s320/c9.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388015583560834" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img.timeinc.net/time/2002/inventions/images/toy_bubble_pic.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHgiVJXRs6_WQamRCftFB2mjG1KrIYWmi4SLkvomXapEE_Cds9V1YXuwEPBik2C7XlxxhUfq_7Du_RE-_0hVzc8l46lvre89k3vmRkADG204EgW84PKXGdGayaTm7qiTLnvtjPFc73aTzB/s320/c10.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388016631061666" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.geocities.com/wwindmills/linkpge/bubble.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgUntuFmnoiiF7-CM2XA-bBORCntFfjYyU14yYQ0MxDmFvOrCuMa7bil0lk6pXWmHP6Xxj5UCrCSy6at33u6zJYpjPScPP7Vl9Cs_8KciL2SJvZ5LvTwKgDdFTG7UdlVYCKTdUeXCgnoXN/s320/c16.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388021544161250" border="0" /></a><br /><span style="color: rgb(102, 51, 102);"><br /><br /><br /><br /><br />Death:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.blogger.com/www.rageboy.com/death.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg8OhQH3CZVDL9pqaYdfG_Y2wqfBJ5zoo0Gk9HFgwQq3DhhsDXw59m1nESyzDSLPfh4kNtvp9UNIEOstDcz4ZoTcYB-WrvoNjoPr8avW1mRAAonSUAkroBmtJOMpA1KRDDKhflAHVkRo6x/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388842200181826" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://assets.goodmagazine.com/uploaded/images/masthead_image/15240/death_MH.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxfri-JKkswzUSAK6YLl2wFqhOuYkiO64JniCKQtliuOq9qol6WUemeGcfaQDILfSg3WWUlmDnzSZ3zWnwpjqHhV6D3w21JuDuyP3VHaIdNXPyAdHOybMQJl6kfWpzqZod54cz501f_3T1/s320/c2.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388854772527586" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.stolaf.edu/people/leming/images/death6.gif"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr3vXtGsg0UErLE5zU1-22i_IFb9OkUY9wI3eoj9ewzSS-JM_ikLULH5p-Z9kaTBxCE6vbMvgQ57YJA5v-la9ADTec1mWhWo5Bp65qv-rhY_bAZGTGSSks3obdDdLXDr_pIKPgMH7jv7DD/s320/c3.gif" alt="" id="BLOGGER_PHOTO_ID_5208388860310381314" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_avlOhEvXaB4Ocegzp6f5H5DV497ZkBBOH4CeE_l8akNo49sxi3DuREuUqQdmKTeYikSv6zTxVXcIEAePm4aetFin319Y8XzIPCul2v4scCCcHT4zEKHOE81V-f9j1Jj4U0g0as-fvzLw/s1600-h/c4.jpg"></a><a href="http://www.vamp.org/Gothic/Images/images/death-gry.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_avlOhEvXaB4Ocegzp6f5H5DV497ZkBBOH4CeE_l8akNo49sxi3DuREuUqQdmKTeYikSv6zTxVXcIEAePm4aetFin319Y8XzIPCul2v4scCCcHT4zEKHOE81V-f9j1Jj4U0g0as-fvzLw/s320/c4.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388866693653922" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.marvel.com/universe3zx/images/0/02/Death.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipCFriFbY6gaHPeGd2MKd-YQQHeXBSN62d1NlT7gTrnXJGfXAJe9-kBpLkg0bwtXcAS6CaZnw_B0ztaOshrJcuHgEK-GCxyhyEI_n2LhSxaYwGc2ikveNJkhL_CiT63IYzvo-ld3QNKlgC/s320/c5.jpg" alt="" id="BLOGGER_PHOTO_ID_5208388875351218978" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Delirium:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://evert.meulie.net/wp-content/uploads/2007/10/delirium.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqum-Iq1t96F9419Bo8ITc7ngHP81nsqgbv_zlj5NCohx_vhLbO5r3PVdfN1MEj2qt1K9-cP6THjALopGU7mAnFNUjQ-ixlUN5c7-NaYZvwN_eb5pID-0rTRf4JCfMP7YqRNdN_nCgspQM/s320/c5.jpg" alt="" id="BLOGGER_PHOTO_ID_5208678534527579826" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://livedesignonline.com/theatre/topstory/delirium1.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-yfyrX5WZKzzysufHQIOvV1OivOy1TDvCal6pUEkqdYyg9wD68W1IyJ9BhAP3UyX-uT8E_sp9c5pRMnF_YXD-BKBBghg6i7cuSb1kZxDrFoR6BIDhojZBLAXENcu44BdE9czmABIheATC/s320/c12.jpg" alt="" id="BLOGGER_PHOTO_ID_5208678542138794642" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV3Lbw6idt1ND6eKmsc5hiu515_EA8gVNuQfus81tYdAoA2FyuJzYmqu81o5hGGKSPRBT6pKG-adw2pGZivoilmBZSbXm06-xXZaxsvlXBJBmsJeEH3e8JiJF_5FClbk_vYdxEPYhO7c02/s1600-h/c16.jpg"></a><a href="http://www.genecolan.com/arstudios/art/delirium2.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV3Lbw6idt1ND6eKmsc5hiu515_EA8gVNuQfus81tYdAoA2FyuJzYmqu81o5hGGKSPRBT6pKG-adw2pGZivoilmBZSbXm06-xXZaxsvlXBJBmsJeEH3e8JiJF_5FClbk_vYdxEPYhO7c02/s320/c16.jpg" alt="" id="BLOGGER_PHOTO_ID_5208678542194718818" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkAyU3E3ewAQsjRYs3Bl3c7HVSTFbx5zkpqbbQh3AtNW6oU3uvPVtHQXP2v4N7R_tWbMMAHkhMaCOL8cqYDsz81_XaSy1YiTmDoFCnsHt2kwQqQiurKJjk2Ud4u2gQ606opy1rTlITuRlw/s1600-h/c17.jpg"></a><a href="http://www.rebeccamorse.com/img/delirium-and-her-fishie.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkAyU3E3ewAQsjRYs3Bl3c7HVSTFbx5zkpqbbQh3AtNW6oU3uvPVtHQXP2v4N7R_tWbMMAHkhMaCOL8cqYDsz81_XaSy1YiTmDoFCnsHt2kwQqQiurKJjk2Ud4u2gQ606opy1rTlITuRlw/s320/c17.jpg" alt="" id="BLOGGER_PHOTO_ID_5208678545700559186" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://goldini.com/imagenes/monocopias/serial/delirium.JPG"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmTV7veFm4GgfqZepiFKudUn6TW0BJ6X0GsbRYPj58miVRAyrlv8PszrrdJgzTiIN8mR2Nw5djvCFQUdmpqeg6bEfBEFQBFTif1AwRmRG1w4DbtYuQuUZ85-bcP3LYGBzj-iviMuRUeIek/s320/c20.JPG" alt="" id="BLOGGER_PHOTO_ID_5208678547387286786" border="0" /></a><br /><span style="color: rgb(102, 51, 102);"><br /><br /><br /><br /><br />Destiny:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://artfiles.art.com/images/-/Su-Omynona/Destiny-Calligraphy-Poster-C12331207.jpeg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs0YE7I1uFnbPvsy-jeN0iAXs_xf7KaXXsnKpa7BVIelNq6aXdxPvktCixmM78PgsCUWG-S1IheNtYeeO5BI7ce5ncyYzmvc8zceQn8TjNv-fCXhcrW0kA0t5gGwr8FB30l2AC6mCPcLaI/s320/c4.jpeg" alt="" id="BLOGGER_PHOTO_ID_5208679260213817522" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjs1EuIcIJZDOtqVYwoKdb9VgY73adOjz45qoKQODTPDyESJSMqU7YVJEsFMp2tN6tZcP76bZ0-Im0IkdZzwREp53zOe2qOJyKBJsFK5BnCuBwM3izEugcOm5WkShNfO9lmAq78jPyGIrc/s1600-h/c7.jpg"></a><a href="http://thor.info.uaic.ro/%7Ebusaco/paint/enlightments/Destiny.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjs1EuIcIJZDOtqVYwoKdb9VgY73adOjz45qoKQODTPDyESJSMqU7YVJEsFMp2tN6tZcP76bZ0-Im0IkdZzwREp53zOe2qOJyKBJsFK5BnCuBwM3izEugcOm5WkShNfO9lmAq78jPyGIrc/s320/c7.jpg" alt="" id="BLOGGER_PHOTO_ID_5208679257923142690" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiev-F76587YLJpXDX5h3XuKcQ2-s8Mf2MUA2knjhyphenhyphenReaDvKL27MBdIbZnM4cWTHkMKmKE8pwqT9LCiIObo6VB0GKMO1DTNsfEEUXuin8oUDoB80FdeJfrHcNroNtmQNCYUa90xo34ZfJLP/s1600-h/c10.jpg"></a><a href="http://www.john-howe.com/portfolio/gallery/data/media/20/Ship-of-Destiny-port.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiev-F76587YLJpXDX5h3XuKcQ2-s8Mf2MUA2knjhyphenhyphenReaDvKL27MBdIbZnM4cWTHkMKmKE8pwqT9LCiIObo6VB0GKMO1DTNsfEEUXuin8oUDoB80FdeJfrHcNroNtmQNCYUa90xo34ZfJLP/s320/c10.jpg" alt="" id="BLOGGER_PHOTO_ID_5208679265240658706" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://jaguar.holyoak.com/art/destiny.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxXfp6atTc0oClcgttLmG1G9dQwBjEYuuEy1KmfFjboK3R-OFFUcbVfX2AX9CP1KboI_NIyWn93spfrm5geIkuV28-DqscAylf-NvkeN3AfaFGOA7ZdMuhZ-0N6e_vLgGEA0hNrBjQ8o-N/s320/c17.jpg" alt="" id="BLOGGER_PHOTO_ID_5208679269826254178" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.podcastshow.com/images/bryce/bryce_large/twilight%27s_destiny.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUM6uizm6eeQLJYj7vE0FfJbFeg4yl2tc9ATAtcB5poIwsIUMupY2spHCS5SIDVrJ-th6MO0Sufa0Iq2UU-Vb4-GcZufdlqpD8WCk4owsrsmF_Eoj0N9_mPJTAAGqUf3qlpHNM0VMtTgZd/s320/c20.jpg" alt="" id="BLOGGER_PHOTO_ID_5208679266068297362" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Dreams:</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.easy-dream-interpretation.com/images/ocean_dreams2.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV28YoMIKZqwfwgsG3cEOXrrrvpLUnPFGW0aiqfrYxrxLnAYo-tApB8RpOrASEImjOJC5Nu-jS35JZBup-Mo3M-xuf_e1YRPFS-LbTap8c3uoogLQ1lkgM2att7ZzzRJoxmxdbABsJmn-2/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208680116622920610" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOlxlZNRo-wnAZhBHN2ENT6Cr0_MhN-9f_UOSyqYjZSxnV4kC2do-KyoQwQwHjMg36UmqY_XXxUR927Ic3Mkgtz6RrkmXpnu7va2gd1v0RNhEJgG2zrs7BMpNBQDCM12Q_ToE4m_JJ7l64/s1600-h/c3.jpg"></a><a href="http://perchancetodream.files.wordpress.com/2008/04/dreams.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOlxlZNRo-wnAZhBHN2ENT6Cr0_MhN-9f_UOSyqYjZSxnV4kC2do-KyoQwQwHjMg36UmqY_XXxUR927Ic3Mkgtz6RrkmXpnu7va2gd1v0RNhEJgG2zrs7BMpNBQDCM12Q_ToE4m_JJ7l64/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208680128630162594" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh8o9Yb1US5kIGxmogpnp8C0PUMoKlreTYPFOG5WSAMPl0IAGIi9J88vqKRhNoqopRehomkWeCNq85y5IyeY3PmOsI5_r6hyphenhyphenXd17cvNd304j-nYmMRpOe5cRwX5x2Fq9eYL715vNI-zSHL/s1600-h/c4.jpg"></a><a href="http://www.oss237.com/wp-content/uploads/2006/06/In-dreams-shes-with-me.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh8o9Yb1US5kIGxmogpnp8C0PUMoKlreTYPFOG5WSAMPl0IAGIi9J88vqKRhNoqopRehomkWeCNq85y5IyeY3PmOsI5_r6hyphenhyphenXd17cvNd304j-nYmMRpOe5cRwX5x2Fq9eYL715vNI-zSHL/s320/c4.jpg" alt="" id="BLOGGER_PHOTO_ID_5208680132268439058" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih7nsaJJnVbLHHMdt0BqN-KA4o4fS5DMJm3_4wdF7NuA1rYiG6KBtXA7CkjHYJDmFsR7er0Uxkmpw6OJfnIbjRx8kSnGBzQkAcI9cJYheGvF9Edlz4EbciDX-uj2oVHx07Nh81EEka3mnY/s1600-h/c6.jpg"></a><a href="http://www.telegraph.co.uk/earth/graphics/2007/08/14/dream.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih7nsaJJnVbLHHMdt0BqN-KA4o4fS5DMJm3_4wdF7NuA1rYiG6KBtXA7CkjHYJDmFsR7er0Uxkmpw6OJfnIbjRx8kSnGBzQkAcI9cJYheGvF9Edlz4EbciDX-uj2oVHx07Nh81EEka3mnY/s320/c6.jpg" alt="" id="BLOGGER_PHOTO_ID_5208680129632214434" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.artsycraftsy.com/dore/raven11_dreams.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1zcvaQlNYgaYMwNn_JbI6qBKER0tTpAFj3roHMZOiLemr-USrxWtQprzOpeYCuU0PHDdP6WsdP-6Z_1T0F94zBwy2g71PtLm-3HF2t-k7k2NEm5OyN8vULUeIXrGvZedJb5VM9s-U_Mdt/s320/c13.jpg" alt="" id="BLOGGER_PHOTO_ID_5208680134792390386" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Eternity:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.voytek-art.com/road-to-eternity.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOWLFrc_j6jo6VzPXOzQdCwEXz0wAB7tPFiK3ux6giJeXRgniiw3s6cVKGTn3uUjCRPw6KQ4GESZBio6FsMKgUDzlBpJUVUecz56FBmO0qVsUj7zmTDZHNZSmwUDPUidR7ekQiNUVNUNsk/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208682297001770834" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQDMpu24xCTihzCk3X9bN0fvwVuNLvpB0P_B2Aym63wgypVC7pRqx0dnERQDjn9_y2t8afR3auuBLZZMyQPlR79-oBVpDjZKi12QyQg3sMBBbZwsxPQnKZya-vPbYIdBy6jUBgrjFT4y1v/s1600-h/c3.jpg"></a><a href="http://lassenlasvegas.com/artwork/large/ParenthesesInEternity460.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQDMpu24xCTihzCk3X9bN0fvwVuNLvpB0P_B2Aym63wgypVC7pRqx0dnERQDjn9_y2t8afR3auuBLZZMyQPlR79-oBVpDjZKi12QyQg3sMBBbZwsxPQnKZya-vPbYIdBy6jUBgrjFT4y1v/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208682300761827426" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu6US0qUfeya0O1h2gFhyWfYSD4IACBzDRwT6K8cxmdcoUan6sTpgrFfXyqF1NMONsKfl7xckR8VTAi0XsyEQ4hL8wjsSSL5mycTAtmTG2y3Qm42cXRtWQ8IV5M-ZUQnzf7M-ls2WKwQhL/s1600-h/c5.jpg"></a><a href="http://www.vaughnsphotoart.com/uploads/images/catalog_src/the-eternity-of-morning_src_1.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu6US0qUfeya0O1h2gFhyWfYSD4IACBzDRwT6K8cxmdcoUan6sTpgrFfXyqF1NMONsKfl7xckR8VTAi0XsyEQ4hL8wjsSSL5mycTAtmTG2y3Qm42cXRtWQ8IV5M-ZUQnzf7M-ls2WKwQhL/s320/c5.jpg" alt="" id="BLOGGER_PHOTO_ID_5208682304715545682" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.acemontana.de/gallery/img/eternity.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfsvanVd4ZdXYNWY5azwLUAQK3p4FTYdHbVV5qL4nAr2AklNeX4JJD3J1Lv15y2X56G-d0ps_-LcbLciOfghYUXNMGjZnADnPHJHueAZqvoHwS0jhbba1pxlO4Z_Q7oPyiBpj1hh_Oyogp/s320/c8.jpg" alt="" id="BLOGGER_PHOTO_ID_5208682309647294530" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ciba.demon.co.uk/eternity.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVvPCJMcxUKU307Hh24EduXS3yD__ZzJaWxlBexwSlHWHvo1Ybx3Sr_-Q7m2Bj-me9csmo45yL95j3XPYMQfi-GMFnriLlMXVUEE123jX8l_KwLQc6V_NkSqkZAoHwsCuu-QYQ4fGQZHCg/s320/c13.jpg" alt="" id="BLOGGER_PHOTO_ID_5208682311109426498" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Fantastic:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.authorstream.com/Content/Abbott-8838-Fantastic-Pictures-fantastic-pictures-images-photos-45508-22163-ppt-powerpoint-118_88.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_gTA0guySIlO-875BIx-0QDQNvCuVp4y7qDSeKYKZ-dmbdJDcdvSh7Xetj_1p8LjLd2KPwlO4sQwTSCTTBrpB8tzkhf7CQvfCFB31zbA5M3gRxS37Vicx81tlNDFBy5WFgmh-OEq5EBMZ/s320/c2.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683149934707730" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.authorstream.com/Content/Noormahl-9875-Fantastic-Images-fantastic-pics4177-ppt-powerpoint-118_88.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK13wuOxNryDMqkEhtHsRaPlpAArCj23UO0OoOadqmniO81YalbWNj81wBRytjCMySwbSHRAjhWe0OD7S8SKHKUG4OtW0u20Vs63-QLQMczrbO1uX-tT2FivC4Z53cTgZXswJjesXx-dYF/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683150040307250" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio0dwmG3F4bTbA8jW52w1i7i633PBtZJLw5EX7TkZRHW4hyphenhyphentf7MJ2MKPyL6HrJAlWyu31dcmYuLsuwHeynYzSaCrQ1-mJ_OgRtfJ7p9o-64fh6AdMp3vAOeIhCMWwMc-dVcaVpjN95FJYY/s1600-h/c8.jpg"></a><a href="http://movies.radiofree.com/photos/fantastic_four_2_02097.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio0dwmG3F4bTbA8jW52w1i7i633PBtZJLw5EX7TkZRHW4hyphenhyphentf7MJ2MKPyL6HrJAlWyu31dcmYuLsuwHeynYzSaCrQ1-mJ_OgRtfJ7p9o-64fh6AdMp3vAOeIhCMWwMc-dVcaVpjN95FJYY/s320/c8.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683153983564802" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.eyesontutorials.com/images/Designing/Sigma/tut61_FantasticWallpapers/FantasticWallpapers.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRb9bz_YBc6cyDzIpNXVB3BQDjxcNdfT6ZScpyp-XPP7rCsPqrFv4l3sraQfk6JsCwrPZ7-ROzlMZnz4QJ4Ynrh2lz1CCRN-pSknFbV0isSXk3dbuoeU7Bcn-PtM5RdgKEVjQ1nb9mgQkn/s320/c11.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683153154615458" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rixane.com/shots/fantastic-ocean-3d-screensaver-640-9.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSts-bMdz3rZTkL_M4eh3dR0LFxuHW6B6_02McFRFYydVD3bhjH9zif4aGN8_0W-jfvr4mplddatfjr_sWVUFi6err0Ek7x-8ONpcohj12wdPJgVwuW7YSPXwm794lrrzqB916b4Ud5b9e/s320/c13.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683160303433922" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Happiness:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://imagecache2.allposters.com/images/pic/JAG/03-PS15-4%7EHappiness-Posters.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCr9i5AjXfcz0V900Knkd0v2FhLgmTEpRtlj2b7vTR9DQerCMMFdAFn3p9pzG30jZaVZ6-9CXt7zx7I00K2XqlPS6OnY42z_n_lNWhAVOtKhwC28hbziqM-t9wWQLobLxAvIfbZYGeXL0E/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683911119210978" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.benettontalk.com/happiness.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0d_Fc8vRNM2P8jngT2lLSqBqh5Vifq__LtZDgh26l9b5Qx6avdThgNUcfHlT9gqj41pWS-xwfwCRJXHVG0ewaM3DqnX4awfTiy9_CaQeOanBIHqEFDX2OKDeBC8LKtn7K_-DwXGhAKvv_/s320/c2.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683915391594642" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://seis.bris.ac.uk/%7Ers1909/photo/happiness.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIZLjywskCltZW5Jsqj9oKt2mS8sIzRi21CVrOdtvuRO4kDPGgHoaOO0wMTPA5VQmnyJkpILvGwXiD9A2Nrs0Eme8Mj0tTv9bOR2gwUguhvt0SieJQaJwpRG9_28X_xvQPZLG5tFrv9WMI/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683913394227026" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://mylemonadestand.files.wordpress.com/2007/04/happiness_is_a_warm_puppy.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc3hcOD2k0u_eLRS_eXiBQBlj6FQQ0YWQqVgy1min3I5hpbAsbCONlif_yO5ePHDZc0LFUpm0FCqrOgnAtmlY9RYbQ8NVmvSfilKkJ6IOc-iP7R4WOLjRKXbbigHBCeIIOTpiFlu5Gf-1D/s320/c7.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683917071322706" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.sapergalleries.com/MackHappiness.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxqh9Elwn3_T7pJnb41hHic9nL5KEEWtVCQ2-XWGORpiQuzhX0jQ04hv4PexJAzYrAcWt6lu9Q9_EQ4gSxvYi1hkY_PppLq27yZO5YiBj_M6z5FSrqL9oMsWjcp3fFrQR5UkM_xmQyHWx7/s320/c18.jpg" alt="" id="BLOGGER_PHOTO_ID_5208683925136596274" border="0" /></a><br /><span style="color: rgb(102, 51, 102);"><br /></span><span style="color: rgb(102, 51, 102);"><br /><br /><br />Hilarious:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i120.photobucket.com/albums/o162/shefoxcake420/Hilarious-704.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQuJZKj-NuRfjMmKMByR27_gWyEy5HftOIzZZpNPFdMovq9GgaIVWXyxQNGD_mCa_54ycVKCGohAiE3fLkrCZnoLx0XZkMzvzLdWibGJ6BUyBAH8p_wOnQv5UFL5u1uvAaRTICUq1Os000/s320/c2.jpg" alt="" id="BLOGGER_PHOTO_ID_5208684569972107634" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.cartoonstock.com/lowres/epa0904l.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1XMi_-dsdho4tcovipohkcmDv7qOLDWO4pyeocVbPSpIXMZ2wOZrqfqDsQP2SSEwWQi11EPXw-Avry7o_NHAbaO2zwk5kxlyecdDxp-G7hk-hqH1Fan0ZfnOHtt76UZrD1k069nMcapdm/s320/c9.jpg" alt="" id="BLOGGER_PHOTO_ID_5208684575641312498" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Hope:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://damienkatz.net/pics/hope.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9PjIYPTd9rfgKYkoxhWSM0yE6RIy_aYIFOoRzJL8XXY8XHZ7XDkExMrPYHYYzY1B9I36hzATW5WcseTrvWSczu1STSeEXUD8QMasQm1mrcxr1YPOksMYQY5UCJWvam6W-7Q67qEZLaWFZ/s320/c4.jpg" alt="" id="BLOGGER_PHOTO_ID_5208684982157684194" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://artfiles.art.com/images/-/Laura-Monahan/Hope-Baby-Hands-and-Feet-Print-C10218300.jpeg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3n2XCPjx_4-PEkZpq8XNrWXLeu2AbYLfyK2TorJqw9TwFw-2KlrdHkAR4-uwv7a3WNuRTdpsirt8LHEO3nZtT2n6v9SS0ShGmyD6k9PBUucHTx6z7sG9_-zv3ViWm3Fv2P4Bdhj_XrKB3/s320/c5.jpeg" alt="" id="BLOGGER_PHOTO_ID_5208684984088428178" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://imagecache2.allposters.com/images/pic/ADL/AD-DD2013%7EWords-to-Live-By-Hope-Posters.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU-_OONZ82zGpOIZW7uE8lfXNllcfKXk6eFBYr0HV_M4FlHUlczy9XZSxBUOFbK6_S-4yIonsFz4CaFGe_twYR72UPutvmUHocMTZpNx0q5SRfVO4mLGRjcVgZc_SHf-2NyhwDcdoJ6ucR/s320/c8.jpg" alt="" id="BLOGGER_PHOTO_ID_5208684987557248146" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://image.linkinn.com/userfiles/Image/hope_1024.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyw1M9CNmcAxHPkt23mgAz5ytP-x-wkWRQdHEPe_Tw6B20_5evCZigL50rzkuTrR12l9AXp5KqwSQ33ShrHboECNc03Ird4yfKEXWK6aEvolv2v-W7AucCkuqYPhc-juXAFbgVnYY4xk5X/s320/c9.jpg" alt="" id="BLOGGER_PHOTO_ID_5208684990651190994" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.thegeographyofhope.com/themes/geographyhope/geo_of_hope.gif"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPJzOFMpk61i6dLRc5OA0aK2-TXAThSJSRrRqmKa1cslrESgVq5u-Y5WCDELl7gczKAmq4rm7F8MpJiWeGfW60jS42Wrj_5PY6gYtkYz0aFQ1o64BE3-O42HZaVAwpw_FjCd02WbiDXn32/s320/c10.gif" alt="" id="BLOGGER_PHOTO_ID_5208684994418396306" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">If:</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://icanhascheezburger.files.wordpress.com/2007/07/if-they-cant-find-you-they-cant-wash-you.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIu1RIeL4T-kgmTwEfdqc3AiKLY32C8yi2pPUhKWvus0DbPY5uNuZlEYyzauxiw-7jXfUKmrTkG0nNiTnGdQ_lOxiHlaEXpyyrH4NPblbjXS3gt1KsVhwaRpUCcqwX8MXTq1PPV-CYtZQe/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208685561474803538" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Liberty:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://stockimages.files.wordpress.com/2007/06/statue-of-liberty.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSZqXDa6TvT8KvSy23WVmI8Ysr8lFY3xh7NKtYypyy8yVBTxQZkrhVOon3R4CeYQPf-ylmHckfGTzaXI7PcHCGnhaW_g8-1v_aDYQNA_E2-peDTad4kQsE5a2qIcXp-ij827CSEoZapptU/s320/c8.jpg" alt="" id="BLOGGER_PHOTO_ID_5208685906915706434" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.scientificillustrator.com/art/liberty_bell.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJX-t-8WHnb1H87lW6xf5RpEwLSwkUh2oxBEebN_n3Pufs3i2fUMMsryohTq7vTQz_x8QUBQK4jhAvQGV0Cd4HJ2OOPggxOmnGZOA3hzD-dl9elq6upgpfWlY1mUuN9IcdryaYEo8687nO/s320/c9.jpg" alt="" id="BLOGGER_PHOTO_ID_5208686563384248930" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Life:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.livelifewell.nsw.gov.au/images/layoutimage.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWkpHqluHElJVv0XAI0ukek_Teg6fRXQy3IqXFQ-sak_TumPf_UQGyG90QqQFbq_Nd4SrfsGVGzlOkNA0e61zcKe-dj-Xl9u2oJTMwMoygtFJkia53_ft_o3Fa-5jNZNZrjF79F7LswZRz/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208686923403017538" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.firstscience.com/home/images/legacygallery/life_8weeks.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuqYt4UAvr6asAJBpzfoKM_ZJSt8YOYzUqRwconsks73PQk1B6QOac8ynn9Hntzp5qB-aX8nfLy1pYZ1ukF2wExNr3CiNDMTuWf1-bvcu2o3J1KUr-u9WTXUglB1FR8WXv5FUq0JmtOkuq/s320/c4.jpg" alt="" id="BLOGGER_PHOTO_ID_5208686919578591074" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.mindtools.com/media/Diagrams/WheelofLife1.gif"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi231d1M-1djMhekHg8CqoAZYNTV1sjH4hCtCosayklf2v5i5KkxzJLeMUl4qLjuJve3DAYH_3qkRDagX54v98LQQYWjgBnngIcNV2fDYxnB7qKvECHz9h3Dfx05XspQOv5pdhHC9mMzcpb/s320/c9.gif" alt="" id="BLOGGER_PHOTO_ID_5208686927043657506" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Love:</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1kr-B3X6OewnwXOpbbKP_hQO68eW4FeA-hxCJg8ANyFYlOp5A9MJiP8e58vsb5B6vWwP3i-rPQ1SmCizOYg-vtAccy0_11n0SfmCMX6BhsoD6qnydKtsNqhIq-taxUH2QxfkKr7lC9ywc/s1600-h/c1.jpg"></a><a href="http://www.strawbale.com/wp-content/uploads/love.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1kr-B3X6OewnwXOpbbKP_hQO68eW4FeA-hxCJg8ANyFYlOp5A9MJiP8e58vsb5B6vWwP3i-rPQ1SmCizOYg-vtAccy0_11n0SfmCMX6BhsoD6qnydKtsNqhIq-taxUH2QxfkKr7lC9ywc/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208687722485037442" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgceDdzM5I1wVMPnO3E741LR_k9ubiRW7bh3D0BLrcIxkCBtsAoJaGPY81B0Rr9w-DPtbrIWF53oEzayIEgveS0k3GkqkzKNzA7PexMvsyJqeKvasW2uTNf5bu0cRkazg5LbfJ0JTtKMUkG/s1600-h/c2.jpeg"></a><a href="http://artfiles.art.com/images/-/Alfred-Gockel/Endless-Love-Print-C10080101.jpeg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgceDdzM5I1wVMPnO3E741LR_k9ubiRW7bh3D0BLrcIxkCBtsAoJaGPY81B0Rr9w-DPtbrIWF53oEzayIEgveS0k3GkqkzKNzA7PexMvsyJqeKvasW2uTNf5bu0cRkazg5LbfJ0JTtKMUkG/s320/c2.jpeg" alt="" id="BLOGGER_PHOTO_ID_5208687724706930914" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgFzqP8GKPS5bf6fDUmFEV2NONgJoz-qs0undDkHavz0S6k76sttG0-7AVy_WngZruX54dva4ow_c3bmQtyyGwB75Y-RNR1h2nZOYwr4Ql9cdkqywMCpOSqvDIHZjOb06GkPFQWfOwqwHj/s1600-h/c13.jpg"></a><a href="http://www.sciam.com/media/inline/D3382F14-0FFD-D99A-AEFFD0563564EE7A_1.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgFzqP8GKPS5bf6fDUmFEV2NONgJoz-qs0undDkHavz0S6k76sttG0-7AVy_WngZruX54dva4ow_c3bmQtyyGwB75Y-RNR1h2nZOYwr4Ql9cdkqywMCpOSqvDIHZjOb06GkPFQWfOwqwHj/s320/c13.jpg" alt="" id="BLOGGER_PHOTO_ID_5208687730449242178" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://assets.espn.go.com/photo/2008/0329/ncb_a_love1_sq_300.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid3ESWNIXF70Q7v2RHZha9b4jl4NgqXsou8jK_Y5Eiv-AriquX9RpeipSS60yyQBbNAH5LtnJzwEnTldFTet11UykBxY082-i70vN73Jdyy16AF4IGrcN1a6hPqdiGxk0uJ0tQUuRoAVCV/s320/c15.jpg" alt="" id="BLOGGER_PHOTO_ID_5208687731250341090" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://graphics8.nytimes.com/images/2008/05/24/arts/24cann600.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvDdjWoSnPf43KIW5rHjGibFsluXikY42Z05LBDDHNugYxmAOT05VEzhqkooi9kNzbJjw_SlJFhoCT5e7MsVjsK6Y42BC3nOapUzosW33Am0FuS1u2TYVqoT7xzv8-lvAmiMRLT0dyylAV/s320/c16.jpg" alt="" id="BLOGGER_PHOTO_ID_5208687737573924786" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Nothingness:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://pensamentosestranhos.blogs.sapo.pt/arquivo/Nothingness.jpg_.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPnDEGgATxnDds1yrDXzX5dIjeW9R25j9alHA8HNZtWuEoRm3KqICn3XVQwduF70dFm0ww3_1CT8kQvJgabV30lgem58sBZOwO8pI-so7iTRU3iDZXcN4nSuFwK5VJMjCmU62585PezXM8/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208688582956626562" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHRaTma9aW_4SCHKYw_2wpUukfm0xfZF-vN7qFpWm2-FwyMPSXA7CGR7UrhH2_8ytBW7rJvA9jVauyINZ9SqUwkqU7sZInnnpjUeBhsXUZw4KXVrZuUQiEBpFeLacwKr7Dxm6fuqOKUgta/s1600-h/c2.jpg"></a><a href="http://gallery.photo.net/photo/3788178-md.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHRaTma9aW_4SCHKYw_2wpUukfm0xfZF-vN7qFpWm2-FwyMPSXA7CGR7UrhH2_8ytBW7rJvA9jVauyINZ9SqUwkqU7sZInnnpjUeBhsXUZw4KXVrZuUQiEBpFeLacwKr7Dxm6fuqOKUgta/s320/c2.jpg" alt="" id="BLOGGER_PHOTO_ID_5208688586265395282" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWm4el8opnfQkVv6oIYJV7pjzo_GvkM0JGDHq_kMcl73-_tcXmes1Wvzb3c82kYYKQZ6i8tYMnTYUsZsw7cKvCODRbR-ljQl1CP26iShvtLD8717_eld0BbEl8aZTjbsrXAI0lQ1hRm4RB/s1600-h/c3.jpg"></a><a href="http://bp0.blogger.com/_TFMtLWpKA4E/R1El_AKdJeI/AAAAAAAADwU/gCgM0yk6HDo/s1600-R/nothingness.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWm4el8opnfQkVv6oIYJV7pjzo_GvkM0JGDHq_kMcl73-_tcXmes1Wvzb3c82kYYKQZ6i8tYMnTYUsZsw7cKvCODRbR-ljQl1CP26iShvtLD8717_eld0BbEl8aZTjbsrXAI0lQ1hRm4RB/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208688591919174946" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.lightoverwater.co.uk/blog/wp-content/uploads/2007/11/into-the-mist-square.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv2rEszDLlDPJBY0bljN_s4BvLgIwKcci7oIU33eFE1yjG-tq_w7X_fwJQyX5lHEzsHB8tiyDZbsCqqUBFszMkFAt0mqIRCwIym2lLnmG6C5IO0_WasMx_rWVaWynuEWdSKGXxoqrkIVXA/s320/c5.jpg" alt="" id="BLOGGER_PHOTO_ID_5208688596031953074" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://thinking4thinking.com/wp-content/uploads/image/IntoNothingness.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpxyMRM8sfbXSZX7AyL7uog8Ao_6AR7GbPxyUhVNFwmsOrBit3qCdkosnoCPkaLNbYuMoKex6Z-4ERSb5fgNI5GOCqcWeDADyCxY57xeVtdmVT7sP9xjsZ30Rp4zI4EPBnkYi6j6IwzZ32/s320/c11.jpg" alt="" id="BLOGGER_PHOTO_ID_5208688599223747858" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Rainbow:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://climate.met.psu.edu/data/frost/images/rainbow.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaxKZrC1zZQlDA40LOWwW0v7NdxZ2b1-kfoU8Hs4ubMqcxp-8gA8-qhdjqr3-IcU8P65cndTIQ5LvTj7vzxdMv-Hr0fZ9jrySj7yI0xIX9paIY6ghNJAaLUJ0UJ9_y2jhJHN2ORA_6HNIP/s320/c2.jpg" alt="" id="BLOGGER_PHOTO_ID_5208689587984376722" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.eaas.co.uk/images/atmospheric_optics/rainbow.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVUk1Hz4tSfzS92qeP_BbVFnc-boFJhRi7nkPf5fSqYX0Ih5Vh3-pC1PzXcx3-IRii2YYvGG3Fdj1ajqcbY5nK_lHTd3bSCc-HS2iD48UAawU-aJu1S9QeNkYKlmYHFSc8o0Ay8qIhH8o7/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208689600848284290" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO8is4ZoBgA_di5Tes4WDCTvU8vHx7NLbsdy0voYV3IhKr8vBZzd-8FIdbnYLqer3woZCnzrOftVQxFwqQIblswsQeU3wzGvXGtM_PhEbL4uAuiulyj9jJnEVxJm4lOhHwiWbOmz0Tl-fK/s1600-h/c6.jpg"></a><a href="http://digital-photography-school.com/blog/wp-content/uploads/2007/11/rainbow-photography.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO8is4ZoBgA_di5Tes4WDCTvU8vHx7NLbsdy0voYV3IhKr8vBZzd-8FIdbnYLqer3woZCnzrOftVQxFwqQIblswsQeU3wzGvXGtM_PhEbL4uAuiulyj9jJnEVxJm4lOhHwiWbOmz0Tl-fK/s320/c6.jpg" alt="" id="BLOGGER_PHOTO_ID_5208689616128643138" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://digital-photography-school.com/blog/wp-content/uploads/2007/11/photogrpah-a-rainbow.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS5__pNG_Tptl34uIqw5Hn_Vnn9DfOReAuz56BqXFrCHHnvgYzqFcn3RgGblYGhTNC4Fpu-e9jwDACSOLb5_L98VlTlNKI1_1PpGs6qT_029r9l8B4XBm917Huh_TUbJN9cWVvcMQqT2Da/s320/c7.jpg" alt="" id="BLOGGER_PHOTO_ID_5208689625273042770" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.hickerphoto.com/data/media/24/niagara_falls_rainbow_sc87.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYf5GC9esyvo1XHUYG3bj_m6eQJglAW1v-TspoYxEqpLnuPr_zHw4TGTtDc-c7JiKxkd8h1PVVXGYEvYF0YnWcgX4y2xHNcEyjKpyrkZBmNnZgiFOi6oqDVKoP11F4T7ifXbOYeBKLBWKv/s320/c20.jpg" alt="" id="BLOGGER_PHOTO_ID_5208689638739866642" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Smile:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Smile_fasdfdsfoiueire.svg/498px-Smile_fasdfdsfoiueire.svg.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1djxZiPwCKC3b-8D9PR9OqSUwYeUSpBENZowimzFtR6uhzPbbcsICe6ygYNX2RzlkGofs1pDHcJ1BZugAcftq9LpNIEaOxwpJWxHlUG0kqIEcdMiWJqJ82oNRTpDM9xAcxFmY0yvwuGed/s320/c1.png" alt="" id="BLOGGER_PHOTO_ID_5208690388730401714" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.pages2send.com/smileforyou/smile2.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9s6p_Xgr61rk_d8WSynH2m4-7ax5bq2JqryhzY5MKosW1rOx-dGOfYlkp8NCfl-wqFdbukQf_9_rsHKjjirTIfLpUq1Dp9m9S3lGqNRCPV-Yikxa0PG0j5FJ-fK0CPjpYYc6habHz3NrB/s320/c3.jpg" alt="" id="BLOGGER_PHOTO_ID_5208690392611149874" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTcR2RZmMiQzZo1RUygnrHta-c6ld1S_RR8Z5EPox6Zq49dJbfngXWo4VbcfK2h59PAl-NMSyfj5dGsmlqa2JQXGOdgbK_C56tsBjhrHGDpdmriV7zSE4R8U_q4uS9gzwLgn2UyY5ToMbv/s1600-h/c4.jpg"></a><a href="http://thesituationist.files.wordpress.com/2007/06/monkey_smile.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTcR2RZmMiQzZo1RUygnrHta-c6ld1S_RR8Z5EPox6Zq49dJbfngXWo4VbcfK2h59PAl-NMSyfj5dGsmlqa2JQXGOdgbK_C56tsBjhrHGDpdmriV7zSE4R8U_q4uS9gzwLgn2UyY5ToMbv/s320/c4.jpg" alt="" id="BLOGGER_PHOTO_ID_5208690394224611442" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.photopumpkin.com/wp-content/uploads/smile.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXT8qtQjWPUV1QSIhCm5LqJov9sWxbyTGVc89acDdN_PYkT-xI3NL4TAEJVKk4MQSRq0oHb1AmTY6MD_BSHJWD8-jCXMCBCMeGvs-gH2v5hPXkm7hHNi3_3dObToQGZUHvyIdjp2t4YJ65/s320/c5.jpg" alt="" id="BLOGGER_PHOTO_ID_5208690395086881522" border="0" /> </a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://jasmine_1480.blogs.friendster.com/my_blog/images/smile_1.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuLeUgDAeuBLi00LHBLJz0iHKr2IgzF_5IyMH4G7mwJpxsVIjxS8eer9qfrVh66Vykcxj3U2ItyxWzuc_CVRVfc7RgPn6UzbJ-vtLQZWg4ODyRezvYV3tY0h7DYSziAGZJSqzPw86eKbEQ/s320/c18.jpg" alt="" id="BLOGGER_PHOTO_ID_5208690399165530418" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Sunflower:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.greatsunflower.org/files/images/geddes-anne-sunflower-wall-6600032.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaJNXTG7ehTQpojznIAH-lSRWzo7XoBV1U23pZyiWmsvBPQnd4lN4oKvbiNOr4JR6HxGk-wXHghKCScq9lRDfs3hyphenhyphenOmYFqd2hOn2YfUtmK9tjwENugxAhEIQlLEDlzbeKcO4hR4But-0TH/s320/c18.jpg" alt="" id="BLOGGER_PHOTO_ID_5208691035823851250" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);">Sunshine:<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i165.photobucket.com/albums/u54/cleanup_bucket/Cleanup_Album_3/sunshine.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrR5Qf9NUVmEj5QofCsMksz4oUIEcM_0GIv_c9FyVo33pKRbt3bAhzlD8oaIh23crgI7C6X-YCZWX6eb5ywd2wFGnejVz9bUMIbilAlpX-xRDfdNFFMo8rQWazoqclFsIndwl-MH_Y8A28/s320/c1.jpg" alt="" id="BLOGGER_PHOTO_ID_5208691357767971106" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.freefoto.com/images/15/78/15_78_6---Rays-of-Sunshine-against-a-dramatic-black-sky_web.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuA4aUhruuzWxG9eiH33gFt1aiqK_S1KIQqMGX2fTFfJPuUR3MzbfAVHZVuGWkcp-Kc1QbxOigkCQNiXUFO0WQ-8uHvHCZg1jf3W0bFCH_01iyP5aRO6mZ-dMuiR4rQ_GWMKb8ZVxxSR8D/s320/c2.jpg" alt="" id="BLOGGER_PHOTO_ID_5208691362307422194" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://dev.newmediamaze.com/images/sunshine_myspace_wallpaper.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbmUUGKqjBz0JiQQJtBmA2u7fVUZgRhJfkppHcMf0k7PjOg8IqD3pdLw_2-gwn8cEdYOmEI9zC1S3en6yysxIHEi9ktu52NYpuL9ZpBNUcTZ5VM2RT-sBh6mIqCsFR5pJ78ZP6IoEqtu46/s320/c9.jpg" alt="" id="BLOGGER_PHOTO_ID_5208691367291255106" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.summersdale.com/images/Instant-sunshine.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ktd2R806h9_ZdKF2eDtMFaqNzS94KENS0U4mF-LcCYGiBqdnVFL2LRb-X46pmcezLswG3QHP4kRIypVNYF9KU1odFeVyFbaAFbI963q3skEPtDeYHAiXSULNjrqda459P7r8sD60e7Oy/s320/c20.jpg" alt="" id="BLOGGER_PHOTO_ID_5208691369230297474" border="0" /></a><br /><span style="color: rgb(102, 51, 102);"><br /></span><br /><br /><br /><span style="color: rgb(102, 51, 102);">Time:</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://psdblog.worldbank.org/photos/uncategorized/2007/10/12/time_is_money_3.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL4IikfiuTZmWrQ6xgeEVYk8sbkX7mzhZl7Qb69nAUiejzO23P8otv2dqbU-uTHWm3asN2_O03arHFUABCERGnx64vU1x6bQA4uhap8RF2e7oKo_zTu0wj5GUnIyRlVY1YxnmtUL_n5SXw/s320/c7.jpg" alt="" id="BLOGGER_PHOTO_ID_5208692840350319282" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.geo.ucalgary.ca/%7Emacrae/timescale/time_scale.gif"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdinntPPhbM1J_wNCCSuigsxXySo4kvOhg8B3wsB2i9Xd85Zn6lBVJSolFuuJtQ3oIkQPIYa0sON9ujfSqaG4RQ_jkgN6WJGyDLJt9eO7sJQNlkVsgVbe7U_5pXEZijmWD3rDPukTZHRoa/s320/c9.gif" alt="" id="BLOGGER_PHOTO_ID_5208692839259177490" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.latimes.com/media/photo/2008-06/39510888.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEX78kZvOEWnE-Jdxu8hgBe0_XZLQAWkkIYMMTJ8gB11ZtC4WClIVMPXEVtw-sfz8UsIvQEtB7IfP9km0OidNsoV9XQdBViIbPV3CdRHw0s1vnEMj6Yro_XEk1WiXnawCW_IhbcrrNbSWY/s320/c16.jpg" alt="" id="BLOGGER_PHOTO_ID_5208692839516543346" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img.timeinc.net/time/time100/2007/images/time100landingimage.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTFYjw8xJ7CjHCtRIf6mH_Cgf1ttE2QxSVhVvyh_EMFkFGuL96fXlWTMyQqiu889Q_7LR_o_7gXZEmfirMUQC_R1gM8SXENeZ7QrhqTmj70zSXRjmT9Ag0cKVmQ9cyIeCx-PdGvr1M97YO/s320/c20.jpg" alt="" id="BLOGGER_PHOTO_ID_5208692848702206146" border="0" /></a> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://imgs.xkcd.com/comics/factoring_the_time.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm9x3xgXc-SROiAy4MpMG36maqTr8cZlh4um73ZNHCeaOJTATYI85eAwEGcW5lTjdr_3ZVkDibjQFbklgdYvpBit4leoEs_Im7_CuSY4Xt88zgHp153ya3nO4V43a35tOA2V-71Gj2ZN4i/s320/c21.png" alt="" id="BLOGGER_PHOTO_ID_5208692849506489778" border="0" /></a><br /><br /><br /><br /><br /><span style="color: rgb(102, 51, 102);"><span style="color: rgb(0, 0, 0);">And, finally, on a lighter note, can you believe Google turned up this while searching for <span style="color: rgb(102, 51, 102);">'bubble'</span>?:<br /><br /></span></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgtGByytmGPfIZRhR8fVD9XfSygLA7-jUNOHS-xM6I63F5puwvJuvUnzyhbeAxTxmsfuJDYydVIIXQp1jUKgows9ZED5-wIVOFsJ4cTAl26lLfmZdKllXtVVR1FwkTbKx6jlheTxBcjKvE/s1600-h/c12.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgtGByytmGPfIZRhR8fVD9XfSygLA7-jUNOHS-xM6I63F5puwvJuvUnzyhbeAxTxmsfuJDYydVIIXQp1jUKgows9ZED5-wIVOFsJ4cTAl26lLfmZdKllXtVVR1FwkTbKx6jlheTxBcjKvE/s320/c12.jpg" alt="" id="BLOGGER_PHOTO_ID_5208699788573627122" border="0" /></a>Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com9tag:blogger.com,1999:blog-7503464577047093171.post-89929173154936280762008-04-19T00:10:00.002+05:302008-04-19T00:35:22.334+05:30AlphabotA friend of mine had put a this link up in Google Talk status message:<br /><br /><a href="http://playfreeonlinegames.eu/playonline/typethealphabet.html">http://playfreeonlinegames.eu/playonline/typethealphabet.html</a><br /><br />and his record of 2.84 seconds. In an exhausted state, after having spent a day running after some compatibility issue in some code, my first shot earned me 6.89 seconds.<br /><br />Huh?!<br /><br /><br />Deciding to take matters a wee bit more seriously I decided to ... umm... cheat. I wrote this Java code:<br /><br /><span style="font-style: italic;">import java.awt.AWTException;</span><br /><span style="font-style: italic;">import java.awt.Robot;</span><br /><span style="font-style: italic;">import java.awt.event.KeyEvent;</span><br /><br /><span style="font-style: italic;">public class alphabot {</span><br /><br /><span style="font-style: italic;">public static void main(String[] args) {</span><br /><br /><span style="font-style: italic;">try {</span><br /><br /><span style="font-style: italic;">Robot robot = new Robot();</span><br /><br /><span style="font-style: italic;">robot.delay(5000);</span><br /><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_A);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_B);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_C);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_D);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_E);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_F);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_G);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_H);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_I);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_J);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_K);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_L);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_M);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_N);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_O);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_P);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_Q);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_R);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_S);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_T);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_U);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_V);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_W);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_X);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_Y);</span><br /><span style="font-style: italic;">robot.keyPress(KeyEvent.VK_Z);</span><br /><br /><br /><br /><br /><span style="font-style: italic;">} catch (AWTException e) {</span><br /><span style="font-style: italic;">e.printStackTrace();</span><br /><span style="font-style: italic;">}</span><br /><span style="font-style: italic;">}</span><br /><span style="font-style: italic;">}</span><br /><br /><br /><br />This is an awt robot which can be given the control of your mouse and keyboard. This particular one waits for 5 seconds to let you click or focus your mouse someplace, and then "types" in the letters of the English alphabet.<br /><br />I compiled it and ran it (as such things go), and before my 5 seconds were up, went to the Webpage to click on 'a' and wait. And , lo! 0.03 secs. Not bad at all ...<br /><br /><br />This is where I should have ideally finished my post and not written this statement and the few that follow it had I not remembered a puzzle I recently read:<br /><br />Place 50 balls in 9 boxes so that each box contains an odd number of balls.<br /><br />At first glance this seems impossible since the sum of an odd number of odd integers cannot be even. Its, however, achievable if you place a box inside another. Talk about a puzzle that forces you to think outside the box to only lead you back to inside one.<br /><br />Yawn!Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com3tag:blogger.com,1999:blog-7503464577047093171.post-55825111903238392682008-03-11T06:28:00.002+05:302008-03-11T06:34:05.976+05:30Binary Sudoku<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirmVAGlZr_RYeesO3ox-DKsNGplJcUnNmGnr4H8oYZdn81e1IDDgEMMIb6bIaya41yl9421ZfR7ztaN4Mh6Q2t2EO39eAhERGM2vEEBtF8J9rdaRrvCqNcXgbcBLifYGb3-wnO8f-ouzog/s1600-h/su_doku.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirmVAGlZr_RYeesO3ox-DKsNGplJcUnNmGnr4H8oYZdn81e1IDDgEMMIb6bIaya41yl9421ZfR7ztaN4Mh6Q2t2EO39eAhERGM2vEEBtF8J9rdaRrvCqNcXgbcBLifYGb3-wnO8f-ouzog/s320/su_doku.jpg" alt="" id="BLOGGER_PHOTO_ID_5176283183042102850" border="0" /></a><br />After a busy day, while I was way into a hectic night , I came across this. I really was in no mood to be humored, but then I looked away and chuckled. Hilarious!<br /><br /><br />(The above pic is from http://xkcd.com/74/)Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com2tag:blogger.com,1999:blog-7503464577047093171.post-22545457138828655662008-01-21T07:56:00.002+05:302012-08-20T17:40:29.733+05:30CoffeeproofCoffee doesn't affect me anymore - this is not a recent discovery, of course, but people around me who are discovering it find it very surprising - and I find <span style="font-weight: bold; font-style: italic;">that</span> amusing. So when I drink coffee these days its more like a force of habit (when its 'normal' coffee) or a whim of indulgence (if you happen to spot me in a Barista/Cafe Coffe Day/Qwiky) - <span style="font-weight: bold; font-style: italic;">never</span>, anymore to stay up in the nights, since I can make it to the deep slumber zone after a mega mug with consistent success, in a couple of minutes flat, effectively competing with the well advertised 2-minute Maggi preparation time. Thats a hard earned skill too - came about after repetitive coffee hogging many times a day when I was working as a software developer, or the many times a week outside my office when I would walk into one of those coffee outlets with a novel in my hand, in a pitted battle against ennui clawing at my life.<br /><br /> And so there was this time, when one of my roomies was leaving for good, and we decided to stay awake and chat till late in the night - and they decided that downing a few dregs of the strongest coffee would facilitate that (I was smirking inwardly). So we go to a Cafe Coffee Day, we return, and while they begin their anticipated chat session, I leave them to gape at me as my lights go out almost instantaneously after I lie down for a while. <!--Imagine a handful of friends sitting around in a group to begin a conversation that was apparently waiting to be joined by someone who had suddenly decided to change into a log. What were they thinking?! --><br /><br />And while I am here about coffee, heres a Turkish proverb in context:<br /><br />"Coffee should be black as hell, strong as death and sweet as<br />love."<br /><br />(Not that even that would work for me ... )Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com3tag:blogger.com,1999:blog-7503464577047093171.post-14132272779656054722007-06-25T16:59:00.000+05:302007-09-16T00:57:46.919+05:30Jonathan Strange and Mr. Norrell (quotes)I recently had the oppurtunity to read the novel "Jonathan Strange and Mr. Norrell" by Susanna Clarke. The favorable reviews and the fact that this won the Mythopoeic Fantasy Award (for Adult Literature) apart, I decided to read it because I just cannot keep off fantasy books - talk of sorcery, magic, swords and dragons, and I am in. Another old habit that would die hard, if at all.<br /><br />Susanna Clarke chooses a style of writing thats in line with the backdrop of the book : the novel is set in the England of 1800, and is about the attempts of two magicians to restore English magic to its former glory. Small surprise then that "old" period English is used- with words like Shewed (showed), Stopt (stopped), Scissars (scissors), Expence (expense), Headach (headache) making a liberal presence.<br /><br />Much of the novel carries itself at a leisurely pace, punctuated with a fair share of thrilling moments. The author has a gift of prose that stands to her advantage in a novel like this, serving to create a much needed atmosphere of casual magic. And, of course, there are places where Clarke’s prose additionally decorates the story, bringing to life the parts that are meant to stand out.<br /><br />Some of my most memorable lines from the novel are:<br /><br />(1)<br />Childermass was one of those uncomfortable class of men whose birth is lowly and who are destined all their lives to serve their betters, but whose clever brains and quick abilities make them wish for recognition and rewards far beyond their reach. Sometimes, by some strange combination of happy circumstances, these men find their own path to greatness, but more often the thought of what might have been turns them sour; they become unwilling servants and perform their tasks no better - or worse – than their less able fellows. They become insolent, lose their places and end badly.<br /><br />(2)<br />After two hours it stopped raining and in the same moment the spell broke, which Peroquet and the Admiral and Captain Jumeau knew by a curious twist of their senses, as if they had tasted a string quartet, or been, for a moment, deafened by the sight of colour blue.<br /><br />(3)<br />She was always very ready to smile and, since a smile is the most becoming ornament that any lady can wear, she had been known on occasion to outshine women who were acknowledged beauties in three counties.<br /><br />(4)<br />Under other circumstances she would have been puzzled to know what to say to a man of the world like Jonathan Strange, but happily his father had just died and that provided a subject.<br /><br />(5)<br />“Can a magician kill a man by magic?” Lord Wellington asked Strange. Strange frowned. He seemed to dislike the question. “I suppose a magician might,” he admitted, “but a gentleman never could.”<br /><br />(6)<br />“All of Man’s works, all his cities, all his empires, all his monuments will one day crumble to dust. Even the houses of my own dear readers must – though it be for just one day, one hour – be ruined and become houses where the stones are mortared with moonlight, windowed with starlight and furnished with the dusty wind. It is said in that day, in that hour, our houses will become possessions of the Raven King…”<br /><br />(7)<br />“… I am rather of the opinion that in England a gentleman’s dreams are his own private concern. I fancy there is a law to that effect and, if there is not, why, Parliament should certainly be made to pass one immediately! It ill becomes another man to invite himself into them.”<br /><br />(8)<br />“… Soldiers, I am sorry to say, steal everything.” He thought for a moment and then added, “Or at least ours do.”<br /><br />(9)<br />“… The French mayn’t pass here. Why, sir! A beetle mayn’t pass unless that beetle has a paper with Lord Wellington’s writing on it!...”<br /><br />(10)<br />But from the first moment of his entering the house Strange found himself subject to that peculiarly uncomfortable Natural Law which states that whenever a person arrives at a place where he is not known, then wherever he stands he is sure to be in the way.<br /><br />(11)<br />“My admiration does not lessen my hatred one whit!”<br /><br />(12)<br />“Well, I suppose one ought not to employ a magician and then complain that he does not behave like other people,” said Wellington.<br /><br />(13)<br />“Dear God!!” cried Fitzroy Somerset, “What language is that?”<br />“I believe it is one of the dialects of Hell,” said Strange.<br />“Is it indeed?” said Somerset. “Well, that is remarkable.”<br />“They have learnt it very quickly,” said Lord Wellington, “They have been dead only three days.” He approved of people doing things promptly and in a businesslike fashion.<br /><br />(14)<br /><em>All magicians lie and this one more than most</em>, Vinculus had said.<br /><br />(15)<br />“Means?” said Stephen. “That is an odd word to use. Yet it is true – skin can mean a great deal. Mine means that any man can strike me in a public place and never fear the consequences. It means that my friends do not always like to be seen with me in the street. It means that no matter how many books I read, or languages I master, I will never be anything but a curiosity – like a talking pig or a mathematical horse.”<br /><br />(16)<br />“It is these black clothes,” said Strange. “I am like a leftover piece of funeral, condemned to walk about the Town, frightening people into thinking of their own mortality.”<br /><br />(17)<br />Most of us are naturally inclined to struggle against the restrictions our friends and family impose upon us, but if we are so unfortunate as to lose a loved one, what a difference then! Then the restriction becomes a sacred trust.<br /><br />(18)<br />“We will know them as we know other men,” he declared, “by the fruits they bear.”<br /><br />(19)<br />The sunlight was cold and clear as the note struck by a knife on a fine wine-glass.<br /><br />(20)<br />Though all the houses of Venice are strange and old, those of the Ghetto seemed particularly so – as if queerness and ancientness were two of the commodities this mercantile people dealt in and they had constructed their houses out of them. Though all streets of Venice are melancholy, these streets had a melancholy that was quite distinct – as if Jewish sadness and Gentile sadness were made up according to different recipes.<br /><br />(21)<br />“…With the ashes that were her screams and the pearls that were her bones and the counterpane that was her gown and the magical essence of her kiss, I was able to divine your name - …”<br /><br />(22)<br />These are the customary three elements of a traditional English summoning spell. The envoy finds the person summoned, the path brings him to the summoner and the handsel (or gift) binds him to come. (<em>I like this one because this represents sound communication principles :) - AG</em>)<br /><br />(23)<br />The ashes, the pearls, the counterpane and the kiss.<br /><br /><br /><br />Of these, the last one – “Ashes, Pearls, the Counterpane and the Kiss”- appeals to me the most. This is the title of a chapter in the book. In which, the Elf-king of the Kingdom Of Lost Hope proudly regales Stephen (a character whom the Elf King admires a lot) with an account of his investigations carried out to find out Stephens' original name . The King is a misanthrope, and Stephen discovers much to his horror, but sadly not to his surprise, that the kings' quest, funded with his hatred for mankind, has woven a wake of innocent deaths.<br /><br />A cursory glance at the words, hint at a romantic allusion ( or at any rate a positive/beautiful feeling), but a moment's thought sets them into their proper context and brings to mind the deaths so casually scribed by their speaker. Apparently for his <em><strong>love</strong></em> (of Stephen): a cause much ill justified for the price it has entailed. In effect, to me,they are almost like a painfully beautiful picture on a wall that hides an ugly gash underneath. Or like a simulacrum of the many contrasts of life itself.Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com15tag:blogger.com,1999:blog-7503464577047093171.post-86845188765825787792007-06-07T10:05:00.001+05:302007-06-08T07:27:30.973+05:30Thoughts during coffeeI am thinking these thoughts as I have my coffee in the office canteen on an evening. Incomplete thoughts that stay but a moment (and give me enough reason to post) :<br /><br />(1) The news declares that inflation is down at 5.06%. I start thinking of things that have usually been known (or are expected) to show an upward trend. Inflation? No. Population... hmm..probably in India. Entropy/chaos - yes. Entropy seems such an intangible concept. I wonder whether it can be correlated to a "materialistic" quantity. Say, if I land upon earth 500 years hence, would I be able to remark that the entropy of the universe has increased by<br />k.(p)^α , where p = population of the SomeCountry ??<br /><br />We know that entropy increases. Does the rate of its increase increase? How about the rate of rate of rate its increase? Does the universe have a limit to the number of times you can say "rate of " before the final "rate" becomes a constant?<br /><br />Interesting question thats pops up in my mind - suppose I had 'x' number of men and 'x' number of women to start with. And I mandate that every couple has one child. I also assume that the society is monoandrous and monogamous. So the next generation has x/2 people, the next has x/4 ... and the population dies out eventually? Why would some governments want that - ha!<br /><br />(2) The last few days have been easy for me (at office)<br /><br />(3) The furniture, the lighting around, the various counters in the canteen are not unlike other canteens/joints that I see these days. Things have become so impersonally utilatirian that it is difficult to note the "personality" of something expressed in its existence. Like the Irani coffeehouses in Mumbai. One CCD (cafe Coffee Day) outlet is same as others. Good or bad?<br /><br />(4) The canteen used to have an interesting arrangement of water coolers previously. By a wall, they had a table on which fresh glasses were placed. A water cooler sat to its right. Another water cooler sat to the right of the first one. And finally, we had another table with fresh glasses placed on it. The arrangement may be pictured as below:<br /><br />1st table with glasses -- water cooler -- water cooler -- 2nd table with glasses<br /><br />I had often wondered whther I could roughly estimate the no. of left handed people in the office by counting the glasses used from the first table. But, then there would be so much 'noise' in the (hypothetical) experiment:<br />(a) Used glasses are replaced with fresh ones periodically<br />(b) During peak hours people choose to drink from a particular cooler based on the queue in<br />front of it.<br />(c) I dont know whether everyone comes to the canteen for food<br /><br />(5) <a href="http://en.wikipedia.org/wiki/Mamihlapinatapai">Mamihlapinatapai</a>- beautiful Yaghan word, meaning<br /><br /><em>"a look shared by two people with each wishing that the other will initiate something that both desire but which neither one wants to start "</em><br /><em></em><br />I wonder how they missed out on it in English - a commonplace phenomenon (and a practical example of deadlocks).<br />Interesting the Yaghan language is considered to be a 'language isolate' i.e. a language which hasn't been proved to have descended from any other.<br /><br />(6) Amruth and I were chatting the other day. I told him that 'Mamihlapinatapai', 'chathuringmes', 'Jabberwocky' were 3 unusual words that I had come across in the most unexpected of sources.<br /><br />(7) Read the following lines:<br /><br /><em>You are the fairest of your sex,</em><br /><em>Let me be your hero;</em><br /><em>I love you as much as 1 over x,</em><br /><em>As x tends to zero.</em><br /><em>Positively.</em><br /><em></em><br />The last word postively takes the cake...<br /><br /><br />End of coffee.Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com6tag:blogger.com,1999:blog-7503464577047093171.post-26869572206182901292007-03-05T19:12:00.000+05:302007-06-08T07:08:48.388+05:30Orkut friends list – a few thoughts<b><u><?xml:namespace prefix = o /><o:p></o:p></u></b> <p class="MsoNormal" style="font-family:trebuchet ms;">The orkut phenomenon has really caught on with the number of its users reaching a whopping 45 million. The other day, Tanmay said its an innovation in communication (or did he say a new communication technology?) – that might be stretching it a bit too far, but then again, for an application with 45 million users I couldn’t dare to disagree (at least not there and then- but I might return with an interesting argument later <span style="font-size:0;">:-) </span>, the clichéd argumentative Indian that I am...).</p><p class="MsoNormal" style="FONT-FAMILY: trebuchet ms"><o:p></o:p></p><p class="MsoNormal" style="FONT-FAMILY: trebuchet ms">Orkut represents an interesting aspect of the general “ambivertedness” of the human nature. Standing right in the middle of our desire of privacy in communication (which e-mail services provide us with – if I mail a person A, nobody else needs to know about that) and our desire for recognition. Orkut is an in-between since (a) you usually do not expect a complete stranger to scrap you (for the ladies- I used the word <b>usually</b>) – so there IS some<span style="font-size:0;"> </span>amount<span style="font-size:0;"> </span>of privacy (b) if an acquaintance happens to drop by, you want a uber-chic profile – the desire for recognition. Also you don’t mind a friend reading the scraps written to you by another friend.</p><p class="MsoNormal" style="FONT-FAMILY: trebuchet ms"><o:p></o:p></p><p class="MsoNormal" style="FONT-FAMILY: trebuchet ms">The friends-list is a source for some interesting ideas. But to talk about things in a precise way lets talk about <b>graphs</b> first. (You can skip this paragraph if you know what they are). All we need to know for now is that a graph is a diagram like this:<br /><br /></p><p class="MsoNormal" style="FONT-FAMILY: trebuchet ms"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_TyfiqsHaAkl3tuZpO2iynj3MAqXAKG_LIzyHseciUj7xnIoTOzBTFdHi1CGNMPU0Qj8quy91wwx3Y-7VvQT0zT9ecPb17eVbMx4bzXMLxJvjYBEi_I5mTHaboAWixbinVLca0JomL379/s1600-h/gr1.JPG"><img id="BLOGGER_PHOTO_ID_5038436166020838018" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_TyfiqsHaAkl3tuZpO2iynj3MAqXAKG_LIzyHseciUj7xnIoTOzBTFdHi1CGNMPU0Qj8quy91wwx3Y-7VvQT0zT9ecPb17eVbMx4bzXMLxJvjYBEi_I5mTHaboAWixbinVLca0JomL379/s320/gr1.JPG" border="0" /></a> </p><p class="MsoNormal">Dots and lines. Graphs are of profound importance in mathematics since a lot of situations can be modeled as graphs (let the dots be cities, the lines be roads – so the above diagram can be believed to represent cities and the interconnecting roads etc.), and any theorem that’s true for the graphs can be carried to the original situations to gain deeper insight. We will call the dots and lines, <b>nodes </b>and <b>edges </b>respectively. Also, we say a graph is connected if you can find a path of lines/edges b<span style="font-family:trebuchet ms;">etw</span>een any two nodes. The above graph is connected. The following one isn’t:</p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx5CxdlMwebQZkq6MuIsfIm0Vw5mP7Y6JvZAxsPSFNjCcveO7XIzPIzhcgexZ8h3NUSx5ai3mJhS07xcjKFfjwMVW3IP65foZPKg78sKxTol0vXbrchhsdTwdbl615Q89Nb2n5c_jBAmEG/s1600-h/gr2.JPG"><img id="BLOGGER_PHOTO_ID_5038437029309264530" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx5CxdlMwebQZkq6MuIsfIm0Vw5mP7Y6JvZAxsPSFNjCcveO7XIzPIzhcgexZ8h3NUSx5ai3mJhS07xcjKFfjwMVW3IP65foZPKg78sKxTol0vXbrchhsdTwdbl615Q89Nb2n5c_jBAmEG/s320/gr2.JPG" border="0" /></a> <p class="MsoNormal" style="FONT-FAMILY: trebuchet ms"></p><p class="MsoNormal">since there is no path between b and a.</p><p class="MsoNormal"><o:p></o:p></p><p class="MsoNormal">Back to orkut now. The friends list can be modeled as a graph with nodes being people and the edges (though they do not exist materially) as “friendships”. We will call this graph the “friend-graph”.</p><p class="MsoNormal"><span style="font-size:0;"></span></p><p class="MsoNormal">Thoughts on the friend-graph:</p><p class="MsoNormal"><o:p></o:p></p><p class="MsoNormal" style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"><span style="font-size:78%;">[1] </span>Orkut claims that you are connected to 45 million people (you see this message when you log in). Connected means if you pick up any 2 people amongst the users, you will always be able to find a chain of friends between them (or, a path in the friend-graph), right? Now 45 million is a big number and I was not too sure that all the users are connected. So I created a second profile only to have orkut claim that I <b><i>was connected to 45 million people through 0 friends</i></b>. Clearly not true – I was expecting to be told that I was connected to zero people. Or rather, let me put it in this way: orkuts’ definition of <i>connectedness </i>is not the same as ours. What Orkut means is you are <b><i>potentially</i></b> connected to 45 million users. </p><p class="MsoNormal" style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"><span style="font-size:78%;">[2]</span>Someone mentioned that friends list is a <b>tree</b>. Its not. A tree is a special kind of graph that looks like this:</p><p class="MsoNormal"><?xml:namespace prefix = v /><v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" preferrelative="t" spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"><v:f eqn="sum @0 1 0"><v:f eqn="sum 0 0 @1"><v:f eqn="prod @2 1 2"><v:f eqn="prod @3 21600 pixelWidth"><v:f eqn="prod @3 21600 pixelHeight"><v:f eqn="sum @0 0 1"><v:f eqn="prod @6 1 2"><v:f eqn="prod @7 21600 pixelWidth"><v:f eqn="sum @8 21600 0"><v:f eqn="prod @7 21600 pixelHeight"><v:path connecttype="rect" gradientshapeok="t" extrusionok="f"><v:shape id="_x0000_i1025" type="#_x0000_t75"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk2HMiU1SxDySjAYyy3QgoONFPIHgt6cmr6R6mnvEusIwhxwT4j2dnnV1elNpl1cEtQz13YmLZbNHMioRpCXqf4_lmFKknyzw2TpbVDa748o3JTIiKSzFr9aOYSR22wDURvKI84ZCP_b71/s1600-h/gr3.JPG"><img id="BLOGGER_PHOTO_ID_5038437609129849506" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: pointer; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk2HMiU1SxDySjAYyy3QgoONFPIHgt6cmr6R6mnvEusIwhxwT4j2dnnV1elNpl1cEtQz13YmLZbNHMioRpCXqf4_lmFKknyzw2TpbVDa748o3JTIiKSzFr9aOYSR22wDURvKI84ZCP_b71/s320/gr3.JPG" border="0" /></a></v:shape></v:path></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas></v:stroke></v:shapetype></p><p class="MsoNormal">It’s precisely defined as a graph that doesn’t have circuits (circuit is a path that leads to the starting point). Orkut has circuits. Noticed that “common friends” list when you visit a profile (say a friend named <b>x</b>)- which is supposed to show the friends that are common to the profile and you? Let’s assume a common friend is <b>y</b>. Visualize the orkut friend-graph now – there is an edge between you and <b>x</b>. And there is path with the edges: you-><b>y</b>, <b>y</b> -> <b>x</b> (since <b>y</b> is friend of <b>x</b> too). So we have the circuit: you-><b>x</b>-><b>y</b>->you. Thus the orkut friends list is definitely not a tree.</p><p class="MsoNormal"><o:p></o:p></p><p class="MsoNormal" style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"><span style="font-size:0;"><span style="font-size:0;">[3] </span></span>The friend graph is also a dynamic graph i.e. one in which the number of nodes change (new users, deleted profiles) and the number of edges change (new friends)</p><p class="MsoNormal" style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"><span style="font-size:0;"><span style="font-size:0;">[4] </span></span>When a new user registers, the count of the total number of users does not go up immediately. Orkut changes the count periodically, not immediately.</p><p class="MsoNormal" style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"><span style="font-size:0;"><span style="font-size:0;">[5] </span></span>It would be interesting to know how many people you are really connected to, through chains of friends i.e. the number of nodes in he connected component of the graph you are a part of. But orkut doesn’t disclose this data :(</p><p class="MsoNormal" style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"><span style="font-size:0;"><span style="font-size:0;">[6] </span></span>I think it would be quite interesting to find out what is the minimum number of those crucial profiles in your connected component, which if deleted, breaks the component into two disconnected parts (and do what?)</p><p class="MsoNormal" style="FONT-FAMILY: trebuchet ms"></p><p class="MsoNormal" style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"><span style="font-size:0;"><span style="font-size:0;">[7] </span></span>Anyone for finding out the <a href="http://en.wikipedia.org/wiki/Six_degrees_of_separation"><b>degrees of separation</b></a>? The famous Milgram experiment claimed that any 2 people in the <?xml:namespace prefix = st1 /><st1:country-region><st1:place>US</st1:place></st1:country-region> are separated by six acquaintances in general. That was in 1967. I would love to know what the average dergree of separation on Orkut is.</p><p></p><p></p><p></p><p></p><p><em><span style="color:#993399;"></span></em></p><p><em><span style="color:#993399;"></span></em></p><p><em><span style="color:#993399;"></span></em></p><p><em><span style="color:#993399;"></span></em></p><p><em><span style="color:#993399;"></span></em></p><p><em><span style="color:#993399;"></span></em></p><p><em><span style="color:#993399;"></span></em></p><p><em><span style="color:#993399;"></span></em></p><p><em><span style="color:#993399;">[Gaurav said he wanted something more from the article. Hence this message to the non-geeks : ignore this paragraph and the following one. </span></em></p><p><em><span style="color:#993399;"><br />Parankush and I were actually planning to find out the degrees of separation on Orkut. The quick and dirty implementation plan was to use a <a href="http://en.wikipedia.org/wiki/Screen_scraping">screen-scraping</a> package like <a href="http://www.perl.com/pub/a/2003/01/22/mechanize.html">PERL Mechanize</a>, scrape all the friend-graph related data onto the local disk, and then do whatever we wish to do with the data ( like boast about it, run algos to find out the minimal cut-sets, the average degree of separation etc etc). Some <strong>interesting challenges</strong> were <strong>(a) we would need a way to merge findings from my program and his (since we were planning to run the codes over our machines, separately, and we didn’t want redundant work. (b) savepoints: to protect ourselves against power failures, and proxy server downtimes we needed a way to commit a savepoint periodically (or, detect when the laptop switches to the battery backup, so that a save point is registered automatically then) (c) how do we pack such a volume of data on our hard drives </strong>. The biggest problem however was <strong>time</strong> : we had absolutely no idea how long we would have to run our codes (days? Weeks?) to scrape all the data using our not-so-reliable net connections and other interrupting factors. Larger the amount of time required to run the algos, more a dynamic graph changes – a fact which prompted Parankush to ask me the Tao of all questions: “<strong>Why</strong> are <strong>we</strong> doing this?” As a reply to which we retired to our monotonous lives.]</span></em></p><p><span style="color:#993399;"></span></p><p><span style="color:#993399;"></span></p><p><br /><v:stroke joinstyle="miter"><v:f eqn="if lineDrawn pixelLineWidth 0"><v:f eqn="sum @0 1 0"><v:f eqn="sum 0 0 @1"><v:f eqn="prod @2 1 2"><v:f eqn="prod @3 21600 pixelWidth"><v:f eqn="prod @3 21600 pixelHeight"><v:f eqn="sum @0 0 1"><v:f eqn="prod @6 1 2"><v:f eqn="prod @7 21600 pixelWidth"><v:f eqn="sum @8 21600 0"><v:f eqn="prod @7 21600 pixelHeight"><v:f eqn="sum @10 21600 0"><v:path connecttype="rect" gradientshapeok="t" extrusionok="f"><o:lock aspectratio="t" ext="edit"><v:imagedata title="" src="file:///D:%5CDOCUME%7E1%5CUser%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C06%5Cclip_image001.gif"></v:imagedata></o:lock></v:path></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:stroke></p>Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com14tag:blogger.com,1999:blog-7503464577047093171.post-83855496112848282452007-02-27T01:17:00.000+05:302007-02-27T01:21:32.970+05:30Lines from The Rubaiyat<span style="font-family:arial;">Some of my favouite lines. From the Rubaiyat:</span><br /><em><span style="font-family:arial;"></span></em><br /><em><span style="font-family:arial;"></span></em><br /><em><span style="font-family:arial;">We are no other than a moving row</span></em><br /><em><span style="font-family:arial;">Of Magic Shadow-shapes that come and go</span></em><br /><em><span style="font-family:arial;">Round with the Sun-illumined Lantern held</span></em><br /><em><span style="font-family:arial;">In Midnight by the Master of the Show;</span></em><br /><em><span style="font-family:arial;"></span></em><br /><em><span style="font-family:arial;">But helpless Pieces of the Game He plays</span></em><br /><em><span style="font-family:arial;">Upon this Chequer-board of Nights and Days;</span></em><br /><em><span style="font-family:arial;">Hither and thither moves, and checks, and slays,</span></em><br /><span style="font-family:arial;"><em>And one by one back in the Closet lays.<br /></em> </span><br /><span style="font-family:arial;"> --- Omar Khayyam, The Rubaiyat</span>Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com2tag:blogger.com,1999:blog-7503464577047093171.post-16526420986904207442007-02-27T00:48:00.001+05:302009-05-10T04:07:12.505+05:30Return of the Commandline<span style="font-family:trebuchet ms;"><span style="color: rgb(0, 0, 0);">Here is a search phrase Google accepts:<br /></span><br /></span><span style="font-family:trebuchet ms;"><span style="color: rgb(0, 0, 0);">intext:(google+recruitment+india) intext:(bangalore) filetype:html<br /></span><br /></span><span style="font-family:trebuchet ms;"><span style="color: rgb(0, 0, 0);">This translates to the following more readable form:<br />“Find pages containing the words <strong>Google, recruitment, India</strong> in their texts. From amongst these, find the ones that contain the word <strong>Bangalore</strong>. Finally, from amongst these, get me the pages of type <strong>html</strong>.”<br /><br />Though complicated, the above phrase achieves quite a lot in a few words, much like the command line statements UNIX users are accustomed to. In the years before the Graphical User Interfaces (GUI) flooded the software market, this was all we had – plain command lines. With the likes of Google and quite a few other applications encouraging them again (another notable example is <a href="http://yubnub.org/">yubnub.org</a>) it suddenly seems the command line is slated for a comeback.<br /><br />GUIs, undoubtedly, have been the dominant form of interface for quite a while. Their greatest advantage is their ease of use over command lines. They are not only easy to learn, but if you have worked on one GUI, you would probably figure out the nuts and bolts of another quite easily. On the other hand, to use command lines efficiently you would require prior knowledge of (probably complicated and cryptic) commands (we are talking a serious learning curve here), with a relatively weaker guarantee that two command line interfaces are going to be similar. Yet, the enormous power of manipulation they offer, make them a formidable contemporary of the GUI and a favorite of developers/administrators (and something that Google hackers swear by).<br /><br />Fundamentally, what GUIs do is tell users what commands to the system are relevant in the current <strong>context</strong> of work (apart from <em>graphically displaying</em> the context). For example, if you are on your windows desktop, and right click the mouse, the GUI lists the commands that are relevant here (e.g.”Refresh”, “Arrange Icons”, ”New” etc.). When you are reading a MS-Word document, the GUI now presents the user a host of options to choose from (File related options:”Open”, “Save As” etc. Help related options: “Check For Updates” etc.). And when you right click your mouse over an open ms-word document, the GUI does not list the “Arrange Icons” command this time; It believes that the command is <em>irrelevant in the particular context</em>. Thus a GUI: </span></span><br /><span style="font-family:trebuchet ms;"><span style="color: rgb(0, 0, 0);"><br />(1) is all about clearly defining a context, with a set of user friendly commands (and the user does not need </span><br /><span style="color: rgb(0, 0, 0);">to know the </span></span><span style="color: rgb(0, 0, 0);font-family:trebuchet ms;" >exact syntax of these commands beforehand)<br />(2)allows the user to execute a command without actually having him type it in – the command is already out<br /></span><span style="font-family:trebuchet ms;"><span style="color: rgb(0, 0, 0);">there, on the screen – an effortless mouse click is all that’s needed to execute it. So, life’s good.<br /><br />It is interesting to think about whether a command line interface also defines a context. Its very hard to see how, when all you <strong>can</strong> see is a prompt. What I am driving at is that GUI was probably the first widely popular paradigm that introduced (or at least popularized) the idea of clearly defining contexts. Of course, we take it for granted now. A command line interface is not <em>bound</em> to a context, and thus, in this sense is <em>freer</em>. It has a no-nonsense attitude that basically says you get what you type (and if you mess up, you got what you deserved!).<br /><br />There are some drawbacks to GUIs though. <strong><em>Scalability</em></strong> is a big one: a GUI is good when we have a small number of commands that you can allow the user to choose from. Bigger the number, more cumbersome the GUI becomes, till a point when you realize that probably a command line substitute might be neater. The nature of this challenge can be guessed when one thinks of implementing the Google search phrase above with a GUI (and, this isn’t just about one search phrase, but the family of such phrases that is accepted by Google).<br /><br />To take another example lets look at the following situation and decide whether it would be wiser to opt for a GUI as against a commandline: I subscribe to a particular newsletter (via mail). Since I haven’t checked my mails for the past few days, and I plan to store the contents of the newsletters I have received in the period, on my local disk, I would have to mechanically sift through these mails (after I have searched them and got them listed), open each of them and copy the contents onto a local file. And to crown it all, if I am using a trickle-down dial-up connection, this job can be quite exacting in terms of time, money and patience. I don't need much convincing here to realise that this is where I would be right at home with a good command line interface that I can put inside a 'code' or 'pipe' or manipulate somehow (or, if this is something that I do regularly, I might even consider writing a screen-scraping script for it – anything to not depend on the GUI. Of course, we might have a GUI to do this for us, but then that would be a different GUI, with a specialized functions, which only stands on the side of my argument).<br /><br />Apart from the problem of scalability, the commands displayed by a GUI <strong><em>cannot be used as elements to build “bigger” commands</em></strong> or commands with more functionality (okay, there are macros, but they are more like sequentially defining actions –more on that in a while). That’s to say, the commands cannot be combined together, which restricts a user to the set of commands already provided. Contrast this with the freedom a UNIX shell (the command line interface) provides. Ideas like <em>piping</em> (streaming the output of one command to the input of another – much like the two “intext” criteria that we have used in the sample search phrase above, where the output pages of the first “intext” criterion is considered as input to the second) and <em>command substitution</em> (plugging the command output into another context) remarkably expand the scope of functionalities of existing commands . And what’s more is users can have these commands sequentially executed by listing them in a script – without any intervention needed (returning to macros again, they come close to this behavior, but there’s a lot they cannot do. For example, they usually work <em>within</em> an application, can’t be made to handle errors easily, etc.). Then there's the question of exercising your creativity too - piping/command substitution let you 'create' your versions of a solution to a problem, in a trouble-free way - which, I feel, adds to the <strong><em>excitement</em></strong> of using them.<br /><br /><br />Summing it up, the GUI as an innovative interface medium has certainly more than fared well. But the GUI revolution has been here for some time and now that we have toyed with it enough to discover its not-so convenient aspects, its probably time we analyzed the command line (again) for its strengths and look for a more promising interface (which proabbly would be the right combination of the two?).<br /><br /><strong>P.S.: </strong><br /><br />(a)There are a few other factors GUIs and command lines maybe compared with respect to. Some are: </span><br /></span><span style="color: rgb(0, 0, 0);"><br /><span style="font-family:trebuchet ms;"><em>(1) Resource intensiveness</em>: A command line is not as resource intensive (in terms of memory) as </span></span><br /><span style="font-family:trebuchet ms;"><span style="color: rgb(0, 0, 0);">a GUI.<br /><em>(2) Better Control of OS</em>: Someone who has worked with both the Linux command line and its GUI </span><br /><span style="color: rgb(0, 0, 0);">will tell you </span></span><span style="font-family:trebuchet ms;"><span style="color: rgb(0, 0, 0);">that command line provides better control of the OS.<br /><em>(3) Multitasking:</em> Both command lines and GUIs can multitask. But GUIs enable surprisingly easy </span><br /><span style="color: rgb(0, 0, 0);">monitoring of the tasks (Your web browser is downloading a file, while you are happily typing </span><br /></span><span style="color: rgb(0, 0, 0);font-family:trebuchet ms;" >away into your blog listening<br /></span><span style="color: rgb(0, 0, 0);font-family:trebuchet ms;" >to your favorite band playing – and the great part is you can see all of this happening.)<br /><br />My thoughts in the post are primarily motivated by the usability of an interface.<br /><br /><br />(b) For those interested, </span><a href="http://www.jnd.org/dn.mss/ui_breakthroughcomma.html"><span style="color: rgb(0, 0, 0);font-family:trebuchet ms;" >here’s </span></a><span style="color: rgb(0, 0, 0);"><span style="font-family:trebuchet ms;">another article on command line vs. GUIs. This article mentions a project called Enso at <a href="http://www.humanized.com/">www.humanized.com</a>, that aims at integrating a command line to your GUI. That is really putting it very vaguely and to do full justice to the wonderful project you must watch their demo video on the home page. Enso is trying to blur the lines between contexts in a GUI – rather, it tries to define a super-context, that’s a bit of both command line and GUI.<br /><br />(c) A small aside: are tools making us dumber? An interesting post </span><a href="http://headrush.typepad.com/creating_passionate_users/2007/02/its_lunchtime_a.html"><span style="font-family:trebuchet ms;">here</span></a><span style="font-family:trebuchet ms;">.<br />(d) I recently came across <a href="http://ignorethecode.net/blog/2009/04/22/oberon/">this</a> - a desktop UI system called Oberon - quite interesting to look at since it seems to have taken an evolution path different from most contemporary systems.<br /></span></span>Abhishek Ghosehttp://www.blogger.com/profile/08292266411977471454noreply@blogger.com2