SlideShare a Scribd company logo
Polynomial algorithm for isomorphic graphs, all cases
Mohamed mimouni
20 street kadissia 60000 Oujda Morocco
mimouni.mohamed@gmail.com
April 12, 2019
Abstract
In this paper, I propose an algorithm capable of solving the problem of isomorphic graphs
in polynomial time. First, I define a pseudo tree that allows us to define for each vertex a
label or a label. Secondly, I apply the pseudo tree for the first graph then I calculate the
labels of each vertex of the first graph, then I do the same for the second graph. Thirdly, I
look for for each graph vertex1 the graph vertices2 which have the same label, if or less a first
graph vertex its label is not in the second graph vertices we deduce that the two pseudo trees
are not isomorphic. In other cases I generate solutions and check them in polynomial time...
This algorithm therefore allows isomorphic graphs to calculate the image of each vertex in
polynomial time.
MOTS-CLES : isomorphic graphs, isomorphism, automorphism, hypergraphs, isomorphs
1
Contents
1 Definitions of the terms 3
1.1 A graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 A hypergraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 An isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Building a pseudo tree 3
3 Label 3
4 Algorithme 3
4.1 For the graph G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.2 For the graph H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5 Mathematical proof 4
5.1 principal theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5.1.1 proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5.2 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5.2.1 The verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5.2.2 The complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6 Algorithm complexity 4
7 Examples 5
7.1 connected graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1.1 Pseudo tree of head a for graph G . . . . . . . . . . . . . . . . . . . . . . . 5
7.1.2 Label of each graph vertex G . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1.3 Pseudo tree of head 2,4,5 and 7 for graph H . . . . . . . . . . . . . . . . . . 5
7.1.4 The labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1.5 Check the solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
8 pseudo codes 7
8.1 pseudo-arbres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
8.2 The label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
8.3 Validate a solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.4 comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
9 Conclusion 8
2
1 Definitions of the terms
1.1 A graph
A graph is a set of points called nodes (sometimes vertices or cells) connected by lines (segments)
or arrows called edges (or links or bows).
1.2 A hypergraph
A hypergraph is a graph whose edges connect one or two or more vertices.
1.3 An isomorphism
An isomorphism f between the graphs G and H is a bijection between the vertices of G and those
of H, such as a pair of vertices u, v of G is an edge of G if and only if (u), (v) is an edge of H.
2 Building a pseudo tree
Let’s say G a simple graph and s a vertex. The pseudo tree header s is done in the following way :
1. The vertex s in level 0.
2. The adjacents of s in level 1.
3. The adjacencies of each vertex of level 1 without repetition, which are not already in the
other levels, in the level 2.
4. Repeat step 3 to build the other levels.
5. End when there are no new adjacent ones.
If in the case (case of not connected graph) where there are still graph vertices G, which are not
in the pseudo-trees, other pseudo-trees must be generated.
3 Label
For each vertex of G a label is formed of four elements :
1. n the level it is at.
2. h the number of adjacent ones who are in the upper level.
3. m the number of adjacents who are in the same level.
4. b the number of adjacent ones who are in the lower level.
4 Algorithme
Let’s say G a graph {g1, g2, g3, , , gn} and H a graph {h1, h2, h3, , , hn}
The two graphs G and H are isomorphic if for the isomorphism function f(gi) = hi, we have the
label of gi equals the label of hi.
label(gi) = label(hi) = n − h − m − b
4.1 For the graph G
Construct one or more pseudo-trees folds so as to have a label for each vertex of the graph G.
4.2 For the graph H
Build pseudo trees and calculate labels for each vertex of H. Search in the graph G vertices that
have the same label. If at least one vertex of H has an unequal label of the labels of the vertices
of H, the header is modified and the labels of the vertices of H. If each vertex of H has a label
equal to graph labels G, we do a validation or verification of the solutions. If the solution is not
validated, the headers are changed. End if a solution is validated or check.
3
5 Mathematical proof
5.1 principal theorem
Let’s say P(a) and Q(a ) two pseudo isomorphic trees.
If f(a) = a we have:
For each vertex s of P(a) : label(s) = label(s)
5.1.1 proof
Isomorphism keeps the distance, therefore:
1. n = d(a, s) = d(a , f(s)) so f(s) is also in level n.
2. for h, there are h vertices of level n-1 adjacent to s such as d(s, th) = d(s , th) and d(a, th) =
d(a , th) = n − 1, according to the definition there is also h vertices in Q(a’)
3. for m, there are m vertices of level n adjacent to s so d(s, tm) = d(s , tm) and d(a, tm) =
d(a, tm) = n, according to the definition there are also m vertices in Q(a’).
4. for b, there are b vertices of level n+1 adjacent to s so d(s, tb) = d(s , tb) and d(a, tb) =
d(a , tb) = n + 1, according to the definition there is also b vertices in Q(a’) .
which shows that label(s) = label(s)
5.2 The algorithm
According to principal theorem we have two cases:
Case 1 label(s) = label(s ) =⇒ f(s) = s .
Case 2 label(s) = label(s ), it is necessary to check f(s)=s’ (We can’t say that f(s) = s )
5.2.1 The verification
So after finding for each vertex of G one or more images of isomorphism f, we must do one last
step: solution verification, this verification and polynomial.
5.2.2 The complexity
All the steps of the algorithm are polynomial, so the algorithm proposed in this paper and Poly-
nomial, so the isomorphism is in P.
6 Algorithm complexity
Each vertex must be in a pseudo-tree, so the complexity is O(n2
).
For the second graph the complexity can reach O(n3
).
The calculation of the labels of each vertex is O(n).
The solution validation is to O(n3
).
So this algorithm is polynomial.
4
7 Examples
7.1 connected graphs
Either the two graphs G and H, present by lists of the following adjacents:
Graph G Graph H
a:b,d,e,h 1:4,6,7,8,9
b:a,c,e,g,i 2:6,7,8,9
c:b,f,g,h,i 3:5,6
d:a,e,f,i 4:1,5,6,9
e:a,b,d,h,i 5:3,4,7,9
f:c,d 6:1,2,3,4,8
g:b,c,h 7:1,2,5,9
h:a,c,e,g 8:1,2,6
i:b,c,d,e 9:1,2,4,5,7
7.1.1 Pseudo tree of head a for graph G
Graph G levels
a level 0
b,d,e,h level 1
f,i,c,g level 2
7.1.2 Label of each graph vertex G
vertex adjacent level top even bottom label
a b,d,e,h 0 empty a b,d,e,h 0-0-0-4
b a,c,e,g,i 1 a b,d,e,h f,i,c,g 1-1-1-3
d a,e,f,i 1 a b,d,e,h f,i,c,g 1-1-1-2
e a,b,d,h,i 1 a b,d,e,h f,i,c,g 1-1-3-1
h a,c,e,g 1 a b,d,e,h f,i,c,g 1-1-1-2
f c,d 2 b,d,e,h f,i,c,g empty 2-1-1-0
i b,c,d,e 2 b,d,e,h f,i,c,g empty 2-3-1-0
c b,f,g,h,i 2 b,d,e,h f,i,c,g empty 2-2-3-0
g b,c,h 2 b,d,e,h f,i,c,g empty 2-2-1-0
explanations After finishing for graph G, we move on to graph H : Label (a)=0-0-0-0-4 so for
graph H, we test f(a)=2, f(a)=4, f(a)=5 and f(a)=7.
7.1.3 Pseudo tree of head 2,4,5 and 7 for graph H
2 4 5 7 level 0 a
6,7,8,9 1,5,6,9 3,4,7,9 1,2,5,9 level 1 b,d,e,h
3,1,4,5 3,8,2,7 6,1,2 6,8,3,4 level 2 f,i,c,g
8 level 3
We are forward to vertex 5 four levels so f(a) = 5.
7.1.4 The labels
head 2
vertex adjacent level top same bottom label images
2 6,7,8,9 0 empty 2 6,7,8,9 0-0-0-4 a
6 1,2,3,4,8 1 2 6,7,8,9 3,1,4,5 1-1-1-2 d,h
7 1,2,5,9 1 2 6,7,8,9 3,1,4,5 1-1-1-2 d,h
8 1,2,6 1 2 6,7,8,9 3,1,4,5 1-1-1-1 empty
At the vertex 8, the label (1-1-1-1-1) does not exist in graph labels G, so f(a) = 2.
head 4
vertex adjacent level top same bottom label images
4 1,5,6,9 0 empty 4 1,5,6,9 0-0-0-4 a
1 4,6,7,8,9 1 4 1,5,6,9 3,8,2,7 1-1-2-2 empty
For vertex 1 the label (1-1-2-2) does not exist in the graph labels G, so f(a) = 4.
5
head 7
vertex adjacent level top same bottom label images
7 1,2,5,9 0 empty 7 1,2,5,9 0-0-0-4 a
1 4,6,7,8,9 1 7 1,2,5,9 6,8,3,4 1-1-1-3 b
2 6,7,8,9 1 7 1,2,5,9 6,8,3,4 1-1-1-2 d,h
5 3,4,7,9 1 7 1,2,5,9 6,8,3,4 1-1-1-2 d,h
9 1,2,4,5,7 1 7 1,2,5,9 6,8,3,4 1-1-3-1 e
6 1,2,3,4,8 2 1,2,5,9 6,8,3,4 empty 2-2-3-0 c
8 1,2,6 2 1,2,5,9 6,8,3,4 empty 2-2-1-0 g
3 5,6 2 1,2,5,9 6,8,3,4 empty 2-1-1-0 f
4 1,5,6,9 2 1,2,5,9 6,8,3,4 empty 2-3-1-0 i
7.1.5 Check the solutions
vertex adjacent images images adjacent vertex adjacent state
7 1,2,5,9 a (b),(d,h),(d,h),(e) a b,d,e,h ok
1 4,6,7,8,9 b (i),(c),(a),(g),(e) b a,c,e,g,i ok
2 6,7,8,9 d (c),(a),(g),(e) d a,e,f,i no
2 6,7,8,9 h (c),(a),(g),(e) h a,c,e,g ok
5 3,4,7,9 d (f),(i),(a),(e) d a,e,f,i ok
5 3,4,7,9 h (f),(i),(a),(e) h a,c,e,g no
9 1,2,4,5,7 e (b),(d,h),(i),(d,h),(a) e a,b,d,h,i ok
6 1,2,3,4,8 c (b),(d,h),(f),(i),(g) c b,f,g,h,i ok
8 1,2,6 g (b),(d,h),(c) g b,c,h ok
3 5,6 f (d,h),(c) f c,d ok
4 1,5,6,9 i (b), (d,h),(c),(e) i b,c,d,e ok
explanations In this table we have f(2) = h and not d. and f(5) = d and not h.
The check to give 2 errors, we must then do another check
vertex adjacent images images adjacent vertex adjacent state
7 1,2,5,9 a (b),(,h),(d),(e) a b,d,e„h ok
1 4,6,7,8,9 b (i),(c),(a),(g),(e) b a,c,e,g,i ok
2 6,7,8,9 h (c),(a),(g),(e) h a,c,e,g ok
5 3,4,7,9 d (f),(i),(a),(e) d a,e,f,i ok
9 1,2,4,5,7 e (b),(,h),(i),(d),(a) e a,b,d„h,i ok
6 1,2,3,4,8 c (b),(,h),(f),(i),(g) c b,f,g„h,i ok
8 1,2,6 g (b),(,h),(c) g b,c„h ok
3 5,6 f (d),(c) f c,d ok
4 1,5,6,9 i (b),(d),(c),(e) i b,c,d,e ok
explanations Now with no errors so both graphs G and H are isomorphic and here is the final
solution:
vertex Image
a 7
b 1
c 6
d 5
e 9
f 3
g 8
h 2
i 4
6
8 pseudo codes
8.1 pseudo-arbres
Here is a pseudo code that generates a pseudo tree.
Algorithm 1: generate a pseudo tree P(a) head a for a graph G
Data: A graph G and a vertex a of G
Result: A pseudo tree P(a)
1 initialization; the vertex a in the level 0;
2 the adjacent from a in level 1;
3 the vertices of G in array graph[];
4 delete the vertices of the level 0 and 1 array graph[];
5 niv ← 1 ;
6 adjacents ← adjacent to a ;
7 while graph[] is not empty do
8 initialize array list[] empty ;
9 niv ← niv + 1 ;
10 for every element of adjacent do
11 adjacents1 ← the adjacents of element ;
12 adjacents1 ← the intersections between adjacent1 and graph[] ;
13 liste[] ← list[]+adjacents1 ;
14 liste[] ← liste[] order and without duplication ;
15 graph[] ← the difference between graph[] and list[] ;
16 if graph[] is empty then
17 break;
18 end
19 end
20 if lise[] is empty then
21 break;
22 else
23 list in level niv ;
24 end
25 end
For unconnected graphs, it is necessary to generate other pseudo-trees for the other remaining
vertices.
8.2 The label
Here’s a pseudo code that calculates the label of a vertex in a pseudo tree.
Algorithm 2: Calculate the label of a vertex s in a pseudo tree
Data: A vertex s in a pseudo tree
Result: s label for a pseudo tree
1 n ← determine the level of s;
2 nivh ← determine the vertices that are in the level n+1;
3 nivm ← determine the vertices that are in the level n;
4 nivb ← determine the vertices that are in the level n-1;
5 h ← the number of adjacent vertices s that are in nivh;
6 m ← the number of adjacent vertices s that are in nivm;
7 b ← the number of adjacent vertices s that are in nivb;
8 label(s) ← "n-h-m-b";
7
8.3 Validate a solution
Here’s a pseudo code to check out a proposed solution.
Algorithm 3: Check a solution
Data: A proposed solution
Result: validated or erroneous solution
1 initialization;
2 err ← 0;
3 for Each f(a)=a’ proposed do
4 adjacent(a) ← the adjacent vertices a;
5 adjacent(a ) ← the adjacent vertices a’;
6 for each adjacent to a do
7 x ← an adjacent vertex adjacent a;
8 x ← the images of x by isomorphism;
9 Intersection ← the intersection between the images of x by isomorphism and the
adjacent ones of a’;
10 if intersection is empty then
11 err ← err+1;
12 break;
13 end
14 end
15 if err = 0 then
16 break;
17 end
18 end
19 if err = 0 then
20 "The solution is validated";
21 else
22 "The solution is not validé";
23 end
8.4 comment
For the not connected graphs it is necessary of course to study the isomorph between the connected
components.
9 Conclusion
In this paper I presented a version of a polynomial algorithm, which gives us the images of each
vertices by isomorphic bijection, or to say that the two graphs are not isomorphic.
8

