0% found this document useful (0 votes)
12 views

Project- 2a Report

The document discusses the algorithmic aspects of network reliability in telecommunication networks, focusing on the reliability of nodes and links within a complete undirected graph of 5 nodes. It outlines methods for calculating reliability, including exhaustive enumeration and algorithmic solutions, while also detailing experiments to analyze the impact of link reliability on overall network reliability. The findings indicate a direct relationship between individual link reliability and network reliability, as well as the effects of random alterations to system conditions.

Uploaded by

jsanthoshithota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Project- 2a Report

The document discusses the algorithmic aspects of network reliability in telecommunication networks, focusing on the reliability of nodes and links within a complete undirected graph of 5 nodes. It outlines methods for calculating reliability, including exhaustive enumeration and algorithmic solutions, while also detailing experiments to analyze the impact of link reliability on overall network reliability. The findings indicate a direct relationship between individual link reliability and network reliability, as well as the effects of random alterations to system conditions.

Uploaded by

jsanthoshithota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

ALGORITHMIC ASPECTS

OF TELECOMMUNICATION
NETWORKS

SANKALP H. TADWALKAR
NET ID: sht170130
NETWORK RELIABILITY
PROJECT- 2A
TABLE OF CONTENTS

INTRODUCTION 2

PROJECT DESCRIPTION 3

EXHAUSTIVE ENUMARATION METHOD4

ALGORITHMIC SOLUTION5

PSEUDO CODE 6

TASK - 1 7

TASK - 2 11

REFERENCES 18

README 19

APPENDIX
SOURCE CODE 20

INTRODUCTION

1
 RELIABILITY:

Reliability is an attribute of any computer-related component that consistently performs


according to its specifications. It has long been considered one of three related attributes that
must be considered when making, buying, or using a computer product or component.
Reliability, availability and serviceability are important aspects to design into any system. In
theory, a reliable product is totally free of technical errors. But in practice reliability is expressed
as a percentage.

 NETWORK RELIABILITY:

Reliability is concerned with the ability of a network to carry out a desired operation such as
“communication”.

Network reliability is the probability that a network with all its subnetworks and constituting
components will successfully complete the task it is intended to perform under the conditions
encountered for the specified period defined between a source and a target. Reliability analysis
is the process of quantifying a system’s ingress–egress serviceability by examining the
dependency relationships between the components that comprise the system. Analysis is
essential whenever the cost of failure is high. Modelling and simulation allow analysts to
determine weak spots in the systems so that the maintenance engineer can inventory a backup
list of components. The reliability analysis focuses on the computer network components and
the connections between them to determine the overall system reliability as well as the
reliabilities between any two individual nodes in the network. Network reliability computations
are like those developed for industrial applications, but there are a few exceptions. In industrial
applications, all the components in the system are usually considered critical to the overall
function of the system.

 RELIABILITY CALCULATION:

To analyse the reliability of Telecommunication networks modelling is usually represented


using graphs. In this context, a certain network will be represented by a set of nodes
linked together by links representing the flow of packets between the nodes.

Each of the elements of the network (Nodes, Links etc) will have an associated reliability,
which is the probability that it will function without disruption when required. It is important
to note that to analyse the influence of the various factors under consideration, it is
necessary to define different levels for each factor. This might generate some networks
that appear unrealistic when compared to real life networks. However, considering some
extreme cases will provide additional understanding of the subject and facilitate the
identification of the behaviour of each factor over the objective variable. Once the graph
representing each network has been defined, it is necessary to estimate its reliability.
As shown, it is necessary to consider all the different configurations with all the
components working/not working; for each configuration check if global system works or
not and for those working configurations, calculate their reliability by multiplying the
individual reliability R of each component and finally summing up all those reliabilities.
PROJECT DESCRIPTION

2
Aim of this project is to find network reliability where network is made up of several nodes and links. To
calculate reliability, we must consider all the possible configurations of the network and probability of
success for each component. Thus, overall network reliability depends on reliability of each component.
Following are the details of the project:

 NETWORK TOPOLOGY:
A complete undirected graph on n = 5 nodes. This means, every node is connected with every
other one (parallel edges and self-loops are excluded in this graph). As a result, this graph has
m = 10 edges, representing the links of the network. There are 210=1024 configurations
possible depending on whether the link is up or down. Topology shown below (Figure-A) is
generated by the program.

