Approaching Optimal Compression with Fast Update for Large Scale

Mathematical Proof for ONRTC
Constructing Optimal Non-overlap Routing Tables
Mathematical Proof
Authors:Tong Yang, Ting Zhang, Shenjiang Zhang and Bin Liu
Dept. of Computer Science and Technology, Tsinghua University, Beijing China
2011.09.20
1
Mathematical Proof for ONRTC
A. Definition of A New Operation
1) Terms and Definition

Regular expression syntax is used to represent the solid node’s prefix.

(A) represents node A's prefix.

(AB) represents the bit string of the path between node A and B, and this requires that no solid nodes appear in the path.

[AB] represents the bit string of the path between node A and B, solid nodes may appear in the path.

If A is the ancestor of B, than

L (A) represents the prefix length of node A.

P represents a trie, and (A) represents a prefix, then P (A) means the next hop of prefix (A) in trie P, according to the
B
longest prefix match.

(̃) represents a prefix with the same length of (A), but it is different with (A). P(̃) means the next hop of prefix ( ̃) in trie
P.

(A*) is a prefix, with the length of 32, and (A) is a part of (A*). P(A*) means the next hop of prefix (A*) in trie P.
2) Definition 1 XOR operation
{
3) Element 1 exists, and is 0.
proof:
{
}
0 is the Element 1
Proof is complete.
, Element 0 of left doesn’t exist.
4) Element 0 of right is
(1) Element 0 of right is
Proof:
, and
y is element 0 of right. Then element 0 of right is
, proof is complete.
(2) Element 0 of left doesn’t exist.
Proof: suppose m is Element 0 of left, then
, satisfy
{
{
2
Mathematical Proof for ONRTC
Ele ent of left doesn’t e ist proof is co plete.
5) Property 1 XOR operation doesn’t satisfy commutative law
Proof: Counterexample:3
XOR operation doesn’t satisfy commutative law
6) Property 2 XOR operation satisfy associative law
Proof:
{
{
{
7) Property 3 XOR operation doesn’t satisfy assignment for addition.
Proof: Counterexample:
.
XOR operation doesn’t satisfy assignment for addition, proof is complete.
8) Property 4 x y=0, if and only if x=0,and y=0
Proof:
{
}
{
}
{
{
Proof is complete.
9) Definition 2
for IPv4, i
IP address R, R=[0,1]{32}, the match result of each bit is
the longest prefix match rule, the next hop of R is P(R) =
; for IPv6, i
.
10) Theorem 1
3
; According to
Mathematical Proof for ONRTC
If the match results of every section of two prefixes are same, then the next hops of the two prefix are same.
Proof:
设
, 那么
t t
Therefore,
. Proof is complete.
11) Theorem 2
The necessary and sufficient condition that two trie is equivalent is that the next hop is same in the two trie for any IP address
according the longest prefix match.
This theorem is easy to understand, and no need to prove.
B. Election and Reprentative Models
1) Election model
A
A
X1
X2
Xt
Xt+1
Xn
X1
(a) The original trie
Figure 1
X2
Xt
Xt+1
Xn
(b) Trie after election
Election model.
As shown in 0, election models can work on binary trie and triangle trie. The next hop of Node Xi is Ni, the number of Ni if Ci.
These nodes must satisfy the followings:

Xi is the elected representative, and it can have sub-tree.

A Xi, i=1,2,3,…,n

There is no solid node in the path between Xi and A.
4
Mathematical Proof for ONRTC

There is no missing node.
Election result: if exist t, j!=t,
t, Ct>Cj, then Xt is the elected representative. If such t doesn’t exist, election failed. The
common ancestor is set to NULL, and participates in the next round election.
Proof: IP address R, obviously, L(R)=K, R=[0,n]{K}. suppose R=[0,n]{L(A)}[0,n][0,n]{K-L(A)-1}.
Step1: match
̃
{
̃
̃
{
̃
̃
}
{
Step2: match [0,n]
ii
n
{
}
0
Step3: [0,n]{K-L(A)-1}
ii
n
n
n
{
n
}
n
Integrate step1/step2/step3,
n
n
n
n
n
n
n
n
n
n
n
n
0, according to the associative law,
,
. Proof is complete.
If P2 is the election model of P1, we say
Ele
.
5
Mathematical Proof for ONRTC
2) Representative Model
Step1
1
1
A
A
1
B
1
Step2
B
1
B
1
A
Step3
(a)The original trie
(b) The trie after transformation
Figure 2
(c) Three steps to match
Representative models
As shown in 0, the next hop of A and B is same, and A is the nearest ancestor of B.
Proof: IP address R, obviously L(R)=32, R=[0,1]{32}. Suppose R=[0,1]{L(A)}[0,1]{L(AB)}[0,1]{32-L(B)}
Step1: match
{
̃
̃
{
̃
̃
}
Step 2: match [0,1]{L(AB)}
{
̃
̃
{
̃
̃
}
Step 3: match [0,1]{32-L(B)}
}
Integrate step1/step2/step3, according Theorem 1,
2,
. Therefore,
. Proof is complete.
6
satisf
, according Theorem
Mathematical Proof for ONRTC
ep
If P2 is the representative model of P1, we say
.
C. Atomic Equivalent Models of ONRTC algorithm
Firstly, the equivalence of the six models is proved in the following:
1) Model 1 of ONRTC
2 D
2
0
0 C
1 A
2
D
(1) p1
0 C
0
1 A
B 0
0
1 A
(2) p2
Figure 3
D
B 0
(3) pp
Model 1 of ONRTC.
Proof:
Ele
ep
, proof is complete.
2) Model 2 of ONRTC
2
2
0
2
0
0
1 A
0
(1) p1
1
A
(2) p2
Figure 4
Model 2 of ONRTC.
Proof:
Ele
ep
, proof is complete.
3) Model 3 of ONRTC
7
0
0
0
1
(3) pp
A
Mathematical Proof for ONRTC
C
3
B
A
1
C 3
0
A
1
(1) p1
B
0
(2) p2
Figure 5
Model 3 of ONRTC.
Proof:
ep
. Proof is complete.
4) Model 4 of ONRTC
3
0
A
C
B
C 3
0
0
A
(1) p1
B
0
(2) p2
Figure 6
Model 3 of ONRTC.
Proof:
ep
. Proof is complete.
5) Model 5 of ONRTC
C
A
0
B
1
0
C
Step1
B
1
A
1
Step2
(a)The original trie
(b) The trie after transformation
Figure 7
Proof: As shown in 0,
A
C
B
1
Step2
(c) Two steps to match
Model 5 of ONRTC
IP address R, satisfy L(R)=32, R=[0,1]{32}, then R=[0,1]{L(C)}[0,1][0,1]{32-L(C)-1}
Step 1: match
8
Mathematical Proof for ONRTC
or
{
̃
̃
{
(̃)
(̃)
}
Step 2: match [0,1]{32-L(C)-1}
{
{
}
. Thus
Integrate step1/step2, according to theorem 1,
satisf
, according to theorem 2,
. Proof is complete.
6) Model 6 of ONRTC
3
1
A
C
B
3
1
2
A
(1) p1
Figure 8
C
B
2
(2) p2
Model 6 of ONRTC
Proof:
ep
. Proof is complete.
D. Conclusion
Therefore, all the six models are proven to be equivalent. It is obvious that all the transformation results own the fewest solid
nodes under the constraint that all the prefixes are not overlapped. In conclusion, the optimal non-overlap tables (in binary trie) can
be achieved by the transformation of the six models.
9