Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE SOLVE ALL THE 6 QUESTIONS REAGRDING THE GRAPHS IN THE PICTURE IF POSSIBLE They are mentions bellow - - - - - -
PLEASE SOLVE ALL THE QUESTIONS REAGRDING THE GRAPHS IN THE PICTURE IF POSSIBLE They are mentions bellow"
The practical work of the OR course consists of writing a Julia program using the JuMP library to solve an optimization problem. The problem and its variant is an application of the shortest path problem.
Problems definition and examples
Given a directed graph with cdots, the set of the vertices of the set of the
arcs of and a positive distance associated with each arc of the problem consists in finding
a shortest path from to if it exists The distance of the path is the sum of all the distances of the
arcs of the path. This problem will be denoted in the following.
A variant of problem denoted will consist in finding two arcdisjoint paths such that the
sum of their respective length is minimal. Both paths start from and end in Two paths are said
to be arcdisjoint if they have no arc in common.
We consider the following weighted directed graph :An optimal solution of problem in is given in green in the figure below. The optimal distance
is
An optimal solution of problem in is given in red and blue in the graph below. The optimal
value is
Questions
A graph will be represented by its adjacency matrix. You will have to compute the optimal value for problem and problem for different graph instances using JuliaJuMP and the free solver Cbc by
following the steps below.
Define the variables associated with problem and write the Linear Program modeling
Define the variables associated with problem and write the Linear Program modeling
Write a Julia function named D that computes the optimal value of problem for a given adjacency matrix representing a graph and for two given vertices, a source and a destination.
Write a Julia function named D that computes the optimal value of problem for a given adjacency matrix representing a graph and for two given vertices, a source and a destination.
Execute your functions on the adjacency matrix representing the graph depicted in the previous section with the source and the destination
Generate different instances of directed graphs with different sizes and execute your functions on these instances to provide the optimal solutions. Provide the sources and destinations for each execution.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started