Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Question
Chapter 9.3, Problem 9E
Program Plan Intro
To describe the way to pick the optimal location of the main pipeline that minimizes the total length of the spurs and also shows the method to determine the optimal location in linear time.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A seven-story office building has 15 adjacent offices per floor. Each office contains a
wall socket for a terminal in the front wall, so the sockets form a rectangular grid in the
vertical plane, with a separation of 4 m between sockets, both horizontally and
vertically. Assuming that it is feasible to run a straight cable between any pair of
sockets, horizontally, vertically, or diagonally, how many meters of cable are needed to
connect all sockets using
a. (a) a star configuration with a single router in the middle?
b. (b) an 802.3 LAN?
Pakistan Railway has hired you for the task of repair of its rail networks of province SINDH, the cost of the repair of track between the different cities are presented in the given Table. For instance, the entry (KHI,HYD)= 10 in the table tells us the cost of building a rail connection between these two cities is 10 (in million rupees)
You are required to develop a rail network that connects all the cities by at least one path with the smallest cost by avoiding multiple paths to the same city. Hence the problem becomes the finding of Minimum spanning tree in a graph.
Your job is as follows;
a) Translate the given information in the form of Graph (Vertices & edges)
b) Use Greedy Algorithms (Kruskal’s , if the S5 is odd & Prim’s technique , if S5 is even) to build rail connections in this scenario. Apply this algorithm and show all steps up to the final routes.
c) What is the cost of repairing of resulting rail network?
A regional telephone company had 5.2 million subscribers. Each of their telephones is connected to a central office by a copper twisted pair. The average length of these twisted pairs is 3.5 km. How much is the copper in the local loops worth? Assume that the cross section of each strand is a circle 1.2 mm in diameter, the density of copper is 8.4 grams/cm3, and that copper sells for $15.00 per kilogram.
Chapter 9 Solutions
Introduction to Algorithms
Knowledge Booster
Similar questions
- API=(141.5/(SG))-131.5 SG=(141.5/(API+131.5)) The Characterization factor(Kw) for crude oil is given as; Kw=(∛TB)/SG where; TB=mean aberage boiling point, deg Rankine SG =specific gravity at 60 ℉ Crude oil are classified based on the following criteria; Kw =12.5-13.0→Paraffin based crude oil Kw =11.0-12.0→Napthenic based crude oil Kw =9.8-11.0→Aromatic based crude oil based on the above information,write php program for the classification of crude oilsarrow_forwardIn Figure, suppose that the wellheads can be divided into two groups depending on gas pressure: a high-pressure group that includes wells 2, 3, 4, and 6 and a low-pressure group that includes wells 5, 7, 8, and 9 . Because of pressure difference, it is not possible to link the wellheads from the two groups. At the same time, both groups must be connected to the delivery point through wellhead 1. Determine the minimum pipeline network for this situation. Choices: a.) Set length of arcs 3-5, 5-3, 4-5, 5-4, 4-7, 7-4, 5-6, and 6-5 to ∞ : Total length = 53 b.) Set length of arcs 3-5, 5-3, 4-5, 5-4, 4-7, 7-4, 5-6, and 6-5: Total length = 53 c.) Set length of arcs 3-5, 5-3, 4-5, 5-4, 4-7, 7-4, 5-6, and 6-7 to ∞ : Total length = 53 d.) Set length of arcs 3-5, 5-3, 4-5, 5-4, 4-7, 7-4, and 6-5 to ∞ : Total length = 53arrow_forwardFully developed flow moving a 40 cm diameter pipe has the following velocity profile: Radius r, cm 0.02.55.07.510.0 12.5 15.0 17.5 20.0 Velocity v, m/s 0.914 0.890 0.847 0.795 0.719 0.543 0.427 0.204 0 Find the volumetric flow rate Q integrate from 0 to R using the relationship Q = [_0^R_ 2rtrvdr. Where r is the radial axis of the pipe, R is the radius of the pipe and v is the velocity. Solve the problem using two steps. Fit a polynomial curve to the velocity data using polyfit. Integrate the equation using int.arrow_forward
- Coding problems: HW5_2 A thin square metal plate has uniform temperature of E1 4T, = E, + E2 + T, + T6 degrees on two opposite edges, a temperature of E2 on one edge, 4T, = E, + T1 + T3 + T5 and E3 on the final edge. Equations can be written for the 4T3 = E1 + E3 +T2+ T4 temperatures, Ti, at 6 uniformly spaced interior nodes. Solve for the 4T4 = E1 + E3 + T3 + T5 node temperatures when E1=80, E2=120 and E3=60. 4T5 = E1 + T2 + T4 + T6 Present the results in a complete sentence using fprintf 4T, = E1 + E2 + T, + T5arrow_forwardQ5/ A beam with a length L is attached to the wall with a cable as shown. A load W = 400 lb. is attached to the beam. The tension force, T, in the cable is given by: T=! WL√/h²+x² hx For a beam with L = 120 in and h=50 in calculate T for x = 10, 30, 50, 70, 90, and 110 in.arrow_forwardA contractor owns three excavators of different capacity. He/she wants to dispatch these excavatorsinto three different jobs. The performance of the excavators is measured as the time consumed toperform each job. The data of the time tests are shown as given in the table below. (a) Draw a network flow diagram.(b) Formulate a mathematical model to obtain the minimum time.(c) Solve this model using the Vogel’s approximation model.arrow_forward
- Pipeline fluid flows are indicated below. Determine the maximum flow from Node 1 to Node 3. From To Pipeline Node Node Capacity 1 3 400 3 1 100 1 2 300 2 1 0 2 3 100 3 2 100 a. 700 b. 400 c. 100 d. none of the answers presented apply. e. 500arrow_forwardPipeline fluid flows are indicated below. Determine the maximum flow from Node 1 to Node 4. From To Pipeline Node Node Capacity 1 2 400 2 1 0 1 4 200 4 1 200 1 3 200 3 1 0 2 4 200 4 2 200 3 4 300 4 3 300 a. none of the answers presented apply. b. 600 c. 300 d. 700 e. 200arrow_forwardA company has 6 branch offices A, B, C, D, E and F The weight of each edge in the given graph represents the distance among branches if there is a road between them and 0 otherwise. The company has planned to lay the fibre optic line connecting all branches such that the length of the fibre optic cable require should be minimum. Find the solution using appropriate algorithm 13 10 20 30 17 18 22 Earrow_forward
- Consider the following transshipment network for finding the shortest route from node 1 to node 7, Min s.t. Node 1 Flows Node 2 Flows Node 3 Flows Node 4 Flows 0 (a) Formulate a linear programming model of the problem. (Express your answers using x where each x is either 0 or 1 for the arc from node/ to node J.) Node 5 FlowS Node 6 Flows 9 Node 7 Flows 18 3 4 6 3 6 For ell x = 0, 1. (b) Find the shortest route from node 1 to node 7 in the network shown. (Enter your answers as a comma-separated list.) path - 1,arrow_forwardUsing C language. In the mechanics of deformable bodies, the following relationships can be used to analyze uniform beams subject to distributed loads: dy dx 0 (x) M(x) de dx EI dM dx dV dx = = V(x) = w(x) Where: x = distance along the beam y = deflection 0 = slope E = modulus of elasticity of the beam I = moment of inertia of the cross-section of the beam M(x) = bending moment at x V = shear force at x w(x) = distributed load at x You measure the following deflections at seven points along the length of a uniform beam: 1.125 1.5 1.875 x [m] 0.375 0.75 -0.2571 -0.9484 -1.9689 -3.2262 -4.6414 y [cm] Employ 4th-order approximation for derivatives to compute the bending moment (in kNm), the shear force (in kN), and the distributed load (in kN/m) at the middle or fourth point. Use the following parameter values in your computation: E = 200 GPa, and I = 200 GPa, and I = 0.0003 m4. NOTES: 1. Ask the user for the modulus of elasticity. 2. Ask the user for the moment of inertia. 2.25 2.625…arrow_forwardA uniform beam subject to a linearly increasing distributed load is shown below. The equation for the beam deflection (y) is Wo L Wo -(-x' + 2Ľ²X³ – L*x) y = 120EIL (а) (x = 0, y = 0) (x = L, y = 0) (b) where L = 600 cm, I = 30,000 cm*, and wo = 2.5 kN/cm. Write an m-file that uses the modified secant method with perturbation factor 8 = 0.1 to determine the location (xmax) of the maximum deflection in the beam, which occurs where dy/dx = 0. Use a stopping criterion of ɛa< 0.0001%.Your plot from problem 4 in homework 1 may help to provide an initial guess of the location. To evaluate the effect of material properties on the beam's deflection, the m-file must create a plot of the value of the maximum deflection for 100 equally spaced E values ranging from 30,000 kN/cm? to 70,000 kN/cm?. Label your axes appropriately. Turn in a printout of your code and a printout of the plot. Also state the x location of the point of maximum deflection.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole