03:25 pts) For the edge weight matrix assigned to you for a directed graph, determine the...
Help. I need to write a small program that executes the following graph algorithms in any language: 1. All-Pairs Shortest Path (Floyd-Warshall). It must ask for the vertices and edges for the user to enter them. As an output, deploy the resulting matrix. This will be done only for directed graphs. 2. Kruskal or Prim algorithm whatever you want to do. It must ask for a graph and present it at the end. The minimum coating tree that results from...
Please answer A and B 1. Consider the following adjacency matrix representing vertices v through v^: weighted graph containing a ro 5 0 0 8 0 61 5 0 0 7 0 0 0 jo 0 0 0 0 1 3| 0 7 0 0 2 0 0 8 0 0 0 0 1 0 0 0 4 L6 0 3 0 0 4 0- 20 0 0 a. Draw the graph resulting from the adjacency matrix b. Assuming the...
1. A planar graph is said quadrag enary if all the faces of the graph are quadrilaterals (all faces are formed by 4 arcs). Let n be the number of vertices of the graph. Find a formula that gives the number of arcs of a graph quadrag enary according to n. Also find a formula that gives the number of faces of a quadrag enary graph according to n. You must clearly write your two formulas. You have to prove...
B B 3 4 6 5 E 1) Represent above graph with a weight matrix. 2) Compute shortest distances between every pair of vertices using Floyd-Warshall's algorithm. Show the results of D(1), DC), D), DC4), and D) assuming using intermediate vertices in the order of vertices A, B, C, D, and E.
Consider the following graph: V4 V1 V2 V3 V5 and consider the following process: Initially, start at v1. • At ach time step, choose one of th and move there. vertices adjacent to your current location uniformly at random, Let pi(n), p2(n), p3(n), p4(n), p5(n) be the probability your location after n time steps is v1, V2, 03, 04, or V5 respectively. So pi(0) = 1 and p2(0) = P3(0) = p4(0) = p5(0) = 0. (a) Express pi(n+1), p2(n+1),...
Q6: 20 pts) For the directed graph assigned to you, run the Depth First Search algorithm. (a) Clearly show the order in which the vertices are pushed and popped. (b) Clearly write the list of edges and their classification into one of the four categories as determined using DFS. (c) Determine whether the directed graph assigned to you is a DAG or not? If it is a DAG. write the topological sort of the vertices.
Run the Dijkstra’s algorithm on the directed graph of the following figure 24.6, using vertex t as the source. In the style of Figure 24.6, show the d and ? values and the vertices in set S after each iteration of the while loop. 1 8 10 I 10 14 4 6 4 6 2 3 2 3 4 6 5 5 2 (a) (c) 1 10 13 4 6 (d) (e) Figure 24.6 The execution of Dijkstra's algorithm. The...
10. You are given a directed graph G(V, E) where every vertex vi E V is associated with a weight wi> 0. The length of a path is the sum of weights of all vertices along this path. Given s,t e V, suggest an O((n+ m) log n) time algorithm for finding the shortest path m s toO As usual, n = IVI and m = IEI.
Question 1 (25 marks) Here below (Fig. 1) is the cross-sectional structure of an integrated circuit (IC) showing a metal- oxide-semiconductor field effect transistor (MOSFET). The four terminals of the MOSFET are connected to four voltages V1, V2, V3, and V4 respectively V V2 V: SO n+ n+ p-type Fig. 1 (a). What channel type is the MOSFET shown? (1 mark) (b). What are the common names of the four terminals connected to V1, V2, V3, and V4 respectively? Note...