# Java Programming Examples on Hard Graph Problems & Algorithms

## 1. Java Programming examples on “Clique”

The programs in this section evaluate the largest independent set in a binary tree, finds the clique and compares it with the size of the graph and performs graph coloring.

Java Program to Find the Maximum Size Clique in a Graph Java Program to Find a Clique by Using the Technique of the Most Dense Subgraph Java Program to Find the Largest clique in a Planar Graph Java Program to Solve the Decision Problem of Testing Whether a Graph Contains a Clique Larger than a Given Size Java Program to Find a Maximum Weight Clique in a Weighted Graph Java Program to Find All the Cliques of a Given Size k Java Program to Find the Largest Independent Set in a Graph by Complements and Find the Clique of this Graph Java Program to Find Independent Sets in a Graph by Graph Coloring Java Program to Find the Maximum Independent Set of a Tree in Linear Time Java Program to Find Size of the Largest Independent Set(LIS) in a Given a Binary Tree Java Program to Find Size of the Largest Independent Set(LIS) in a Given an N-ary Tree |

## 2. Java Programming examples on “Vertex Cover”

The programs in this section evaluates the dominating set problem and calculates the vertex cover of a graph.

Java Program to Implement a Heuristic to Find the Vertex Cover of a Graph Java Program to Solve the Dominating Set Problem Java Program to Check Whether a Vertex Cover of Size k Exists |

## 3. Java Programming examples on “Traveling Salesman Problem”

The programs in this section implements travelling salesman problem, branch and bound method, held-karp algorithm and incremental insertion method.

Java Program to Solve Travelling Salesman Problem for Unweighted Graph Java Program to Implement Branch and Bound Method to Perform a Combinatorial Search Java Program to Solve TSP Using Minimum Spanning Trees Java Program to Solve TSP Using Incremental Insertion Method Java Program to Find a k-Optimal Tour for TSP Java Program to Implement Held-Karp Algorithm Java Program to Implement Nearest Neighbour Algorithm Java Program to Implement Knight’s Tour Problem |

## 4. Java Programming examples on “Hamiltonian Cycle”

The programs in this section finds the hamiltonian cycle in a graph and finds the longest path in a DAG

Java Program to Find Hamiltonian Cycle in an UnWeighted Graph Java Program to Find the Longest Path in a DAG Java Program to Check if a Given Graph Contain Hamiltonian Cycle or Not Java Program to Convert Hamiltonian Cycle into Path Java Program to Check Whether a Hamiltonian Cycle or Path Exists in a Given Graph |

## 5. Java Programming examples on “Graph Partition”

The section contains programs which partition a tree using DFS and finds the maximum cut in the tree.

Java Program to Find Minimum Number of Edges to Cut to make the Graph Disconnected Java Program to Partition a Tree from a Given Element using DFS Java Program to Find the Maximum Cut in a Graph Java Program to Perform Spectral Partitioning of a Graph |

## 6. Java Programming examples on “Vertex Coloring”

The programs in this section perform edge coloring, vertex coloring and graph coloring and implements the 4-color problem and greedy coloring.

Java Program to Perform Graph Coloring on Bipartite Graphs Java Program to Check if a Given Graph is Bipartite Java Program to Perform Edge Coloring of a Graph Java Program to Use Color Interchange Method to Perform Vertex Coloring of Graph Java Program to Demonstrate the Implementation of 4-Color Problem Java Program to Perform Greedy Coloring |

## 7. Java Programming examples on “Edge Coloring”

The programs in this section implement vizing theorem, open shop scheduling problem to find the chromatic index and arboricity of a graph.

Java Program to Implement the Vizing’s Theorem Java Program to Find Chromatic Index of Cyclic Graphs Java Program to Perform Edge Coloring on Complete Graph Java Program to Perform Edge Coloring to the Line Graph of an Input Graph Java Program to Find the Arboricity of a Graph Java Program to Solve the Open Shop Scheduling Problem |

## 8. Java Programming examples on “Steiner Tree”

The programs in this section evaluates the steiner tree of a graph by applying the heuristic method.

Java Program to Find the Steiner Tree of a Given Graph Java Program to Apply Heuristic Based on Shortest Path to Find Steiner Tree Java Program to Check if a Steiner Tree Size k Exists for a Graph |

## 9. Java Programming examples on “Feedback Edge/Vertex Set”

The programs evaluates the good feedback vertex set in a graph and calculates if the graph is a DAG.

Java Program to Check Whether Graph is DAG Java Program to Find a Good Feedback Edge Set in a Graph Java Program to Find a Good Feedback Vertex Set |

**Here’s the list of 1000 Java Algorithms, Problems & Programming Examples.**