Implement the small instance of the maximum network

Assignment Help Basic Computer Science
Reference no: EM132734970

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: EM132734970

Questions Cloud

Strategic planning session : Have you ever been involved in a strategic planning session? If so, please describe how the group and the session were structured?
What is the amount of sales or revenue dollars the company : If the company wants to earn a profit of $50,000 instead of breaking even, what is the amount of sales or revenue dollars the company must achieve?
What is Human Microbiome : What is Human Microbiome ? / How does one acquire it ? What factors/ habits influence this and how does it affect a person's health ?
How many units must be sold the year to earn the same : Contribution margin per unit will remain unchanged at $2. How many units must be sold this year to earn the same net income as was earned last year?
Implement the small instance of the maximum network : 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
Show the before-and-after effects of the dividend : A 10% stock dividend (23,000 shares) is declared when the market price per share is $15. Show the before-and-after effects of the dividend
Calculate the overhead spending and volume variances : Actual variable overhead for the month was $37,680 and fixed overhead was $16,000. Calculate the overhead spending, efficiency, and volume variances for Nov
Compare the enlightenment with post-enlightenment : Compare and contrast the Enlightenment (Rousseau, Kant, Emerson) with the Post-Enlightenment (Dostoyevsky, Nietzsche, Freud, Woolf, Achebe) theory of personhood
What may be written off over time for tax purposes : Estimated final salvage value of the machine is $120,000.The cost of this asset that, by law, may be written off over time for tax purposes is closest to

Reviews

len2734970

12/18/2020 1:59:33 AM

I put everything you need in the file . those pdfs have exercises 25-33 in it and it also have examples of how to do it . can you do it for me.

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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