Solution:
The answer is 18.
First, we will show that Kristoff must carry at least 18 ice blocks. Let
0<x1≤x2≤⋯≤xn
be the weights of ice blocks he carries which satisfy the condition that for any p,q∈Z≥0 such that p+q≤2016, there are disjoint subsets I,J of {1,…,n} such that ∑α∈Ixα=p and ∑α∈Jxα=q.
Claim: For any i, if x1+⋯+xi≤2014, then
xi+1≤⌊2x1+⋯+xi⌋+1
Proof. Suppose to the contrary that xi+1≥⌊2x1+⋯+xi⌋+2. Consider when Anna and Elsa both demand ⌊2x1+⋯+xi⌋+1 kilograms of ice (which is possible as 2×(⌊2x1+⋯+xi⌋+1)≤x1+⋯+xi+2≤2016). Kristoff cannot give any ice xj with j≥i+1 (which is too heavy), so he has to use from x1,…,xi. Since he is always able to satisfy Anna's and Elsa's demands, x1+⋯+xi≥2×(⌊2x1+⋯+xi⌋+1)≥x1+⋯+xi+1. A contradiction.
It is easy to see x1=1, so by hand we compute obtain the inequalities x2≤1, x3≤2, x4≤3, x5≤4, x6≤6, x7≤9, x8≤14, x9≤21, x10≤31, x11≤47, x12≤70, x13≤105, x14≤158, x15≤237, x16≤355, x17≤533, x18≤799. And we know n≥18; otherwise the sum x1+⋯+xn would not reach 2016.
Now we will prove that n=18 works. Consider the 18 numbers named above, say a1=1, a2=1, a3=2, a4=3, …, a18=799. We claim that with a1,…,ak, for any p,q∈Z≥0 such that p+q≤a1+⋯+ak, there are two disjoint subsets I,J of {1,…,k} such that ∑α∈Ixα=p and ∑α∈Jxα=q. We prove this by induction on k. It is clear for small k=1,2,3. Now suppose this is true for a certain k, and we add in ak+1.
When Kristoff meets Anna first and she demands p kilograms of ice, there are two cases.
Case I: if p≥ak+1, then Kristoff gives the ak+1 block to Anna first, then he considers p′=p−ak+1 and the same unknown q. Now p′+q≤a1+⋯+ak and he has a1,…,ak, so by induction he can successfully complete his task.
Case II: if p<ak+1, regardless of the value of q, he uses the same strategy as if p+q≤a1+⋯+ak and he uses ice from a1,…,ak without touching ak+1. Then, when he meets Elsa, if q≤a1+⋯+ak−p, he is safe. If q≥a1+⋯+ak−p+1, we know q−ak+1≥a1+⋯+ak−p+1−(⌊2a1+⋯+ak⌋+1)≥0. So he can give the ak+1 to Elsa first then do as if q′=q−ak+1 is the new demand by Elsa. He can now supply the ice to Elsa because p+q′≤a1+⋯+ak. Thus, we finish our induction.
Therefore, Kristoff can carry those 18 blocks of ice and be certain that for any p+q≤a1+⋯+a18=2396, there are two disjoint subsets I,J⊆{1,…,18} such that ∑α∈Iaα=p and ∑α∈Jaα=q. In other words, he can deliver the amount of ice both Anna and Elsa demand.