SlideShare a Scribd company logo
M. R. Hassan
International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 10
An Algorithm for Computing Average Packet Delay
M. R. Hassan m_r_hassan73@yahoo.com
Computer Science Department,
Faculty of Science, South Valley University,
Aswan, Egypt.
Abstract
Average Packet delay is considered as a vital performance measure for a computer-
communication network especially in the network designing problem. Average Packet delay
evaluation depends on two main parts: the first part is the capacity of each link in the network,
the last one is the flow of each link. The capacity of each link is assumed to be fixed but the
flow of each link is computed by using routing algorithms and the traffic requirement matrix.
The paper presents an algorithm based on FLOYD’s routing algorithm to calculate the flow of
each link and then we can compute the average packet delay.
Keywords: Computer Networks, QoS, Average Packet Delay.
1. INTRODUCTION
Performance measures [1], eg, delay, throughput are very important measures in designing
reliable networks. The performance measure, Average Network Throughput (ANT), which
takes into consideration the network topology, link reliabilities, the capacity of the links in the
network, and the total installed capacity, [2] and [3]. The optimization priblem of ANT has
been studied by many researches, [4-6].
The other vital performance measure for a communication computer network is the average
packet delay, T, that is, the mean time that a packet takes to travel from a source node to a
destination node in the network, [7]. The average packet delay optimization problem
formulated and solved in [8-10]. The average source-to-destination packet delay is
considered as an important criteria in the computer network design problems [11].
This paper presents a simple algorithm to calculate the average packet delay (T) of a
given computer network by generating the set of all shortest paths by using Floyd’s
algorithm, [12], to determine the route to be taken by packets between each source-
destination pair of nodes based on Euclidean distance between them. Then assumed the
traffic that has been actually carried by each link in the network to calculate the flow of
this link.
The paper is organized as follows: The assumptions and notation used given in Section 2.
Section 3 describes the problem of calculating the average packet delay. Section 4 presents
the proposed algorithm for calculating the average packet delay. Section 5 shows how to use
the proposed algorithm to calculate the average packet delay for a given network. Conclusion
and future work are given in section 6.
2. NOTATIONS AND ASSUMPTIONS
Notations:
N is the number of nodes.
M is the number of links in the network.
Ck is the capacity of link k.
Fk is the flow of link k.
Lk is the length of link k.
ijγ is the traffic between nodes i and j.
γ is the total traffic in the network.
µ1 is the average packet length.
M. R. Hassan
International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 11
Assumptions:
1. The location of each network node is given.
2. The traffic between each node-pair has a Poisson distribution.
3. The packet size has exponential distribution with mean µ1 (bits/packet).
4. The nodal memory is infinite.
5. Independence between interarrival and transmission times on each link.
3. PROBLEM DESCRIPTION
The computer network is modeled as a directed graph G (N, L), |N| = n and |L| = m, where n
represents the number of nodes of the network and m represents the number of links of the
network. If we consider the sample network of 4 nodes and 5 links (n = 4 and m = 5) as
shown in Fig. 1.
FIGURE 1: A sample network
The distance matrix is:
1 2 3 4
1 0 16 12 0
2 16 0 15 10
3 12 15 0 22
4 0 10 22 0
FIGURE 2: The Distance matrix for the network in Figure1.
The shrtest paths are as follows by using Floyd’s algorithm, [12] :-
P12 = 1-2
P13 = 1-3
P14 = 1-3-4
P23 = 2-3
P34 = 3-4
P24 = 2-4
The flow of each link can be computed by summed the packets that travel across that link.
The total number of packets that carried by the link depends on the number of shortest paths
contains that link. The following table summerizes the link and the paths that contains that
link.
The link The paths
1-2 Appears in P12
1-3 Appears in P13 and P14
2-3 Appears in P23
2-4 Appears in P24
3-4 Appears in P13 and P34
TABLE 1: The links and the corresponding paths
1 4
2
16
10
3
22
15
12
M. R. Hassan
International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 12
So, if the number of packets equal p then the following table summerize the number of
packets carried by each link.
The link
The number of
packets
1-2 p
1-3 2p
2-3 p
2-4 p
3-4 2p
TABLE 2: The number of packets carried by each link
So, the total flow is equal to 14p, if we consider the link is bidirectional.
In the following subsections we will describe the main parts of the algorithm to calculate the
flow of a given network and then calculate the average delay.
3. 1. Shortest Path Generation
We wil use Floyd’s all-pairs shortest path algorithm, [12], to find all shortest paths from the
source node to the destination node by using the distance matrix as follows:
SubAlgorithm_1
Input:
V = set of vertices, labeled by integers 1 to N.
E = set of edges, labeled by ordered pairs (u, v) of vertex labels.
D[u][v]: The distance matrix. D[u][v]=0 if u ≠ v and (u, v) ∉E or u=v
P[u][v]: the shortest path from u to v . P[u][v]=u and P[u][v]=0 if u ≠ v
and (u, v) ∉E or u=v.
For all edges (u, v) in E:
W[u][v] = D[u][v].. And W(u, v) = infinity if u ≠ v and (u, v) ∉E or u=v.
Begin
for(k =1; k<= n; k++)
for(u =1; u<= n; u++)
for(v =1; v<= n; v++)
W[u][v] = min (W[u][v], W[u][k]+ W[k][v])
P[u][v]=k;
end.
3. 2. Finding the Intermediate Nodes for Each Shortest Path
If P(i, j)=Vq then intermediate nodes on shortest path from i to j can be deduced as follows:
SubAlgorithm_2:
for(i=1;i<n;i++)
for(j=i+1;j<=n;j++)
Begin
if(p[i][j]!=i) then
repeat
q++;
v[q]=p[i][v[q-1]];
until v[q]=v[q-1]
for(k=1;k<q;k++) print v[k];
End
3. 3. Calculate the Flow of Each Link
For each path generated in 3.2 count the total traffic that carried by each link connects the
corresponding pair of nodes:
M. R. Hassan
International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 13
SubAlgorithm_3
Initially set flow[][]=0;
For each path generated in 3.2 do
Begin
If the path contains q vetices then
For(k=1; k<q,k++)
flow[i][V[k]]+= ][kivγ ;
END
3. 4. The Total Traffic
The total traffic across the network is calculated by:
ij
n
ji
γ=γ ∑
,
…(1)
SubAlgorithm_4:
Set γ = 0
for(i=1;i<n;i++)
for(j=i+1;j<=n;j++)
γ = γ + ijγ
3. 5. The Average Packet Delay
The Average packet Delay, the mean time that a packet takes to travel from a source node to
a destination node in the network is given by [11]:
∑
= −γ
=
m
i ii
i
fc
f
T
1
1
….(2)
4. AN ALGORITHM FOR COMPUTING THE AVERAGE PACKET DELAY
The steps of the algorithm for calculating the average delay of the computer network are as
follows:
Step 1: Read the distance matrix D and the capacity for each link Ci
Step 2: Generate shortest paths using SubAlgorithm_1 and deduce the intermediate nodes
for each path using SubAlgorithm_2.
Step 3: Use SubAlgorithm_3 to calculate the flow of each link, fi
Step 4: Calculate the total traffic, γ by using SubAlgorithm_4.
Step 5: Calculate the Average Packet Delay, T, using equation (2).
Note: The algorithm has been implemented using VC++ 6.0.
5. CASE STUDY
To illustrate the proposed algorithm for computing the Average Packet Delay, consider an
example networks taken from [9]. As shown in figure 2 the network has 8 nodes 13 links. The
numbers written in bold represent the link lengths.
M. R. Hassan
International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 14
FIGURE 3: Example network
Table 3 shows the link flows (computed by the proposed algorithm) and corresponding
capacities (taken from [10]) for the given network shown in Figure 1.
Link Flow (Kbps) Capacity
(Kbps)
1 - 2 10 19.2
1 - 3 50 56
1 - 6 10 19.2
2 - 3 40 56
2 - 4 20 56
3 - 5 100 200
3 - 6 40 100
4 - 5 30 56
4 - 8 20 56
5 - 7 50 56
5 - 8 30 56
6 - 7 20 56
7- 8 20 56
TABLE 3: Link flows and Capacities
The total traffic, 65=γ .
The Average Packet delay (T) is equal to 0.419 s
The following table shows the link flows (computed by the proposed algorithm) and
corresponding capacities for the given network with 10 nodes and 14 links shown in Figure 2,
taken from [8].
Link Flow (Kbps) Capacity
(Kbps)
1 - 2 80 100
1 - 5 220 230.4
2 - 3 100 230.4
2 - 4 60 100
3 - 8 140 230.4
4 - 5 60 100
4 - 8 80 100
5 - 6 100 230.4
5 - 7 180 230.4
6 - 7 60 100
6 - 10 80 100
7 - 9 140 230.4
8 - 9 160 230.4
9 - 10 100 230.4
TABLE 4: Link flows and Capacities
1
3
8
216
12
24
22
6
4
5
7
18
28 17
10
15
14
23
20 21
M. R. Hassan
International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 15
The total traffic, 140=γ .
The Average Packet delay (T) is equal to 0.3423 s
FIGURE 4: Example network taken from [8].
The above results shows that the proposed algorithm is working properly and efficient for the
computer networks with large number of nodes.
6. CONCLUSION AND FUTURE WORK
This paper presented a simple algorithm to calculate the average packet delay. The algorithm
is based on determining the flow of each each link of a given network. The flow claculations
depends on the shortest path generated by the routing algorithm. Finally we illustrate the
using of the proposed algorithm by calculating the average packet delay to a given sample
network. In the future work we hope that the algorithm can be used in the average delay
optimization problems.
7. REFERENCES
1. Tokumi Yokohira, Masashi Sugano and Hideo Miyahara, “Fault Tolerant Packet-Switched
Network Design and Its Sensitivity”, IEEE Transactions on Reliability, 40(4):452-460,
1991.
2. Ahuja Sanjay P. and Kumar Anup “Reliability and Performance based measure for
computer networks and distributed systems “, IEEE Southeastcon, Charlotte, NC,1993.
3. M. R. Girgis, A. Younes and M. R. Hassan, “An Algorithm for Computing Throughput of
Computer Networks”, Egyptian Informatics Journal, 9(1):205-218, 2009.
4. Ahuja Sanjay P., “Performance based reliability Optimization for computer networks “,
Engineering the New Century Conference Proceedings-IEEE-Southeastcon. IEEE,
Piscataway, NJ, USA, 97CB36044, PP. 121-125, 1997.
5. Kumar Anup, Elmaghraby Adel S. and Auja Sanjay P., "Performance and reliability
optimization for distributed computing systems", 3rd IEEE Symposium on Computers and
Communications, Athens, Greece, pp. 611-615, 1998.
6. M. R. Girgis, A. Younes and M. R. Hassan, “Optimizing The Performance-Based
Reliability For Computer Networks By Using Fuzzy Optimization With Genetic
1
8
2
5
4
26.93
25
3
7
6
9
10
25
25
25
26.93
33.54
33.54
36.40
39.05
35.36
30.41
29.15
30
M. R. Hassan
International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 16
Algorithms”, International Journal of Computational and Applied Mathematics, 2(2):139–
148, 2007.
7. S. Pierre and A. Elgibaoui,” Improving Communication Network Topologies Using Tabu
Search”, Proceedings of 22nd Annual Conference on Local Computer Networks, pp. 44-
53, 2-5 Nov 1997.
8. R. Beaubrun and S. Pierre, ” A Routing Algorithm for Distributed Communication
Networks”, Proceedings of 22nd Annual Conference on Local Computer Networks, pp.
99-105, 2-5 Nov1997.
9. Peirre Samuel and Legault, “A genetic algorithm for designing distributed computer
network topologies”, IEEE Transactions Systems , MAN and Cybernetics-Part B:
Cybernetics, 28(2):249-258, 1998.
10. M. R. Girgis, A. Younes and M. R. Hassan, “Optimizing the transmission delay of a
computer network by using fuzzy optimization with genetic algoritms”, International
Journal of Intelligent Computing and Information Science, 8(1):163-171, 2008.
11. Gerla, M., and Kleinrock. L. “On theTopological Design of Distributed Computer
Networks”. IEEE Transactions on communications,25(1): 48-60,1977.
12. MacIej M. Syslo, “Discrete Optimization Algorithms: With Pascal Programs”, Prentice
Hall, (1983).

More Related Content

What's hot (20)

PPTX
Routing in telephone networks
Renjith Ravi
 
PPTX
Et3003 sem2-1314-7 network layers iv (ipv4)
Tutun Juhana
 
PPT
Internet Protocol
Ghaffar Khan
 
PDF
FAULT-TOLERANT MULTIPATH ROUTING SCHEME FOR ENERGY EFFICIENT WIRELESS SENSOR ...
ijwmn
 
PDF
E NERGY - E FFICIENT P ATH C ONFIGURATION M ETHOD FOR DEF IN WSN S
ijitjournal
 
PPTX
Et3003 sem2-1314-5 network layers ii (intro to routing)
Tutun Juhana
 
PDF
Router vs Switch layer3
Khan Mohammad Habibi
 
PDF
Network topologies
sanjana mun
 
PDF
4 chitra ijece indonesia ed iqbal qc
IAESIJEECS
 
PPT
12 routing
Sanjay Thakare
 
PPT
4d routing
kavish dani
 
PPTX
Et3003 sem2-1314-9 network layers vi (routing protocols)
Tutun Juhana
 
PDF
A Genetic Algorithm for Reliability Evaluation of a Stochastic-Flow Network w...
CSCJournals
 
PDF
Link layer
Belete Kidane
 
PPTX
Network Layer
Dr Shashikant Athawale
 
PPT
Routing protocols-network-layer
Nitesh Singh
 
PDF
Application of N jobs M machine Job Sequencing Technique for MPLS Traffic Eng...
CSCJournals
 
PPTX
Ch 19 Network-layer protocols - section 2
Hossam El-Deen Osama
 
PDF
Implementation of Spanning Tree Protocol using ns-3
Naishil Shah
 
PPTX
Week13 lec2
syedhaiderraza
 
Routing in telephone networks
Renjith Ravi
 
Et3003 sem2-1314-7 network layers iv (ipv4)
Tutun Juhana
 
Internet Protocol
Ghaffar Khan
 
FAULT-TOLERANT MULTIPATH ROUTING SCHEME FOR ENERGY EFFICIENT WIRELESS SENSOR ...
ijwmn
 
E NERGY - E FFICIENT P ATH C ONFIGURATION M ETHOD FOR DEF IN WSN S
ijitjournal
 
Et3003 sem2-1314-5 network layers ii (intro to routing)
Tutun Juhana
 
Router vs Switch layer3
Khan Mohammad Habibi
 
Network topologies
sanjana mun
 
4 chitra ijece indonesia ed iqbal qc
IAESIJEECS
 
12 routing
Sanjay Thakare
 
4d routing
kavish dani
 
Et3003 sem2-1314-9 network layers vi (routing protocols)
Tutun Juhana
 
A Genetic Algorithm for Reliability Evaluation of a Stochastic-Flow Network w...
CSCJournals
 
Link layer
Belete Kidane
 
Network Layer
Dr Shashikant Athawale
 
Routing protocols-network-layer
Nitesh Singh
 
Application of N jobs M machine Job Sequencing Technique for MPLS Traffic Eng...
CSCJournals
 
Ch 19 Network-layer protocols - section 2
Hossam El-Deen Osama
 
Implementation of Spanning Tree Protocol using ns-3
Naishil Shah
 
Week13 lec2
syedhaiderraza
 

Viewers also liked (6)

PPTX
Ssh
Raghu nath
 
PPTX
3 ip packet
Rizqa Mahendra
 
PDF
Voice over IP (VoIP)
Peter R. Egli
 
PPTX
Voip powerpoint
GW1992
 
PPT
Voice Over IP (VoIP)
habib_786
 
PPTX
Slideshare ppt
Mandy Suzanne
 
3 ip packet
Rizqa Mahendra
 
Voice over IP (VoIP)
Peter R. Egli
 
Voip powerpoint
GW1992
 
Voice Over IP (VoIP)
habib_786
 
Slideshare ppt
Mandy Suzanne
 
Ad

Similar to An Algorithm for Computing Average Packet Delay (20)

PDF
Effective load balancing method in ad hoc
ijmnct
 
PDF
Fuzzy Optimized Metric for Adaptive Network Routing
CSCJournals
 
PDF
An Ant Algorithm for Solving QoS Multicast Routing Problem
CSCJournals
 
PDF
Broadcast wormhole routed 3-d mesh
IJCNCJournal
 
PDF
A genetic algorithm for constructing broadcast trees with cost and delay cons...
IJCNCJournal
 
PDF
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
csandit
 
PDF
Analysis of data transmission in wireless lan for 802.11 e2 et
eSAT Journals
 
PDF
Analysis of data transmission in wireless lan for 802.11
eSAT Publishing House
 
PDF
Design And Evaluation of Time Slot Assignment Algorithm For IEEE 802.16j Rela...
CSCJournals
 
PDF
Three dimension hamiltonian broadcast
IJCNCJournal
 
PDF
Multi-carrier Equalization by Restoration of RedundancY (MERRY) for Adaptive ...
IJNSA Journal
 
PDF
Dcf learn and performance analysis of 802.11 b wireless network
IJCNCJournal
 
PDF
Available network bandwidth schema to improve performance in tcp protocols
IJCNCJournal
 
PDF
An efficient ant optimized multipath routing in wireless sensor network
Editor Jacotech
 
DOCX
Simulation of a Wireless Sub Network using QualNET
Daksh Raj Chopra
 
PDF
MODELLING TRAFFIC IN IMS NETWORK NODES
ijdpsjournal
 
PDF
Determining the Optimum Number of Paths for Realization of Multi-path Routing...
TELKOMNIKA JOURNAL
 
PDF
All optical network design with even and odd nodes
eSAT Journals
 
PDF
Transmission Time and Throughput analysis of EEE LEACH, LEACH and Direct Tran...
acijjournal
 
PDF
Discriminators for use in flow-based classification
Denis Zuev
 
Effective load balancing method in ad hoc
ijmnct
 
Fuzzy Optimized Metric for Adaptive Network Routing
CSCJournals
 
An Ant Algorithm for Solving QoS Multicast Routing Problem
CSCJournals
 
Broadcast wormhole routed 3-d mesh
IJCNCJournal
 
A genetic algorithm for constructing broadcast trees with cost and delay cons...
IJCNCJournal
 
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
csandit
 
Analysis of data transmission in wireless lan for 802.11 e2 et
eSAT Journals
 
Analysis of data transmission in wireless lan for 802.11
eSAT Publishing House
 
Design And Evaluation of Time Slot Assignment Algorithm For IEEE 802.16j Rela...
CSCJournals
 
Three dimension hamiltonian broadcast
IJCNCJournal
 
Multi-carrier Equalization by Restoration of RedundancY (MERRY) for Adaptive ...
IJNSA Journal
 
Dcf learn and performance analysis of 802.11 b wireless network
IJCNCJournal
 
Available network bandwidth schema to improve performance in tcp protocols
IJCNCJournal
 
An efficient ant optimized multipath routing in wireless sensor network
Editor Jacotech
 
Simulation of a Wireless Sub Network using QualNET
Daksh Raj Chopra
 
MODELLING TRAFFIC IN IMS NETWORK NODES
ijdpsjournal
 
Determining the Optimum Number of Paths for Realization of Multi-path Routing...
TELKOMNIKA JOURNAL
 
All optical network design with even and odd nodes
eSAT Journals
 
Transmission Time and Throughput analysis of EEE LEACH, LEACH and Direct Tran...
acijjournal
 
Discriminators for use in flow-based classification
Denis Zuev
 
Ad

Recently uploaded (20)

PPTX
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
PDF
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
PPTX
A Case of Identity A Sociological Approach Fix.pptx
Ismail868386
 
PPTX
Peer Teaching Observations During School Internship
AjayaMohanty7
 
PDF
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
PDF
Our Guide to the July 2025 USPS® Rate Change
Postal Advocate Inc.
 
PPTX
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
PDF
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
PPTX
How to Create & Manage Stages in Odoo 18 Helpdesk
Celine George
 
PDF
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
PDF
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
DOCX
MUSIC AND ARTS 5 DLL MATATAG LESSON EXEMPLAR QUARTER 1_Q1_W1.docx
DianaValiente5
 
PDF
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
DOCX
DLL english grade five goof for one week
FlordelynGonzales1
 
PDF
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
PDF
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
PPTX
Photo chemistry Power Point Presentation
mprpgcwa2024
 
PPTX
How Physics Enhances Our Quality of Life.pptx
AngeliqueTolentinoDe
 
PDF
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
PPTX
How to Add New Item in CogMenu in Odoo 18
Celine George
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
A Case of Identity A Sociological Approach Fix.pptx
Ismail868386
 
Peer Teaching Observations During School Internship
AjayaMohanty7
 
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
Our Guide to the July 2025 USPS® Rate Change
Postal Advocate Inc.
 
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
How to Create & Manage Stages in Odoo 18 Helpdesk
Celine George
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
MUSIC AND ARTS 5 DLL MATATAG LESSON EXEMPLAR QUARTER 1_Q1_W1.docx
DianaValiente5
 
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
DLL english grade five goof for one week
FlordelynGonzales1
 
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
Photo chemistry Power Point Presentation
mprpgcwa2024
 
How Physics Enhances Our Quality of Life.pptx
AngeliqueTolentinoDe
 
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
How to Add New Item in CogMenu in Odoo 18
Celine George
 

An Algorithm for Computing Average Packet Delay

  • 1. M. R. Hassan International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 10 An Algorithm for Computing Average Packet Delay M. R. Hassan [email protected] Computer Science Department, Faculty of Science, South Valley University, Aswan, Egypt. Abstract Average Packet delay is considered as a vital performance measure for a computer- communication network especially in the network designing problem. Average Packet delay evaluation depends on two main parts: the first part is the capacity of each link in the network, the last one is the flow of each link. The capacity of each link is assumed to be fixed but the flow of each link is computed by using routing algorithms and the traffic requirement matrix. The paper presents an algorithm based on FLOYD’s routing algorithm to calculate the flow of each link and then we can compute the average packet delay. Keywords: Computer Networks, QoS, Average Packet Delay. 1. INTRODUCTION Performance measures [1], eg, delay, throughput are very important measures in designing reliable networks. The performance measure, Average Network Throughput (ANT), which takes into consideration the network topology, link reliabilities, the capacity of the links in the network, and the total installed capacity, [2] and [3]. The optimization priblem of ANT has been studied by many researches, [4-6]. The other vital performance measure for a communication computer network is the average packet delay, T, that is, the mean time that a packet takes to travel from a source node to a destination node in the network, [7]. The average packet delay optimization problem formulated and solved in [8-10]. The average source-to-destination packet delay is considered as an important criteria in the computer network design problems [11]. This paper presents a simple algorithm to calculate the average packet delay (T) of a given computer network by generating the set of all shortest paths by using Floyd’s algorithm, [12], to determine the route to be taken by packets between each source- destination pair of nodes based on Euclidean distance between them. Then assumed the traffic that has been actually carried by each link in the network to calculate the flow of this link. The paper is organized as follows: The assumptions and notation used given in Section 2. Section 3 describes the problem of calculating the average packet delay. Section 4 presents the proposed algorithm for calculating the average packet delay. Section 5 shows how to use the proposed algorithm to calculate the average packet delay for a given network. Conclusion and future work are given in section 6. 2. NOTATIONS AND ASSUMPTIONS Notations: N is the number of nodes. M is the number of links in the network. Ck is the capacity of link k. Fk is the flow of link k. Lk is the length of link k. ijγ is the traffic between nodes i and j. γ is the total traffic in the network. µ1 is the average packet length.
  • 2. M. R. Hassan International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 11 Assumptions: 1. The location of each network node is given. 2. The traffic between each node-pair has a Poisson distribution. 3. The packet size has exponential distribution with mean µ1 (bits/packet). 4. The nodal memory is infinite. 5. Independence between interarrival and transmission times on each link. 3. PROBLEM DESCRIPTION The computer network is modeled as a directed graph G (N, L), |N| = n and |L| = m, where n represents the number of nodes of the network and m represents the number of links of the network. If we consider the sample network of 4 nodes and 5 links (n = 4 and m = 5) as shown in Fig. 1. FIGURE 1: A sample network The distance matrix is: 1 2 3 4 1 0 16 12 0 2 16 0 15 10 3 12 15 0 22 4 0 10 22 0 FIGURE 2: The Distance matrix for the network in Figure1. The shrtest paths are as follows by using Floyd’s algorithm, [12] :- P12 = 1-2 P13 = 1-3 P14 = 1-3-4 P23 = 2-3 P34 = 3-4 P24 = 2-4 The flow of each link can be computed by summed the packets that travel across that link. The total number of packets that carried by the link depends on the number of shortest paths contains that link. The following table summerizes the link and the paths that contains that link. The link The paths 1-2 Appears in P12 1-3 Appears in P13 and P14 2-3 Appears in P23 2-4 Appears in P24 3-4 Appears in P13 and P34 TABLE 1: The links and the corresponding paths 1 4 2 16 10 3 22 15 12
  • 3. M. R. Hassan International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 12 So, if the number of packets equal p then the following table summerize the number of packets carried by each link. The link The number of packets 1-2 p 1-3 2p 2-3 p 2-4 p 3-4 2p TABLE 2: The number of packets carried by each link So, the total flow is equal to 14p, if we consider the link is bidirectional. In the following subsections we will describe the main parts of the algorithm to calculate the flow of a given network and then calculate the average delay. 3. 1. Shortest Path Generation We wil use Floyd’s all-pairs shortest path algorithm, [12], to find all shortest paths from the source node to the destination node by using the distance matrix as follows: SubAlgorithm_1 Input: V = set of vertices, labeled by integers 1 to N. E = set of edges, labeled by ordered pairs (u, v) of vertex labels. D[u][v]: The distance matrix. D[u][v]=0 if u ≠ v and (u, v) ∉E or u=v P[u][v]: the shortest path from u to v . P[u][v]=u and P[u][v]=0 if u ≠ v and (u, v) ∉E or u=v. For all edges (u, v) in E: W[u][v] = D[u][v].. And W(u, v) = infinity if u ≠ v and (u, v) ∉E or u=v. Begin for(k =1; k<= n; k++) for(u =1; u<= n; u++) for(v =1; v<= n; v++) W[u][v] = min (W[u][v], W[u][k]+ W[k][v]) P[u][v]=k; end. 3. 2. Finding the Intermediate Nodes for Each Shortest Path If P(i, j)=Vq then intermediate nodes on shortest path from i to j can be deduced as follows: SubAlgorithm_2: for(i=1;i<n;i++) for(j=i+1;j<=n;j++) Begin if(p[i][j]!=i) then repeat q++; v[q]=p[i][v[q-1]]; until v[q]=v[q-1] for(k=1;k<q;k++) print v[k]; End 3. 3. Calculate the Flow of Each Link For each path generated in 3.2 count the total traffic that carried by each link connects the corresponding pair of nodes:
  • 4. M. R. Hassan International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 13 SubAlgorithm_3 Initially set flow[][]=0; For each path generated in 3.2 do Begin If the path contains q vetices then For(k=1; k<q,k++) flow[i][V[k]]+= ][kivγ ; END 3. 4. The Total Traffic The total traffic across the network is calculated by: ij n ji γ=γ ∑ , …(1) SubAlgorithm_4: Set γ = 0 for(i=1;i<n;i++) for(j=i+1;j<=n;j++) γ = γ + ijγ 3. 5. The Average Packet Delay The Average packet Delay, the mean time that a packet takes to travel from a source node to a destination node in the network is given by [11]: ∑ = −γ = m i ii i fc f T 1 1 ….(2) 4. AN ALGORITHM FOR COMPUTING THE AVERAGE PACKET DELAY The steps of the algorithm for calculating the average delay of the computer network are as follows: Step 1: Read the distance matrix D and the capacity for each link Ci Step 2: Generate shortest paths using SubAlgorithm_1 and deduce the intermediate nodes for each path using SubAlgorithm_2. Step 3: Use SubAlgorithm_3 to calculate the flow of each link, fi Step 4: Calculate the total traffic, γ by using SubAlgorithm_4. Step 5: Calculate the Average Packet Delay, T, using equation (2). Note: The algorithm has been implemented using VC++ 6.0. 5. CASE STUDY To illustrate the proposed algorithm for computing the Average Packet Delay, consider an example networks taken from [9]. As shown in figure 2 the network has 8 nodes 13 links. The numbers written in bold represent the link lengths.
  • 5. M. R. Hassan International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 14 FIGURE 3: Example network Table 3 shows the link flows (computed by the proposed algorithm) and corresponding capacities (taken from [10]) for the given network shown in Figure 1. Link Flow (Kbps) Capacity (Kbps) 1 - 2 10 19.2 1 - 3 50 56 1 - 6 10 19.2 2 - 3 40 56 2 - 4 20 56 3 - 5 100 200 3 - 6 40 100 4 - 5 30 56 4 - 8 20 56 5 - 7 50 56 5 - 8 30 56 6 - 7 20 56 7- 8 20 56 TABLE 3: Link flows and Capacities The total traffic, 65=γ . The Average Packet delay (T) is equal to 0.419 s The following table shows the link flows (computed by the proposed algorithm) and corresponding capacities for the given network with 10 nodes and 14 links shown in Figure 2, taken from [8]. Link Flow (Kbps) Capacity (Kbps) 1 - 2 80 100 1 - 5 220 230.4 2 - 3 100 230.4 2 - 4 60 100 3 - 8 140 230.4 4 - 5 60 100 4 - 8 80 100 5 - 6 100 230.4 5 - 7 180 230.4 6 - 7 60 100 6 - 10 80 100 7 - 9 140 230.4 8 - 9 160 230.4 9 - 10 100 230.4 TABLE 4: Link flows and Capacities 1 3 8 216 12 24 22 6 4 5 7 18 28 17 10 15 14 23 20 21
  • 6. M. R. Hassan International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 15 The total traffic, 140=γ . The Average Packet delay (T) is equal to 0.3423 s FIGURE 4: Example network taken from [8]. The above results shows that the proposed algorithm is working properly and efficient for the computer networks with large number of nodes. 6. CONCLUSION AND FUTURE WORK This paper presented a simple algorithm to calculate the average packet delay. The algorithm is based on determining the flow of each each link of a given network. The flow claculations depends on the shortest path generated by the routing algorithm. Finally we illustrate the using of the proposed algorithm by calculating the average packet delay to a given sample network. In the future work we hope that the algorithm can be used in the average delay optimization problems. 7. REFERENCES 1. Tokumi Yokohira, Masashi Sugano and Hideo Miyahara, “Fault Tolerant Packet-Switched Network Design and Its Sensitivity”, IEEE Transactions on Reliability, 40(4):452-460, 1991. 2. Ahuja Sanjay P. and Kumar Anup “Reliability and Performance based measure for computer networks and distributed systems “, IEEE Southeastcon, Charlotte, NC,1993. 3. M. R. Girgis, A. Younes and M. R. Hassan, “An Algorithm for Computing Throughput of Computer Networks”, Egyptian Informatics Journal, 9(1):205-218, 2009. 4. Ahuja Sanjay P., “Performance based reliability Optimization for computer networks “, Engineering the New Century Conference Proceedings-IEEE-Southeastcon. IEEE, Piscataway, NJ, USA, 97CB36044, PP. 121-125, 1997. 5. Kumar Anup, Elmaghraby Adel S. and Auja Sanjay P., "Performance and reliability optimization for distributed computing systems", 3rd IEEE Symposium on Computers and Communications, Athens, Greece, pp. 611-615, 1998. 6. M. R. Girgis, A. Younes and M. R. Hassan, “Optimizing The Performance-Based Reliability For Computer Networks By Using Fuzzy Optimization With Genetic 1 8 2 5 4 26.93 25 3 7 6 9 10 25 25 25 26.93 33.54 33.54 36.40 39.05 35.36 30.41 29.15 30
  • 7. M. R. Hassan International Journal of Computer Networks (IJCN), Volume (3) : Issue (1) : 2011 16 Algorithms”, International Journal of Computational and Applied Mathematics, 2(2):139– 148, 2007. 7. S. Pierre and A. Elgibaoui,” Improving Communication Network Topologies Using Tabu Search”, Proceedings of 22nd Annual Conference on Local Computer Networks, pp. 44- 53, 2-5 Nov 1997. 8. R. Beaubrun and S. Pierre, ” A Routing Algorithm for Distributed Communication Networks”, Proceedings of 22nd Annual Conference on Local Computer Networks, pp. 99-105, 2-5 Nov1997. 9. Peirre Samuel and Legault, “A genetic algorithm for designing distributed computer network topologies”, IEEE Transactions Systems , MAN and Cybernetics-Part B: Cybernetics, 28(2):249-258, 1998. 10. M. R. Girgis, A. Younes and M. R. Hassan, “Optimizing the transmission delay of a computer network by using fuzzy optimization with genetic algoritms”, International Journal of Intelligent Computing and Information Science, 8(1):163-171, 2008. 11. Gerla, M., and Kleinrock. L. “On theTopological Design of Distributed Computer Networks”. IEEE Transactions on communications,25(1): 48-60,1977. 12. MacIej M. Syslo, “Discrete Optimization Algorithms: With Pascal Programs”, Prentice Hall, (1983).