More Related Content

What's hot

Higher paper 2__november_2013
Higher paper 2__november_2013Higher paper 2__november_2013
Higher paper 2__november_2013
Maha Javad
 
Ακολουθίες - Α.Π - Γ.Π 2021
Ακολουθίες - Α.Π - Γ.Π 2021Ακολουθίες - Α.Π - Γ.Π 2021
Ακολουθίες - Α.Π - Γ.Π 2021
General Lyceum "Menelaos Lountemis"
 
Ats maths09
Ats maths09Ats maths09
Ats maths09
azzurra_239
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)
irjes
 
Merrk
MerrkMerrk
Merrk
fouadinfo
 
Cs6702 graph theory and applications question bank
Cs6702 graph theory and applications question bankCs6702 graph theory and applications question bank
Cs6702 graph theory and applications question bank
appasami
 
Tenth class-state syllabus-model paper-em-ap-mathematics
Tenth class-state syllabus-model paper-em-ap-mathematicsTenth class-state syllabus-model paper-em-ap-mathematics
Tenth class-state syllabus-model paper-em-ap-mathematics
NaukriTuts
 
05 practice paper_3_h_set_a
05 practice paper_3_h_set_a05 practice paper_3_h_set_a
05 practice paper_3_h_set_a
claire meadows-smith
 