FIGURE - A

 COMPONENTS THAT MAY FAIL:


The links of the network may fail, the nodes are always up. The reliability of each link is p, the
same for every link. The parameter p will take different values in the experiments. To calculate
reliability of the system we must consider reliability of each link.

 RELIABILITY CONFIGURATION:
The system is considered operational, if the network is connected. To find whether the network
is connected or not we have to do Depth First Search traversal of the graph. If we can visit all
the nodes, then network is said to be connected (system is operational) otherwise it is
disconnected (system is not operational).

EXHAUSTIVE ENUMARATION METHOD

3
This is one of the method to find reliability of the system. If the components in the systems are not in
basic configurations like series or parallel, then we use this method. Following are the steps to find
reliability of the system using exhaustive enumeration method.

1. List all the possible states of the system.


2. Assign UP and DOWN condition to each state.
3. Reliability can be obtained by summing the probability of the UP states.

 EXAMPLE:

Components that may fail Links


Number of links: 3
Number of total combinations 2 =8
3

Combinations Possible: Consider 0: Link is down


1: Link is Up

000
001
010
011
100
101
110
111

FIGURE B

Hence while finding reliability of the system we will consider those combinations in
which system is functional i.e. Graph is connected. We will assign probability to each
link.
Probability that link is up will be P and if link is down then (1-P)
Combinations in which graph is connected: 011, 101, 110, 111

Reliability =(1-P)*P*P + P*(1-P)*P + P*P*(1-P) + P*P*P

 LIMITATIONS:
1. For N components, there are 2 N possible states
2. Number of states grows exponentially
3. This method is practical only for small systems
4. Hence, this method is non-scalable

4
ALGORITHMIC SOLUTION
1. We have 5 nodes with 10 links. Adjacency Matrix representation for the graph is as follows:

A B C D E
A 0 1 1 1 1
B 0 0 1 1 1
C 0 0 0 1 1
D 0 0 0 0 1
E 0 0 0 0 0

2. There are 210=1024 combinations are possible.

3. Convert 0 to 1023 decimal numbers in binary.

4. Now we get 1024 ten-digit binary numbers.

5. If the digit is 1 then Link is up and if 0 then Link is down.

6. Thus, the combinations will look as follows:

000000000 All links are down


0
000000000 One link is up and other Nine are down
1
:
111110000 Five links are up and five are down
0
:
111111111 All links are up
1

7. Now we take one combination at a time and put the 10 digits at proper position in Adjacency
Matrix to get graph for given combination.

8. Then we do Depth First Search (DFS) traversal of the graph to check whether it is connected or
not. DFS traversal checks if we can visit each node from given starting point.

9. We calculate reliability of the network only if it is operational i.e. graph is connected.

10. We have Probability P if link is up and (1-P) if link is down. Thus, we get expression of reliability
in form of addition of products.
EXAMPLE:
Consider combination: 1111111111

Network Reliability = (P*P*P*P*P*P*P*P*P*P) + Other combination in which system is


operational

11. Thus, we get the Reliability of the Network.

5
PSEUDO CODE

Initialize Graph = [ ] [ ]
# Adjacency Matrix Representation of the network

Initialize Combinations = [ ]
# To store 1024 configurations

Reliability of each link p

Reliability of each configuration Sr = 1

Reliability of Network R = 0

FOR k 0 to 1023:

Combinations [k] = Convert k into 10-digit binary number


# Storing all the possible configuration in Combinations

FOR k 0 to 1023:

Map Combination[k] to the Graph


# Mapping 10-digit binary number into Adjacency Matrix representation

Find Connectivity of the Graph


# Determining whether graph is connected or not using DFS traversal

IF connected:
# Finding reliability only if system is operational

IF digit is 1: temp = p
# Link is up with probability p

ELSE: temp = (1-p)


# Link is down with probability 1-p

Sr = Sr * temp
# Reliability of the state

R = R + Sr
# Reliability of the Network

6
TASK – 1
 AIM:

Run the program for different values of p. Let the parameter p run over the [0; 1] interval, in
steps of 0.04. Show graphically in a diagram how the obtained network reliability values
depend on p.

 PSEUDO CODE:

Initialize Graph = [ ] [ ]

Initialize Combinations = [ ]

Reliability of each link p = 0

Reliability of each configuration Sr = 1

Network Reliability of system R = 0

Network Reliability List for each p, R_List = [ ]

