This is a funny one to have in the discrete math section, but then again it’s hard to fence off discrete math since it goes into the weeds often.

But you are right that b_1, b_2, b_3 are 4, 2, 3

I think the biggest thing with these concepts is to step back and not get too caught in the formula at first, try to see the high-level of what it does. Then if you have an example, try to follow through an example with the end goal in mind.

I’ll walk through my process (I didn’t know this theorem but that’s an even better indicator of the discovery process).

- What is it aiming to do? Given a certain condition (a set of numbers that is pairwise prime), there is a single unique solution X to some system of equations in the form of X ≡ b_1 (mod n_1), …, X ≡ b_n (mod n_m).

Meaning X acts as a sort of universal truth if we have two sets of information (the pairwise coprime set, and some b_i’s which are variable).

To put it in more real life terms, we can think as each of the coprime number as capacities to m different boxes. For each box, we are given a hint (for box_i, b_i items will NOT fit that box).

Meaning, the system of equations is really telling us, there is a single quantity of items, that if you try to stuff them into each box alone, will yield the given remainders. As a bonus we know the range of the number is bound by the product of the coprime numbers (a nice quality to quantify how computationally expensive things might be).

So back to the problem, we have a box1 of capacity 3, box2 of capacity 4, box3 of capacity 7. Somebody came in yesterday and tried to pack exactly *a* items into box1, they said dang I have 4 left over. They took them all out and tried the same with box2, they said dang i have 2 left over. And so forth. The leftover amount in each attempt is b_i. (so the b’s are leftovers, or remainders)

Now for the solution

a ≡ 4 (mod 3)

a ≡ 2 (mod 4)

a ≡ 3 (mod 7)

N_i is the product of all the coprime numbers except the i’th one. So

N_1 = 28, N_2 = 21, N_3 = 12, from this we know

28 * y_1 ≡ 1 (mod 3)

21 * y_2 ≡ 1 (mod 4)

12 * y_3 ≡ 1 (mod 7)

A little algebra will yield y_1 = 1, y_2 = 1, y_3 = 3

so finally

a = ((4 * 28 * 1) + (2 * 21 * 1) + (3 * 12 * 3)) (mod 84)

(84 is 3*4*7)

which means a = 10. The person was trying to fit 10 items into the boxes.

Now, how does 10 ≡ 4 (mod 3) make sense given the analogy?

It turns out 10 ≡ 4 (mod 3) is the same as 10 ≡ 1 (mod 3). Which can only be know after the fact. I know this breaks the pureness of the analogy but that’s life hahahaha.