subject

The highway distance between 6 cities named (A ... G) are illustrated in the following adjacency matrix: A B C D E F A 0 7 19   28 B 7 0 10 18 40  C 19 10 0 16  17 D  18 16 0 14 10 E  40  14 0 12 F 28  17 10 12 0M269/ THE-Final 3 of 4 2020-2021/Spring a) Draw the graph that represent such adjacency matrix b) List the right sequence of nodes traversed by the DFS and BFS algorithm starting from node A.
c) Does this graph possess a Euler circuit/path? , why? If any of them does not exist, how the graph can be modified to have one?
d) Draw the minimum spanning tree of this graph .
e) Use the Dijkstra's algorithm to determine the shortest paths from city (A) to all other cities . Determine the shortest path and cost from node A to node E . [Hint: implement the algorithm step by step to show which node will be added in sequence]
f) Determine the shortest paths between all pairs of nodes using Floyd-Warshall algorithm.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 11:30, magicalpenguin48
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
image
Computers and Technology, 24.06.2019 15:00, MilanPatel
In excel, what happens to the cell contents when you click and drag a cell into multiple cells?
Answers: 1
image
Computers and Technology, 24.06.2019 21:30, keelynnbarrier
Computer security/cybersecurity1) each of the following code fragments contains a number of security vulnerabilities. for each fragment, identify these security vulnerabilities and, for each vulnerability, discuss at least one way that it could be improved. note that in your discussion of how each vulnerability could be improved, you do not need to re-write a new version of the program in c; simply discuss your solution, either in pseudocode or in 1-2 sentences. a) /* file descriptor leak */#include #include int main(int argc, char *argv[]){ char *filepath = argv[0]; char *shellpath = argv[1]; file *passwords; passwords = fopen(filepath, "r"); /* read the password and do something with it */ /* . . */ /* fork and execute alternative shell */ execl(shellpath, "shell", null); }b)#include /* assume the following function is written for an electronic storefront. the user will enter the id of the item to be ordered, as well as the quantity of units that they would like to purchase. the program will then lookup the price for the price for the item using a predefined function, and return the total cost of the order.*/int gettotalcost(){ char itemid[9]; int price, unitsordered, cost; printf(" enter the 9-digit id of the item to be ordered: "); scanf("%s", & itemid); /* lookup the price according to the itemid */ price = getpricebyid(itemid); printf(" enter the quantity of units to be ordered: "); scanf("%d", & unitsordered); cost = price * unitsordered; return cost; }c)#include /* the following function is intended to return a user's full name by concatenating the user's first and last name into a single string and then returning that string. */char *getfullname(char *firstname, char *lastname, int max_len){ char fullname[max_len]; strcpy(fullname, firstname); strcat(fullname, " "); strcat(fullname, lastname); return fullname; }d)#include /* the following code snippet runs through the list of cli arguments entered and displays them to the console. */int main(int argc, char *argv[]){ int i; printf("you've entered the following arguments: "); for(i = 0; i < argc; i++){ print(argv[i]); printf("\n"); } /* */}
Answers: 2
image
Computers and Technology, 25.06.2019 10:40, phavion
If you're using the paintbrush tool and want to change the color of the paint being used what should you change
Answers: 2
You know the right answer?
The highway distance between 6 cities named (A ... G) are illustrated in the following adjacency mat...

Questions in other subjects:

Konu
Chemistry, 08.05.2021 09:30
Konu
Physics, 08.05.2021 09:30
Konu
Mathematics, 08.05.2021 09:30
Konu
Mathematics, 08.05.2021 09:30
Konu
Mathematics, 08.05.2021 09:30
Konu
Mathematics, 08.05.2021 09:30