Home / Expert Answers / Computer Science / please-answer-this-using-c-output-should-be-as-followed-at-the-bottom-message-me-for-any-quest-pa948

(Solved): Please answer this using c++!!! OUTPUT SHOULD BE AS FOLLOWED AT THE BOTTOM, message me for any quest ...



Please answer this using c++!!! OUTPUT SHOULD BE AS FOLLOWED AT THE BOTTOM, message me for any questions:))

In this programming assignment, you will be implementing Link-State-Routing Algorithm with either C or C++. Original Answer only please, thank you i will upvote for top quality:))

1.1 Input File
Test input file will be randomly generated when your program will be tested.
Test input file format: represent

6
110
122
131
145
1
5
2
2
2
3
3
4
1
1
3
5
1
Figure 1: Example Network Topology
Sample test the input file of Figure 1 will be

1 5 1073741824
16 1073741824
212
220
232
243
2 5 1073741824
26 1073741824
311
322
330
343
351
3 6 1073741824
415
423
433
440

Your program should be able to take two inputs as follows:
Unixprompt> mylinkstate <test-input-file> <node i><flag>
Where: <t

what OUTPUT should look like:

Should be able to display the immediate result for each iteration in a tabular like
format: (please refer to a table in the c

Your final must display the following two items:
1) Forwarding table for the given <node i> (Refer to the table in lecture
no

Step
0
12345
N
u
UX
uxy
uxyv
uxyw
uxyvwz
A
N
2
(W)
Z
D(z)tp(z)
D(V)(v) D(w).p(w) D(x).p(x) D(y).p(y)
2.
5.u
(1,u
24+
op
4.x

sample-out-4-10nodes X
1
2
step N
3
0 {7}
1
456789 191²3456V 89282122224 25 25 27 28 29 28
10
12
20
23
26
{7,8}
{7,8,1}
3 {7

1.1 Input File Test input file will be randomly generated when your program will be tested. Test input file format: represent the current status of the entire network o Test input file contains link information and cost of between link ? C[i][j] = n if there is direct link from node i to nodej, where 0 <= n < 100 = 1073741824 (=2^30) otherwise o The first line of test input file has the total number of node in the network o Following each line contains link cost between i and j. Sample test input file: 6 110 122 131 145 1 5 2 2 2 3 3 4 1 1 3 5 1 Figure 1: Example Network Topology Sample test the input file of Figure 1 will be as follows: 5 2 6 1 5 1073741824 16 1073741824 212 220 232 243 2 5 1073741824 26 1073741824 311 322 330 343 351 3 6 1073741824 415 423 433 440 451 465 5 1 1073741824 5 2 1073741824 531 541 550 562 6 1 1073741824 62 1073741824 6 3 1073741824 645 652 660 Your program should be able to take two inputs as follows: Unixprompt> mylinkstate Where: : test input file name : compute the least-cost paths from to all possible destination : 1- display immediate table for each iteration 0 - Otherwise (default) Should be able to display the immediate result for each iteration in a tabular like format: (please refer to a table in the class lecture note of chapter 5.1~5.2 on page 17- page 20) if the instructor wants to verify the correctness of your program. (when flag value is 1) Your final must display the following two items: 1) Forwarding table for the given (Refer to the table in lecture note of chapter 5.1-5.2 on page 17- page 20) 2) Total execution time in ms (millisecond) from reading test input files to the completion of computing the least-cost path from the given Step 0 12345 N' u UX uxy uxyv uxyw uxyvwz A N 2 (W) Z D(z)tp(z) D(V)(v) D(w).p(w) D(x).p(x) D(y).p(y) 2. 5.u (1,u 24+ op 4.x 2,x 2.u 4 y 3.v. 3.y 4 y 4,y Initialization (step 0): For all a: if a adjacent to then D(a) = Cua find a not in N' such that D(a) is a minimum add a to N' update D(b) for all b adjacent to a and not in N' : D(b) = min ( D(b), D(a) + Ca,b) sample-out-4-10nodes X 1 2 step N' 3 0 {7} 1 456789 191²3456V 89282122224 25 25 27 28 29 28 10 12 20 23 26 {7,8} {7,8,1} 3 {7,8,1,6} 4 {7,8,1,6,9} 5 {7,8,1,6,9,2} 6 {7,8,1,6,9,2,4} 30 2 NM + in 17 Destination | 1 | 2 3 1.000 7 {7,8,1,6,9,2,4,10} 8 {7,8,1,6,9,2,4,10,3} 9 {7,8,1,6,9,2,4,10,3,5} FORWARDING TABLE: Link (7,1) (7,2) (7,1) (7,8) (7,2) (7,1) (7,8) 9 (7,1) 10 (7,2) Execution time: 0.031 ms 1 4,7 4,7 4 5 6 8 2 8,7 8,7 8,7 8,7 8,7 3 4 5 31,7 15,7 INF, 7 31,7 8,8 53,8 31,7 8,8 44,1 23,6 8,8 41,6 23,6 8,8 41,6 23,6 8,8 41,6 23,6 41,6 23,6 23,10 23,10 6 26,7 26,7 5,1 8 2,7 9 69,7 15,8 15,8 7,6 10 14,7 14,7 14,7 14,7 14,7 12,2 12,2


We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe