w = 400 x+800( 12-x)+300( 10-x)+500(x-4)=-200 x+ 10600
Domain of definition
; 4≤x≤ 10
W is
Descending function
When x= 10, w has a minimum value =8600.
That is, 10 was transferred from Shanghai to a city, and 2 were transferred from Shanghai to b city. Hangzhou turns to a city 0 and Hangzhou turns to b city 6.