routing permutation in the baseline network and in the omega network student : tzu-hung chen...

Post on 17-Dec-2015

237 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Routing Permutation in the Routing Permutation in the Baseline Network and in the Baseline Network and in the

Omega NetworkOmega NetworkStudent : Tzu-hung Chen 陳子鴻 Advisor : Chiuyuan Chen

Department of Applied Mathematics

National Chiao Tung University

Outline

Preliminaries Previous resultsMotivationOur resultsConcluding remarks

N × N multistage interconnection network (MIN)

P0

P1

PN-1

N×N

MIN

O0

O1

ON-1

Preliminaries

0 1 2 3 4 5 6 7

stage 0 stage 1 stage 2

0 1 2 3 4 5 6 7

The number of processors (inputs/ outputs) : The number of stages :

Preliminaries

N = 8, n = 3

2logn N

2 , kN k N

Input Output

switching element

Preliminaries

A 2 × 2 switching element has only two possible states: straight, cross.

(a) straight

sub port 0

sub port 1

sub port 0

sub port 1

(b) cross

sub port 0

sub port 1

sub port 0

sub port 1

Preliminaries

(a) 4×4 Baseline network

0 1

2 3

0 1

2 3

(b ) 4×4 Omega network0

1 2

3

0 1

2 3

2 2

:

Baseline networkN N

U

2 2

:

Baseline networkN N

L

10

23

N-2N-1

N-3N-4

n-1 stages

10

N-2N-1

(a) N × N Baseline network (b ) N × N Omega network

2 -1N2 - 2N

2N

2 +1N

Preliminaries

0 1

2 3

4 5

6 7

0 1

2 3

4 5

6 7

0 1

2 3

4 5

6 7

0 1

2 3

4 5

6 7

(a) 8×8 Baseline network (b ) 8×8 Omega network

Preliminaries

Unique path: there is a unique path between each source (input) and each destination (output).

Preliminaries

Self routable: a routing in the network only depends on the source and the destination.

Control tag is a sequence of labels that label the successive links on a path.

Input 0 can get to output 6 by using control tag

Preliminaries

0 1 2 3 4 5 6 7stage 0 stage 1 stage 2

0 1 2 3 4 5 6 7

1

01

(110)

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7

Conflict

Preliminaries

Have the same nodestage 0 stage 1 stage 2

Have the same link => link-disjoint=> node-disjoint

0 1 1

0 1 1

N

N

a a aP

b b b

Preliminaries

A permutation of an MIN is one-to-one mapping between the inputs and outputs.

For convenience, let

0 1 1, , , NP b b b

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7

1 0 2 3 4 5 7 6

2 1 4 7 3 0 6 5

2 4 7 1 6 3 5 0stage 0 stage 1 stage 2

0 1 2 3 4 5 6 77 3 0 5 1 6 4 2

7 3 0 5 1 6 4 2P

Preliminaries

No conflict occurs in the network. P is an admissible permutation.

Preliminaries

0 1 2 3 4 5 6 70 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7P

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7

stage 0 stage 1 stage 2

Not admissible!Conflict!

2

2

2

2

0 1 1

0 1 1

10 12

10 12

is a semi-permutation, if

, , , 0,1, , 12 2 2

and

, , , 0,1, , 12 2 2

N

N

N

N

N

N

a a aP

b b b

aa a

bb b

Preliminaries

A semi-permutation P

Example

Preliminaries

0 3 5 6 is a semi-permutation, because

7 4 0 3

0 3 5 6 , , , 0,1,2,3

2 2 2 2

and

7 4 0 3 , , , 0,1,2,3

2 2 2 2

P

Previous results

Previous results

In [11], Shen et al. proposed an O(N logN) algorithm to determine the admissibility of an arbitrary permutation to the Omega network; their results are applicable to Omega-equivalent networks.

In [18], Yang and Wang proposed an algorithm to decompose an arbitrary permutation into two semi-permutations.

Previous results

Previous results

In [17], Yang and Wang used the idea in [18] to prove that an arbitrary permutation can be realized in a Baseline network with node-disjoint paths in four passes.

Motivation

Motivation

Although [11] claimed that their results are applicable to Omega-equivalent networks, an admissible permutation of the Omega network may not be an admissible permutation of the Baseline network.

