Article Update: Maze Solver in C#

Check out http://www.codeproject.com/csharp/MazeSolver.asp for an updated version of my MazeSolver article. The article now describes the internal working of my class. I hope this version will help you to understand my logic.

Advertisements

New article: Analog clock control in C#

Visit http://www.codeproject.com/cs/miscctrl/AnalogClockControl.asp for my new article. It is a step-by-step guide on how to make a clock control in C#. The article contains much description and pictures. I hope you will like this.

MazeSolver

It was a difficult problem to find a shortest path in a 2D Maze. During my second year exams, I got a mail in which I was asked to write a program for this. I started to think but first no solution could come into my mind, but soon I thought that this could be done using graphs. The maze is similar to a graph, with every element of the maze (node) adjacent to its left, right, top and bottom nodes. After this I applied simple breadth first search to find the shortest path.

Matrix and Fraction classes

I always get confused when performing row operations in a Matrix. But matrices were a great portion of our Maths-III course, as well as our Economics’ Linear programming section. Hence I needed a program which could tell me at when I was doing mistakes. The solution was simple, just to download any matrix application. But the problem was that all matrix programs I got, worked on floating point numbers and in our class problems we have to consider the exact values using fractions. I therefore needed a matrix application which could show results in a fraction format, but I didn’t found any. At that time we learned how to represent real world objects in a programming language and we did the example of a fraction class in our OOP course. I further enhanced that idea and was able to develop a fraction class and later on, a matrix using the fraction class. I incorporated all my needs and it worked fine. Then I uploaded the classes on GotDotNet<www.gotdotnet.com> and other similar sites and yes, I was able to further improve my classes with the help of user responses. I finally posted two articles on CodeProject<www.codeproject.com> and user responses were wonderful. I finally thank all of those who were helpful starting from Sir Saqib Ilyas to Jeffrey, Marc and other fellows.