Purity of Mathematics
My friend, Abhishek has put up a series of posts which describes various branches of Mathematics (Applied Mathematics, Pure Mathematics). Some of you may not be able to read them as they are in hindi.
Reading these I remembered a similar post on xkcd comparing purity of various field (branches)

I’ll agree with it but comic misses the Applied Mathematics, which i think will have application in the whole spectrum of various branches mentioned by comics. On the other side Pure mathematics is purely based on reason, ignoring its usability.
Mathematicians have always had differing opinions regarding the distinction between pure and applied mathematics. One of the most famous (but perhaps misunderstood) modern examples of this debate can be found in G.H. Hardy’s A Mathematician’s Apology.
Applied mathematics sought to express physical truth in a mathematical framework, whereas pure mathematics expressed truths that were independent of the physical world.
Yahoo search is improving
Earlier I wrote about Sometimes yahoo is better is better than google in providing search results when I was searching for Installing latex on hostmonster. And now with its open search platform SearchMonkey its trying to close in to Google. SearchMonkey allows you to create data services to built search apps that can enhance your search results.

Yahoo search gallery provides you many existing search enhancements that you can add after logging to yahoo. [Via labnol.org].Try various enhancement like LinkedIn Profile, IMDB results, StumbleUpon Reviews and other popular ones.
And you can also create your own search enhancement using step by step method using Presentation application (SearchMonkey Guide).
SearchMonkey API unables you to modify how particular links appears in search results. You can add images, related links and other html formatting but it does not unable you change position of a page in search result. I was unable to find feature which will enable us to filter sites which requires you to login or sites like ebay and amazon which may not be relevant to us by making their appearance farther in search results.
But still these enhancements provides you little summary of search results which is very useful like in case of movie reviews, people profile via linkedIn, stock information etc thus sometimes making opening the actual webpage unnecessary.
Puzzle puzzle every where
Past few weeks have been puzzle/problem solving weeks, which includes 4 google treasure hunt problems. (Robot in a Maze, Puzzle 2 (getting lines from specific files in zip archive), Network routing table and last one:Prime numbers ). Solving these was fun.
puzzle
Two days back my friend shared this (Galton’s Paradox) on Google reader (My Google reader shared Items). Try explaining it
not that difficult though.
But what drew my attention again? Yesterday I was watching 21 movie, Its based on real story of six MIT students cashed in millions in Vegas Casinos by counting cards. Here comes the puzzle, In a classroom scene Prof Micky asks one of the student (Jim, our hero)
Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?
I’m sure you will be left puzzled for a moment, when you hear the solution by Jim, at least I was. Its a tricky one, But you can get through it
. So what choice would you have made, I’ll update the post with answer after few days.
Update:
This is famous puzzle known as Monty Hall Problem. Wikipedia has very good explanation for this.
Because there is no way for the player to know which of the two unopened doors is the winning door, most people assume that each door has an equal probability and conclude that switching does not matter. In fact, in the usual interpretation of the problem the player should switch—doing so doubles the probability of winning the car, from 1/3 to 2/3.
Also Read: Classic Computer Science Puzzles
Related Post:
Orio’s Riddle Completed
Twisty Puzzles
Google treasure hunt: last puzzle
Few days back google announced about last leg of google treasure hunt journey. This time they provided unix epoch time 1212448500, time when puzzle was supposed to get released.
You can use http://www.epochconverter.com/ to convert it to human readable format. This side also provides list of available methods to get epoch time, convert it to human readable format and vice-versa.
PHP date(output format, epoch); Output format example: ‘r’ = RFC 2822 date
Python import time first, then time.gmtime(epoch)
MySQL from_unixtime(epoch, optional output format)
So the puzzle was supposed to release at
Mon, 02 Jun 2008 23:15:00 GMT, for India: Tuesday, June 03, 2008 4:45:00 AM (middle of the night).
Forth Puzzle is available here. Its a bit tricky, but i wrote a c program to calculate the number using brute force method…and it worked.(Share how you did it or is there some shortcut which works without any programming). Problem is to find a prime number which in turn can be expressed as sum of of n consecutive prime numbers. Your answer should satisfy 4 such list of prime numbers of given length.
So its over for now and soon they are going to contest winners and rewards. Hope i could have been one
. But I have submitted this puzzle after long delay.(Was sleeping when it was released)
- Puzzle 1 (Robot in a maze) : Find it here
- Puzzle 2 (getting lines from specific files in zip archive) : Find it here
- Puzzle 3 (Network routing table) : Find it here
Google Treasure Hunt puzzle 3
Two days back google posted that they will be posting 3 puzzle for google treasure hunt soon.
This week’s puzzle is set to be released on Tuesday, May 27 at 10 a.m. PDT.
PDT is 7 hours behind UTC, so its around 10 PM, 27th May in India.
So the 3rd puzzle is live now. I have given it a try and submitted my answer, I think (!) it should be correct.
This time question is related to networking. You have to find the path followed by a packet given its destination and routing table for the network.