We propose an algorithm to determine the

admissibility of permutations for the Baseline

network.

0 1

2 3

4 5

6 7

0 1

2 3

4 5

6 7

0 1

2 3

4 5

6 7

0 1

2 3

4 5

6 7

stage 0 stage 1 stage 2

Motivation

stage 0 stage 1 stage 2

(a) Omega network (b) Baseline network

0 1 2 3 4 5 6 7Identity permutation

0 1 2 3 4 5 6 7P

The algorithm in [11] has one step that can be removed without breaking the correct of the algorithm.

Motivation

We propose an algorithm to determine the admissibility of permutations for the Omega network that does not need the step in [11].

The motivation of [17]

In [17], Yang and Wang proved that an arbitrary permutation can be realized in a Baseline network with node-disjoint paths in four passes.

In this thesis, we implement the decomposition

algorithm in [18] and the algorithm in [17] into a

C++ computer program.

Our results

Our results

Determine the admissibility of permutations for the Baseline network

Determine the admissibility of permutations for the Omega network

We implement the decomposition algorithm in [18] and the algorithm in [17] into a C++ computer program.

The Baseline network

stage 0

N×N Baseline network

2 2

An Baseline network can be viewed as adding a

stage (call it stage 0) to two Baseline networksN N

N N

2 2

:

Baseline networkN N

U

2 2

:

Baseline networkN N

L

10

23

N-2

N-3N-4

N-1

The Baseline network

A permutation P is admissible in a Baselinenetwork if

(i) for each pair of inputs 2 and 2 +1, there is no

conflict at stage 0, and

(ii) the two partial permutations and of (defined

later and is for , is for ) are admissiU L

U L

i i

P P P

P U P L

2 2

ble

permutations of an Omega network.N N

Determine the admissibility of permutations for the Baseline network

2 2

:

Baseline networkN N

U

2 2

:

Baseline networkN N

L

0

0

0

0

Input 2i

Input 2i+1

Input 2i

Input 2i+1

Input 2i

Input 2i+1

Input 2i

Input 2i+1

stage 0

Algorithm Baseline -Admissible

0 1 -1Input : A permutation and an integer j.

Output: true if is admissible and false if is not admissible for

an Baseline network.

Step 1: if 2 then return true;

Step 2: f

NP b b b

P P

N N

N

2

2 , 2 1,

or each , 0 -1, do

if then return false;

N

i j i j

i i

b b

2 2

0 1 0 1-1 -1

2 2 ,

2 1 2 1,

2 2 ,

Step 3: set and , where

if 0

if 0

if

N NU L

i i j

ii i j

i i

i

P u u u P l l l

b bu

b b

b bl

2 1 2 1,

1

if 1j

i i jb b

Algorithm Baseline -Admissible

2

2

Step 4: recursively call Algorithm Baseline-Admissible( , , -1);

if the result is false then is not admissible and return false;

Step 5: recursively call Algorithm Baseline-Admissible(

NU

N

P j

P

, , -1);

if the result is false then is not admissible and return false;

else P is admissible and return true;

LP j

P

Algorithm Baseline -Admissible

0 1 2 3 4 5 6 7

0,2 1,2 2,2 3,2 4,2 5,2 6,2 7,2

Example 3. 7 3 0 5 1 6 4 2 .

Initially, 2.

In step 1, since 8 2, step 2 will be performed.

In step 2, since , , , and ,

st

P b b b b b b b b

j

N

b b b b b b b b

ep 3 will be performed.

In step 3, 3 0 1 2 and 7 5 6 4 .U LP P

0 1 2 3

In step 4, recursively call Algorithm Baseline-Admissible(4, , 1), where

3 0 1 2 . Now, 1.

. In step 1, since 4 2, step 2 will be performed.

. In step 2, sin

U

U

P

P b b b b j

N

0,1 1,1 2,1 3,1ce and , step 3 will be performed.

. In step 3, 0 1 and 3 2 .

. In step 4, recursively call Algorithm Baseline-Admissible(2, , 0), where

U L

U

b b b b

P P

P

0 1

0 1

0 1 . Now, 0.

. In step 1, since 2, return true.

. In step 5, recursively call Algorithm Baseline-Admissible(2, , 0), where

3 2 . No

U

L

L

