Sunday, February 10, 2008

back blogging....Feels like heaven

I'm back. Somehow got my system up and running after a long time.

Some very interesting LJ articles for your reading pleasure...
inside linux packet filter I
inside linux packet filter II
these articles describe the path of a network packet up the Linux kernel protocol stack.(And also describes how packet sockets are implemented).

Oh..and my new years resolution was - "Atleast one blog/month" ;-)

Monday, November 5, 2007

Fascinating fractals

"Mountains are not cones, clouds are not spheres, and rivers are not straight lines" -- Benoit Mandelbrot.

-------------------------------------
For Benoit Mandelbrot, fractals are the "geometry of nature."

You might want to read it for the beautiful theory...
or for all the beautiful figures..... :-)

fractals
Mandelbrot


ohhh and on the Internet...
"All routers does lead to Wikipedia" -- Balagopal

Friday, September 28, 2007

Training @ CDAC

currently we are having training at CDAC, vellayambalam. Vellayambalam is about 15-20 kms from our place (A long distance considering the fact that rust-age machines of state transport take a gozillion hours to reach here.(Yeah, I'm publishing this from CDAC :-) ).

ps :- I can't believe I forgot to close a paren in the above post after doing so much LISP programming.

Thursday, August 30, 2007

First days after joining Tata Elxsi - TVM

It's been a long time... I joined Elxsi on 8th August. We (ME and 9 friends) rented a house near technopark. It's a very nice place. Really enjoying the training sessions @ TEL.

Monday, July 30, 2007

Random Walking

What is the probability that two random walkers starting from a point meet each other during their walk?

We consider random walks in 1, 2 and 3 dimensions.

A 1d random walk can be thought of as a random walk along a long street(Similar to number line), where at each point he may choose to proceed in the same direction or reverse his direction.

A 2d random walk can be thought of as a random walk on a 2d grid, where at each point he may choose any one of four directions(forward, backward, left and right).

Similarly a random walker walking in 3d space has 6 options at each point(Four directions of 2d walk plus up and down).

I wrote a python program to simulate random walks in 1, 2 and 3 dimensions.

The function randwalk simulates a random walk in any dimension. The dimension is determined by the parameter update which is a function which returns the new position of a random walker given his old position. The limit parameter limits the no: of steps taken by a random walker(Random walkers won't walk forever:-) ).


I obtained the following results.

Two 1d random walkers meet about 95% of time at an average of about 1 move before meeting each other.
Two 2d random walkers meet about 60-70% of time at an average of about 20 moves before meeting each other.
Two 3d random walkers meet about 30-35% of time at an average of about 10 moves (This is surprising) before meeting each other.

The above simulation is not very realistic. It assumes that both random walkers walk the same distance at the same pace.
Also, in real life, random walkers don't choose directions randomly. Instead, they may prefer one path over another according to their tastes and preferences.

References



Introduction to probability, Charles M. Grinstead and J . Laurie Snell

Friday, July 27, 2007

Some interesting links

list of Mathematical illusions
list of Paradoxes

If truth does not exist, the statement "truth does not exist" is a truth, thereby proving itself incorrect.
- Nihilist Paradox

Saturday, July 21, 2007

Stages of knowledge

The four stages of knowledge

stage 1 : The stage where you don't know and you know that you don't know.
stage 2 : The stage where you don't know (the whole thing) and you think that you know.
stage 3 : The stage where you know and you think that you don't know.
stage 4: The stage where you know and you know that you know(This stage is purely hypothetical).



"
The path of the righteous man
is beset on all sides...
by the inequities
of the selfish...
and the tyranny of evil men.
Blessed is he who,
in the name of charity and good will,
shepherds the weak
through the valley of darkness,
for he is truly his brother's keeper
and the finder of lost children.
And I will strike down upon thee with
great vengeance and furious anger...
those who attempt to poison
and destroy My brothers.
And you will know
I am the Lord...
when I lay My vengeance
upon you.

....

maybe it means...
you're the evil man,
and I'm the righteous man,
and Mr. 9-millimeter here,
he's the shepherd...
protecting my righteous ass
in the valley of darkness.

Or it could mean...

you're the righteous man,
and I'm the shepherd,
and it's the world
that's evil and selfish.

Now, I'd like that.

But that shit ain't the truth.

The truth is,

you're the weak...
and I'm the tyranny of evil men.

But I'm tryin', Ringo.
I'm tryin' real hard...

to be the shepherd.
"


- From Pulp Fiction, Jules Winnfield to Ringo