Backtracking Set 5 (m Coloring Problem)-Backtracking-Given an undirected graph and a number m, determine if the graph can be colored with at most m colors .
graph algorithms
Dijkstra’s shortest path algorithm – Greedy algorithm – Dijkstra’s algorithm is very similar to Prim’s algorithm for minimum spanning tree. Like Prim’s MST, we generate a SPT (shortest path tree) with given source as root.
Prim’s MST for Adjacency List Representation – Greedy algorithm – We have discussed Prim’s algorithm and implementation for adjacency matrix representation. The time complexity for the matrix representation is O(V^2).
Kruskal’s Minimum Spanning Tree Algorithm-Greedy Algorithm-Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together. A single graph can have many different spanning trees
pseudo polynomial Algorithms – Analysis of Algorithm – An algorithm whose worst case time complexity depends on numeric value of input (not number of inputs)