Midterm 2 Solution

$30.00 $24.00

1. Write a program that computes the “diameter” of a directed graph which is defined as the maximum-length shortest path connecting any two vertices. Estimate the runtime of your algorithm. Feel free to use the following datasets: https://algs4.cs.princeton.edu/44sp/tinyEWD.txt https://algs4.cs.princeton.edu/44sp/mediumEWD.txt https://algs4.cs.princeton.edu/44sp/1000EWD.txt https://algs4.cs.princeton.edu/44sp/10000EWD.txt 2. Compute the (i) number of connected components (ii) size of the largest component, (iii) number of components…

Rate this product

You’ll get a: zip file solution

 

Categorys:
Tags:

Description

Rate this product

1. Write a program that computes the “diameter” of a directed graph which is defined as the maximum-length shortest path connecting any two vertices. Estimate the runtime of your algorithm. Feel free to use the following datasets:
https://algs4.cs.princeton.edu/44sp/tinyEWD.txt
https://algs4.cs.princeton.edu/44sp/mediumEWD.txt
https://algs4.cs.princeton.edu/44sp/1000EWD.txt
https://algs4.cs.princeton.edu/44sp/10000EWD.txt

2. Compute the
(i) number of connected components
(ii) size of the largest component,
(iii) number of components of size less than 10 for data provided at:
https://algs4.cs.princeton.edu/41graph/movies.txt .

Midterm 2 Solution
$30.00 $24.00