43literal equations
43literal equations43literal equations
43literal equations
alg1testreview
 
ملزمة الرياضيات للصف السادس التطبيقي الفصل الاول الاعداد المركبة 2022
 ملزمة الرياضيات للصف السادس التطبيقي الفصل الاول الاعداد المركبة 2022 ملزمة الرياضيات للصف السادس التطبيقي الفصل الاول الاعداد المركبة 2022
ملزمة الرياضيات للصف السادس التطبيقي الفصل الاول الاعداد المركبة 2022
anasKhalaf4
 
Chapter 1 Functions Relations V3
Chapter 1 Functions Relations V3Chapter 1 Functions Relations V3
Chapter 1 Functions Relations V3
luxvis
 
Algebreviewer
AlgebreviewerAlgebreviewer
Algebreviewer
Angelina Pascua Lumbre
 
Ch 5 con and diff
Ch 5  con and diffCh 5  con and diff
Ch 5 con and diff
DARSHANSINGH99
 
Algebra 2 Section 1-1
Algebra 2 Section 1-1Algebra 2 Section 1-1
Algebra 2 Section 1-1
Jimbo Lamb
 
Biseccion
BiseccionBiseccion
Biseccion
Marlon Baquedano
 
SAT Math: It's All About The Question
SAT Math: It's All About The QuestionSAT Math: It's All About The Question
SAT Math: It's All About The Question
Dennis DiNoia
 
Chapter0
Chapter0Chapter0
Chapter0
osamahussien
 
Kertas Percubaan SPM Kedah add-maths p2 2017
Kertas Percubaan SPM Kedah add-maths p2 2017Kertas Percubaan SPM Kedah add-maths p2 2017
Kertas Percubaan SPM Kedah add-maths p2 2017
Tuisyen Geliga
 
IIT JEE - 2007 ii - mathematics
IIT JEE -  2007   ii - mathematicsIIT JEE -  2007   ii - mathematics
IIT JEE - 2007 ii - mathematics
Vasista Vinuthan
 
End of module 3 review
End of module 3 reviewEnd of module 3 review
End of module 3 review
mlabuski
 

