Exam 1

  1. Question

    Given the following information:

    banana ++ pineapple ++ pineapple = 909909
    banana ++ pineapple ++ banana = 516516
    pineapple ++ orange ++ pineapple = 921921

    Compute:

    banana ++ orange ++ pineapple = ?\text{?}

    Solution

    The information provided can be interpreted as the price for three fruit baskets with different combinations of the three fruits. This corresponds to a system of linear equations where the price of the three fruits is the vector of unknowns xx:

    x1=x_1 = banana x2=x_2 = orange x3=x_3 = pineapple

    The system of linear equations is then: (102201012)(x1x2x3)=(909516921) \begin{aligned} \left( \begin{array}{rrr} 1 & 0 & 2 \\ 2 & 0 & 1 \\ 0 & 1 & 2 \end{array} \right) \cdot \left( \begin{array}{r} x_1 \\ x_2 \\ x_3 \end{array} \right) & = & \left( \begin{array}{r} 909 \\ 516 \\ 921 \end{array} \right) \end{aligned} This can be solved using any solution algorithm, e.g., elimination: x1=41,x2=53,x3=434. x_1 = 41, \, x_2 = 53, \, x_3 = 434. Based on the three prices for the different fruits it is straightforward to compute the total price of the fourth fruit basket via:

    banana ++ orange ++ pineapple =
    x1x_1 ++ x2x_2 ++ x3x_3 =
    4141 ++ 5353 ++ 434434 = 528528