Names: Section: ISyE 3133, Studio 1 – Linear Functions and Summation/For All Notation In this class, we work with functions of multiple variables: f (x1 , x2 , . . . , xn ) These functions have n inputs and a single output. Variables are inputs into the function. We also call them • Decision variables Constants are known values. They can be represented with numerical values (1, π, with generic placeholders (a1 , a2 , a3 , b11 , b12 , etc). We also call them √ 3) or • Parameters • Data • Known constants Question 1. In the following, x1 , x2 , x3 are variables, and a1 , a2 , a3 are constants. Fill out the following tables with the output associated with the given inputs, and answer any reflection questions. Part (a) is done for you as an example. (a) f (x1 , x2 , x3 ) = 4x1 + √ x1 1 0 πx2 − 4x3 Inputs x2 x3 2 1 1 1 Output f (x1 , x2 , x3 ) √ √ 4(1) + π(2) − 4(1) = 2 π √ π−4 (b) f (x1 , x2 , x3 ) = a1 x1 + a2 x2 + a3 x3 x1 x2 x3 1 2 1 0 0 √ f (x1 , x2 , x3 ) π 1 • Reflection Question. Why are a1 , a2 , and a3 not included in the inputs? (c) f (x1 , x2 , x3 ) = max(x1 , x2 ) x1 x2 x3 1 3 4 -3 1 4 x1 x2 x3 1 3 4 -3 1 4 x1 x2 x3 1 3 4 -3 1 4 f (x1 , x2 , x3 ) (d) f (x1 , x2 , x3 ) = max(x1 , 3) f (x1 , x2 , x3 ) (e) f (x1 , x2 , x3 ) = max(a1 , a2 ) f (x1 , x2 , x3 ) (f) f (x1 , x2 , x3 ) = a31 x1 + a22 x2 + a3 x3 . 2 x1 x2 x3 1 2 1 0 1 1 x1 x2 x3 1 2 1 1 1 0 x1 x2 x3 2 3 1 2 3 2 f (x1 , x2 , x3 ) (g) f (x1 , x2 , x3 ) = x1 + 2x2 + x2 x3 f (x1 , x2 , x3 ) (h) f (x1 , x2 , x3 ) = x21 + 2x1 x2 + x22 f (x1 , x2 , x3 ) Linear functions take the following form: f (x1 , x2 , . . . , xn ) = a1 x1 + a2 x2 + · · · + an xn + b where a1 , . . . , an and b are constants (possibly 0). Question 2. Label the functions in Question 1 as linear or nonlinear. Summation notation is used when we want to add up a set of terms with similar structure. 4 P i2 is equivalent to: i=1 i=1 1 + i=2 4 + which equals 30. 3 i=3 9 + i=4 16 Question 3. Write each of the following summations in expanded form, and mark which of them are linear (as before, x1 , x2 , x3 are variables, and a1 , a2 , a3 are constants). Part (a) is done for you as an example. (a) 3 P xi i=1 x1 + x2 + x3 Linear (b) 3 P ai xi i=1 (c) P √ xi x2 i∈{1,3} (d) 3 P ixi i=1 i̸=2 4 (e) 3 P i P xi xj i=1 j=1 5 Linear constraints are (in)equalities that take the following form: a1 x1 + a2 x2 + · · · + an xn ≤ b where a1 , . . . , an and b are constants (possibly 0). ≤ can be replaced by ≥ or =. For all notation is different from summation notation. It has a different meaning, and they are NOT interchangeable! We use for all notation (∀) when we have multiple constraints that have a similar structure. xi ≥ 0, ∀i = 1, . . . , 4 is equivalent to i=1 i=2 i=3 i=4 x1 ≥ 0 x2 ≥ 0 x3 ≥ 0 x4 ≥ 0 Notice here that we have 4 different constraints (with shared structure). Question 4. Write each of the following expressions in expanded form, and mark which of them are linear constraints (as before, x1 , x2 , x3 are variables, and a1 , a2 , a3 are constants). Part (a) is done for you as an example. (a) ai xi ≤ 10, ∀i = 1, . . . , 3 a1 x1 ≤ 10 a2 x2 ≤ 10 a3 x3 ≤ 10 Linear (b) xi ≥ i2 , ∀i = 1, . . . , 3 6 (c) xi xi+1 ≤ 10i, ∀i = 1, 2 Question 5. For each of the following sentences, represent them as a set of one or more linear constraints using summation and for-all notation, as appropriate. (Some parts may use one, the other, or both.) As before, x1 , x2 , x3 are variables, and a1 , a2 , a3 are constants. (If you are new to summations and for-alls, you may find it helpful to first write the expression normally). (a) At the stationary store, pens cost a1 cents each and highlighters cost a2 cents each. Maple buys x1 pens and x2 highlighters, and spends $5.50 in total. (b) Adventurers 1, 2, and 3 can carry at most a1 , a2 , a3 pounds of supplies each, respectively. Each adventurer i will carry xi pounds of supplies from the town of Phandalin to the city 7 of Neverwinter, and shouldn’t carry more than they’re able. 8 Question 6. Rewrite each constraint from the previous exercise, replacing summations with for-alls and vice versa. State in words the meaning of the resulting constraint(s). (a) Rewrite part (a). (b) Rewrite part (b). 9 Question 7. Write the following in expanded form. 3 X aij xi ≤ bj , ∀j = 1, 2 i=1 10