Capacity $P$.

2011 warehouses are connected by roads in such a way that from any warehouse you can drive to any other, possibly by driving along several roads. On the warehouses, there are $x_{1}, \ldots, x_{2011}$ kg of cement respectively. In one trip, you can transport an arbitrary amount of cement from any warehouse to another along a connecting road. In the end, according to the plan, there should be $y_{1}, \ldots, y_{2011}$ kg of cement on the warehouses respectively, and $x_{1}+x_{2}+\ldots+x_{2011}=y_{1}+y_{2}+\ldots+y_{2011}$. What is the minimum number of trips required to fulfill the plan for any values of the numbers $x_{i}$ and $y_{i}$ and any road scheme?
Let (for an arbitrary road scheme) initially all the cement is located at one warehouse $S$, and it needs to be distributed evenly among all warehouses. Then, to each warehouse, except for $S$, cement must be delivered in some trip, so there should be at least 2010 trips in total.

We will prove by induction on $n$ that with $n$ warehouses, it is always possible to manage with $n-1$ trips. The base case ($n=1$) is obvious. The induction step. Let $n>1$. Since from any warehouse you can reach any other, there exists a route that passes through all warehouses (possibly more than once). Consider such a route and a warehouse $A$ that appears on this route the latest for the first time. Then, if we remove warehouse $A$ and all roads leading from it, it is still possible to reach any warehouse from any other.

We can assume that $A$ is the warehouse with number $n$. If $y_{n} \leq x_{n}$, then we will transport $x_{n}-y_{n}$ kg of cement from $A$ to any connected warehouse, and then forget about it and all the roads leading from it. By the induction hypothesis, for the remaining warehouses, the plan can be executed in $n-2$ trips. In the end, with $n-1$ trips, the required distribution of cement will be achieved.

Suppose $y_{n}>x_{n}$. We have already proven that from the distribution where $y_{i}$ kg of cement is on the $i$-th warehouse, it is possible to achieve the distribution where $x_{i}$ kg of cement is on the $i$-th warehouse in $n-1$ trips. By performing all these transports in reverse order (and in the opposite direction), we will implement the required plan.

## Answer

In 2010 trips.