Homework 5: Graph Algorithms (Part II) & NP Completeness

$24.99 $18.99

In this homework, we will focus our attention to finding shortest-paths and maximum flow on graphs, and NP Completeness. Problem 1: Shortest Path 40 points 1. If p = fv1; ; vng is the shortest path between v1 and vn, then prove that any subpath pij = fvi; ; vj g in p is the…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

In this homework, we will focus our attention to finding shortest-paths and maximum flow on graphs, and NP Completeness.

Problem 1: Shortest Path 40 points

1. If p = fv1; ; vng is the shortest path between v1 and vn, then prove that any subpath

pij = fvi; ; vj g in p is the shortest path between vi and vj . (20 points)

  1. Write the pseudocode to find a negative weight cycle in a directed graph G = (V; E) with the weight function w : E ! R. (20 points)

Bonus Problem (20 points):

  1. Demonstate Dijkstra’s algorithm on the following graph.

  1. Implement Dijkstra’s algorithm in Python, and validate your code on the following graph.

  1. Prove that there are uncountable number of unsolvable binary decision problems. Further-more, give an example of an unsolvable binary decision problem. (10 points)

  1. Define NP, NP-Hard and NP-Complete classes, and give one problem in each of these com-plexity classes. (10 points)

  1. Assuming that Hamiltonian circuit problem is NP-Complete, prove that traveling salesman problem is NP-Complete via reduction. (20 points)

Homework 5: Graph Algorithms (Part II) & NP Completeness
$24.99 $18.99