YES(?, a + b + 3) Initial complexity problem: 1: T: (?, 1) div(a, b) -> end(a, b) [ 0 >= a ] (?, 1) div(a, b) -> end(a, b) [ a >= b ] (?, 1) div(a, b) -> div(a, b - a) [ b >= a + 1 /\ a >= 1 ] (1, 1) start(a, b) -> div(a, b) start location: start leaf cost: 0 Repeatedly removing leaves of the complexity graph in problem 1 produces the following problem: 2: T: (?, 1) div(a, b) -> div(a, b - a) [ b >= a + 1 /\ a >= 1 ] (1, 1) start(a, b) -> div(a, b) start location: start leaf cost: 2 A polynomial rank function with Pol(div) = -V_1 + V_2 Pol(start) = -V_1 + V_2 orients all transitions weakly and the transition div(a, b) -> div(a, b - a) [ b >= a + 1 /\ a >= 1 ] strictly and produces the following problem: 3: T: (a + b, 1) div(a, b) -> div(a, b - a) [ b >= a + 1 /\ a >= 1 ] (1, 1) start(a, b) -> div(a, b) start location: start leaf cost: 2 Complexity upper bound a + b + 3 Time: 0.085 sec (SMT: 0.082 sec)