Happy Diwali !!

Wishing each one of you a very happy and prosperous deepawali. May this year brings you lots and lots of happiness in life and fulfill all your dreams.

Rangoli

Above is Rangoli, we made at office.

Enjoy !!

New Rubiks Cube

Yesterday I went for the movie Hancock and I was only able to get the tickets for the evening show, We were there in afternoon itself. So we went to nearby Crosswords nearby

Then I saw, they were selling rubik’s cube. It has been a long time since I touched it. So I bought myself a Rubik’s Cube (Original from Rubiks.com, my first one) and It cost me around Rs 225.

Also few must be knowing that around 2 weeks back Rubik’s Cube was celebrating its 25th anniversary.
Check out some cool ads for Rubik cube.

25 years and still going

25 years and still going

Today, I also found some creative ads related to Rubik’s cube via Toxel.com

So I have the new cube now, which is much better (smoother) compared to ones i previously had. I hope to improve upon my timing now.

And about the movie, Hancock, it wasn’t worth the hype created. though Will Smith rocked as always.

happy cubing !!

Related Posts:
Solving Rubiks Cube
Adobe AIR: Rubik Timer

Also check: Rubik Cube Timer, My Rubik Page

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)

mathematics purity
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.

In search of a new car, the player picks door 1. The game host then opens door 3 to reveal a goat and offers to let the player pick door 2 instead of door 1.

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)

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:

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 \LaTeX 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 :

(a+b)^3 = (a+b)^2(a+b)

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

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:

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 ?

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:

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.

Next Page →