WHILE p<=1

FOR k 0 to 1023:

Combinations [k] = Convert k into 10-digit binary number

FOR k 0 to 1023:

Map Combination[k] to the Graph

Find Connectivity of the Graph

IF connected:

IF digit is 1: temp = p

ELSE: temp = (1-p)

Sr = Sr * temp

R = R + Sr
# Reliability of the Network

Append R to R_List
p = p +0.04
 GRAPH:

7
FIGURE-1

 EXPLANATION (FIGURE-1):
i. As we can see in the graph as Reliability p of each link increases Network Reliability
also increases.
ii. We are increasing value of Reliability p of each link by 0.04.
iii. As each link becomes more reliable, network also becomes more reliable.
iv. We can see in the graph System Reliability almost becomes constant after Reliability p
of each link becomes 0.8
v. Thus, relation between Network Reliability and Reliability p of each link is given as
follows:

Network Reliability ∝ Reliability p of each link

 OUTPUT:

8
p Reliability
0 0
0.04 0.0002697490454177407
0.08 0.0036245095902189815
0.12 0.015350518217976061
0.16 0.04043112676405005
0.20 0.08194549760000008
0.24 0.14052990392702402
0.28 0.21451714411994455
0.32 0.30045931545848314
0.36 0.3938159155294931
0.40 0.4896538624000033
0.44 0.5832594605636222
0.48 0.6706055018696019 TASK – 2
0.52 0.7486504923719378
0.56 0.8154723505031013
0.60 0.8702567423999985
 AIM:
0.64 0.9131714198070847
0.68 0.9451634179692346 Now fix the p parameter at p = 0.9 and do
the following experiment. Among the
0.72 0.967716668524208 1024 possible combinations of
0.76 0.9826043988263465 component states pick k of the
0.80 0.9916645376000005 combinations randomly and flip the
corresponding system condition. That is,
0.84 0.9966181405472736 if the system was up, change it to down, if
0.88 0.9989415017400338 it was down, change it to up. Show in a
0.92 0.9997930405266834 diagram, how the reliability of the system
changes due to this alteration.
0.96 0.999987162497931
Specifically, show how the change
1.00 1 depends on k, in the range k = 0; 1; 2; 3; :
: : ; 25. During this experiment keep the value of the parameter p fixed at p = 0.9. To reduce the
effect of randomness, run several experiments and average them out, for each value of k.

9
 PSEUDO CODE:
Initialize Graph = [ ] [ ]
Initialize Combinations = [ ]
Reliability of each link p = 0
Reliability of each configuration Sr = 1
Network Reliability R = 0
Network Reliability List for each p, R_List = [ ]
Network Reliability of 100 experiments T_List = [ ]
Network Reliability averaged over 100 experiments Ravg = [ ]

FOR y 0 to 100:
# Repeating the experiment to reduce the effect of randomness

FOR i 0 to 1023:
Combinations [k] = Convert k into 10-digit binary number

WHILE K<=25:
FOR i 0 to 25:
r = Pick k random number from 0 to 1023
Map combination[ r ] to Graph
Find connectivity of Graph
IF connected:
Combination[r]= ‘0000000000’
# Flipping system from Up to Down
ELSE:
Combination[r]= ‘1000100101’
# Flipping system from Down to Up

R=0
FOR i 0 to 1023:
Map Combination[k] to the Graph

10
Find Connectivity of the Graph
IF connected:
IF digit is 1: temp = p
ELSE: temp = (1-p)
Sr = Sr * temp
R = R + Sr
# Reliability of the Network
Append R to R_List
K=K+1
Append R_List to T_List
# Adding result of each experiment to new list
# Taking average of 100 experiments to find Network Reliability
FOR i 0 to 25:
E=0
FOR j 0 to 100:
E=T_List[ j ][ i ] + E
Eavg=E/100
Append Eavg to Ravg
 GRAPH AND EXPLANATION:

1] Network Reliability vs k:

FIGURE-2

EXPLANATION (FIGURE-2):

1. In this experiment we are choosing k random numbers and checking if system is


operational or not and flipping that condition.

11
2. After taking close look on output of first part, we got the conclusion that from 1024
combinations of the system around 728 are operational.
3. Thus, Probability of converting operational system into non-operational is very high.
4. So, as we increase k, more configurations become non-operational.
5. As a result, Network Reliability keeps on decreasing.
6. Relation between Network Reliability and k is given as follows:

