Rochester Institute of Technology
RIT Scholar Works
Theses
Thesis/Dissertation Collections
1997
Applying a genetic algorithm to improve the lower
bounds of multi-color ramsey numbers
Shardul Rao
Follow this and additional works at:
http://scholarworks.rit.edu/theses
Recommended Citation
Applying
a
Genetic
Algorithm
to
Improve
the
Lower Bounds
of
Multi-Color
Ramsey
Numbers
Shardul Rao
Computer Science Department
Rochester Institute
of
Technology
Rochester Institute of Technology
Department of Computer Science
Applying a Genetic Algorithm to Improve the Lower
Bounds of Multi-Color Ramsey Numbers
Shardul Rao
A thesis, submitted to
The Faculty of the Department of Computer Science
in partial fulfillment of the requirements for the degree of
Master of Science in Computer Science
Approved by:
Professor Stanislaw P. Radziszowski
Professor Peter G. Anderson
Professor Walter A. Wolf
Contents
Abstract
1
Acknowledgements
2
1
Introduction
3
1.1
Notations
3
1.2
Ramsey Theory
4
1.3
Background
6
1.3.1
Known
and unknownbounds
8
2
Genetic Algorithms
11
2.1
Introduction
11
2.2
Representation
andApproach
13
2.3
Algorithm
andImplementation
15
2.3.1
Supporting
functions
16
2.3.2
The
main program19
3
Experiments
23
3.1
Experimental
Setup
23
3.2
Effect
of various parameters24
4
Results
&
Conclusions
26
4.1
R(C4,C4,C4)
=10
27
4.2
R(K3,C4,C4)
=12
28
4.4
R(C5,C5,C5)
=17
30
4.5
R{C5,C4,K3)>
13
31
4.6
R(K3,K3,C4,C4)
>
25
32
References
34
Abstract
Ramsey Theory
studies conditions when a combinatorial object contains necessarily
some smaller given objects.The
role ofRamsey
Numbers is
to
quantify
some ofthe
general existentialtheorems
in
Ramsey
Theory.
The
objective ofthis
thesis
is
to
try
to
improve
the
lower bounds
ofRamsey
Numbers,
in
particularthe
bounds for
multi-color graphRamsey
Numbers.
Let
Gi,G2,---,Gm
be
graphs on some n.R(G\,G2,
,Gm)
denotes
the
m-colorRamsey
numberfor
graphs,
avoiding
G,
in
colori for
1
<
i
<
m.Thus,
to
showR(G\,
G2,
. ,Gm)
>
N,
we needto
find
an edgecoloring
for
a
Kn
graphusing
m colors(for
N
aslarge
aspossible) avoiding
G,
in
colori.
An
order-basedGenetic Algorithm
(GA)
combined with agreedy coloring
heuristic is
used as a searchheuristic
in
finding
the
coloring.Each
chromosome
is
a permutationrepresenting
the
orderin
whichthe
edges of graph arecolored.
(This
approach wasfar
more successfulthan
astring
representing
the
coloring.)
The
algorithm was successful.The
known lower bounds for
R(C4,C4,C4),
R(C4,C4,
K3), R(C4,K3, K3), R(C5,Cni
C5)
werematched,
andtwo
newlower
bounds for
Ramsey
numbers,
R(C4,C4,K3,K3)
>
25
andR(Cs, C4,
K3)
>
Acknowledgments
First
ofall,
I
wouldlike
to thank
Dr. Stanislaw Radziszowski for
introducing
me
to the
wonderfultheory
ofRamsey
numbers.His
extensive researchin
this
area wasvery
usefulfor
mein
finding
different
sources ofinformation.
I
would alsolike
to
thank Dr.
Peter
Anderson,
for
encouraging
meto
solvethis
problemusing
Genetic
Algorithms.
His ideas
ofimplementation
werevery
helpful in
writing the
code.I
alsothank
him for
providing
supportwhen
I
had
to take
abreak in
my
studiesfor
afamily
emergency.I
alsothank
Dr.
Walter
Wolf,
for
accepting
my
requestto
be
onmy
advisorscommittee and
evaluating my
thesis.
Last
but
notleast,
I
wouldlike
to thank
allmy
friends. Without
their
best
1
Introduction
In
a collectionof
six people eitherthree of them mutually
know
each other orthree
of
them
mutually
do
notknow
each other.This
may
be
considered as a non-trivial example ofRamsey
theory.
This
section
introduces
Ramsey
theory
andits
relevanceto
graphtheory.
1.1
Notations
Let
G
=(V, E)
be
a graph with vertex setV
and edge setE. The
numbern of vertices of
G
is
calledthe
order ofG,
andthe
numberq
of edgesin
G
is
calledthe
size ofG.
For
S
C
V
wedenote
by
G[S]
the
graph with vertex setS
and edge set of all(u,v)
G E
suchthat
v and ubelong
to
S.
G[S]
is
calledinduced
subgraphof
G. The
complement of a graphG,
denoted
by
Gcis
the
graphhaving
samevertex set as
G,
but
two
vertices are adjacentin
Gcif
andonly
if
they
are not adjacentin G.
A
complete graphis
a graphin
whichevery
two
vertices arejoined
by
an edge.Kn
denotes
the
complete graph of orderN.
A largest
complete subgraph of a graphG
is
called a cliquein
G,
andis
denoted
by
/3(G).
A
subset ofthe
vertex set of a graphG
is
called anin
dependent
set of verticesif
the
subgraphinduced
by
it
has
no edges.The
independence
numberofG
is denoted
by
a(g)
andis
defined
to
be
the
cardinality
of alargest
independent
setin
G.
Note
that
a(G)
=P(GC).
The
Following
the
notationin
[GRS],
wedenote
the
set{1,2,
...,n}
by
[n].
We
sometimes use
[n]
to
referto
anarbitrary
set ofcardinality
n.We denote
the
set{Y
:YC
S,
\Y\
=k}
by
[S]k,
and whenS
=[n]
we write[n]k.
An
r-coloring
of a setS
is
amap
X:S-+[r}.
For
sG
S, X(s)
is
calledthe
color of s.A
setT
C
S
is
called a monochromatic(under
X)
if X is
constant onT.
We
write n >(si,.
. .if,
for
every r-coloring
of[n]fc,
there
existsi,
1
<
i
< r,
and a subsetT
of[n],
\T\
=s,-,
sothat
[T]kis
coloredi.
In
the
caseS\
=S2
= . . . =sr
= s we usethe
shortened n*
(s)k.
If
ris
notindicated it
is
assumedto
be
2.
The
Ramsey
function
Rk(s\,
. . .sr) denotes
the
minimum n suchthat
n(sj,
. . . ,5r)fc.1.2
Ramsey Theory
Ramsey
theory,
adeep
generalization of pigeonholeprinciple,
is due
to
Ram
sey
[1930].
To introduce
the
theory,
assumethat
among 6 persons,
each pair of persons are eitherfriends
or enemies.Then
eitherthere
are3
persons whoare mutual
friends
or3
persons who are mutual enemies.Stated
in
otherway,
supposethat
S
is
any
set of6
elements.If
wedivide
the
2-element
subsets ofS
into
two classes,
X
andY,
then
either2. there
is 3-element
subset ofS
all of whose2-element
subsets arein Y.
Generalizing
these
conclusions,
supposethat p
andq
areintegers
withp,q
>
2,
then
a positiveinteger N has
the
(p,
q)
Ramsey
property
if
the
following
holds: Given
any
setS
ofN
elements,
if
wedivide
the
2-element
subsets ofS
into
two
classesX
andY,
then
either1. there is
a p-element subset ofS
all of whose2-element
subsets arein
X,
or2.
there
is
^-element subset ofS
all of whose2-element
subsets arein Y.
Thus,
the
number6
has
the
(3,3)
Ramsey
property.However,
the
number5
does
nothave
the
(3,3)
Ramsey
property
(as
there
is
nop
orq
elementsubset
satisfying
above condition).Note
that
if the
numberN
has
the
(p,
q)
Ramsey
property
andM
>
N,
then
the
numberM
has
the
(p,q)
Ramsey
property.
Ramsey's Theorem
statesthat,
if
p
andq
areintegers
withp, q >
2,
then
there
is
a positiveinteger N
has
the property
(p,
q)
Ramsey
property.The
smallest
integer N
whichhas
the
(p,q)
Ramsey
property
is
calledRamsey
Number
andis
denoted
by
R(p,q).
The
computation ofthe
Ramsey
numbersis in
general adifficult
problem.Graph
theory
makesit
convenientto
discuss
Ramsey
numbers.In studying
Ramsey
numbersR(p,
q), think
ofS
asthe
vertex set of agraph,
and of aset of
2-element
subsets ofS
asthe
edge set ofthis
graph.Then,
to say that
of
N
elements and wehave
a graphG
with vertex set5,
then
if
wedivide
the
2-element
subsets ofS
into
edges ofG
and edges ofGc,
eitherthere
arep
vertices all of which arejoined
by
edgesin
G
orthere
areq
vertices all of which arejoined
by
edgesin Gc.
To
say
in
otherwords,
a numberN
has
the
(p,
q)
Ramsey
property
if
andonly
if
wheneverwe colorthe
edges ofK^,
the
complete graph ofN
vertices,
with each edgebeing
colored eitherblue
orred, then
eitherKn
has
a redKp
or ablue Kq.
Thus,
to
find
R(Gi,
G2,
. . .,
Gt)
we needto
find
the
largest
numberTV
suchthat
ani-colored
completegraphKn
does
not contain a subgraph G,-in
colori,
for
1
<
i
< t.
For
example,
R(C4,C4,C4)
=11
meansthat there
is
no graphKn,
whereN
>
11,
which canbe
3-colored
in
such away
that
there
is
no monochromaticquadrilateral,
and suchcoloring
exists on10
vertices.1.3
Background
Graph
Ramsey
theory
has
grownfrom
nonexistencein
early
60s
to
become
one of
the
presently
most active areasin
Ramsey
theory.
To
statein
a simpleway,
let
Gi,G2,...,Gt
be
graphs.An integer
N is
saidto
have
Ramsey
property
(Gi, G2,
. . .,
G<),
if
every
coloring
of edges of complete graphKn
in
t
colors1,2,
... ,i giverise,
for
somei,
to
a subgraphthat
is
(isomorphic
to)
Gi
andis
colored allin
colori. The
graphRamsey
numberR(Gi
,
G2,
. . . ,Gt)
is
smallestinteger N
with graphRamsey
property
(Gi, G2,
. . .Chvatal
andHarary
[1972],
is
the
following:
For
agraphG (without
isolated
vertices),
let x(G)
denote
the
chromatic number ofG
andlet
c(G)
denote
the cardinality
ofthe
largest
connected component ofG.
R(G,H)>(x(G)-l)(c(H)-l)
+
l
Using
this results,
Chvatal
[1977]
proved one ofthe
most elegant results:For
any tree
Tm
with m verticesR(Tm,Kn)
=(m-l)(n-l)
+
l
Several
otherinteresting
results canbe found in
[GRS].
There
are wellknown
results
for
computing the
upperbounds
of classicalRamsey
numbers.Much
less
researchhas been done
in
the
area of multi-color graphRamsey
numbers as compared
to
classicalRamsey
numbers.As described
in
nextsection, very
few
exact values areknown. In
allthe
problems consideredin
this
thesis,
the
subgraphG;
is
either a complete graph or a cycle of order4
or
5. The
number of colorst
, waslimited
to
3, 4,
or5.
The
objective ofthis thesis
wasto
learn
to apply
concepts of genetic algorithms
to
Ramsey
theory
andtry
to
find
a new value of someRamsey
number or
to
improve
the
lower
bounds.
Another
objective wasto
performthe
searchusing the
under utilizedcomputing
power ofRIT
computer sciencedepartment.
The
next section presents some ofthe
known
and unknownbounds
of multiA
comprehensivelist
ofbounds
canbe found in Dr.
Radziszowski's
paper[Ral].
1.3.1
Known
and unknownbounds
The
only
known
value of a multi-color classicalRamsey
numberis
.
R(3, 3,
3)
=R(3, 3, 3;
2)
=17
[GG]
Greenwood
andGleason define
a3-coloring
ofK\q
labeling
the
verticesby
GF(16)
andcoloring
{a,
/?}
by
the
cubic character of a/?.
They
provethat
there
are no monochromatictriangles
andhence
i?(3,3,
3)
=17.
These
are some ofthe
bounds
of multi-color classical numbers:55
<
#(3,4,4)
<79
[KLR]
The
resultbelow is
provedin
[PR]
by improving
its
upperbound
withhelp
of a computer algorithm.
30
<
#(3,3,4)
<
31
[Ka2][PR]
Multi-color
general graphs:R(C4,C4,C4)
=11
[BS]
R{C4,C4,K3)
=12
[Sch]
R(C4,K3,K3)
=17
[ER]
i?(G5,G5,G5)
=17
[Yrl]
R{C4,C4,C4,C4)>
18
[Exl]
This
thesis
provides explicitlower bounds for
previously
uninvestigatedRam
sey
numbers asfollows:
R(K3,K3,C4,C4)>25
R(Ch,C4,K3)>
13
The
figure
onthe
next page shows some ofthe
construction of graphs of nvertices
containing
neitherfc-clique
nor/-independent
set,
which giveslower
10
R(4,3)
>8
[image:15.554.143.358.144.582.2]2
Genetic
Algorithms
2.1
Introduction
Genetic
algorithms are search algorithmsbased
onthe
mechanics of naturalselection and natural genetics.
They
combine survival ofthe
fittest
among
string
structures with a structured yet randomizedinformation
exchangeto
form
a search algorithm with someinnovative flair
ofhuman
search.In
every
generation,
a new set of artificial creatures(strings)
is
createdusing
bits
andpieces of
the
fittest
ofthe
old.While
randomized,
genetic algorithms areno simple random walk.
They
efficiently
exploithistorical information
to
speculate on new search points with expected
improved
performance[Gld].
In
orderfor
genetic algorithmsto
surpasstheir
moretraditional
cousinsin
the
quest
for
robustness,
GAs
mustdiffer
in
somevery
fundamental
ways.Ge
netic algorithms are
different from
other optimization and search proceduresin
four
ways:1.
GAs
work with acoding
ofthe
parameterset,
notthe
parametersthemselves.
2.
GA
search uses a population ofpoints,
not a single point.3.
GAs
use payoff(objective
function)
information,
notderivatives
orother
auxiliary knowledge.
4.
GAs
use probabilistictransition rules,
notdeterministic
rules.Genetic
algorithms requirethe
natural parameter set ofthe
optimizationproblem
to
be
coded as afinite-length
string
over somefinite
alphabet(but
not
for
the
orderbased
ones).A
simpleGA
that
yieldsgoodresultsin
many
practical problemsis
composedof
three
operators:1.
Selection
2.
Crossover
3.
Mutation
Selection is
the
processin
whichindividual
strings are chosento
breed
(i.e.,
participate
in crossover) according
to their
objectivefunction
values,
/
(also
called
fitness function).
Selecting
stringsaccording to their
fitness
valuesmeans
that
strings withhigher
valueshave
ahigher
probability
ofproducing
offspring.
Simple
crossoverfollows
selection.Each
pair of selected strings undergoescrossing
over asfollows:
aninteger
positionk
along the string
is
selecteduniformly
at randombetween
1
andthe
string
length less
one[1,
/
1].
Two
new strings are created
by
swapping
all charactersbetween
positions,
k +
1
and
/
inclusively.
Mutation
is the
occasional(with
smallprobability)
random alteration ofthe
value of a
string
position.The
mutationoperator, usually
plays asecondary
2.2
Representation
and
Approach
Using
the
problemdefinition
from
[Rob],
we needto
find
an edgecoloring
for
aKn
graph(for
N
aslarge
aspossible)
avoiding
G,-in
colori.
The
most common representationfor
storing
colors one canthink of,
is
anadjacency
matrix,
where eachentry
represents color of edge(i,j). The
colorscan
be
stored as numbers0,1,2,...
in
the
array.Using
this
representationthe
entire population canbe
randomly
initialized
as strings of0,
1
,. . .,
t
colors.
As
the
graphis
complete andundirected,
we needto
storeonly the
lower
triangle
of matrix.This
lower
triangle
canbe
mappedinto
a singledimensional
array, the
chromosomewiththe
small alphabet[t].
In
adifferent
approach,
instead
ofusing
this
string
as a chromosome weuse a permutation.
A
permutation representsthe
orderin
whichthe
edgesare colored.
This
representation canbe
combined with agreedy coloring
approach,
where each edgeis
colored,
in
order andusing
the
lowest
possiblecolor number
to
avoid monochromaticG,-,
penalizing
use ofhigher
numberof colors.
In
the
computation offitness,
the
non-optimal solution canbe
penalizedby
lowering
its
fitness
valueby
one,
every time
it
fails
to
avoidGi
in
colori.
The
objectiveis
to
get a permutation suchthat
number of colors requiredis
not greater
than
m.For
the
aboverepresentation, the
orderbased
Genetic
Algorithm
is
used.We
need an operator analogous
to crossover,
which permits exchange oftant ordering
similaritiesbetween
pairs of parentsto
form
offspring.The
following
cross-overs were usedfor
making
children:1.
Partially
matched cross-over(PMX):
Under
PMX,
two
strings(per
mutations)
arealigned,
andtwo
crossing
sites are pickeduniformly
atrandom
along
the
strings.These
two
pointsdefine
amatching
sectionthat
is
usedto
effect a crossthrough
positionby
position exchangeoperators.
That
is,
first
perform atwo-point crossover, then
repairthe
children so
they
are valid permutations.(PMX
arosein
considering
waysto tackle
ablind
traveling
salesman problem).2. Order
cross-over(OX):
The
order crossover operator starts offin
amanner similar
to
PMX,
but
instead
ofusing
pointby
point exchangesto
effectthe mapping,
it
uses asliding
motionto
fill
the
holes left
by
transferring
the
mapped positions.Although PMX
andOX
aresimilar,
they
processdifferent kind
of similarities.
PMX
tends to
respect absolute valuepositions,
whereasOX
tends to
respect relative value position.3.
Cycle
cross-over(CX):
CX
operatoris
a cross ofdifferent
color.It
performsrecombination under
the
constraintsthat
each element comesfrom
one parent orthe
other.2.3
Algorithm
and
Implementation
The
structure ofthe
genetic algorithm usedfor
Ramsey
numbersin
this thesis
is
shownbelow.
1.
Randomly
initialize
the
population.2.
Select
two
winners(chromosome)
using
a pair of Telementtourna
ments.
Call
them
parents.3.
Perform
cross-over, then
mutatethe
children.The
children replacethe
tournament
losers
ofstep 2.
4.
Evaluate
the
fitness
of children.5.
Repeat
steps2 through
5
until a specified optimum valueis
reached orfor
afixed
number oftimes.
The
following
parameters affectthe
behavior
ofthis
algorithm:population size
mutation rate
tournament
sizenumber of
loops
seed
2.3.1
Supporting
functions
Given
apermutation,
ofthe
\2/
edges of
Kn,
we needto
colorthose
edgesin
that
order.As
the
edges are numbered(to
map to
singledimensional
array),
we needtwo
end nodes of an edgeto
checkif
a graphG;
is
being
formed
in
colori.
A
look_up
table
is
usedto
get value ofi
for
a given edge e.The table is
initialized
as:k
=0
for
i
^0to
N-l
do
for
j
>0
to
i-1
do
look_up[k]
=i
k
=k+1
end
end
and
the
value ofj
canbe
computed asj
=look_up[e]
-i
x(i-l)/2.
The
colorto
be
assignedto
edge(i,j)
needsto
be
composed with all otheredges adjacent
to
nodesi
andj
to
avoidGi
in
colori. For
example, to
checkfor
k
->0
to
N-l
do
if i, j,
k
aredistinct
then
if
color(i,j)
=color
(i,k)
= color(j,k)
then
return
false
endif
endif
end
return
true
As
the
colors are storedin
anarray,
to
get color of edge(i,j)
the
index
ofarray
is
computed as:i
x(i-l)/2
+j
if
i
>j
j
x(j-D/2
+i
if
j
>
i
Using
the
function
pointer ofC
language,
the
function
to
check of G,-is
being
formed
canbe
changed at run-timedepending
onthe
problem andthe
number of colors.The fitness
function
f
v(who)
usesthe
abovefunctions
to
computethe
the_f
itness
of
individual
string.The
variable whodenotes
the
individual
p
[who]
, a rowin
the
populationi.e.
the
p
[P0PJ3IZE]
[individualJLength]
.The
valueis
computed as:
for
i
0
to individual-length
do
I
=look_up
[p
[who] [i] ]
J
= p[who][i]
-I
x(I-D/2
this_color
=0
done
=0
while not
done
done
=Check
[this_color]
(I,
J,this_color)
if
notdone
then
this_color
=this_color
+1
if
this_color
>
no_of.colorsthen
break
endif
endif
end
if
this_color
>
no_of-colorsthen
the_fitness
=the_fitness
-1
endif
color
[p
[who] [i]]
=this_color
end
where color
[]
is
usedto
storethe coloring, Check
[]
is
the array
of pointerfunctions
and no_of.colorsis
a parameterindicating
maximum number of2.3.2
The
main programThe
main algorithmis
givenbelow:
init()
for
who ^0to
P0P_SIZE-1
do
fitness
[who]
=fv(who)
if
hero > MAX_HER0
then
break
endifend
trial
=0
while
true
trial
=trial
+1
if
trial
>
LOOPS
then
break
endiftournament
(tournament_size,
pi
,C\)
tournament
(tournament_size,
p2
,C2)
make_children(pi,
P2
,C\,
C2)
if
MUT-RATE >
0.0
then
mutate(ci),
mutate(c2)endif
fitness[ci]
=fv(ci),
fitness
[c2]
=fv(c2)
if
hero > MAX.HER0
then
break
endifend
The
main program startsby
randomly
initializing
populationp,
value ofMAX_HER0
(the
goal),
individualJ.ength, look_up
table,
etc.The
fitness
value of each chromosome
in
the
initial
populationis
computed.There is
aslight chance
that the
MAX-HERO
willbe found
evenbefore
evolution.The
mainloop
ofthe
program(while
true)
performsthe
actual work ofgenetic algorithm.
A
tournament
is
held
twice
to
gettwo
parents andtwo
children.
Every
time the
tournament
()
function
is
calledit
returns a winnerand a
loser
to
serve as parent and child respectively.The
algorithmfor
tournament
()
is
givenbelow. The function
which gets randomj
is
writtenin
such away that the
value ofj
is
not repeatedfor
that
iteration.
After
the
tournament,
a crossoveris
performedbetween
selected parentsto
gettwo
newchildren,
who replacethe the tournament
losers. This
loop
continues
till the
desired
maximumhero
is
reached or number oftrials
exceedswinfit = -9999
losefit
=9999
for
i
?0
to
tournament_size-l
do
get a random
j
if
fitness
[j]
>
winfitthen
winfit =
fitness
[j]
winner =
j
endif
if
fitness
[j]
<
losefit
then
losefit
=fitness
[j]
loser
=j
endif
end
This
approachis different from
the
one usedin
usualGAs,
in
away the
tournament
is
held
[Gld].
The
easiestway
is
to
create abiased
roulettewheel where each current
string in
the
populationhas
a roulette wheel slotsized
in
proportionto
its
fitness.
To
select,
wesimply
spin a weighted roulette wheelfor
P0P_SIZE times.
If
a string's
fitness
value represents/
percent ofthe total
fitness,
each spinturns up that
string
with aprobability
of//100. In
this way,
morehighly
fit
strings
have
ahigher
number of offspringsin succeeding
generation.Whenever
a reproductionis
necessary,
the
complete old populationis
replaced
by
new oneby
successively selecting
parents andperforming
crossover onthem to
get new members ofthe
population.Where
as,
in
the
genetic algorithmused,
the
presentinvestigating
children3
Experiments
3.1
Experimental
Setup
The
searchbehavior
in
aGA depends
on a number ofparameters,
such as:population
size,
mutation rate andtournament
size.The
initial
populationdepends
on value of 'seed' usedto randomly
initialize
population.Even if
wetake
five
values of each ofthe
parametersthe
number oftimes the
program
is
requiredto
runis
54 x3
(for
eachtype
of crossover).In
orderto
reduce
the
computations,
giventhree
sets offive
valueseach,
the
following
arrangement requires
25
experimental runs.P
q
r st
1
ab
cd
e2
e ab
cd
3
d
e ab
c4
cd
e ab
5
b
cd
e aThe
massivecomputationinvolved in running the
program25
times
for
eachtype
of cross-over andfor
each seedvalue,
wasdivided
by
using
multiplecomputers.
A UNIX
shell script usedfor
running the
program withdifferent
combinations
(25
in all)
ofthree parameters,
was run ondifferent
computersfor
different
seed values
(different
initial population)
using the
'rsh'utility
ofUNIX. The
results were stored
in
afile
onefor
each problem and computer.The
use of multiple computersfor
experimentshelped
to
speedup
the
search.The
following
values of populationsize,
mutation rate andtournament
sizeand
their
combinations were usedfor
these
experiments.After
doing
someinitial
experimentsthe
following
values of parameters werefixed
for
all problems.population size mutation rate
tournament
size1000
0
2
2000
0.001
7
5000
0.005
12
15000
0.01
19
40000
0.05
26
Various
different
valuesof seed wereused, specially
for
those
Ramsey
numberswhose exact values are now
known.
3.2
Effect
of
variousparameters
Even
afterperforming
severalexperiments,
it
wasdifficult
to
identify
the
effect of
the three parameters, tournament
size,
populationsize,
and mutationThe
main reasonfor
this that
the
majority
of solutions werefound in
the
initial
population,
i.e.,
evenbefore
evolution.Thus
these
parameters werenever
actually
used.The
actual values(or
range ofvalues)
of parametersfor
these
problemsalong
withthe
number of coloringsfound,
is
givenbelow.
The
effect of parameters on moredifficult
problemsis discussed below.
problem seed
POP-SIZE
ts
MUT.RATE
coloringsN
R\C4,C4,C4)
0-6000
1000-15000
2-17
0-0.05
30
9
R(C4,C4,K3)
0-6000
1000-15000
2-17
0-0.05
25
12
R(Cs,C5,C5)
0-6000
1000-15000
2-17
0-0.05
43
16
The
otherproblems, viz.,
R(C4,K3,
K3), R(C4, C4, K3, K3),
andR(C5,C4,
K3)
required a
large
member of evaluationsto
achieve successful colorings.R(C4,K3,K3):
The
solutionfor
this
problem wasfound
only
when weused
the
smallest mutation rateof0.001.
The
other parametershad
novisible effect on
the
search.As high
as140,000
fitness
value evaluationswere required and
16
colorings werefound
for
a complete graph of size16.
R(C4,C4, K3,
K3):
Only
6
colorings werefound for
a complete graphof size
24.
The
successful parameterswere,
mutation rate was again0.001,
population size was1000
andthe tournament
size was7.
R(Cs,
C4,K3):
83
colorings werefound for
agraph of size12,
but
very
few
ofthem
in the initial
population.There
was no specific effect ofany
ofthe
parameters onthe
search.4
Results
& Conclusions
This
section presents some ofthe
results achievedusing the
genetic algorithm
for
search.The
results were storedin
the
'mc'(multicolored)
format
developed
by
Dr. Radziszowski for
storing
graphs.The
graphs are stored asfollows: If
cis
the
number of colorsthen ceiling(log(c))
bits
are usedto
code oneentry
ofthe
matrix(actually
half
ofit).
Color
0 is
used
to
handle
partial colorings(not
usedin
this thesis).
6
bits
are sufficientto
make one printable character.The
first
char of mc-format givesthe
number
of vertices andthe remaining
bytes
(6
bits
ofinfo
each)
as needed.The
last
oneis possibly
padded with0-bits.
The
results shownbelow
are afterdecoding
the
corresponding
'mc'format.
These
areadjacency
matricesshowing
the
coloring
of complete graphsKn-The
fines
following
the
matrix show color numbere,
degrees
of nodes1
to
N
with adjacent edgesin
colori,
number of edgesin
colori
and number oftriangles
&;
quadrilaterals respectively.The
first four
values arepreviously
4.1
i2(C4>C4,C4)
=10
221333112
2
11123323
21
2112332
112
322133
3113
21312
32122
3121
332213
211
1331312
21
12331212
3
232321113
0 deg:
0000000000,
0
edge,
0 tr
1
deg:
3333433433,
16 edge,
4
tr,
0
quad2 deg:
3343243233,
15 edge,
3
tr,
0
quad3 deg:
3323323333,
14 edge,
2
tr,
0
quad4.2
R(Kz,CAtCA)
=12
3311112122
3
132111223
31
11233132
131
3231311
1213
331211
11223
23211
113332
2211
2131132
133
12132221
11
223111131
2
2321111312
0
deg:
00000000000,
0
edge,
0
tr
1
deg:
54455444555,
25
edge,
0
tr
2
deg:
33212432433,
15
edge,
3
tr,
0
quad4.3
R(Ki,K3,CA)
=17
323212113221321
3
21213111231322
22
2121121131233
312
331232122121
2213
13212312231
11231
1232122123
231131
212313212
1112222
23213113
11231312
2133122
311222232
213131
2211313212
12213
23321211311
1232
111222333321
112
3321212111221
23
22323211231312
1
123113232132231
0
deg:
0000000000000000,
0 edge,
0 tr
1 deg:
5665566665666655,
45
edge,
0 tr
2 deg:
6566665656655665,
45 edge,
0 tr
3 deg:
4434434344344345,
30 edge,
5
tr,
0
quad4.4
R(C6, C6>
C5)
=17
113222111131231
1
31111223313112
13
1111332212113
311
222111131231
2112
33111121321
21123
3111121321
211233
111121321
1231111
23313112
12311112
3312112
132111133
212113
1321111332
12113
31132221111
1231
132111132221
113
2112333111121
21
31132221111312
1
123111122331311
0 deg:
0000000000000000,
0 edge,
0 tr
1
deg:
8888888888888888,
64 edge,
0 tr
2
deg:
4334444343344443,
29 edge,
8
tr,
2
quad4.5
i2(C5jC4,tf3)> 13
This
newbound
wasfound for
previously
uninvestigatedRamsey
number.Even
aftertrying
alot
(performing
lot
of experiments withdifferent
parameters), this
lower bound
could notbe improved
using
this
GA.
11211312312
1
2123131131
12
123121131
211
11213213
1221
3131131
13313
121121
311211
13213
1321321
1121
21131131
312
311211213
13
1331321211
1
21131131231
0
deg:
000000000000,
0
edge,
0
tr
1
deg:
666666666666,
36
edge,
0 tr
2 deg:
323322232222,
14
edge,
4
tr,
0
quad3 deg:
232233323333,
16
edge,
0 tr
4.6
R(Ks,Ks,CA,C4)>2b
This is
another newbound,
found for
previously
uninvestigatedRamsey
number. This bound
could notbe improved further
using this
GA.
11234212221241411123411
1
3312121414112342212132
13
141222124242132221323
231
12121313112442212132
3141
1222123242142221321
42121
212221211311123314
212122
43132331221142211
1222214
1132124124311143
21212231
341431211142211
241312113
11412412232242
2121223341
2321221142411
14433122112
132132211124
212122314431
41211132211
4141413231234
2132221221
12222114121212
123411143
431413212421211
11123412
1434412211231321
2211123
12222114121212312
311134
122221131212124123
11134
21212241434132121112311
413133212241221411134
11
1323211414121241233111
2
12321413121411323441312
0 deg:
000000000000000000000000,
0 edge,
0 tr
1
deg:
a9697a89a889a7aa9aaaaaa9,
109 edge,
0 tr
2
deg:
77a8a8977897788678878565,
90 edge,
0
tr
3 deg:
244433433334342343334445,
41
edge,
7
tr,
0
quad4 deg:
433232243433343432231434,
36
edge,
4
tr,
0
quadA Genetic Algorithm
was appliedsuccessfully
to
one ofthe
mostinteresting
and
difficult
problemsin
combinatorics, the
Ramsey
numbers.As
shownabove, the
bounds
ofexisting
R(C4,C4,C4),
R(C4,C4,K3), R(C4,K3,K3),
R(C5,
C5,
C5)
wereachieved andtwo
newRamsey
numbersR(C4,C4, K3,
K3)
>
25
andR(C5,
C4,K3)
>
13
werefound.
The
orderbased
genetic algorithm combined withgreedy
approach wasfaster
and efficient as compared
to the
usualstring
based
approach.References
[Ban]
Bannani
F.,
"Bounds
ofClassical
Ramsey Numbers",
Ph.D.
Thesis,
Dept.
ofMathematics
andStatistics,
Carelton
University,
1988
[BS]
Bialostocki A.
andSchonheim
J.,
"On
Some
Turan
andRamsey
Num
bers",
Graph
Theory
andCombinatorics,
Academic
Press, London,
1984,
29-33
[ER]
Exoo
G.
andReynolds
D.F., "Ramsey
Numbers Based
onC$
Decom
positions",
Discrete Mathematics
71,
1988,
119-127
[Exl]
Exoo
G., "Ramsey
Graphs
with aComputer",
Congressus
Numeran-tium
59, 1987,
31-36
[Gld]
Goldberg
D.E.,
Genetic Algorithms
in
Search,
Optimization
andMa
chine
Learning,
Addison
Wesley,
1989.
[GRS]
Graham
R.L.,
Rothschild
B.L.,
Spencer
J.H., Ramsey Theory,
John
Wiley
&
Sons,
1980
[GG]
Greenwood R.E.
andGleason
A.M.,
"Combinatorial Relations
andChromatic
Graphs",
Canadian
Journal of
Mathematics
7, 1955,
1-7.
[Ka2]
Kalbfleisch
J.G.,
"Chromatic
Graphs
andRamsey's
Theorem",
Ph.D.
Thesis, University
ofWaterloo,
January
1966.
[KLR]
Kreher
D.L.,
Wei Li
andRadziszowski
S.P.,
"Lower Bounds
ofMulti
colored
Ramsey
Numbers From
Group
Orbits",Journal
of
Combinato
[McN]
McNamara
J.N.,
"Two
New
Ramsey Numbers",
MS
Thesis,
Rochester Institute
ofTechnology,
1992.
[PR]
Piwakowski K.
andRadziszowski
S.,
"New Upper Bound for
the
Ram
sey
Number
i?(3,3,4)
to
appear.[Ral]
Radziszowski
S.,
"Small
Ramsey
Numbers",
Electronic Journal
of
Combinatorics,
1996.
[Rob]
Roberts
F.,
Applied
Combinatorics,
Prentice
Hall
Inc.,
1984,
325-348
[Sch]
Schutle
C.U.,
"Ramsey-Zahlen fur
Baume
andKreise",
Ph.D.
Thesis,
Heinrich-Heine-Universitat
Dusseldorf,
1992.
[Wei]
Wei
Li,
"An
Algorithmic Approach for
Multi-Color
Ramsey Numbers",
MS
Thesis,
Rochester
Institute
ofTechnology,
1987.
[Xin]
Xin
Jin,
"Ramsey
Numbers
Involving
Triangle:
Theory
andAlgo
rithm",
MS
Thesis,
Rochester
Institute
ofTechnology,
1993.
[Yrl]
Yuabsheng
Y.
andRowlinson
P.,
"On
the
Third
Ramsey
Numbers
ofGraphs
withFive
Edges",
Journal
of
Combinatorial
Mathematics
andCombinatorial
Computing
11, 1992,
213-222.
APPENDIX
void
pmx(A,
B)
int *A, *B;
{
int *As, *Bs;
int
i,
start , end;
int
LB
=0,
UB
=individual_length-l;
/*
subscript vectorindexed
by
contents*/
As
=ivector(LB,
UB)
;
Bs
=ivector(LB,
UB)
;
for(i
=LB;
i
<=UB; i++)
{
As[A[i]]
=i;
Bs[B[i]]
=i;
>
end =random_int(individual_length-l) ;
start =random_int(end-l) ;
for(i
=start;
i
<=end;
i++)
{
int
tmp
=A[i]
;
int
tmpl
=B[Bs[tmp]];
/*
swap
the
contents ofA[i]
andthe
withthe
contentsof
A
at positon pointedby
the
contents ofAs(subscript
ofA)
at positionB[i]
*/
A[i]
=A[As[B[i]]]
=tap;
/*
swap
the
contents ofB[i]
andthe
withthe
contentsof
B
at positon pointedby
the
contents ofBs
(subscript
ofB)
at positionA[i]
*/
B[Bs[tmp]]
=B[i];
B[i]
=tmpl;
}
free_ivector(As,
LB,
UB)
;
free_ivector(Bs,
LB,
UB)
;
void
cx(A,
B)
int
*A,
*B;
int
*As,
*swp;
int i
, stpt, current;
int LB
=0,
UB
=individual_length-l;
/* the
subscript vectorindex
by
the
contents ofA */
As
=ivector(LB,
UB)
;
/?The
vectorindicating
whetherto
swap
or notto */
/*
0
-not
to
swap
*/
/*
1
-to
swap
*/
swp
=ivector(LB,
UB)
;
for(i
=LB;
i
<=UB;
i++)
{
As[A[i]]
=i;
swp[i]
=1;
>
stpt =
random_int(individual_length)
;
swp[stpt] =
0;
current =
As
[B
[stpt]];
/*
i.e
not reachedthe
starting
pt ofthe
cycle*/while(current !=
stpt)
{
swp
[current]
=0;
current =
As
[B
[current]
]
;
>
for(i
=LB;
i
<=UB;
i++)
{
if
(swp[i]) {
stpt =
A[i]
A[i]
=B[i]
B[i]
=stpt;
>
}
free_ivector(As,
LB,
UB)
;
free_ivector(swp,
LB,
UB)
;
void
ox(
A,
B
)
int *A, *B;
int *As, *Bs;
int
*Ac,
*Bc;
int *At,
*Bt;
int
*tempA,
*tempB;
int
i
,j
,j
A
,j
B
,done
, start =0
, end =1
;
int LB
=0,
UB
=individual_length-l;
As
=ivector(LB,
UB)
Bs
=ivector(LB,
UB)
Ac
=ivector(LB,
UB)
Be
=ivector(LB,
UB)
At
=ivector(LB,
UB)
Bt
=ivector(LB,
UB)
tempA
=ivector(LB,
UB)
;
tempB
=ivector(LB,
UB)
;
for(i
=LB;
i
<=UB; i++)
{
As[A[i]]
=i;
/*
subscriptA
vector*/
At[i]
=A[i];
/*
copy
ofA */
Bs[B[i]]
=i;
/*
subscriptB
vector*/
Bt[i]
=B[i];
/*
copy
ofB */
Ac[i]
=0;
/*
the
affected ones*/
Bc[i]
=0;
tempA[i]
= -1;tempB[i]
=-1;
}
for(i
= start;
i
<=end;
i++)
{
int
tmp;
Bc[B
s[At[i]]]
=l;
Ac
[A
s[Bt[i]]]
=l;
tmp
;=A[i];
A[i]
=B[i];
B[i]
=tmp;
>
if
(start
>
]
LB)
{
JA
= start-1;
JB
= start-1;
}
else
{
JA
=UB;
JB
=UB;
>
/*
sort ofmoving
the
block
right*/
for(i
=end;
i
>= start;
i-)
{
if
(!Ac[i]) {
A[jA]
=AtCi];
jA-;
if
(jA
<
LB)
{
jA
=UB;
}
if
(!Bc[i]) {
B[jB]
=BtCi];
JB--;
if
(jB
<
LB)
{
JB
=UB;
>
>
>
/*
getthe
numbersto
putin
the
remaining
spots*/
if
(end
==UB)
{
i
=LB;
>
else
{
i
= end +1
;
>
jA
=LB;
jB
=LB;
done
=0;
while(ldone)
{
if
(!Ac[i])
{
tempA[jA]
=At
[i]
;
JA++;
>
if
(!Bc[i])
{
tempB[jB]
=Bt[i];
JB++;
>
i++;
if
(i
==start)
{
done
=1;
>
else
{
if
(i
>
UB)
{
i
=LB;
if
(i
==start)
done
=1;
}
>
>
if
(end
<
UB)
{
jA
=end +
1;
jB
= end +1;
>
else
{
jA
=LB;
jB
=LB;
>
i
=0;
while
((tempA[i]
!= -1)II
(tempB[i]
!= -1)){
if
(tempA[i]
!=-1)
{
JA++;
if
(jA
>
UB)
{
JA
=LB;
}
>
if
(tempB[i]
!
==-1)
{
B[jB]
==tempB[i]
;
JB++;
if
(jB
>
UB)
{
JB
=LB;
}
>
i++
free_ivector(As, LB,
UB)
free_ivector(Bs, LB,
UB)
free_ivector(Ac, LB,
UB)
free_ivector(Bc, LB,
UB)
free_ivector(At, LB,
UB)
free_ivector(Bt, LB,
UB)