What's hot (20)

Higher paper 2__november_2013
Higher paper 2__november_2013Higher paper 2__november_2013
Higher paper 2__november_2013
 
Ακολουθίες - Α.Π - Γ.Π 2021
Ακολουθίες - Α.Π - Γ.Π 2021Ακολουθίες - Α.Π - Γ.Π 2021
Ακολουθίες - Α.Π - Γ.Π 2021
 
Ats maths09
Ats maths09Ats maths09
Ats maths09
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)
 
Merrk
MerrkMerrk
Merrk
 
Cs6702 graph theory and applications question bank
Cs6702 graph theory and applications question bankCs6702 graph theory and applications question bank
Cs6702 graph theory and applications question bank
 
Tenth class-state syllabus-model paper-em-ap-mathematics
Tenth class-state syllabus-model paper-em-ap-mathematicsTenth class-state syllabus-model paper-em-ap-mathematics
Tenth class-state syllabus-model paper-em-ap-mathematics
 
05 practice paper_3_h_set_a
05 practice paper_3_h_set_a05 practice paper_3_h_set_a
05 practice paper_3_h_set_a
 
43literal equations
43literal equations43literal equations
43literal equations
 
ملزمة الرياضيات للصف السادس التطبيقي الفصل الاول الاعداد المركبة 2022
 ملزمة الرياضيات للصف السادس التطبيقي الفصل الاول الاعداد المركبة 2022 ملزمة الرياضيات للصف السادس التطبيقي الفصل الاول الاعداد المركبة 2022
ملزمة الرياضيات للصف السادس التطبيقي الفصل الاول الاعداد المركبة 2022
 
Chapter 1 Functions Relations V3
Chapter 1 Functions Relations V3Chapter 1 Functions Relations V3
Chapter 1 Functions Relations V3
 
Algebreviewer
AlgebreviewerAlgebreviewer
Algebreviewer
 
Ch 5 con and diff
Ch 5  con and diffCh 5  con and diff
Ch 5 con and diff
 
Algebra 2 Section 1-1
Algebra 2 Section 1-1Algebra 2 Section 1-1
Algebra 2 Section 1-1
 
Biseccion
BiseccionBiseccion
Biseccion
 
SAT Math: It's All About The Question
SAT Math: It's All About The QuestionSAT Math: It's All About The Question
SAT Math: It's All About The Question
 
Chapter0
Chapter0Chapter0
Chapter0
 
Kertas Percubaan SPM Kedah add-maths p2 2017
Kertas Percubaan SPM Kedah add-maths p2 2017Kertas Percubaan SPM Kedah add-maths p2 2017
Kertas Percubaan SPM Kedah add-maths p2 2017
 
IIT JEE - 2007 ii - mathematics
IIT JEE -  2007   ii - mathematicsIIT JEE -  2007   ii - mathematics
IIT JEE - 2007 ii - mathematics
 
End of module 3 review
End of module 3 reviewEnd of module 3 review
End of module 3 review
 

Similar to Isomorphespolynomial eng

Graphtheory
GraphtheoryGraphtheory
Graphtheory
Praveen Kumar
 
Graph theory
Graph theoryGraph theory
Graph theory
Kumar
 
Graph Dynamical System on Graph Colouring
Graph Dynamical System on Graph ColouringGraph Dynamical System on Graph Colouring
Graph Dynamical System on Graph Colouring
Clyde Shen
 
Lego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawingsLego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawings
Mathieu Dutour Sikiric
 
Exhaustive Combinatorial Enumeration
Exhaustive Combinatorial EnumerationExhaustive Combinatorial Enumeration
Exhaustive Combinatorial Enumeration
Mathieu Dutour Sikiric
 
6 CSE551 PavelGreedy5_v3 - Tagged.pdf it
6 CSE551 PavelGreedy5_v3 - Tagged.pdf it6 CSE551 PavelGreedy5_v3 - Tagged.pdf it
6 CSE551 PavelGreedy5_v3 - Tagged.pdf it
srinivas281220
 
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam LermaGraph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
PyData
 
Cs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyCs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer key
appasami
 
Attributed Graph Matching of Planar Graphs
Attributed Graph Matching of Planar GraphsAttributed Graph Matching of Planar Graphs
Attributed Graph Matching of Planar Graphs
Raül Arlàndez
 
Bounded Approaches in Radio Labeling Square Grids -- Dev Ananda
Bounded Approaches in Radio Labeling Square Grids -- Dev AnandaBounded Approaches in Radio Labeling Square Grids -- Dev Ananda
Bounded Approaches in Radio Labeling Square Grids -- Dev Ananda
Dev Ananda
 
Theta θ(g,x) and pi π(g,x) polynomials of hexagonal trapezoid system tb,a
Theta θ(g,x) and pi π(g,x) polynomials of hexagonal trapezoid system tb,aTheta θ(g,x) and pi π(g,x) polynomials of hexagonal trapezoid system tb,a
Theta θ(g,x) and pi π(g,x) polynomials of hexagonal trapezoid system tb,a
ijcsa
 
Independence Complexes
Independence ComplexesIndependence Complexes
Independence Complexes
Rickard Fors
 
Feedback Vertex Set
Feedback Vertex SetFeedback Vertex Set
Feedback Vertex Set
Mag-Stellon Nadarajah
 
Cryptography and Network Security chapter 4.ppt
Cryptography and Network Security chapter 4.pptCryptography and Network Security chapter 4.ppt
Cryptography and Network Security chapter 4.ppt
the9amit
 
Minimizing cost in distributed multiquery processing applications
Minimizing cost in distributed multiquery processing applicationsMinimizing cost in distributed multiquery processing applications
Minimizing cost in distributed multiquery processing applications
Luis Galárraga
 
CH04.ppt
CH04.pptCH04.ppt
Quadratic Functions graph
Quadratic Functions graphQuadratic Functions graph
Quadratic Functions graph
Refat Ullah
 
A Hypocoloring Model for Batch Scheduling Problem
A Hypocoloring Model for Batch Scheduling ProblemA Hypocoloring Model for Batch Scheduling Problem
A Hypocoloring Model for Batch Scheduling Problem
IOSR Journals
 
