Trial and improvement:
K is even
As they are children they won't be that old
Let K=2
S=1
T=0 doesn't
work
Let K=4
S=2
T=3
B=1 but total
of boys does not equal total of girls
Let K=6
S=3
T=5
B=3 but total
of boys does not equal total of girls
Let K=8
S=4
T=7
B=5 total of
boys does equal total of girls
Algebraically:
| B=T-2 | (I) |
| T+B = K+S | (II) |
| K=2S | (III) |
| T-1 = 2(S-1) T= 2S -1 | (IV) |
| T+T-2=2S+S | From(I II III) |
| 2T - 2 = 3S | |
| (4S - 2) -2 = 3S | Sub for T from (IV) |
| From (III) | |
| From (IV) | |
| From (I) |