The nodes are hosts on the network, and the lines between them are links. A packet is sent out from host O with a destination of 46.44.187.63. Which nodes does the packet pass through on its way to the destination?
To refresh your concepts read (Routing tables, On wikipedia). If you got the idea, then it shouldn’t be difficult. Intuitively also you should be able to find your way through routing table. Give It a try..and but you will only get to know your answer status after 23hrs from now.
Previous Puzzles:
- Puzzle 1 (Robot in a maze) : Find it here
- Puzzle 2 (getting lines from specific files in zip archive) : Find it here
Latex on wordpress blog
Some time back I came to know that wordpress blogs hosted at wordpress.com supports latex. But no such default functionality for self hosted wordpress blogs. But there are plugins (latexrender, wp-latex) which can facilitate similar things.
But for these to work you will need to install latex on your hosting account. (I have intalled latex on my hostmonster account some time back.).
For installing latexrender wordpress plugin you can find guidelines here
One more thing to remember while setting $latexrender_path_http in latex.php give full http path to latexrender folder like $latexrender_path_http = "http://your blog addr/latexrender";
Now you are set to go. To include
in your posting, use the following:
[tex] your latex code here [/tex] For example:
[tex] (a+b)^3 = (a+b)^2(a+b) [/tex]
produces :
But after setting up latexrender plugin, the png image was still not generated. Error that I got was:
I can’t find the format file ‘latex.fmt’!
But when I tried similar command (latex sample.tex) from shell prompt, It was working fine.
So I thought that problem is in calling latex from php file using exec. So when I copied the latex.fmt file to directory containing .tex file it started working fine. May be some problem in setting environment variable.
You can look for latex.fmt file using :
find -name latex.fmt
For latexrender you can copy latex.fmt file to latexrender/tmp/ folder inside your wordpress installation.
I’m still working on how to set environment variable in php so that I don’t have to copy latex.fmt again and again.
But for now I gave got working latex on my blog
. Now I can write math equations in my blog posts.
You can try latex formulas in comment too.
And if you want to publish LaTeX equation in WordPress blog without installing any software, try jsTeXrender: http://yourequations.com/. Thanks Doug for the tip.
Related Posts:
Latex Beamer
Installing latex on hostmonster
Tagged: hostmonster, http, latex, php, wordpress
Wordpress plugins you should install
Few months back I have shifted my blog to self hosted wordpress blog at this location. I have passed few months trying new things on this blog like themes, plugins and its been fun playing with it. During this time I have tried several plugins, so wanted to share some of the plugins that I liked the most:
- Aksimet: filters spam comments and tracksbacks. You don’t want your post to be filled with useless comments.
- Wordpress.com Stats: Its a light weight plugin but still provides detailed representation of important statistics
- Google Sitemap Generator: Generates sitemap for your wordpress blog which is by Ask.com, Google, YAHOO and MSN Search.
- Get Recent Comments: Display the most recent comments or trackbacks with your own formatting in the sidebar.
- FeedBurner FeedSmith: It redirects your wordpress feeds to feedburner so that you can easily track your subscribers.
- Plugin Central: Automatically installs and updates WordPress plugins.
- Wordpress Data backup: Its a necessary plugin to backup your blog. I still haven’t restoring posts from backup though.
For some specific users plugins like wp-latex, are also useful. It generates PNG images from inline $\LaTeX$ code in your posts and comments. I have installed latex on my hosting service( hostmonster) and still working on making simliar plugins(LatexRender) to work.
You can find many more such list on web if you do a google search. But Lorelle has a nice compilation of list of favorite wordpress plugins.
Evolution of a blogger
It has been almost 3 year, When I started blogging. Looking back to see how my blogging style has changed, change in content of blog post or change in my motivation for blogging to sum up how I am evolved as a blogger. First I’ll tell you how my reasoning behind blogging has changed:
Why do I Blog ?
- Because I wanted to blog, seeing so many on internet.
- Then as catalog of stuff I’m doing, for me and may be for others to know.
- And with time it changed to showcasing what I like, what I’m doing, sharing tips and then taking readers opinion, discussing with them. (at leasts thats the aim)
In all above cases common things can be to pass time and share experience plus along with we are (I am) also always looking for recognition and admiration.
And about change in my blog content:
- May 2005, Posted some pictures, wanted to avoid much writing.
- June 2005, Just write about your projects, so that you don’t have to dwell for blog content.
- November 2005, You try to write some good posts(Solving Rubik’s Cube, Speed up firefox) but you end with posts like Unnatural laws whose content is generally a email forward or similar.
- February 2006, You try your best looking for good content to post but most of post were result of “submit to blog” button on digg.
- July 2006, Most of blog post consists of linking to stories of others blogs or quoting parts of posts from other blogs.
- September 2006, Now blog posts are mixture of posts from above categories.
- January 2007, Now You are improving with some good posts (sharing knowledge firefox: about pages). Also tried covering some events in IITB (Techfest 2007: Feeding the Fish, Creative Commons, India launched on 26th Jan at IIT Bombay)
- Then there is also a time when you stop blogging for some time (for me this hibernation period was from May 2007 to Nov 2007)
- Decemeber 2008, January 2008: You are trying to get back in form and you want to write good posts now)
- February 2008, Some good posts which includes what new you tried Adobe AIR: Web to Desktop, Trying hands on Google gadgets) or tips you want to share(Google movie search tricks).
- Now I feel, I have a good enough blog which people (atleast some) want to read. And I’m always ready to try, explore new things and share with my viewers and always waiting for there feedback. (Check my posts for this month)
In all these time periods you will always have some good posts and some just blog posts.
Share with your motivation behind blogging and how you pick up content for your blog. I’m not a good writer (I try to share mostly technical, geeky stuff through my blog) so any suggestion/feedback to writing style are always welcome.
Tagged: adobe, blog, google, india, movie search tricks, on internet
Google treasure hunt (Second puzzle)
Its about time (936266827 seconds before Y2K38) i.e 19may2008 17:07:58 (UTC) and the second puzzle is live (Check it out). You can still try the first question here. Second puzzle from google treasure hunt is to calculate
Sum of line n for all files with path or name containing pattern and ending in particular extension. Similarly Sum of line m for all files with some pattern.
Hint: If the requested line does not exist, do not increment the sum.
Multiply all the above sums together and enter the product below.
for a given set of files contained in a zip archive. I have already submitted my answer
, but this time I will have to wait for 24hrs to check the status of my answer
. I thinks its a good puzzle to test your quick shell script abilities. (Can also be done easily in perl/python).
For the solution part, I wont give the actual solution (As dont want it to spoil for others who are actually trying) but you can use shell commands [grep, find ,sed and pipe (|)] to get to solution. You can get all the required numbers in 2 lines on shell.
Related Post:
Google Treasure Hunt
Orio’s Riddle Completed
Twisty Puzzles
Tagged: google, linux, perl, programming, puzzle
Google treaure hunt
The Google Engineering team is launching its first ever Treasure Hunt, a contest designed to challenge your problem-solving skills.
Find more details at Google Australia blog here
They will be releasing first four puzzles in the next consecutive four weeks, one is alread released.
To get the URL of the contest you have to decode:
aHR0cDovL3RyZWFzdXJlaHVudC5hcHBzcG90LmNvbS8=
And yeah,
I was able to that do that. I’ll tell you the answer its http://treasurehunt.appspot.com/, as its already on Google Blog
Actually its the base64 decode of the given code.
You can find the first puzzle here.
A robot is located at the top-left corner of a 34 x 49 grid.
The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid. How many possible unique paths are there?
I have solved this one. Give it a try, its not that difficult. Any way I’m there to help ![]()
Here is the solution to the problem :
The number of paths for n x m grid (n-1 down blocks and m-1 right blocks) is equal to number of ways of arranging n-1 D’s (Down move) and m-1 R’s (Right move). So it’s
(n-1+m-1)! / ((n-1)! * (m-1)!)
You can calculate it using calculator in Windows/Linux.
I’m waiting for the next to come.
The second puzzle will be appearing soon — to be exact, 936266827 seconds before Y2K38,
Update:
Unix internal time is commonly stored in a data structure using a long int containing the number of seconds since 1970. This time is used in all time-related processes such as scheduling, file timestamps, etc. In a 32-bit machine, this value is sufficient to store time up to 18-jan-2038. After this date, 32-bit clocks will overflow and return erroneous values such as 32-dec-1969 or 13-dec-1901. Read More about Y2K38.
According to wikipedia The latest time that can be represented in this format, following the POSIX standard, is 03:14:07 UTC on Tuesday, January 19, 2038. So when you calculate specified 936266827 seconds before that next puzzle should come around 19may2008 17:07:58 (The puzzle is alread there)(UTC) .
I have removed exact timing for you to get it on your own.(or is it still there ..haha ). And still if you need it, you can request in comments.
I calculated it using stata. You can easily calculate this in two lines in python:
>>> import time
>>> print time.ctime(2**31 - 1 - 936266827)
Related Post:
Orio’s Riddle Completed
Twisty Puzzles
Tagged: google, linux, programming, puzzle, python, Unix



Add to del.icio.us Network
Google Reader Shared Items
Twitter Feed
Flickr Photos