Introdution to differential forms
Introdution to differential formsIntrodution to differential forms
Introdution to differential forms
Dunga Pessoa
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
PalGov
 

Similar to Isomorphespolynomial eng (20)

Graphtheory
GraphtheoryGraphtheory
Graphtheory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph Dynamical System on Graph Colouring
Graph Dynamical System on Graph ColouringGraph Dynamical System on Graph Colouring
Graph Dynamical System on Graph Colouring
 
Lego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawingsLego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawings
 
Exhaustive Combinatorial Enumeration
Exhaustive Combinatorial EnumerationExhaustive Combinatorial Enumeration
Exhaustive Combinatorial Enumeration
 
6 CSE551 PavelGreedy5_v3 - Tagged.pdf it
6 CSE551 PavelGreedy5_v3 - Tagged.pdf it6 CSE551 PavelGreedy5_v3 - Tagged.pdf it
6 CSE551 PavelGreedy5_v3 - Tagged.pdf it
 
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam LermaGraph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
 
Cs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyCs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer key
 
Attributed Graph Matching of Planar Graphs
Attributed Graph Matching of Planar GraphsAttributed Graph Matching of Planar Graphs
Attributed Graph Matching of Planar Graphs
 
Bounded Approaches in Radio Labeling Square Grids -- Dev Ananda
Bounded Approaches in Radio Labeling Square Grids -- Dev AnandaBounded Approaches in Radio Labeling Square Grids -- Dev Ananda
Bounded Approaches in Radio Labeling Square Grids -- Dev Ananda
 
Theta θ(g,x) and pi π(g,x) polynomials of hexagonal trapezoid system tb,a
Theta θ(g,x) and pi π(g,x) polynomials of hexagonal trapezoid system tb,aTheta θ(g,x) and pi π(g,x) polynomials of hexagonal trapezoid system tb,a
Theta θ(g,x) and pi π(g,x) polynomials of hexagonal trapezoid system tb,a
 
Independence Complexes
Independence ComplexesIndependence Complexes
Independence Complexes
 
Feedback Vertex Set
Feedback Vertex SetFeedback Vertex Set
Feedback Vertex Set
 
Cryptography and Network Security chapter 4.ppt
Cryptography and Network Security chapter 4.pptCryptography and Network Security chapter 4.ppt
Cryptography and Network Security chapter 4.ppt
 
Minimizing cost in distributed multiquery processing applications
Minimizing cost in distributed multiquery processing applicationsMinimizing cost in distributed multiquery processing applications
Minimizing cost in distributed multiquery processing applications
 
CH04.ppt
CH04.pptCH04.ppt
CH04.ppt
 
Quadratic Functions graph
Quadratic Functions graphQuadratic Functions graph
Quadratic Functions graph
 
A Hypocoloring Model for Batch Scheduling Problem
A Hypocoloring Model for Batch Scheduling ProblemA Hypocoloring Model for Batch Scheduling Problem
A Hypocoloring Model for Batch Scheduling Problem
 
Introdution to differential forms
Introdution to differential formsIntrodution to differential forms
Introdution to differential forms
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
 

Recently uploaded

原版一比一爱尔兰都柏林大学毕业证(UCD毕业证书)如何办理
原版一比一爱尔兰都柏林大学毕业证(UCD毕业证书)如何办理 原版一比一爱尔兰都柏林大学毕业证(UCD毕业证书)如何办理
原版一比一爱尔兰都柏林大学毕业证(UCD毕业证书)如何办理
tzu5xla
 
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
actyx
 
How To Control IO Usage using Resource Manager
How To Control IO Usage using Resource ManagerHow To Control IO Usage using Resource Manager
How To Control IO Usage using Resource Manager
Alireza Kamrani
 
Sample Devops SRE Product Companies .pdf
Sample Devops SRE  Product Companies .pdfSample Devops SRE  Product Companies .pdf
Sample Devops SRE Product Companies .pdf
Vineet
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
Timothy Spann
 
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
slg6lamcq
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
一比一原版马来西亚博特拉大学毕业证(upm毕业证)如何办理
一比一原版马来西亚博特拉大学毕业证(upm毕业证)如何办理一比一原版马来西亚博特拉大学毕业证(upm毕业证)如何办理
一比一原版马来西亚博特拉大学毕业证(upm毕业证)如何办理
eudsoh
 
Drownings spike from May to August in children
Drownings spike from May to August in childrenDrownings spike from May to August in children
Drownings spike from May to August in children
Bisnar Chase Personal Injury Attorneys
 
ML-PPT-UNIT-2 Generative Classifiers Discriminative Classifiers
ML-PPT-UNIT-2 Generative Classifiers Discriminative ClassifiersML-PPT-UNIT-2 Generative Classifiers Discriminative Classifiers
ML-PPT-UNIT-2 Generative Classifiers Discriminative Classifiers
MastanaihnaiduYasam
 
Overview IFM June 2024 Consumer Confidence INDEX Report.pdf
Overview IFM June 2024 Consumer Confidence INDEX Report.pdfOverview IFM June 2024 Consumer Confidence INDEX Report.pdf
Overview IFM June 2024 Consumer Confidence INDEX Report.pdf
nhutnguyen355078
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
ihavuls
 
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
nyvan3
 
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCAModule 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
yuvarajkumar334
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
hyfjgavov
 
一比一原版悉尼大学毕业证如何办理
一比一原版悉尼大学毕业证如何办理一比一原版悉尼大学毕业证如何办理
一比一原版悉尼大学毕业证如何办理
keesa2
 
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
z6osjkqvd
 
一比一原版加拿大渥太华大学毕业证(uottawa毕业证书)如何办理
一比一原版加拿大渥太华大学毕业证(uottawa毕业证书)如何办理一比一原版加拿大渥太华大学毕业证(uottawa毕业证书)如何办理
一比一原版加拿大渥太华大学毕业证(uottawa毕业证书)如何办理
uevausa
 
Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024
ElizabethGarrettChri
 