P b b j

N

P

P b b

w, 0.

. In step 1, since 2, return true.

Hence return true.

j

N

0 1 2 3

In step 5, recursively call Algorithm Baseline-Admissible(4, , 1), where

7 5 6 4 . Now, 1.

. In step 1, since 4 2, step 2 will be performed.

. In step 2, sin

L

L

P

P b b b b j

N

0,1 1,1 2,1 3,1ce and , step 3 will be performed.

. In step 3, 5 4 and 7 6 .

. In step 4, recursively call Algorithm Baseline-Admissible(2, ,0), where

U L

U

b b b b

P P

P

0 1

0 1

5 4 . Now, 0.

. In step 1, since 2, return true.

. In step 5, recursively call Algorithm Baseline-Admissible(2, ,0), where

7 6 . Now,

U

L

L

P b b j

N

P

P b b

0.

. In step 1, since 2, return true.

Hence return true.

Hence return true.

j

N

Our results

2

Theorem 1

Algorithm Baseline-Admissible is correct and it

takes ( log ) time.O N N

2

(1) if 2: ( )

2 ( ) ( ) if 2N

O NProof T N

T O N N

The Omega network

2 2

An Omega network can be viewed as

adding a stage (call it stage 0) to two

Omega networks.

N N

N N

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

stage 0 stage 1 stage 2 stage 3

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7

stage 0 stage 1 stage 2

(a) 8×8 Omega network (b) 16×16 Omega network

(i) The upper N/4 switching elements of stage n−1 (the last stage) belong to U and the lower N/4 switching elements of stage n−1 belong to L.

(ii) For each switching element of stage ℓ (ℓ = n−2, n−3, . . . , 1), if this switching element is adjacent to a switching element of stage ℓ+1 which belongs to U (L), then it belongs to U (L).

Define sub network U and sub network L

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

stage 0 stage 1 stage 2 stage 3

(a) 8×8 Omega network0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7

stage 0 stage 1 stage 2

(b) 16×16 Omega network

sub network U

sub network U

The Omega network

A permutation P is admissible in a Omeganetwork if

2(i) for each pair of inputs and , there is no

conflict at stage 0, and

(ii) the two partial permutations and of (defined

later and is for , is for ) are admissib

N

U L

U L

i i

P P P

P U P L

2 2

le

permutations of an Omega network.N N

(a) (b) N = 16

Determine the admissibility of permutations for the Omega network

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7

0

0

0

0

0

0

0

00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

stage 0 stage 1 stage 2 stage 3

stage 0 stage 1 stage 2

Algorithm Omega -Admissible

0 1 -1Input : A permutation and an integer j.

Output: true if is admissible and false if is not admissible for

an Baseline network.

Step 1: if 2 then return true;

Step 2: f

NP b b b

P P

N N

N

2

2

, ,

or each , 0 -1, do

if then return false;N

N

i j i j

i i

b b

2 2

2 2

0 1 0 11 1

,

,

,

Step 3: set and , where

if 0

if 0

if

N N

N N

U L

i i j

ii i j

i i j

i

P u u u P l l l

b bu

b b

b bl

2 2 ,

1

if 1N Ni i jb b

Algorithm Omega -Admissible

2

2

Step 4: recursively call Algorithm Omega-Admissible( , , -1);

if the result is false then is not admissible and return false;

Step 5: recursively call Algorithm Omega-Admissible( , , -

NU

NL

P j

P

P j 1);

if the result is false then is not admissible and return false;

else P is admissible and return true;

P

Algorithm Omega -Admissible

0 1 2 3 4 5 6 7

0,2 4,2 1,2 5,2 2,2 6,2 3,2 7,2

Example 5. 0 1 2 3 4 5 6 7 .

Initially, 2.

In step 1, since 8 2, step 2 will be performed.

In step 2, since , , , and ,

st

P b b b b b b b b

j

N

b b b b b b b b

ep 3 will be performed.

In step 3, 0 1 2 3 and 4 5 6 7 .U LP P

0 1 2 3

In step 4, recursively call Algorithm Baseline-Admissible(4, , 1), where

0 1 2 3 . Now, 1.

. In step 1, since 4 2, step 2 will be performed.

. In step 2, sin

U

U

P

P b b b b j

N

