Fixed row and column sums need the diagonal value to select the exact grid. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Diagonal five selects the left-shifted grid
Hold rows 4, 8 and columns 5, 7. Diagonal 5 accepts grid 1, 3; 4, 4.
1+4=5
Diagonal seven selects the middle grid
The same rows and columns with diagonal 7 accept cells 2, 2; 3, 5.
2+5=7
Diagonal nine selects the right-shifted grid
Diagonal 9 accepts cells 3, 1; 2, 6. Each row keeps zero residuals.