Professional Documents
Culture Documents
HW 2 Solution
HW 2 Solution
HW 2 Solution
Problem 1 (Lagrange multiplier with equality constraints): Find the maximum and
minimum of 𝑓(𝑥, 𝑦, 𝑧) = 4𝑦 − 2𝑧 subject to the constraints 2𝑥 − 𝑦 − 𝑧 = 2 and 𝑥 2 +
𝑦 2 = 1.
Solution:
Problem 4 (Naïve Bayes Classifier): You are a robot in an animal shelter, and must
learn to discriminate Dogs from Cats. You choose to learn a Naïve Bayes classifier. You
are given the following examples: