Tuesday, September 21, 2010

Sunday, September 19, 2010

Few tips for Advanced Algorithms


If you are doing “Introduction to Algorithms and Data Structures” or “Advanced Algorithms”, there video lectures will be very useful.
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/
OR
http://www.youtube.com/results?search_type=search_playlists&search_query=mit%27s+introduction+to+algorithms&page=1


Apart from it , I find the data structures like splay trees, B trees are very useful.
http://www.youtube.com/watch?v=G5QIXywcJlY

And this is a java applet you can try out with different data structures.
http://people.ksp.sk/~kuko/bak/big/

To simulate Max-Flow Min-Cut algorithm
http://www.cse.yorku.ca/~aaw/Wang/MaxFlowStart.htm AND http://optlab-server.sce.carleton.ca/POAnimations2007/MaxFlow.html

Wednesday, September 15, 2010

Hike to Thotupola Kanda


Few months back, I and few friends of mine went on a hike to Thotupola kanda, which is the third highest mountain in Sri Lanka.
It was kind of interesting, but had to walk almost 34km throughout the day.
We started the journey from Colombo, around 8pm so we can reach the starting point in the next morning.
My friend; Rohan Wickramasinghe the most travelholic guy in the team had reserved 2nd class tickets. But unfortunately he had reserved them for the next date. So finally we decided to travel on 3rd class and move on.
3rd class service was not that good for a long journey like that. Anyway it was quite an experience.

On the way to Ohiya...

When the train moves towards up country; it needs an extra engine to be coupled. So at Rambukkana and Pattipola, the train is stopped for several minutes more to couple and decouple the extra engine.

Coupling and De-coupling...
After pattipola, we reached to Ohiya; one of the highest villege in te Badulla district in SL and high 1774m above sea level.


In Ohiya; there was a small shop and the shop owner rented one room of his home for us. We rested there for a while and started our hike.
Initially it was sunny and windy. We could see the far beyond the horizons.


But the sunny part left us and suddenly it became so foggy.

On the way to Horton plains...

After few hours we reached Horton Plains.


It’s a cloud forest filled up with fresh and raw green with beautiful flowers.


Also there are many species which are endemic to the region. But we couldn’t spent much of time for them.
We walked over the green a lot of time until we reach the junction which leads to Thotupola Kanda.




Then we started to climb up our target. By the time it was rainy + windy + foggy.



When we reached the peak of the mountain; it was as foggy as we couldn’t see much around.



After having lunch around 2pm we climbed-down the mountain and slowly walked towards the Pattipola railway which is the highest railway station in Sri Lanka. Our plan was to catch a train from Pattipola and to go to Ohiya.




Fortunately or unfortunately when we reached there, train had already left 10 min ago and there were no trains for the day. So we had to walk from Pattipola to Ohiya (around 8km) via the railway which was never planned.



There is a place called “Summit level” which is highest pot of Sri Lanka and which is 1898m high above sea level.

At summit level...

By the time it almost was getting dark. But the craziest issue was to pass the railway tunnels which are dark and filled with bats every time. If a train came when we were half on the way through the tunnel, we just had to lie down on the muddy ground and stay away from the rail tracks as much as possible. But the gap between the train and the tunnel was so thin. So we had no clue what we should do if a train came.
Believe me; this was really dangerous and we didn’t have many torches or even people didn’t live around. Later I got to know that due to security reasons passing the tunnel by foot is prohibited.

Inside the "Tunnel 18"...

On the way we passed through around 3 tunnels and 2 bridges. The three tunnels are different from each other and one of them is the 3rd longest rail way tunnel in Sri Lanka; which is called Tunnel 18.

I'm at the Tunnel 18.

Tunnel 18th is very especial one because every time it's very dark. Lot of bat lives in there. This tunnel is a bending one. Tunnel was made by 1919 and after some times it was repaired. On the tunnel there is a mountain called Nasdanda mountain. Near this tunnel there is another two Railway tunnels. One of them is very short and bend and other one is very long and direct not bend one.
Main important thing of Pattipola tunnel 18thTunnel is both sides of this tunnel is different. This tunnel divides Badulla and Nuwaraeliya districts, Border of Welimada and Nuwaraeliya Electorates, dry Zone and Wet Zone, Green forest zone and highest west gap zone.
When you through this tunnel from Ohiya side you feel somewhat hot and you can see the sunshine and see clear air. After you move Pattipola side you feel different than that. Now you feel very cool and you may be able to see sunshine and you can see the mist come and covered every places in there. However if you can feel changing whether zones like that, you're very lucky.


Even passing a bridge was tricky in a darker environment. After a one and half hour walk we reached to Ohiya. The time was around 7pm.


So we stayed the night at Ohiya and came back to Colombo via train in the next morning.