Consider the (20x20) array of numbers here


Consider the (20x20) array of numbers here. Lets say this represents a matrix A of distances (in kilometers) between cities. Note that A is symmetric A(i,j) = A(j,i) and all its diagonal elements are zero. Suppose Vladimir from city i and Petra from city j want to meet up in some third city k (i, j and k are all different). Conscious about their carbon footprint (!), they want k to be as near as possible: specifically the sum of the distances both has to travel should be minimum. Given i and j, write a program in PYTHON that determines what k should be. (In PYTHON you can store the matrix as a list of lists). Do not worry in your program about "reading in" A: Just hard-wire it in to the code. You should read in from the user the two cities (i and j) where Vladimir and Petra live. From your program, calculate the answer for. Try not to use built in python functions, mainly loops.
1. i=5, j=11
2. i=10, j=13 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Consider the (20x20) array of numbers here
Reference No:- TGS094473

Expected delivery within 24 Hours