0,1 2,1 1,1 3,1ce and , step 3 will be performed.

. In step 3, 0 1 and 2 3 .

. In step 4, recursively call Algorithm Baseline-Admissible(2, , 0), where

U L

U

b b b b

P P

P

0 1

0 1

0 1 . Now, 0.

. In step 1, since 2, return true.

. In step 5, recursively call Algorithm Baseline-Admissible(2, , 0), where

2 3 . No

U

L

L

P b b j

N

P

P b b

w, 0.

. In step 1, since 2, return true.

Hence return true.

j

N

0 1 2 3

In step 5, recursively call Algorithm Baseline-Admissible(4, , 1), where

4 5 6 7 . Now, 1.

. In step 1, since 4 2, step 2 will be performed.

. In step 2, sin

L

L

P

P b b b b j

N

0,1 2,1 1,1 3,1ce and , step 3 will be performed.

. In step 3, 4 5 and 6 7 .

. In step 4, recursively call Algorithm Baseline-Admissible(2, ,0), where

U L

U

b b b b

P P

P

0 1

0 1

4 5 . Now, 0.

. In step 1, since 2, return true.

. In step 5, recursively call Algorithm Baseline-Admissible(2, ,0), where

6 7 . Now,

U

L

L

P b b j

N

P

P b b

0.

. In step 1, since 2, return true.

Hence return true.

Hence return true.

j

N

Our results

2

Theorem 2

Algorithm Omega-Admissible is correct and it takes

( log ) time.O N N

2

(1) if 2: ( )

2 ( ) ( ) if 2N

O NProof T N

T O N N

We implement the decomposition algorithm in [18] and the algorithm in [17] into a C++ computer program.

Our results

Our result

The output of our program

Outputs: Permutation 的大小為 : 8

您輸入的 permutation為:

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7

In pass 1, the permutation is:

0 2 4 6

0 4 3 7

Control tag for the first

semi-permutation is:

The input 0: 0 0 0

The input 2: 1 0 0

The input 4: 0 1 1

The input 6: 1 1 1

In pass 2, the permutation is:

0 4 3 7

0 2 4 6

Control tag for the second

semi-permutation is:

The input 0: 0 0 0

The input 2: 0 1 0

The input 4: 1 0 0

The input 6: 1 1 0

In pass 3, the permutation is:

1 3 5 7

0 4 3 7

Control tag for the third

semi-permutation is:

The input 1: 0 0 0

The input 3: 1 0 0

The input 5: 0 1 1

The input 7: 1 1 1

In pass 4, the permutation is:

0 4 3 7

1 3 5 7

Control tag for the forth

semi-permutation is:

The input 1: 0 0 1

The input 3: 0 1 1

The input 5: 1 0 1

The input 7: 1 1 1

Permutation 的大小為 : 8

您輸入的 permutation為:

0 1 2 3 4 5 6 7

7 3 0 5 1 6 4 2

In pass 1, the permutation is:

0 3 4 7

1 5 2 6

Control tag for the first

semi-permutation is:

The input 0: 0 0 1

The input 3: 1 0 1

The input 4: 0 1 0

The input 7: 1 1 0

In pass 2, the permutation is:

1 5 2 6

7 5 1 2

Control tag for the second

semi-permutation is:

The input 0: 1 1 1

The input 3: 1 0 1

The input 4: 0 0 1

The input 7: 0 1 0

In pass 3, the permutation is:

1 2 5 6

0 4 3 7

Control tag for the third

semi-permutation is:

The input 1: 0 0 0

The input 2: 1 0 0

The input 5: 0 1 1

The input 6: 1 1 1

In pass 4, the permutation is:

0 4 3 7

3 0 6 4

Control tag for the forth

semi-permutation is:

The input 1: 0 1 1

The input 2: 0 0 0

The input 5: 1 1 0

The input 6: 1 0 0

Concluding Remarks

Concluding Remarks

We propose an algorithm to determine whether a permutation is admissible to the Baseline network.

We also propose an algorithm to determine whether a permutation is admissible to the Omega network.

We have also implemented the decomposition algorithm in [18] and the algorithm in [17] into a C++ computer program.

Compare

Algorithm

[11] Omega network

This thesis

Baseline network and Omega network( remove one step in [11])

Thank you for your attention !

top related