Search This Blog

Simplicity is the ultimate sophistication.” — Leonardo da Vinci
Contact me: sreramk360@gmail.com

Wednesday, 16 December 2015

What exactly caused the Chennai rains this december (2015)?


What exactly caused the Chennai rains this December (2015)?
                                    Article author: K Sreram
Heavy rain that hadn’t occurred in Chennai for over hundred years is something important to consider to understand our world’s climatic change. We have all heard about global warming, in which the global surface temperature gradually increase as a consequence of greenhouse effect. The global average temperature raised by 1˚C from 1880 to 2010. Does this value sound quite small? Well it's probably not. Because, this data is “average global surface temperature”. So on an average, all places on the map experience a temperature hike by 1˚C; obviously we have the net hike being directly proportional to the Earth’s surface area; which means that it eventually sums up to a huge value. Can the Chennai rains be related to this temperature hike? Yes it can! Global warming does not just cause glaciers melting in the Polar Regions, and the raising of the sea water level.

Saturday, 21 November 2015

how chess works


How chess games work

People have always wondered, “How to play like a grandmaster?” But when the question is “How to get into IIT?” the simple answer known to everyone is study hard and solve all problems; also make sure you solve them on time during the exam. But when it comes to chess, I found it really hard to come up with “what do players actually do to win the game?” Or what causes a grandmaster to play better than anyone? If the question is about IIT-JEE, the simple answer would be, “Just know them all, and solve problems on time”. Nevertheless when it comes to chess, it is quite hard to determine how a good chess game should be played.

Chess is a battle, where you mustn’t make mistakes. You might already know that any standard chess engine running on an ordinary machine would easily defeat the world’s top grandmasters. If you have tried playing with one such chess engines, you would think “Fine, that’s obvious. The computer is unimaginably strong. Beating it is impossible”. Not so soon; if a super grandmaster plays ten games with the computer, he is bound to lose most of them. But not all of them! This clearly shows that not all chess games played by a computer is unbeatable. If you are someone (like me) who have tried to improve your chess by trying the beat the engine, but failed unbelievably but finally managed to bring the game to a draw, after several “reverse moves” and finally realised that you have mistakenly set a lesser “fixed search depth” value; and badly want to know how chess works. You have come to the right place.

So what is so different about chess grandmasters? Or perhaps, any strong player (especially if you have got the awesome opportunity of playing chess with a chess grandmaster, being an ordinary player). Let me tell you the secret. You need to always make sure that you do the following each time you play:

Thursday, 5 November 2015

Writing a good story


Writing a good story
While reading a story, we tend to feel as if the events in the story are real. We cannot say this is exactly true, because I the hero is in a dangerous situation, you don’t feel “shocked” or “scared” the same way you would feel when it were real. But, you will know “How it feels” to be in that situation and be shocked or scared. Now let’s go on to the part where we actually write our story.

Saturday, 3 October 2015

Bellman Ford Algorithm implementation in c++

BELLMAN FORD ALGORITHM IMPLEMENTATION IN C++


Shortest path algorithm: Elaborated


Shortest path algorithm
Email: sreramk@outlook.com
Shortest path algorithms are used in may real life applications, especially applications involving maps and artificial intelligence algorithms which are NP in nature. A graph is a collection of nodes connected by edges  and can be expressed as. Stands for vertices. These vertices and the connecting edges together can be imagined to form a three dimensional geometrical structure. In some cases, for each (here  are vertices which are connected) there is a weight value assigned to it. This can also be called as “distance” or “cost” of connecting the two nodes. The shortest path algorithm traces the minimum distance (or cost) between two nodes  which are either directly or indirectly connected. The weight values along each possible paths to the destination node from the source node are summed up, and the path with the minimum summation value is chosen as the shortest path.
We may represent a weighted graph as where the extra parameter represents the set of weight values across each edge. Weight of the edge. Usually, shortest path algorithms are of time complexity because every node needs to be visited at least once. In case of AI algorithms, the vertices are generated based on specific rules, and usually it’s a function of depth; because most nodes have more than one connections, we may also have non-polynomial relation between the depth and the number of nodes.
Algorithms like Dijkstra’s algorithm’s time complexity is (note, represents number of nodes and represents number of edges). Dijkstra’s algorithm holds only for the situations where. But from the definition of a weighted graph given above, weight values can also be negative. So a modified version of the algorithm which also solves problems with negative weight edge is required. But this modified algorithm would require a greater runtime-time complexity; Dijkstra’s algorithm is a greedy algorithm, which selects the best possible path to every node in the graph, originating from source. But Dijkstra’s algorithm fails to solve problems that have negative weight values. In scenarios where negative weight values are present, another algorithm called Bellman Ford algorithm is used. But its runtime complexity is. Which is far greater than Dijkstra’s algorithm. Generally,  unless there are disjoint nodes or graphs. Unless stated, the graphs discussed here are always assumed to not contain any disjoint sets or nodes.

Sunday, 2 August 2015

Fundamentals of calculus chapter 4: More on differential equations

Fundamentals of calculus chapter 4: More on differential equations

Differential equations do not have immediate means to solve them. The reason is, because differential equations are defined from differentiation and so is its integral, it’s easier to find the differential equation rather than it’s solution. If our motive is purely to find the solution of differential equations, then our best approach will be to try and find how the expressions “behave” while trying to differentiate them. Then we may back trace this sequence of steps to find the original expression.

Monday, 27 July 2015

An optimal algorithm for the shortest path in the graph


An optimal algorithm to find the shortest path in the graph
Introduction:

Many real-life solutions rely on shortest path algorithms, especially games rely on them! If a graphic game character traces your moves along a complicated path and finds you, then it is obvious that the game implemented a graph algorithm to find the shortest path to approach you. Is it really that easy to find an optimal path to reach a point in a graph? No not exactly, as the upper bound of the Dijkstra’s algorithm is $O(|V|^2)$. If we assume your game map to be a big grid, then the number of cells in the grid is equal to the number $|V|$. But this is still the worst case, and for most times we don’t need to consider the worst case. Let me describe the Dijkstra’s algorithm. 

Featured post

Why increasing complexity is not good?

“ Simplicity is the ultimate sophistication.” — Leonardo da Vinci Why is complicating things wrong ? - K Sr...