560 likes | 664 Views
ICN’s. The n-D hypercube (n-cube) contains 2^n nodes (processors). The nodes are neighbors in the n-cube iff their end bit binary addresses differ in a single bit. Neighbor nodes. Two nodes are neighbors in the n-cube iff their end bit binary addresses differ by a single bit. Hypercubes.
E N D
ICN’s The n-D hypercube (n-cube) contains 2^n nodes (processors). The nodes are neighbors in the n-cube iff their end bit binary addresses differ in a single bit
Neighbor nodes Two nodes are neighbors in the n-cube iff their end bit binary addresses differ by a single bit
Hypercubes Hypercubes are designed recursively How ?
2 - Cube 2^2 = 4 nodes 00 01 10 11
3 - Cube 2^3 = 8 nodes 00 01 00 01 10 11 10 11
3 - Cube 2^3 = 8 nodes 100 101 000 001 110 111 010 011
4 - Cube 2^4 = 16 nodes 100 101 100 101 000 001 001 000 110 110 111 111 011 010 010 011
4 - Cube 2^4 = 16 nodes 100 101 100 101 000 001 001 000 110 110 111 111 011 010 010 011
100 110 010 000 101 111 110 100 001 011 101 000 010 111 001 011
100 110 010 000 101 111 110 100 001 011 101 000 010 111 001 011
0100 0110 0010 0000 0101 0111 1110 1100 0001 0011 1101 1000 1010 1111 1001 1011
4 - Cube 0110 0100 0101 0000 0010 0111 0010 0011
Reduced hypercube 100 101 000 001 110 111 010 011
Folded hypercube (4) 100 101 000 001 110 111 010 011
3-cube routing: data exchange The nodes are coded as XYZ 100 101 000 001 110 111 010 011
Routing by inverting X The nodes are coded as XYZ 100 101 000 001 110 111 010 011
Routing by inverting Y The nodes are coded as XYZ 100 101 000 001 110 111 010 011
Routing by inverting Z The nodes are coded as XYZ 100 101 000 001 110 111 010 011
Hemming distance The shortest path , between nodes, is determined by the Hamming distance. 100 101 000 001 110 111 010 011
Hemming distance XOR (source and destination) and count the 1’s 100 101 000 001 110 111 010 011
Examples 010 -> 111 = 100 101 000 001 110 111 010 011
Examples 010 -> 111 = 010 XOR 111 = 101 = 2 hops 100 101 000 001 110 111 010 011
Examples 010 -> 110 = 100 101 000 001 110 111 010 011
Examples 010 -> 110 = 010 XOR 110 = 100 = 1 hops 100 101 000 001 110 111 010 011
Examples 010 -> 101 = 010 XOR 010 = 111 = 3 hops 100 101 000 001 110 111 010 011
Examples 010 -> 101 = 010 XOR 010 = 111 = 3 hops 100 101 000 001 110 111 010 011
Hypercube • The hypercube can emulate (simulate) other ICN’s • The hypercube is a general purpose or universal ICN
Embedding a linear array • How can we embed other ICN’s into a hypercube ?
Algorithm • Bits must differ by a single bit • Use the binary Reflected Gray Code
Binary Reflected Code • RGC(n); n-bit binary Reflected Gray Code • RGC(n) = [ 0 . RGC(n-1), 1 . RGC (n-1) ] -1
1-cube/2-node array • RGC(n); n-bit binary Reflected Gray Code RGC(n) = [ 0 . RGC(n-1), 1 . RGC^{-1}(n-1) ] = [ 0 . RGC(1-1), 1 . RGC^{-1}(1-1) ] = [ 0. RGC(0) , 1 . RGC^{-1}(0) ] = [ 0 1 ] or 1 - Cube 0 1
2-cube/4-node array • RGC(n); n-bit binary Reflected Gray Code RGC(2) = [ 0 . RGC(2-1), 1 . RGC^{-1}(2-1) ] = [ 0 . RGC(1) , 1 . RGC^{-1}(1) ] = [ 0 . ( 0,1) , 1 . (1,0) ] = [ 00, 01 , 11, 10 ] 00 10 01 11 2- cube
Linear array; n = 3 • RGC(n); n-bit binary Reflected Gray Code RGC(3) = [ 0 . RGC(3-1), 1 . RGC^{-1}(3-1) ] = [ 0 . RGC(2) , 1 . RGC^{-1}(2) ] = [ 0.(00,01,11,10 ) , 1.(10,11,01,00) ] = [000,001,011,010,110,111,101,100 Addresses ARRAY = 0 1 2 3 4 5 6 7 HYPERCUBE = 0 1 3 2 6 7 5 4
Linear array - Hypercube HYPERCUBE = 0 1 3 2 6 7 5 4 100 101 000 001 110 111 010 011
Linear array - Hypercube HYPERCUBE = 0 1 3 2 6 7 5 4 100 101 000 001 110 111 010 011
Linear array - Hypercube HYPERCUBE = 0 1 3 2 6 7 5 4 100 101 000 001 110 111 010 011
Linear array - Hypercube HYPERCUBE = 01 3 2 6 7 5 4 100 101 000 001 110 111 010 011
Linear array - Hypercube HYPERCUBE = 01 3 2 6 7 5 4 100 101 000 001 110 111 010 011
Linear array - Hypercube HYPERCUBE = 01 32 6 7 5 4 100 101 000 001 110 111 010 011
Linear array - Hypercube HYPERCUBE = 01 32 6 7 5 4 100 101 000 001 110 111 010 011
3-Cube/16-node array HYPERCUBE = 01 32 6 7 5 4 100 101 000 001 3-cube 110 111 010 011
Embed an 8-leave Binary Tree into a 3-Cube 000 000 000 000 001 010 011 100 101 110 111 1. Choose the address of the parent to be the address of the left child.
Embed an 8-leave Binary Tree into a 3-Cube 000 000 000 010 100 110 000 001 010 011 100 101 110 111 Choose the address of the parent to be the address of the left child.
Embed an 8-leave Binary Tree into a 3-Cube 000 000 100 Height = n = 4 Nodes = 2^n-1 000 010 100 110 000 001 010 011 100 101 110 111 Choose the address of the parent to be the address of the left child.
Embed an 8-leave Binary Tree into a 3-Cube 000 Level- 3 000 100 Level- 2 000 010 100 110 Level- 1 Level- 0 000 001 010 011 100 101 110 111
Create Tables (connection) for each level 000 Level- 3 000 100 Level- 2 000 010 100 110 Level- 1 Level- 0 000 001 010 011 100 101 110 111
Table: Level -1 000 Level- 3 000 100 Level- 2 000 010 100 110 Level- 1 Level- 0 000 001 010 011 100 101 110 111 001 ->> 000 011 ->> 010
Table: Level -1 000 Level- 3 000 100 Level- 2 000 010 100 110 Level- 1 Level- 0 000 001 010 011 100 101 110 111 001 ->> 000 011 ->> 010 101 ->> 100 111 ->> 110
Table: Level -2 000 Level- 3 000 100 Level- 2 000 010 100 110 Level- 1 Level- 0 000 001 010 011 100 101 110 111 010 ->> 000 110 ->> 100