Data Scientist Machine Learning Profiles .pdf
Data Scientist Machine Learning  Profiles .pdfData Scientist Machine Learning  Profiles .pdf
Data Scientist Machine Learning Profiles .pdf
Vineet
 

Recently uploaded (20)

原版一比一爱尔兰都柏林大学毕业证(UCD毕业证书)如何办理
原版一比一爱尔兰都柏林大学毕业证(UCD毕业证书)如何办理 原版一比一爱尔兰都柏林大学毕业证(UCD毕业证书)如何办理
原版一比一爱尔兰都柏林大学毕业证(UCD毕业证书)如何办理
 
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
一比一原版斯威本理工大学毕业证(swinburne毕业证)如何办理
 
How To Control IO Usage using Resource Manager
How To Control IO Usage using Resource ManagerHow To Control IO Usage using Resource Manager
How To Control IO Usage using Resource Manager
 
Sample Devops SRE Product Companies .pdf
Sample Devops SRE  Product Companies .pdfSample Devops SRE  Product Companies .pdf
Sample Devops SRE Product Companies .pdf
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
 
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
一比一原版南十字星大学毕业证(SCU毕业证书)学历如何办理
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
一比一原版马来西亚博特拉大学毕业证(upm毕业证)如何办理
一比一原版马来西亚博特拉大学毕业证(upm毕业证)如何办理一比一原版马来西亚博特拉大学毕业证(upm毕业证)如何办理
一比一原版马来西亚博特拉大学毕业证(upm毕业证)如何办理
 
Drownings spike from May to August in children
Drownings spike from May to August in childrenDrownings spike from May to August in children
Drownings spike from May to August in children
 
ML-PPT-UNIT-2 Generative Classifiers Discriminative Classifiers
ML-PPT-UNIT-2 Generative Classifiers Discriminative ClassifiersML-PPT-UNIT-2 Generative Classifiers Discriminative Classifiers
ML-PPT-UNIT-2 Generative Classifiers Discriminative Classifiers
 
Overview IFM June 2024 Consumer Confidence INDEX Report.pdf
Overview IFM June 2024 Consumer Confidence INDEX Report.pdfOverview IFM June 2024 Consumer Confidence INDEX Report.pdf
Overview IFM June 2024 Consumer Confidence INDEX Report.pdf
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
一比一原版英国赫特福德大学毕业证(hertfordshire毕业证书)如何办理
 
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCAModule 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
Module 1 ppt BIG DATA ANALYTICS_NOTES FOR MCA
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
 
一比一原版悉尼大学毕业证如何办理
一比一原版悉尼大学毕业证如何办理一比一原版悉尼大学毕业证如何办理
一比一原版悉尼大学毕业证如何办理
 
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
一比一原版英属哥伦比亚大学毕业证(UBC毕业证书)学历如何办理
 
一比一原版加拿大渥太华大学毕业证(uottawa毕业证书)如何办理
一比一原版加拿大渥太华大学毕业证(uottawa毕业证书)如何办理一比一原版加拿大渥太华大学毕业证(uottawa毕业证书)如何办理
一比一原版加拿大渥太华大学毕业证(uottawa毕业证书)如何办理
 
Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024
 
Data Scientist Machine Learning Profiles .pdf
Data Scientist Machine Learning  Profiles .pdfData Scientist Machine Learning  Profiles .pdf
Data Scientist Machine Learning Profiles .pdf
 

