Describe method to enumerate shortest cyclesin bipartite graph. Consider example and provide implementation of this method (https://yadi.sk/d/nMza892Y3PVR3U). Show way to improve under structured graphs
Enumerating cycles in bipartite graph using matrix approach
1. HUAWEI TECHNOLOGIES CO., LTD.
47pt
www.huawei.com
Usatyuk Vasiliy, 2013
L [dog] Lcrypto.com
Enumerating cycles
in bipartite graphs
using matrix approach
2. HUAWEI TECHNOLOGIES CO., LTD.
Let consider arbitrary codes on the graph
parity-check matrix
Enumerate cycle 4
girth_four_num=0;
for i=1:rows-1
for j=1:cols-1
if H(i,j)==1
%save to array (i,j)
x1=i;y1=j;
for j1=j+1:cols
if H(i,j1)==1
%save to array (i,j)
x2=i;y2=j1;
for i1=i+1:rows
if H(i1,j1)==1
%save to array (i,j)
x3=i1;y3=j1;
if H(i1,j)==1 %the forth point;
%save to array (i,j)
x4=i1;y4=j;
girth_four_num=girth_four_num+1;
else
%delete all saved element location for symbols and checks;
end
end
end
end
end
end
end
end
,
11
11
H
Poor solution, complexity too high
Fan J.,Yang X., "A Method of Counting the Number of Cycles in LDPC Codes," Signal
Processing, 2006 8th International Conference on , vol.3, no., pp.,, 16-20 2006
3. HUAWEI TECHNOLOGIES CO., LTD.
Let consider arbitrary codes on the graph
parity-check matrix
Enumerate cycle 4
girth_four_num=0;
for i=1:rows-1
for j=1:cols-1
if H(i,j)==1
%save to array (i,j)
x1=i;y1=j;
for j1=j+1:cols
if H(i,j1)==1
%save to array (i,j)
x2=i;y2=j1;
for i1=i+1:rows
if H(i1,j1)==1
%save to array (i,j)
x3=i1;y3=j1;
if H(i1,j)==1 %the forth point;
%save to array (i,j)
x4=i1;y4=j;
girth_four_num=girth_four_num+1;
else
%delete all saved element location for symbols and checks;
end
end
end
end
end
end
end
end
,
11
11
H
Poor solution, complexity too high
Fan J.,Yang X., "A Method of Counting the Number of Cycles in LDPC Codes," Signal
Processing, 2006 8th International Conference on , vol.3, no., pp.,, 16-20 2006
4. HUAWEI TECHNOLOGIES CO., LTD.
Let try to estimate number of cycle using
properties of adjacency matrix
Hmatrixcheck-parityofmatrixadjacency,
0
0
isA
H
H
A T
22
equallengthwholepathsofnumbergivesA
gequallengthwholepathsofnumbergivesAg
But powers of the adjacency matrix takes into account not only the trail(simple way,
edges that form the walk distinct), but also way those go through the same edge
many times.
5. HUAWEI TECHNOLOGIES CO., LTD.
lollipop walk
Cycles of length 2m are thus lollipop walks.
All cycles in bipartite graphs contain an even number
of edges and all lollipop walk paths have
mnm,
naaa ,...,, 21
m2,0
mnm,
.2mod0 mn
1v 3v 4v 6v 2v 5v
4v 3v 5v
2v 6v
1v
2,4 lollipop walk where
while are distinct.
57 aa
is n length walks where are distinct and
for some
11 mn aa
].,1[ nm
1a
2a 3a 4a 5a 6a
7a
1a 2a
3a
4a 5a
6a
7a
621 ,...,, aaa
4,2 lollipop walk where
while are distinct.
37 aa
621 ,...,, aaa
Halford, T.R.; Chugg, K.M., "An algorithm for counting short cycles in bipartite graphs,"
Information Theory, IEEE Transactions on , vol.52, no.1, pp.287,292, Jan. 2006
6. HUAWEI TECHNOLOGIES CO., LTD.
v c v
c
c
1a 2a 3a
4a
lollipop walk from to 6,2 .39 aa 1a
Subtract non-trail way
v
c
v
5a
6a
7a8a9a
cv
LH 6,1 Count lollipop walk and walks where
sv
L 6,2 715131 ,, aaaaaa
which necessary to substract to get
sv
L 6,2
7. HUAWEI TECHNOLOGIES CO., LTD.
Let define number of paths length 2k from variable i to j variable
and from i check node i to j check nodes
ss
v
k VVP s
,2
cc
v
k VVsizeP c
,2
Let define number of paths length 2k+1 from variable i to j check node
and from i check node i to j symbol nodes
cs
v
k VVP s
,12
sc
v
k VVsizeP c
,12
Let define number lollipop walks from check i to j check
and from i check node to j symbol nodes
cc
v
kkk VVL c
,22,2 kkk 22,2
sc
v
kkk VVL c
,22,12
kkk 22,12
1
0
22,12212
k
i
v
iki
v
k
v
k
ccc
LHPP
1
0
22,2122
k
i
v
iki
Tv
k
v
k
ccc
LHPP
1
0
22,121212
k
i
v
iki
Tv
k
v
k
sss
LHPP
1
0
22,2122
k
i
v
iki
v
k
v
k
sss
LHPP
IHPL Tv
k
v
k
cc
12)2,0(
IHPL ss v
k
v
k 12)2,0(
sc v
k
v
kk LTr
k
LTr
k
N )2,0()2,0(2
2
1
2
1
Number of cycles 2k length:
8. HUAWEI TECHNOLOGIES CO., LTD.
v c v c v c
1a 2a 3a ga 1ga 2ga
3ga
...
lollipop walk from to 2,g .13 gg gg1a
sssssccs vv
g
vvv
g
v
g
v
g
v
g PILLPPLHILHL 2)2,2()2,0(22)2,1()2,1()2,( 0,1max
v c v
c
c
1a 2a 3a
4a
2ga
lollipop walk from to g,2 .33 agg
1a
3
6 2
),1(),1()2,(
s
ccs
v
v
g
v
g
v
g
P
ILHILHL
Substract non-trail ways
Substract non-trail ways
Lollipop-matrix equation
9. HUAWEI TECHNOLOGIES CO., LTD.
Lollipop-matrix equation
vv
vcv
v
g
v
v
g
v
g
v
g
LL
HPHLL
)2,3()2,0(
1)2,2()2,1(
0,1max
vvvvv
ccv
vvv
g
v
g
v
v
g
v
g
v
g
IPPPLL
HLdiagHLL
222)2,2()2,0(
)2,1()2,1()2,(
0,1max
cv
LTo get just replace toH T
H
vv
L To
cv
L
HPH
P
I
HPHL
HLP
LL
HPLLHLL
v
v
vv
cv
vv
vvvcv
v
v
v
g
v
g
vv
g
v
g
v
v
g
vv
g
v
g
v
g
3
2
1)2,1(
)2,0(1
)2,1()2,0(
1)2,1(),0()2,()2,1(
2
2
2
0,2max2
0,1max
3
6
2
2
),1(),1(),2(
1),0(),1(
v
ccv
vcv
v
v
g
v
g
v
g
v
g
v
g
v
g
P
IHLdiagHLL
HPHLL
HPH
P
I
HP
P
HI
H
P
I
P
I
LLHLL
v
v
v
v
vv
vvcv
v
v
v
v
vv
v
g
vv
g
v
3
2
3
2
33
),1()2,0(),2()2,3(
2
4
2
6
2
4
3
6
0,1max
HPH
P
I
HP
P
HI
H
P
I
HPHLL
v
v
v
c
v
vcv
v
v
v
v
v
v
g
v
g
v
g
3
2
3
2
3
1)2,0()2,1(
2
2
2
2
2
2
2
19. HUAWEI TECHNOLOGIES CO., LTD.
Girth point of view
Labeling problem
Target girth >=6 length cycle
00
00
10
0***
0***
0***
II
II
II
?*is
20. HUAWEI TECHNOLOGIES CO., LTD.
Girth point of view
Target girth >=6 length cycle
Circulant 8
00
00
10
0***
0***
0***
II
II
II
}1,0{,
0***
0***
0**
00
00
10
A
II
II
IIIA
}1,0{,
0***
0**
0**
00
00
100
B
II
III
III
B
}6,7{
08mod)016(
,
0**
0**
0**
00
006
100
C
c
III
III
III
c
}0{,
0**
0**
0*
003
006
100
D
III
III
IIII D
}6,0{,
0**
0*
0*
003
006
1000
E
III
IIII
IIII
E
}7,5,1,0,3{,
0
0
0
00813
00376
10000
J
IIIII
IIIII
IIIII
and so on for
Girth>4