Network Reliability ∝ 1/
k

2] Change in Reliability vs k:

FIGURE-3

EXPLANATION (FIGURE-3):

1. As we can have seen in earlier graph Network Reliability decreases as k increases.


2. This graph shows variation in Network Reliability value as we increase k.
3. Maximum change in Network Reliability is approximately 0.25.
4. We can say that Change in Reliability in above graph is nothing but value to which Network
Reliability decreases.

12
5. Thus, relation between k and Change in Reliability is give as follows:

Change in Reliability ∝ k

 OUTPUT:

1] Network Reliability vs k:

k Reliability
1 0.9994922423999998
2 0.9991230155640024
3 0.9971101138860018
4 0.9956015680240019
5 0.9939217759340019
6 0.9906444894480021
7 0.9832854915800015
8 0.9755077935160021
9 0.9669087763700019
10 0.9611328020840026
11 0.9527417209360014
12 0.9426735211160015
13 0.9284121578880019
14 0.9171135813360016
15 0.90677899438280014
16 0.8948871223120017
17 0.8774426432740019
18 0.857866199900013
19 0.8480819154680011
20 0.8330773325400007
21 0.8130488820300007
22 0.7996054481734001
23 0.7747135156480009
24 0.7579463158920008
25 0.7369124384284001

13
2] Change in Reliability vs k

k Change in Reliability
0 0.0
1 0.0010948471919973723
2 0.002027860757997879
3 0.003966058889997681
4 0.005585694227998372
5 0.008492571521998005
6 0.016211784851997812
7 0.023922455759998074
8 0.03256137694799832
9 0.0383285090699852
10 0.04672343978999782
11 0.056805649757997845
12 0.07108465586399848
13 0.08231641864199846
14 0.09271839862799847
15 0.10461022424999811
16 0.12205108123199859
17 0.14168400767999867
18 0.15147884584799853
19 0.16595451136799855
20 0.1859926976639984
21 0.20044088571599872
22 0.2224506918779987
23 0.24309191280599918
24 0.265749597699988
25 0.2884818031019989

14
15
REFERENCES
1. NETWORK RELIABILITY
https://whatis.techtarget.com/definition/reliability
https://www.emeraldinsight.com/doi/abs/10.1108/13598541211227108?journalCode=scm
http://seat.massey.ac.nz/143465/Lectures/Network%20Reliability_2_1s.pdf

2. MATPLOTLIB LIBRARY
https://pythonspot.com/matplotlib-line-chart/

3. NETWORKX LIBRARY
https://networkx.github.io/documentation/stable/

4. LECTURE NOTES BY DR. ANDRAS FARAGO

README

16
PROGRAMMING LANGUAGE USED: PYTHON

Instruction to run the program:

1. Copy the source code given in appendix section of the report.

2. Download PyCharm IDE for python and set interpreter as Python 3.6.

A. https://www.python.org/downloads/

B. https://www.jetbrains.com/pycharm/download/#section=windows

3. Install following libraries using PIP command

A. NetworkX

B. Matplotlib

4. Installing using PIP command

A. https://docs.python.org/3/installing/index.html

B. https://packaging.python.org/tutorials/installing-packages/

5. Open new Python project and new Python file.

6. Paste the code and click on Run.

7. Network Topology and Graphs will appear.

8. As the code is full of looping statements it will take some time to execute completely.

APPENDIX
SOURCE CODE:

17
# Importing libraries needed #

from numpy import binary_repr


import networkx as nx
import matplotlib.pyplot as plt
import random

#----------------------------------------------#
# Creating Network Topology and Declaring
Variables #

# Adjacency Matrix Representation for 5 nodes


and 10 edges #
# a b c d e
# a 0 1 1 1 1
# b 0 0 1 1 1
# c 0 0 0 1 1
# d 0 0 0 0 1
# e 0 0 0 0 0

Graph=[[0,1,1,1,1],[0,0,1,1,1],[0,0,0,1,1],
[0,0,0,0,1],[0,0,0,0,0]]
combination=[]

#----------------------------------------------#

#Creating Network Topology


Topo=nx.Graph()
Topo.add_nodes_from([0,4])