Isomorphespolynomial eng

  • 1. Polynomial algorithm for isomorphic graphs, all cases Mohamed mimouni 20 street kadissia 60000 Oujda Morocco mimouni.mohamed@gmail.com April 12, 2019 Abstract In this paper, I propose an algorithm capable of solving the problem of isomorphic graphs in polynomial time. First, I define a pseudo tree that allows us to define for each vertex a label or a label. Secondly, I apply the pseudo tree for the first graph then I calculate the labels of each vertex of the first graph, then I do the same for the second graph. Thirdly, I look for for each graph vertex1 the graph vertices2 which have the same label, if or less a first graph vertex its label is not in the second graph vertices we deduce that the two pseudo trees are not isomorphic. In other cases I generate solutions and check them in polynomial time... This algorithm therefore allows isomorphic graphs to calculate the image of each vertex in polynomial time. MOTS-CLES : isomorphic graphs, isomorphism, automorphism, hypergraphs, isomorphs 1
  • 2. Contents 1 Definitions of the terms 3 1.1 A graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 A hypergraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 An isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Building a pseudo tree 3 3 Label 3 4 Algorithme 3 4.1 For the graph G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4.2 For the graph H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5 Mathematical proof 4 5.1 principal theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5.1.1 proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5.2 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5.2.1 The verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5.2.2 The complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 6 Algorithm complexity 4 7 Examples 5 7.1 connected graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 7.1.1 Pseudo tree of head a for graph G . . . . . . . . . . . . . . . . . . . . . . . 5 7.1.2 Label of each graph vertex G . . . . . . . . . . . . . . . . . . . . . . . . . . 5 7.1.3 Pseudo tree of head 2,4,5 and 7 for graph H . . . . . . . . . . . . . . . . . . 5 7.1.4 The labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 7.1.5 Check the solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 8 pseudo codes 7 8.1 pseudo-arbres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8.2 The label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8.3 Validate a solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8.4 comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 9 Conclusion 8 2
  • 3. 1 Definitions of the terms 1.1 A graph A graph is a set of points called nodes (sometimes vertices or cells) connected by lines (segments) or arrows called edges (or links or bows). 1.2 A hypergraph A hypergraph is a graph whose edges connect one or two or more vertices. 1.3 An isomorphism An isomorphism f between the graphs G and H is a bijection between the vertices of G and those of H, such as a pair of vertices u, v of G is an edge of G if and only if (u), (v) is an edge of H. 2 Building a pseudo tree Let’s say G a simple graph and s a vertex. The pseudo tree header s is done in the following way : 1. The vertex s in level 0. 2. The adjacents of s in level 1. 3. The adjacencies of each vertex of level 1 without repetition, which are not already in the other levels, in the level 2. 4. Repeat step 3 to build the other levels. 5. End when there are no new adjacent ones. If in the case (case of not connected graph) where there are still graph vertices G, which are not in the pseudo-trees, other pseudo-trees must be generated. 3 Label For each vertex of G a label is formed of four elements : 1. n the level it is at. 2. h the number of adjacent ones who are in the upper level. 3. m the number of adjacents who are in the same level. 4. b the number of adjacent ones who are in the lower level. 4 Algorithme Let’s say G a graph {g1, g2, g3, , , gn} and H a graph {h1, h2, h3, , , hn} The two graphs G and H are isomorphic if for the isomorphism function f(gi) = hi, we have the label of gi equals the label of hi. label(gi) = label(hi) = n − h − m − b 4.1 For the graph G Construct one or more pseudo-trees folds so as to have a label for each vertex of the graph G. 4.2 For the graph H Build pseudo trees and calculate labels for each vertex of H. Search in the graph G vertices that have the same label. If at least one vertex of H has an unequal label of the labels of the vertices of H, the header is modified and the labels of the vertices of H. If each vertex of H has a label equal to graph labels G, we do a validation or verification of the solutions. If the solution is not validated, the headers are changed. End if a solution is validated or check. 3
  • 4. 5 Mathematical proof 5.1 principal theorem Let’s say P(a) and Q(a ) two pseudo isomorphic trees. If f(a) = a we have: For each vertex s of P(a) : label(s) = label(s) 5.1.1 proof Isomorphism keeps the distance, therefore: 1. n = d(a, s) = d(a , f(s)) so f(s) is also in level n. 2. for h, there are h vertices of level n-1 adjacent to s such as d(s, th) = d(s , th) and d(a, th) = d(a , th) = n − 1, according to the definition there is also h vertices in Q(a’) 3. for m, there are m vertices of level n adjacent to s so d(s, tm) = d(s , tm) and d(a, tm) = d(a, tm) = n, according to the definition there are also m vertices in Q(a’). 4. for b, there are b vertices of level n+1 adjacent to s so d(s, tb) = d(s , tb) and d(a, tb) = d(a , tb) = n + 1, according to the definition there is also b vertices in Q(a’) . which shows that label(s) = label(s) 5.2 The algorithm According to principal theorem we have two cases: Case 1 label(s) = label(s ) =⇒ f(s) = s . Case 2 label(s) = label(s ), it is necessary to check f(s)=s’ (We can’t say that f(s) = s ) 5.2.1 The verification So after finding for each vertex of G one or more images of isomorphism f, we must do one last step: solution verification, this verification and polynomial. 5.2.2 The complexity All the steps of the algorithm are polynomial, so the algorithm proposed in this paper and Poly- nomial, so the isomorphism is in P. 6 Algorithm complexity Each vertex must be in a pseudo-tree, so the complexity is O(n2 ). For the second graph the complexity can reach O(n3 ). The calculation of the labels of each vertex is O(n). The solution validation is to O(n3 ). So this algorithm is polynomial. 4
  • 5. 7 Examples 7.1 connected graphs Either the two graphs G and H, present by lists of the following adjacents: Graph G Graph H a:b,d,e,h 1:4,6,7,8,9 b:a,c,e,g,i 2:6,7,8,9 c:b,f,g,h,i 3:5,6 d:a,e,f,i 4:1,5,6,9 e:a,b,d,h,i 5:3,4,7,9 f:c,d 6:1,2,3,4,8 g:b,c,h 7:1,2,5,9 h:a,c,e,g 8:1,2,6 i:b,c,d,e 9:1,2,4,5,7 7.1.1 Pseudo tree of head a for graph G Graph G levels a level 0 b,d,e,h level 1 f,i,c,g level 2 7.1.2 Label of each graph vertex G vertex adjacent level top even bottom label a b,d,e,h 0 empty a b,d,e,h 0-0-0-4 b a,c,e,g,i 1 a b,d,e,h f,i,c,g 1-1-1-3 d a,e,f,i 1 a b,d,e,h f,i,c,g 1-1-1-2 e a,b,d,h,i 1 a b,d,e,h f,i,c,g 1-1-3-1 h a,c,e,g 1 a b,d,e,h f,i,c,g 1-1-1-2 f c,d 2 b,d,e,h f,i,c,g empty 2-1-1-0 i b,c,d,e 2 b,d,e,h f,i,c,g empty 2-3-1-0 c b,f,g,h,i 2 b,d,e,h f,i,c,g empty 2-2-3-0 g b,c,h 2 b,d,e,h f,i,c,g empty 2-2-1-0 explanations After finishing for graph G, we move on to graph H : Label (a)=0-0-0-0-4 so for graph H, we test f(a)=2, f(a)=4, f(a)=5 and f(a)=7. 7.1.3 Pseudo tree of head 2,4,5 and 7 for graph H 2 4 5 7 level 0 a 6,7,8,9 1,5,6,9 3,4,7,9 1,2,5,9 level 1 b,d,e,h 3,1,4,5 3,8,2,7 6,1,2 6,8,3,4 level 2 f,i,c,g 8 level 3 We are forward to vertex 5 four levels so f(a) = 5. 7.1.4 The labels head 2 vertex adjacent level top same bottom label images 2 6,7,8,9 0 empty 2 6,7,8,9 0-0-0-4 a 6 1,2,3,4,8 1 2 6,7,8,9 3,1,4,5 1-1-1-2 d,h 7 1,2,5,9 1 2 6,7,8,9 3,1,4,5 1-1-1-2 d,h 8 1,2,6 1 2 6,7,8,9 3,1,4,5 1-1-1-1 empty At the vertex 8, the label (1-1-1-1-1) does not exist in graph labels G, so f(a) = 2. head 4 vertex adjacent level top same bottom label images 4 1,5,6,9 0 empty 4 1,5,6,9 0-0-0-4 a 1 4,6,7,8,9 1 4 1,5,6,9 3,8,2,7 1-1-2-2 empty For vertex 1 the label (1-1-2-2) does not exist in the graph labels G, so f(a) = 4. 5
  • 6. head 7 vertex adjacent level top same bottom label images 7 1,2,5,9 0 empty 7 1,2,5,9 0-0-0-4 a 1 4,6,7,8,9 1 7 1,2,5,9 6,8,3,4 1-1-1-3 b 2 6,7,8,9 1 7 1,2,5,9 6,8,3,4 1-1-1-2 d,h 5 3,4,7,9 1 7 1,2,5,9 6,8,3,4 1-1-1-2 d,h 9 1,2,4,5,7 1 7 1,2,5,9 6,8,3,4 1-1-3-1 e 6 1,2,3,4,8 2 1,2,5,9 6,8,3,4 empty 2-2-3-0 c 8 1,2,6 2 1,2,5,9 6,8,3,4 empty 2-2-1-0 g 3 5,6 2 1,2,5,9 6,8,3,4 empty 2-1-1-0 f 4 1,5,6,9 2 1,2,5,9 6,8,3,4 empty 2-3-1-0 i 7.1.5 Check the solutions vertex adjacent images images adjacent vertex adjacent state 7 1,2,5,9 a (b),(d,h),(d,h),(e) a b,d,e,h ok 1 4,6,7,8,9 b (i),(c),(a),(g),(e) b a,c,e,g,i ok 2 6,7,8,9 d (c),(a),(g),(e) d a,e,f,i no 2 6,7,8,9 h (c),(a),(g),(e) h a,c,e,g ok 5 3,4,7,9 d (f),(i),(a),(e) d a,e,f,i ok 5 3,4,7,9 h (f),(i),(a),(e) h a,c,e,g no 9 1,2,4,5,7 e (b),(d,h),(i),(d,h),(a) e a,b,d,h,i ok 6 1,2,3,4,8 c (b),(d,h),(f),(i),(g) c b,f,g,h,i ok 8 1,2,6 g (b),(d,h),(c) g b,c,h ok 3 5,6 f (d,h),(c) f c,d ok 4 1,5,6,9 i (b), (d,h),(c),(e) i b,c,d,e ok explanations In this table we have f(2) = h and not d. and f(5) = d and not h. The check to give 2 errors, we must then do another check vertex adjacent images images adjacent vertex adjacent state 7 1,2,5,9 a (b),(,h),(d),(e) a b,d,e„h ok 1 4,6,7,8,9 b (i),(c),(a),(g),(e) b a,c,e,g,i ok 2 6,7,8,9 h (c),(a),(g),(e) h a,c,e,g ok 5 3,4,7,9 d (f),(i),(a),(e) d a,e,f,i ok 9 1,2,4,5,7 e (b),(,h),(i),(d),(a) e a,b,d„h,i ok 6 1,2,3,4,8 c (b),(,h),(f),(i),(g) c b,f,g„h,i ok 8 1,2,6 g (b),(,h),(c) g b,c„h ok 3 5,6 f (d),(c) f c,d ok 4 1,5,6,9 i (b),(d),(c),(e) i b,c,d,e ok explanations Now with no errors so both graphs G and H are isomorphic and here is the final solution: vertex Image a 7 b 1 c 6 d 5 e 9 f 3 g 8 h 2 i 4 6
  • 7. 8 pseudo codes 8.1 pseudo-arbres Here is a pseudo code that generates a pseudo tree. Algorithm 1: generate a pseudo tree P(a) head a for a graph G Data: A graph G and a vertex a of G Result: A pseudo tree P(a) 1 initialization; the vertex a in the level 0; 2 the adjacent from a in level 1; 3 the vertices of G in array graph[]; 4 delete the vertices of the level 0 and 1 array graph[]; 5 niv ← 1 ; 6 adjacents ← adjacent to a ; 7 while graph[] is not empty do 8 initialize array list[] empty ; 9 niv ← niv + 1 ; 10 for every element of adjacent do 11 adjacents1 ← the adjacents of element ; 12 adjacents1 ← the intersections between adjacent1 and graph[] ; 13 liste[] ← list[]+adjacents1 ; 14 liste[] ← liste[] order and without duplication ; 15 graph[] ← the difference between graph[] and list[] ; 16 if graph[] is empty then 17 break; 18 end 19 end 20 if lise[] is empty then 21 break; 22 else 23 list in level niv ; 24 end 25 end For unconnected graphs, it is necessary to generate other pseudo-trees for the other remaining vertices. 8.2 The label Here’s a pseudo code that calculates the label of a vertex in a pseudo tree. Algorithm 2: Calculate the label of a vertex s in a pseudo tree Data: A vertex s in a pseudo tree Result: s label for a pseudo tree 1 n ← determine the level of s; 2 nivh ← determine the vertices that are in the level n+1; 3 nivm ← determine the vertices that are in the level n; 4 nivb ← determine the vertices that are in the level n-1; 5 h ← the number of adjacent vertices s that are in nivh; 6 m ← the number of adjacent vertices s that are in nivm; 7 b ← the number of adjacent vertices s that are in nivb; 8 label(s) ← "n-h-m-b"; 7
  • 8. 8.3 Validate a solution Here’s a pseudo code to check out a proposed solution. Algorithm 3: Check a solution Data: A proposed solution Result: validated or erroneous solution 1 initialization; 2 err ← 0; 3 for Each f(a)=a’ proposed do 4 adjacent(a) ← the adjacent vertices a; 5 adjacent(a ) ← the adjacent vertices a’; 6 for each adjacent to a do 7 x ← an adjacent vertex adjacent a; 8 x ← the images of x by isomorphism; 9 Intersection ← the intersection between the images of x by isomorphism and the adjacent ones of a’; 10 if intersection is empty then 11 err ← err+1; 12 break; 13 end 14 end 15 if err = 0 then 16 break; 17 end 18 end 19 if err = 0 then 20 "The solution is validated"; 21 else 22 "The solution is not validé"; 23 end 8.4 comment For the not connected graphs it is necessary of course to study the isomorph between the connected components. 9 Conclusion In this paper I presented a version of a polynomial algorithm, which gives us the images of each vertices by isomorphic bijection, or to say that the two graphs are not isomorphic. 8