Simulation for Applied Graph Theory Using Visual C++ by Shaharuddin Salleh & Zuraida Abal Abas

Simulation for Applied Graph Theory Using Visual C++ by Shaharuddin Salleh & Zuraida Abal Abas

Author:Shaharuddin Salleh & Zuraida Abal Abas
Language: eng
Format: epub
Publisher: CRC Press Taylor & Francis Group
Published: 2016-12-10T16:00:00+00:00


6.1.1 Greedy Algorithm for Finding the Maximum Clique

We discuss a greedy algorithm for finding the maximum clique. The graph G(V, E) has nodes V = {v1, v2, v3…vn}. The algorithm starts with finding the nodes adjacent to the first node, v1. The nodes are adjacent only if eij ∈ E and {vi, vj} ⊆ V. Once all the adjacent nodes to v1 have been determined, the total number of adjacent nodes is stored as variable k1. At the same time, all the adjacent nodes to v1 are stored in an array p1[k1] = vi. Next, among all the k1 nodes stored in the array, the connectivity of every pair of each node is determined. All the adjacent nodes to v1 that have been determined to be connected to each other are then stored as the first clique, C1, and its total nodes in C1 are determined. The same process of finding the clique of the graph originating from v2 is applied. The process is repeated to all the nodes in order to find other cliques. Note that only isolated nodes do not have a clique originating from it. The maximum clique is then obtained from the clique with the highest number of nodes.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.