0% found this document useful (0 votes)
103 views

A Genetic Algorithm For The Maximum Clique Problem

The genetic algorithm uses a chromosome representation where each gene represents a vertex in the graph and can have a value of 1 or 0 depending on whether the vertex is part of the clique. It initializes a population of random chromosomes and uses crossover and mutation operators along with a selection process based on chromosome fitness to find the maximum clique. The fitness function calculates the size of the largest clique in the chromosome. Over generations, the algorithm aims to find chromosomes with higher fitness, representing larger cliques.

Uploaded by

nourah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

A Genetic Algorithm For The Maximum Clique Problem

The genetic algorithm uses a chromosome representation where each gene represents a vertex in the graph and can have a value of 1 or 0 depending on whether the vertex is part of the clique. It initializes a population of random chromosomes and uses crossover and mutation operators along with a selection process based on chromosome fitness to find the maximum clique. The fitness function calculates the size of the largest clique in the chromosome. Over generations, the algorithm aims to find chromosomes with higher fitness, representing larger cliques.

Uploaded by

nourah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

A Genetic Algorithm

for the Maximum


Clique Problem
BY: REBECCA MOUSSA, ROMARIO AKIKI, AND HAIDAR HARMANANI

Presented by:
Nourah saad ALQahtani
[email protected]
ef
Outlines
Introduction
The clique Decision problem
The Clique Decision Problem belongs to NP
The Clique Decision Problem belongs to NP-hard
The Maximum Clique Problem
Related Work
Genetic Problem
Chromosomal Representation
Initial Population
Cost Function
The selection process
Genetic Operators
Genetic Maximum Clique Algorithm
Experimentation Results
Conclusion
References
introduction
Many important applied problems involve finding the best way to
accomplish some task. Often this involves finding the maximum or
minimum value of some function: the minimum time to make a
certain journey, the minimum cost for doing a task, the maximum
power that can be generated by a device, and so on. Many of these
problems can be solved by finding the appropriate function and
then using techniques of calculus to find the maximum or the
minimum value required.
The clique problem
is the computational problem of finding cliques (subsets of
vertices, all adjacent to each other, also called complete
subgraphs) in a graph. ...

A Clique is a subgraph of graph such that all vertices in subgraph


are completely connected with each other.

Most versions of the clique problem are hard problems.

The clique decision problem is NP-complete.


The clique Decision problem
To prove that a problem is NP-Complete, we have to show that it
belongs to both NP and NP-Hard Classes.

1. The Clique Problem belongs to NP – If a problem belongs to the NP


class, then it should have polynomial-time verifiability
2. The Clique Decision Problem belongs to NP-Hard – A problem L
belongs to NP-Hard if every NP problem is reducible to L in polynomial
time.
The Clique Decision Problem belongs to NP
1. Certificate – Let the certificate be a set S consisting of nodes in the clique and S is a
subgraph of G.
2. Verification –
We have to check if there exists a clique of size k in the graph. Hence, verifying if number of
nodes in S equals k, takes O(1) time.

Verifying whether each vertex has an out-degree of (k-1) takes O(k2) time (Since in a
complete graph, each vertex is connected to every other vertex through an edge. Hence the
total number of edges in a complete graph = lEl = k*(k-1)/2 ).
Therefore, to check if the graph formed by the k nodes in S is complete or not, it takes O(k2)
= O(n2) time (since k<=n, where n is number of vertices in G).

Therefore, the Clique Decision Problem has polynomial time verifiability and hence belongs
to the NP Class.
The Clique Decision Problem belongs to NP-
Hard
let the Clique Decision Problem by C.To prove that C is NP-Hard, we take an already
known NP-Hard problem.
The Boolean Satisfiability Problem (S) is an NP-Complete problem as proved by the
Cook’s theorem .if S is reducible to C for

a particular instance and can be done in


polynomial time, then C is also an NP-Hard problem.
Every problem in NP can be reduced to S in polynomial time. Thus, if S is reducible to
C in polynomial time, every NP problem can be reduced to C in polynomial time,
thereby proving C to be NP-Hard.

