P=[(F+T)*Cc*H*(Cte/Cty) - G]/D
P = probability that it will flip this turn
F = # foreignors, with resistors counting double
T = # working tiles under foreign control (out of the max of 21, no matter what the cultural
boundaries are atm)
Cc = 2 if foreign civ has more local culture than you, 1 otherwise
H = .5 for WLTKD, 2 for disorder, 1 otherwise
Cte = Total culture of the foreign civ
Cty = Total culture of your civ
G = # garrison units ( n / d )
D = factor based on relative distance to capitals
Now reorganizing this gives the required garrison as:
G = (F+T)*Cc*H*(Cte/Cty)
F + T = 26, Cc = 1, H = 1, (Cte/Cty) = 0.25
G = (F+T)*Cc*H*(Cte/Cty) = 6.5 , so 7 troops will stop flips.
Calculating P:
P = ((26 * 0.25) - 16)/D , which is less than zero.