Tuesday, March 22, 2011

Gaphs and their applications (Depth First Search)

This is third article of series: Graphs and graph searching where we'll discuss about simple Depth First Search (DFS) algorithm.

We made a graph class that can represent a graph in the previous article of this series. Lets add another function to this class DFSSearch(i,j). This function is an implementation of Depth first search where the search algorithm begins at root node and explores the first successor of the node then again its first successor and so on until it finds the goal or it reaches the leaf node (i.e nodes without any successors). Then the search backs off to the previous node which is still to be expanded and so on. The algorithm of DFS is similar to that of BFS but the only difference is the use of Stack instead of Queue.
Here is a simple algorithm

Monday, March 21, 2011

Graphs and their applications (Breadth First Search)

This is second article of series: Graphs and graph searching where we'll discuss about simple Breadth First Search (BFS) algorithm.

We made a graph class that can represent a graph in the previous article of this series. Lets add another function to this class BFSSearch(i,j). This function is an implementation of Breadth first search where the search algorithm begins at root node and explores all neighbouring nodes before going to the next level. Then for each neighbouring nodes, it explores their unexplored neighbour node and so on until it finds the goal.
Here is a simple algorithm

Graphs and their applications

In this series of article I'll show you how to represent Graphs
and searching in graphs. We'll be implementing Breadth First Search (BFS), Depth First Search (DFS), Greedy Best First Search and A Star (A*) Search.. Before actually diving into coding these search strategies we'll first build a Graph itself.
As you might know, a graph consists of nodes and arcs that connect the nodes. A graph is very similar to a tree but in graph same node can be reached from multiple paths. Below is a simple representation of a graph.

Ok now we know that a Graph has


  • Nodes



  • Arcs

  • Sunday, March 13, 2011

    Automatic Wordpress Comment Browser in VB.NET

    In this series we'll build software that will automatically comment in the wordpress blogs. I'll explain the ideas and main codes so that you will understand the idea behind automation in the web from client side and explore the unlimited potential behind it!

    For development purpose, I don’t comment on real blogs on the internet for obvious reasons. Instead I set up two or three Wordpress blogs on my 'localhost' and play with them.

    Lets start

    AJAX Comment with Js Helper in CakePHP 1.3

    In this article I'll show you how to add Ajax comments in your CakePHP. I'm using CakePHP 1.3 and they say that Ajax and Javascript helpers are depreciated. So we'll be using new Js helper. Now lets get started.

    Saturday, March 12, 2011

    Making an Article Spinner

    Let's make an article spinner. If you don’t know about spinner text then it looks like {john|nikita|mike}. So when you "spin" the text you will get one of the three names. It is generally used for automation of Signup process, Blog commenting etc. Since you can provide many options you don’t have to change or worry about the same content being posted again and again.

    I'll build this program in VB.NET and I'll also give a generalized algorithm so that you can implement it in any programming language. Here is the main idea behind the algorithm

    Recent Posts