Research Article

On Asymptotic Analysis of Packet and Wormhole Switched Routing Algorithm for Application-Specific Networks-on-Chip

Algorithm 1

Test cases.
Input: Number of nodes.
Output: Pairs
 BEGIN
(2)   pair()
(3)    Open one.doc, two.doc, three.doc, four.doc file to write output;
(4)    Input four nodes from user;
(5)    k, c, d, e, l, g = 0;
(6)   FOR i = 0 to 3
(7)   FOR j = 0 to 3
(8)    arr k 0 = node i ;
(9)    arr k 1 = node j ;
(10)    k++;
(11) END FOR
(12) END FOR
(13) FOR i = 0 to 12
(14)  Print (arr i 0 , arr i 1 ) to one.doc
(15)   FOR j = 0 to 12
(16)     IF (i ! = j), THEN
(17)     Print 2-2 pairs (arr2 i 0 , arr2 i 1 , arr2 j 0 , arr2 j 1 ) to two.doc;
(18)     c++;
(19)   FOR d = 0 to 12
(20)   IF (j ! = d and i ! = d), THEN
(21)   Print 3-3 pairs (arr2 i 0 , arr2 i 1 , arr2 j] 0 , arr2 j 1 , arr2 d 0 , arr2 d 1 ) to three.doc;
(22)   e++;
(23)   FOR l = 0 to 12
(24)     IF (l ! = j && l ! = d && l ! = i), THEN
(25)     Print 4-4 pairs
(26)     (arr2 i 0 , arr2 i 1 , arr2 j [0 , arr2 j 1 , arr2 d 0 , arr2 d 1 , arr2 l 0 , arr2 l 1 ) to four.doc;
(27)     g++;
(28)   END FOR
(29)    END FOR
(30)   END FOR
(31) END FOR
(32) Print number of 1-1 pairs = k to one.doc;
(33) Print number of 2-2 pairs = c to two.doc;
(34) Print number of 3-3 pairs = e to three.doc;
(35) Print number of 4-4 pairs = g to four.doc;
(36) END pair()
(37)  END
The run time complexity of the Algorithm: Test cases is