Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is C++ Assignment: For this week\'s assignment, you\'ll be making a program

ID: 3678925 • Letter: T

Question

This is C++

Assignment: For this week's assignment, you'll be making a program that can compute the shortest distance between two selected points on a graph. Your previous program which can multiply matrices, and your knowledge of adjacency matrices should let you do this. There are FIVE DIFFERENT graphs provided with this assignment (see attached document), and for each of the five graphs, you have to find the shortest distance between the points given below. PLEASE NOTE: As some graphs have one-way paths, you'll realize the distance from A to B wll not always be the same as the distance from B to A. You do NOT need to tell me -WHAT- the path is (don't say 'A to R to G to F to B). For this assignment we only want the distance. Distance is considered the number of paths you have to cross to get from one point to another. So your results could say 3 steps" is the shortest distance or 15 steps" or so on FOR YOUR ASSIGNMENT For each of the five graphs, find the shortest distances between the following points (1) A to B (2) B to A (3) A to C (4) B to C (5) C to D

Explanation / Answer

Graph 1 :

The shortest distance from A to B is 1 Step.

The shortest distance from B to A is 1 Step.

The shortest distance from A to C is 1 Step.

The shortest distance from B to C is 1 Step.

The shortest distance from C to D is 2 Steps.

Graph 2 :

The shortest distance from A to B is 3 Steps.

The shortest distance from B to A is 3 Steps.

The shortest distance from A to C is 4 Steps.

The shortest distance from B to C is 1 Step.

The shortest distance from C to D is 3 Steps.

Graph 3 :

The shortest distance from A to B is 3 Steps.

The shortest distance from B to A is 1 Step.

The shortest distance from A to C is 2 Steps.

The shortest distance from B to C is 1 Step.

The shortest distance from C to D is 2 Steps.

Graph 4 :

The shortest distance from A to B is 1 Step.

The shortest distance from B to A is 3 Steps.

The shortest distance from A to C is 3 Steps.

The shortest distance from B to C is 2 Steps.

The shortest distance from C to D is 3 Steps.

Graph 5 :

The shortest distance from A to B is 5 Steps.

The shortest distance from B to A is 3 Steps.

The shortest distance from A to C is 7 Steps.

The shortest distance from B to C is 2 Steps.

The shortest distance from C to D is 4 Steps.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote