Maximum network flow problem

Assignment Help Data Structure & Algorithms
Reference no: EM132734983

Exercise 25
Demonstrate the brute force method, using the ManualSimplex application, on this LP (you will need to use a text editor to make a suitable input file for this problem, which is already in the required format for LP):

max x1 + 2x2 + 3x3 + 3x4 + 2x5 + x6 subject to 4x1 + 8x2 + 3x3 + 6x4 + 10x5 - x6 = 120
8x1 - 4x2 - 6x3 - 8x4 + x5 + 3x6 = 24
12x1 + 5x2 - 9x3 + 6x4 - 9x5 + 8x6 = 360
x ≥ 0

List all different ways (order doesn't matter) to choose m basic variables, and for each, use the program to do the row operations, and mark as infeasible or feasible, and if it is feasible, write the objective function value. When all have been done, note the optimal choice, and state clearly the values of all the variables and the objection function value for this optimal choice.

Exercise 26
For each of the 3 problems below, produce a careful mathematical description of the LP, ready to be put into a data file for use with ManualSimplex. Then use the application, noting the values of the basic variables and the objective function at the optimal tableau for both Phase 1 and Phase 2, as appropriate, and describe the final solution to each problem as infeasible, unbounded, or having an optimal feasible point.
a. Formulate and solve this LP:

subject to the constraints

max x1 + 2x2 + 3x3
-3x1 + 15x2 - 3x3 ≥ 3 6x1 + 3x2 + 6x3 ≤ 60
-6x1 + 6x2 + 3x3 ≤ 21
9x1 + 5x2 - x3 ≥ 21
-3x1 + 5x2 + 2x3 ≥ 3 6x1 + 8x2 - 4x3 ≤ 30
8x2 - 4x3 ≤ 12
3x1 + 3x3 ≥ 12
x1, x2, x3 ≥ 0

b. Formulate and solve the above LP, but with this constraint added:
2x3 ≤ 1
c. Formulate and solve the LP for part a, but with the first four constraints removed.

Exercise 27
In this exercise you will explore using LP to solve a problem that comes up in game programming. Also, you'll get to practice performing the simplex method on a number of LP instances where you can verify the correctness of the results.
Suppose you have two polygonal objects in a 2D game, as follows. The first object has its center at the point c = cx , and has vectors a , a , and a from c to its three vertices
cy
(the technique works for any number of vertices). Then it turns out that every point in the first object can be expressed as
c + µ1a1 + µ2a2 + µ3a3,
where µ1 + µ2 + µ3 = 1 and all the µj values are nonnegative (this is a standard convex combination idea). In addition, let's say that this object is moving along a straight line with velocity vector v = vx , so that at any time λ (with λ 0, of course) the center is
vy
at c + λv.

Exercise 28
Formulate and solve the LP produced by the transportation problem with this data (attached):

Put your optimal point in this chart and check that the objective function value matches the direct calculation and that the rows and columns add up to the targets.

Exercise 29
Implement the small instance of the maximum network flow problem shown below as an LP instance and solve it using ManualSimplex. Turn in a graph showing the optimal amount of flow along each edge.
Assume, obviously, that vertex 1 is the source and vertex 6 is the sink, and that the numbers written along the edges are the capacities of the edges.

Exercise 30
Perform the branch and bound algorithm for the 0-1 knapsack problem similarly to the previous example, on the instance given below.
For convenience, you probably will want to actually draw the tree, noting that at any moment the nodes that have no children are the ones that would be in the priority queue, and the node with the best bound can be found by simply scanning those nodes.

Exercise 31
Your job on this Exercise is to write code in Java to implement the branch and bound algorithm for the 0-1 knapsack problem.
Create a Java application named Ex31 that will ask the user for the name of a data file, read the information from the data file, and then solve that instance of the 0-1 knapsack problem using the branch and bound method, following exactly the algorithm demonstrated in the previous example-without an explicit tree.
The data file must contain the capacity of the knapsack, followed by the number of items, followed by the profit and weight information (on one line) for each item. All these values are integers. You may assume that the items are sorted in order from most profitable per unit of weight to least profitable.
As a small but important requirement to avoid irritating me, you must label the items starting with 1, rather than 0.

Exercise 32
Your job on this Exercise is to solve some fairly large (n = 30) instances of ETSP using
AutoHeuristicTSP.

For an instance of ETSP with n = 30, the dynamic programming approach would take Θ(n22n-1) or so steps, which is some multiple of 900 billion steps, requiring a table with roughly a billion rows and 30 columns).
So, it should be fairly impressive that our new approach will be able to solve such problems quite easily!
To do this, just run AutoHeuristicTSP with the desired data file as input, and interactively do cuts and branches until the optimal tour is found.
First solve the instance bad1, drawing by hand some (until you are sure you understand how to draw the entire tree, and get tired) of the branch and bound tree following the style used on page 9.16 (AutoHeuristicTSP keeps track of everything for you, so you don't really need to draw the tree to solve the instance, but I'm requiring it to force you to practice what you'll need for Test 3).
Then, solve the instance bad2.

For both instances, report the optimal tour total length and the branching choices that led to the node for this optimal tour in the branch and bound tree.
I came up with bad1 and bad2 by using RandomTestingHeuristicTSP with n = 30 to generate random test instances with 30 points and picking ones that looked hard.

Exercise 33
Your job on this Exercise is to demonstrate Christofides' algorithm on the instance of ETSP with these 12 points:
1: (64, 65)
2: (7, 71)
3: (8, 55)
4: (51, 57)
5: (55, 56)
6: (80, 75)
7: (3, 84)
8: (17, 84)
9: (72, 72)
10: (65, 31)
11: (58, 10)
12: (8, 30)

Your demonstration will be mostly graphical, drawing on the diagram on the next page the edges of the minimum spanning tree T obtained by Prim's algorithm, the set O of vertices with an odd number of edges of T connected to them, the edges in the minimum weight matching M of the points in O, a list of vertices that form an Eulerian traversal of the vertices, and finally the list of vertices for the tour obtained by this algorithm.

You must also compute the total length of this tour, and compare it to the optimal tour (obtained by using one of our earlier algorithms). Verify that this tour has total length less than or equal to 1.5 times the optimal tour's total length.

Attachment:- exercies.zip

Reference no: EM132734983

Questions Cloud

Global response against covid-19 : Scientists, doctors, and public health officials from around the world are contributing to the global response against COVID-19.
Discuss what effect hr policies and procedures : Research analytic measures that are used to predict and evaluate the quality and impact of HR practices and Discuss what effect HR policies and procedures
Compute the actual return on the plan assets : The company's actuary provides the following information about the plan. Compute the actual return on the plan assets in 2019
What substance is called the spreading factor : What substance is called the "spreading factor"? How does the "spreading factor" aid an organism in its quest to penetrate the host cell?
Maximum network flow problem : Describe the final solution to each problem as infeasible, unbounded, or having an optimal feasible point - Formulate and solve the above LP
About comparing the Order Testudines : Make the topic about comparing the Order Testudines and all the major orders in the Clade Lepidosauromorpha, including their distinguishing morphological
What are the three categories of immune malfunctions : Define - innate immunity, adaptive immunity, humoral immunity, cell mediated immunity, inflammatory response, specific and non specific response
Do have sole responsibility over the accounts : Can you explain the approval process, if any, of how transactions are processed in the benefit accounts? Do you have sole responsibility over their accounts?
Describe the genus and species name : Describe the genus and species name and general characteristics of the organism that caused his disease

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write a script that checks the day of the week

Write a script that checks the day of the week, and takes one of two actions depending on the day. If the day is Monday through Friday, print the name of the day.

  Write recursive version of array-based linear search

Write an algorithm but not code. Write a recursive version of the array-based linear search algorithm. Write a recursive version of the linked-list-based linear search algorithm."""

  Use the string input by the user as an argument to open file

One of these must use preorder traversal, one must use inorder traversal, and one must use postorder traversal. You must decide which to use for each method, but use comments to document the type of traversal used.

  How we can maintain the integrity of the linked list

Describe an O(1) algorithm that logically removes the value stored in such a node from the linked list, maintaining the integrity of the linked list.

  Demonstrate reasoning about efficiency of algorithms

BIT 204 - Data Structure and Algorithms - Kent Institute Australia - critically analyse, manage and present in meaningful ways information and data

  Program to implement a stack and a queue

Write a C/C++ program to implement a stack and a queue as applications of LL.

  Write an algorithm that find the median of all two-n numbers

Write an algorithm that finds the median of all 2n numbers whose time complexity is in T (lg n).

  How the bellman-ford algorithm can be adapted to solve

Suppose that in addition to a system of difference constraints, we want to handle equality constraints of the form xi = xj + bk. Show how the Bellman-Ford algorithm can be adapted to solve this variety.

  Assignment - working with doubly linked lists

CS 20A: C++ Data Structures Assignment: Working with Doubly Linked Lists. In this assignment, you will implement the following four methods on an incomplete implementation of a doubly-linked list: append(const T& value): appends a node containing a s..

  Discuss the quadratic probing hash table

Given the input {4371, 1323, 6173, 4199, 4344, 9679, 1989}, a fixed table size of 10, and a hash function H(X) = X mod 10, show the resulting.

  How to implement a priority-based scheduler

COP4610: Introduction to Operating Systems - Project 4: Priority-based Scheduler - you will learn how to implement a priority-based scheduler forxv6. To get started, download a new copy of the xv6 source code fromhere.

  How to calculate signature using mod

How does he calculate the signature on each of m1j mod n (for positive integer j), m1-1 mod n, m1*m2 mod n, and in general m1j*m2k mod n (for arbitrary integers j and k)?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd