Dijkstra Algorithm : PPT

DIJKSTRA (G, w, s)

  1. INITIALIZE SINGLE-SOURCE (G, s)
  2. S ← { }     // S will ultimately contains vertices of final shortest-path weights from s
  3. Initialize priority queue Q i.e., Q  ←  V[G]
  4. while priority queue Q  is not empty do
  5. u  ←  EXTRACT_MIN(Q)    // Pull out new vertex
  6.     S  ←  S È {u}
        // Perform relaxation for each vertex v adjacent to u
  7.     for each vertex v in Adj[u] do
  8.         Relax (u, v, w)

Above is the algorithm for dijkstra’s minimum path. Click below for more…

Continue reading

Minimum Spanning Tree : PPT

A subgraph that spans (reaches out to ) all vertices of a graph is called a spanning subgraph.

A subgraph that is a tree and that spans (reaches out to ) all vertices of the original graph is called a spanning tree.

Among all the spanning trees of a weighted and connected graph, the one (possibly more) with the least total weight is called a minimum spanning tree (MST).

Click Below For More

Continue reading

HUFFMAN CODING :PPT

Huffman coding is a coding technique for lossless compression of data base based upon the frequency of occurance of a symbol in that file.

In huffman coding every Data is based upon 0’s and 1’s which reduces the size of file.

Using binary representation, the number of bits required to represent each character depends upon the number of characters that have to be represented. Using one bit we can represent two characters, i.e., 0 represents the first character and 1 represents the second character.

Click Below for More – –

Continue reading