You are on page 1of 11

7.8.

Exercises
1. Consider a packet-switching network for server communications with n nodes. For each
of the following topologies, sketch the network, and give the average number of hops
between a pair of servers (include the server-to-node link as a hop):
a. Star: one central node with all servers attached to the central node
b. Bidirectional ring: each node connects to two other nodes to form a loop, with each
node connected to one server
c. Fully connected: each node is directly connected to all other nodes, with each node
connected to one server
d. A ring with n - 1 nodes connected to a central node, with each node in the ring
connected to one server.
Jawab :
a. Min =2
Max =2

Rata-rata jumlah hop


b. Min=3
Untuk max
n=4, max=4
n=5, max=9/2
n=6, max=5

min+max 2+2
=
=2
2
2

maka dapat disimpulkan, untuk n


n
max= +2
2
maka rata-rata jumlah hopnya,
min+max
H=
=
2
c. H=3

n
3+ +2
2
n
=2.5+
2
4

d. Min=3
Max=4

Jumlah rata-rata hopnya.


2 (3 )+(n4 )4
H=
n2

2. Figure 7.18 shows a network.


a. Find the least-cost path between the two servers, using Dijkstra's algorithm.
b. Show an iteration graph as the least-cost path is developed.

Jawab:
a. Menggunakan Algoritma Dijkstra
K
{A}
{A,F}
{A,F,C}
{A,F,C,D}
{A,F,C,D,E}
{A,F,C,D,E,B}

A,C
AC(5)
AC(5)
AC(5)
AC(5)
AC(5)
AC(5)

A,D
X
AFD(12)
ACD(9)
ACD(9)
ACD(9)
ACD(9)

A,F
AF(9)
ACF(8)
ACF(8)
ACF(8)
ACF(8)
ACF(8)

A,E
X
AFE(10)
ACE(7)
ACE(7)
ACE(7)
ACE(7)

A,B
X
AFB(14)
AFB(14)
AFB(14)
ACEB(9)
ACEB(9)

b.

3. For the network shown in Figure 7.18:


a. Find the least-cost path between the two servers, using the Bellman-Ford algorithm.
b. Show an iteration graph as the least-cost path is developed.
Jawab:
a. Menggunakan Algoritma Bellman-Ford
l
1
2
3
4

A,C
AC(5)
AC(5)
AC(5)
AC(5)

A,D
X
ACD(9)
ACD(9)
ACD(9)

A,F
ACF(8)
ACF(8)
ACF(8)

A,E
X
ACE(7)
ACE(7)
ACE(7)

A,B
X
AFB(14)
ACEB(9)
ACEB(9)

b.

4. Consider again the network in Figure 7.18. Assume that each link is bidirectional and
that the cost of either direction is identical.
a. Find the least-cost path between the two servers, using Dijkstra's algorithm.
b. Show an iteration graph as the least-cost path is developed.
Jawab :
a. Menggunakan Algortitma Dijkstra

b.

K
{A}
{A,F}
{A,F,C}

A,C
AC(5)
AC(5)
AC(5)

A,D
X
AFD(12)
ACD(9)

A,F
AF(9)
ACF(8)
ACF(8)

A,E
X
AFE(10)
ACE(7)

{A,F,C,D}

AC(5)

ACD(9)

ACF(8)

ACE(7)

{A,F,C,D,E}
{A,F,C,D,E,B}

AC(5)
AC(5)

ACED(8)
ACED(8)

ACF(8)
ACF(8)

ACE(7)
ACE(7)

A,B
X
AFB(14)
ACFB(13
)
ACFB(13
)
ACEB(9)
ACEB(9)

5. The network shown in Figure 7.19 is a snapshot of a practical consisting of seven


routers. The load on each link is normalized to a number indicated on that link.
a. Find the least-cost path between the two routers R1 and R7, using Dijkstra's
Algorithm.
b. Show an iteration graph as the least-cost path is developed.

Jawab:
a. Menggunakan Algoritma Djikstra
K
{1}
{1,2}
{1,2,3}
{1,2,3,4}

1,2
1,2(3)
1,2(3)
1,2(3)
1,2(3)

1,3
1,3(3)
1,3(3)
1,3(3)
1,3(3)

1,4
X
1,2,4(11)
1,3,4(7)
1,3,4(7)

1,5
X
1,2,5(15)
1,3,5(7)
1,3,5(7)

1,6
1,6(9)
1,6(9)
1,6(9)
1,6(9)

1,7
X
X
X
X

{1,2,3,4,5}
{1,2,3,4,5,6}

1,2(3)
1,2(3)

1,3(3)
1,3(3)

1,3,4(7)
1,3,4(7)

1,3,5(7)
1,3,5(7)

1,3,5,6(8)
1,3,5,6(8)

1,3,5,7(20)
1,3,5,6,7(16
)

b.

6. For the network shown in Figure 7.19:


a. Find the least-cost path between the two servers, using the Bellman-Ford algorithm.
b. Show an iteration graph as the least-cost path is developed.
Jawab:
a. Menggunakan Algoritma Bellman-Ford
l
1
2
3
4

1,2
1,2(3)
1,2(3)
1,2(3)
1,2(3)

1,3
1,3(3)
1,3(3)
1,3(3)
1,3(3)

1,4
X
1,3,4(7)
1,3,4(7)
1,3,4(7)

1,5
X
1,3,5(7)
1,3,5(7)
1,3,5(7)

1,6
1,6(9)
1,6(9)
1,3,5,6(8)
1,3,5,6(8)

1,7
X
1,6,7(17)
1,6,7(17)
1,3,5,6,7(16
)

b.

7. The practical network shown in Figure 7.20 is a WAN consisting of seven routers R1
through R7 interconnecting four LANs. The load on each link is normalized to a

number indicated on that link. Assume that all links are bidirectional with equal
indicated load.
a. Find the least-cost path between the two routers R1 and R7 connecting users A and
B, using Dijkstra's algorithm.
b. Show an iteration graph as the least-cost path is developed.

Jawab:
a. Dari R1 sampai R4 menggunakan Algoritma Dijkstra
k
{1}
{1,6}
{1,6,5}
{1,6,5,4}
{1,6,5,4,3}
{1,6,5,4,3,2}
{1,6,5,4,3,2,7
}
b.

1,2
1,2 (2)
1,2 (2)
1,2 (2)
1,2 (2)
1,2 (2)
1,2 (2)
1,2 (2)

1,3
X
1,6,3(7)
1,6,3(7)
1,6,3(7)
1,6,3(7)
1,2,3(6)
1,2,3(6)

1,4
X
X
1,6,5,4(11)
1,6,5,4(11)
1,6,3,4(9)
1,2,3,4(8)
1,6,7,4(5)

1,5
X
1,6,5(7)
1,6,5(7)
1,6,5(7)
1,6,5(7)
1,6,5(7)
1,6,5(7)

1,6
1,6(2)
1,6(2)
1,6(2)
1,6(2)
1,6(2)
1,6(2)
1,6(2)

1,7
1,7(8)
1,6,7(3)
1,6,7(3)
1,6,7(3)
1,6,7(3)
1,6,7(3)
1,6,7(3)

8. The practical network shown in Figure 7.20 is a WAN consisting of seven routers R1
through R7 interconnecting four LANs. The load on each link is normalized to a
number indicated on that link. Assume that all links are bidirectional with equal
indicated load.
a. Find the least-cost path between the two routers R1 and R7 connecting users A and
B, using Bellman-Ford's algorithm.
b. Show an iteration graph as the least-cost path is developed.
Jawab:
a. Dari R1 sampai R4 menggunakan Algoritma Bellman-Ford
l
1
2
3
4
b.

1,2
1,2 (2)
1,2 (2)
1,2 (2)
1,2 (2)

1,3
X
1,2,3(6)
1,2,3(6)
1,2,3(6)

1,4
X
1,7,4(10)
1,6,7,4(5)
1,6,7,4(5)

1,5
X
1,6,5(7)
1,6,7,5(4)
1,6,7,5(4)

1,6
1,6(2)
1,6(2)
1,6(2)
1,6(2)

1,7
1,7(8)
1,6,7(3)
1,6,7(3)
1,6,7(3)

9. The network in Figure 7.21 has six interconnected nodes, A through F. The
corresponding blocking probabilities of links are indicated on the corresponding links.
For this network, find the overall blocking probability from A to F.

Jawab:
PBC =( 0.3 )( 0.1 ) ( 0.7 )=0.021
PCE =( 0.3 ) ( 0.6 )=0.18
PCDF =1( 10.5 ) (10.8 )=0. 9
PCEF =1( 10.18 ) (10.2 )=0.34 4
PCF =( 0.9 ) ( 0.344 )=0.3 1

PBCF =1( 10.021 ) ( 10.31 )=0.32 4


PBF =( 0.3 ) ( 0.324 ) =0.09 7
P AF=1( 10.4 )( 10.097 )=0.45 8
10. Figure 7.22 shows a large communication network of six interconnected nodes, A
through F. The corresponding blocking probabilities of links are indicated on the
corresponding links. For this network, find the overall blocking probability from AtoF.

Jawab:
P AB=0. 4
PBC =( 0.3 )( 0.1 ) ( 0.7 )=0.021
PCE =( 0.3 ) ( 0.3 ) ( 0.6 )=0.054
PCDF =1( 10.5 ) (10.8 )=0.9
PEF =0.2
PCF =[ 1 ( 1PCE )( 1PEF ) ] P CDF ( 0.3 ) ( 0.3 )=0.0197
P AC =1( 1P AB ) ( 1P BC ) =0.4126
P AF=1( 1P AC ) ( 1PC F ) =0.424

You might also like