# Minimising L1 and L2

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Task 3 of the municipal stage (Moscow) of the All-Russian School Olympiad (VsOSh) 2025/26 in artificial intelligence, grades 9–11 (variant III). Original: [tasks-ai-9-11-mun-msk-25-26.pdf](https://vos.olimpiada.ru/upload/files/Arhive_tasks/2025-26/mun/ai/tasks-ai-9-11-mun-msk-25-26.pdf).*

You are tuning the simplest possible regression model, which always predicts the same number $c$ (a constant model). You are given a set of true values:

$$
y = \{1, 2, 3, 9, 10, 10\}.
$$

Consider two quality functions: $L_1(c) = \sum_i |y_i - c|$ and $L_2(c) = \sum_i (y_i - c)^2$.

**a)** Find the value $c_1$ that minimises $L_1(c)$. If there are several optimal values, give the smallest of them as your answer.

**b)** Find the value $c_2$ that minimises $L_2(c)$. If there are several optimal values, give the smallest of them as your answer.

*Translator's note: this task's points are not stated in the statement paper (whose total is 600 points); the official answers give a maximum of 100 points, 50 for each part (exact match of the answer).*