Proof the Boolean Satisfiability problem reduces to the


Clique Decision Problem
Let the boolean expression be – F = (x1 v x2) ^ (x1‘ v x2‘) ^ (x1 v x3)
Let the expression within each parentheses be a clause. Hence we have three
clauses – C1, C2 and C3. Consider the vertices as – <x1, 1>; <x2, 1>; <x1’, 2>; <x2’,
2>; <x1, 3>; <x3, 3> .
We connect these vertices such that :
. 1. No two vertices belonging to the same clause are connected.
2. No variable is connected to its complement.

Proof the Boolean Satisfiability problem reduces to the


Clique Decision Problem
Thus, the graph G (V, E) is constructed such that – V = { <a, i> | a belongs to Ci } and
E = { ( <a, i>, <b, j> ) | i is not equal to j ; b is not equal to a’ }.
Consider the subgraph of G with the vertices ( k=3 ) <x2, 1>; <x1’, 2>; <x3, 3>.
For the assignment – <x1, x2, x3> = <0, 1, 1> F evaluates to true
1. The satisfiability expression evaluates is true.
2. the satisfiability problem is reduced to the clique decision problem..
3. Then,the Clique Decision Problem is NP-Hard.

The Clique Decision Problem is NP and


NP-Hard. Therefore, the Clique decision
problem is NP-Complete.
Have importance and wide application in the
areas of social network analysis,
telecommunication networks,
bioinformatics, information retrieval, and
computer vision

The Clique
Problem Common formulations of
the clique problem include
finding a maximum clique
,maximal clique .
The Maximum Clique Problem
The maximum clique algorithms a combinatorial optimization problem. used to
find a maximum clique (a clique with the largest number of vertices).

The maximum clique problem has been shown to be NP hard and the associated
decision problem to be NP-complete ..
The problem is reducible to the maximum 3-satisfiability problem.
ef
The maximum weight clique problem is a variation of the maximum clique problem
that finds cliques of maximum weight.
ω(G) = max{|S| : S is a clique in G}.
Harary et al. proposed the first serial
algorithm for solving the maximum clique
problem. The inductive algorithm worked by
enumerating all cliques in an arbitrary graph.

Bron et al. proposed a greedy approach that


finds maximal cliques through a depth-first Related
search. The algorithm branches are formed
based on candidate keys, and backtracks
once a maximal clique is found.
Work
Balas . proposed a branch and bound
algorithm for finding a maximum clique in
arbitrary undirected graphs
Genetic Problem
Genetic Algorithms are search techniques that reflects the process of
natural selection where the fittest individuals are selected for
reproduction.

Used for solving both constrained and unconstrained optimization


problems based on a natural selection process .

Genetic algorithms work by selecting during each generation individuals from


the current population and applying transformations based on a certain
probability.
In this article, we ’ re going to solve the maximum
clique problem using genetic algorithms
The process of natural selection starts with the selection of fittest individuals from a
population. They produce offspring which inherit the characteristics of the parents
and will be added to the next generation. If parents have better fitness, their offspring
will be better than parents and have a better chance at surviving. This process keeps
on iterating and at the end, a generation with the fittest individuals will be found

Five phases are considered in a genetic algorithm.


1. Initial population
2. Fitness function
3. Selection
4. Crossover
5. Mutation

Chromosomal Representation

THE PROCESS BEGINS WITH A SET OF


INDIVIDUALS WHICH IS CALLED A
POPULATION.
An individual is characterized by a set of
parameters (variables) known as Genes.

Genes are joined into a string to form a


Chromosome (solution).

Initial Population

We solve the maximum clique problem using a vector-based


chromosomal encoding.

The length of the vector is equal to the number of vertices in


the graph.

A gene can take on either a 0 or a 1, depending on whether the


vertex belongs to the clique.
Cost Function
The cost function is important for chromosomes survival
from one generation to the next. the cost of a solution is
the size of the largest clique, ω(G):
The selection process
The selection process is essential in order to increase the mean
quality of solutions in the population. During every generation, the
algorithm selects individuals for reproduction.
the researchers use the classical roulette wheel approach

This approach will guarantee that “healthy” individuals are selected in a higher probability
than “weak” individuals .
The selection process
a random value r ∈ [0, 1] is selected and compared with the
respective cumulative probability q for the individual under
consideration.
If the random number falls in the interval qi−1 < r ≤ qi, or if its less
than the cumulative probability of the first individual when
considering it, then the individual is selected.
Genetic Operators
We explore the design space using two genetic operators, mutation and
crossover, which we apply iteratively with their corresponding
probabilities. Both operators ensure that the generated solutions are
feasible using the ExpandClique operator.
Genetic Operators
Crossover

The crossover operator selects two chromosomes


and apply the bitwise and operator. Thus, only
common edges are maintained in the solution.
Offspring are created by exchanging the genes of
parents among themselves until the crossover
point is reached.
Genetic Operators
Mutation
The mutation operator is used in order to create a
random, unbiased change while inhibiting premature
convergence.
In certain new offspring formed, some of their genes
can be subjected to a mutation with a low random
probability. This implies that some of the bits in the bit
string can be flipped.
ExpandClique
is an operator that aims at deterministically expanding the size
of the clique that was found so far.
The operator selects a random vertex Vk and iterates over the
genes from vertices k+1 till n. At each iteration, the operator
randomly sets gene i to 1 if the corresponding vertex Vi is
pairwise connected to all vertices in the current clique. The final
outcome is a larger clique.

Genetic Maximum Clique


Algorithm
The proposed genetic maximum clique algorithm is shown
in Algorithm . The algorithm starts by randomly creating an
initial feasible population of chromosomes. During each
generation, the cliques within the chromosomes are
successively evolved using the crossover and mutation
operators.The operators are always followed by the
ExpandClique operator that randomly adds vertices to the
clique in order to expand its size. The best chromosomes are
maintained for the next generation. Then it is said that the
genetic algorithm has provided a set of solutions to our
problem.The algorithm repeats for Ng generations.

Experimentation Results
The proposed algorithm was implemented in Java and evaluated on the
DIMACS clique benchmark graphs which arise from various applications and
problems.
The authers have empirically determined that a population size of 20 and a
generation number of 10,000 are sufficient to achieve good results.
And have also experimentally determined the crossover probability to be 80%
and the mutation probability to be 40%.
And compare the results with the most optimal results obtained so far for the
maximal clique problem.
The algorithm was able to find the optimal answer in most of the attempted
cases.
PROS:
The algorithm was also very competitive for the other results
producing suboptimal answers in a very reasonable time.
The proposed algorithm found optimal results in 21 of the
attempted DIMACS benchmarks.

CONS:
Experiments with a genetic algorithm are somewhat
difficult to design.
The study could be further developed by adding
complexity

Conclusion

This paper presented a genetic algorithm for finding a


Maximum clique in an arbitrary graph, an N P-hard problem.
Maximum Clique Problem (MCP) is an NP Complete problem
which finds its application in diverse fields. This paper
proposed the solution of above problem with the help of
Genetic Algorithms (GAs).
THANK YOU

References

(Shyalika, 2019)
(igi-global, 1988-2021)
(sciencedirect, 2021)

Moussa, R., Akiki, R., & Harmanani, H. (2019). A Genetic Algorithm for the Maximum Clique
Problem. In 16th International Conference on Information Technology-New Generations (ITNG
2019) (pp. 569-574). Springer, Cham.
Lavnikevich, N. (2013). On the Complexity of Maximum Clique Algorithms: usage of coloring

heuristics leads to the 2^(n\5) algorithm running time lower bound. arXiv preprint
arXiv:1303.2546.
Walteros, J. L., & Buchanan, A. (2020). Why is maximum clique often easy in practice?. Operations

Research, 68(6), 1866-1895.‫‏‏‬

You might also like