Docsity

Assignment 9 Problems - Computing Techniques | ME 2016, Assignments of Computer Science

Toggle sidebar
bg1
ME2016, Fall 2008, Dr. Ferri
Homework Assignment 9
October 29, 2008
Problem 1. (2 points)
Consider the linear-programming problem: Maximize 21
3
5xxz += , subject to:
155.2 21
≤
+xx , 7
21
≤
+
xx , 13x
≤
0,0 21 ≥≥ xx
(a) Obtain the solution graphically. Use Matlab to plot the feasible region and some contour
lines for z.
(b) Check your answer using the Matlab program linprog.
Problem 2. (3 points)
Consider the linear-programming problem: Maximize 21 xxz
+
=
, subject to:
82 21
≤
+
xx (2.1)
92 21
≤
+
xx (2.2)
7
21
≤
+
xx (2.3)
0,0 21 ≥≥ xx
(a) Use the graphical procedure to find the maximum value of z and the (x1, x2) combination at
which this maximum occurs. You can plot the feasible region by hand, or use Matlab to help
you.
(b) How does your solution change if constraint (2.3) is removed?
Problem 3. (3 points)
We wish to minimize the function 22
( , ) ( 2) 2( 3)fxy x y=− + − using a gradient method.
(a) Give an expression for the gradient of f(x,y),
f
∇
G
. Setting 0f
∇
=
G
, find the exact location of
the minimum.
(b) Starting from the point (x0, y0) = (1,1), move in the negative-gradient direction (direction of
steepest descent) until a minimum is reached. Give the coordinates of this point (x1, y1).
(c) From (x1, y1), move in the new negative-gradient direction to find a new minimum (x2, y2).
Problem 4. (2 points)
The following data (next page) was taken by a student in ME4053 to measure the speed of
sound. The first column gives the distance between the speaker and the microphone (in meters)
and the second column gives the measured time-delay between when a signal is sent to the
speaker and when the signal reaches the microphone (in milliseconds).
(a) Plot the data with the range on the x-axis and the time delay on the y-axis.
(b) Perform a linear regression on the data. Plot the straight line on the same plot as part (a).
pf2

Partial preview of the text

Download Assignment 9 Problems - Computing Techniques | ME 2016 and more Assignments Computer Science in PDF only on Docsity!

ME2016, Fall 2008, Dr. Ferri Homework Assignment 9 October 29, 2008

Problem 1. (2 points)

Consider the linear-programming problem: Maximize (^) 1 2 3

z = x + x , subject to:

x 1 (^) + 2. 5 x 2 ≤ 15 , x 1 (^) + x 2 ≤ 7 , x 1 (^) ≤ 3

x 1 ≥ 0 , x 2 ≥ 0

(a) Obtain the solution graphically. Use Matlab to plot the feasible region and some contour lines for z. (b) Check your answer using the Matlab program linprog.

Problem 2. (3 points) Consider the linear-programming problem: Maximize z = x 1 + x 2 , subject to:

x 1 (^) + 2 x 2 ≤ 8 (2.1) 2 x 1 (^) + x 2 ≤ 9 (2.2) x 1 (^) + x 2 ≤ 7 (2.3)

x 1 ≥ 0 , x 2 ≥ 0

(a) Use the graphical procedure to find the maximum value of z and the (x 1 , x 2 ) combination at which this maximum occurs. You can plot the feasible region by hand, or use Matlab to help you. (b) How does your solution change if constraint (2.3) is removed?

Problem 3. (3 points)

We wish to minimize the function f ( , x y ) = ( x − 2)^2 + 2( y − 3)^2 using a gradient method.

(a) Give an expression for the gradient of f(x,y), ∇ f

G

. Setting ∇ f = 0

G G

, find the exact location of the minimum. (b) Starting from the point (x 0 , y 0 ) = (1,1), move in the negative-gradient direction (direction of steepest descent) until a minimum is reached. Give the coordinates of this point (x 1 , y 1 ). (c) From (x 1 , y 1 ), move in the new negative-gradient direction to find a new minimum (x 2 , y 2 ).

Problem 4. (2 points) The following data (next page) was taken by a student in ME4053 to measure the speed of sound. The first column gives the distance between the speaker and the microphone (in meters) and the second column gives the measured time-delay between when a signal is sent to the speaker and when the signal reaches the microphone (in milliseconds). (a) Plot the data with the range on the x-axis and the time delay on the y-axis. (b) Perform a linear regression on the data. Plot the straight line on the same plot as part (a).

(c) Calculate the speed of sound by taking the inverse of the slope of your linear regression line. Express your answer in meters per second.

Range (m) Time (ms) 0.02 0. 0.04 0. 0.06 0. 0.08 0. 0.10 0. 0.12 0. 0.14 0. 0.16 0. 0.18 0. 0.20 0.