18
for x in range(5):
for y in range(5):
if Graph[x][y] == 1:
Topo.add_edge(x, y)
graph_pos = nx.spring_layout(Topo)
nx.draw_networkx_nodes(Topo, graph_pos,
node_size=1600, alpha=0.6, node_color='blue')
nx.draw_networkx_edges(Topo, graph_pos, width=1,
alpha=0.3,edge_color='black')
nx.draw_networkx_labels(Topo, graph_pos,
font_size=15, font_family='arial')
plt.title("Network Topology")
plt.show()

#----------------------------------------------#
# Function to determine Graph Connectivity #

def conn(ingraph):
node_graph = nx.Graph()
node_graph.add_node(0)
node_graph.add_node(1)
node_graph.add_node(2)
node_graph.add_node(3)
node_graph.add_node(4)
for x in range(5):
for y in range(5):
if ingraph[x][y] == 1:
node_graph.add_edge(x, y)

z=nx.is_connected(node_graph)
return z

#----------------------------------------------#
# Function to Map Link Combination to Adjacency
Matrix #

19
def graphmap(i):
k = 0
for j in range(1, 5):
Graph[0][j] = int(combination[i][k])
k = k + 1
k = 4
for j in range(2, 5):
Graph[1][j] = int(combination[i][k])
k = k + 1
k = 7
for j in range(3, 5):
Graph[2][j] = int(combination[i][k])
k = k + 1
Graph[3][4] = int(combination[i][9])
return Graph

#----------------------------------------------#
# Creating 1024 Combinations #

for i in range(1024):
binary=binary_repr(i, width=10)
combination.append(binary)

#----------------------------------------------#
# PART-1 #

# Dependency of Network Reliability on


Probability p #

20
p=0
reliability=0
total1=[]
r1=1
while p<=1:

reliability = 0
for i in range(1024):
if conn(graphmap(i)) == True:
r1=1
for l in range(10):
if combination[i][l] == '1':
temp = p
else:
temp = (1 - p)
r1 = r1 * temp

reliability = reliability + r1

total1.append(reliability)
step = 0.04
p = p + step

for i in range(25):
print (total1[i])

#Displaying Graph of Probability p vs


Reliability #

p=0
p_list=[]
while p<=1:

21
p_list.append(p)
p=p+0.04

plt.plot(p_list,total1)
plt.ylabel('<--------- Network Reliability
--------->')
plt.xlabel('<---------- Reliability p of each
Link ---------->')
plt.title('Network Reliability vs Reliability p
of each Link')
plt.show()

#----------------------------------------------#
# PART-2 #
# Choosing k random combinations out of 1024 #
# k= 0 to 25 #

k=0
p=0.9
total2=[]

22
total=[]
for i12 in range(100):
k=0
p = 0.9
combination=[]
for i in range(1024):
binary = binary_repr(i, width=10)
combination.append(binary)

while k<=25:
for i in range(0,k):
r=random.randint(0,1023)
if conn(graphmap(r)) == True:
combination[r]='0000000000'
else:
combination[r]='1000100101'
reliability = 0
for i in range(1024):
if conn(graphmap(i)) == True:
r1=1
for l in range(10):
if combination[i][l] == '1':
temp = p
else:
temp = (1 - p)
r1 = r1 * temp
reliability = reliability + r1
total.append(reliability)
k = k + 1
total2.append(total)
total = []
# Finding Average Reliability of 100 experiments
to reduce effect of randomness #

part2=[]
for i in range(26):
e=0
for j in range(100):
e=total2[j][i]+ e

23
eavg=e/100
part2.append(eavg)

print("Output of Network Reliability vs k")


for i in range(25):
print (part2[i])

# Displaying Graph of k vs Reliability #

k=0
k_list=[]
while k<=25:
k_list.append(k)
k=k+1

plt.plot(k_list,part2)
plt.ylabel('<--------- Network Reliability
--------->')
plt.xlabel('<---------- k ---------->')
plt.title('Network Reliability vs k')
plt.show()

# Displaying Graph of k vs Change in Reliability

change_list=[]
for i in range(26):
c=part2[0]-part2[i]
change_list.append(c)

24
print(change_list)
plt.plot(k_list,change_list)
plt.ylabel('<--------- Change in Reliability
--------->')
plt.xlabel('<---------- k ---------->')
plt.title('Change in Reliability vs k')
plt.show()

print("Output of Change in Reliability vs k")


for i in range(26):
print (change_list[i])

#----------------------------------------------#

25

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy