YES Problem 1: (VAR v_NonEmpty:S x:S y:S) (RULES id_inc(x:S) -> s(x:S) id_inc(x:S) -> x:S if(ffalse,x:S,y:S) -> y:S if(ttrue,x:S,y:S) -> rand(p(x:S),id_inc(y:S)) nonZero(0) -> ffalse nonZero(s(x:S)) -> ttrue p(0) -> 0 p(s(x:S)) -> x:S rand(x:S,y:S) -> if(nonZero(x:S),x:S,y:S) random(x:S) -> rand(x:S,0) ) Problem 1: Dependency Pairs Processor: -> Pairs: IF(ttrue,x:S,y:S) -> ID_INC(y:S) IF(ttrue,x:S,y:S) -> P(x:S) IF(ttrue,x:S,y:S) -> RAND(p(x:S),id_inc(y:S)) RAND(x:S,y:S) -> IF(nonZero(x:S),x:S,y:S) RAND(x:S,y:S) -> NONZERO(x:S) RANDOM(x:S) -> RAND(x:S,0) -> Rules: id_inc(x:S) -> s(x:S) id_inc(x:S) -> x:S if(ffalse,x:S,y:S) -> y:S if(ttrue,x:S,y:S) -> rand(p(x:S),id_inc(y:S)) nonZero(0) -> ffalse nonZero(s(x:S)) -> ttrue p(0) -> 0 p(s(x:S)) -> x:S rand(x:S,y:S) -> if(nonZero(x:S),x:S,y:S) random(x:S) -> rand(x:S,0) Problem 1: SCC Processor: -> Pairs: IF(ttrue,x:S,y:S) -> ID_INC(y:S) IF(ttrue,x:S,y:S) -> P(x:S) IF(ttrue,x:S,y:S) -> RAND(p(x:S),id_inc(y:S)) RAND(x:S,y:S) -> IF(nonZero(x:S),x:S,y:S) RAND(x:S,y:S) -> NONZERO(x:S) RANDOM(x:S) -> RAND(x:S,0) -> Rules: id_inc(x:S) -> s(x:S) id_inc(x:S) -> x:S if(ffalse,x:S,y:S) -> y:S if(ttrue,x:S,y:S) -> rand(p(x:S),id_inc(y:S)) nonZero(0) -> ffalse nonZero(s(x:S)) -> ttrue p(0) -> 0 p(s(x:S)) -> x:S rand(x:S,y:S) -> if(nonZero(x:S),x:S,y:S) random(x:S) -> rand(x:S,0) ->Strongly Connected Components: ->->Cycle: ->->-> Pairs: IF(ttrue,x:S,y:S) -> RAND(p(x:S),id_inc(y:S)) RAND(x:S,y:S) -> IF(nonZero(x:S),x:S,y:S) ->->-> Rules: id_inc(x:S) -> s(x:S) id_inc(x:S) -> x:S if(ffalse,x:S,y:S) -> y:S if(ttrue,x:S,y:S) -> rand(p(x:S),id_inc(y:S)) nonZero(0) -> ffalse nonZero(s(x:S)) -> ttrue p(0) -> 0 p(s(x:S)) -> x:S rand(x:S,y:S) -> if(nonZero(x:S),x:S,y:S) random(x:S) -> rand(x:S,0) Problem 1: Reduction Pair Processor: -> Pairs: IF(ttrue,x:S,y:S) -> RAND(p(x:S),id_inc(y:S)) RAND(x:S,y:S) -> IF(nonZero(x:S),x:S,y:S) -> Rules: id_inc(x:S) -> s(x:S) id_inc(x:S) -> x:S if(ffalse,x:S,y:S) -> y:S if(ttrue,x:S,y:S) -> rand(p(x:S),id_inc(y:S)) nonZero(0) -> ffalse nonZero(s(x:S)) -> ttrue p(0) -> 0 p(s(x:S)) -> x:S rand(x:S,y:S) -> if(nonZero(x:S),x:S,y:S) random(x:S) -> rand(x:S,0) -> Usable rules: id_inc(x:S) -> s(x:S) id_inc(x:S) -> x:S nonZero(0) -> ffalse nonZero(s(x:S)) -> ttrue p(0) -> 0 p(s(x:S)) -> x:S ->Interpretation type: Linear ->Coefficients: All rationals ->Dimension: 1 ->Bound: 2 ->Interpretation: [id_inc](X) = 2.X + 1/2 [nonZero](X) = X + 1/2 [p](X) = 1/2.X [0] = 0 [false] = 0 [s](X) = 2.X + 1/2 [true] = 1 [IF](X1,X2,X3) = X1 + X2 [RAND](X1,X2) = 2.X1 + 1/2 Problem 1: SCC Processor: -> Pairs: RAND(x:S,y:S) -> IF(nonZero(x:S),x:S,y:S) -> Rules: id_inc(x:S) -> s(x:S) id_inc(x:S) -> x:S if(ffalse,x:S,y:S) -> y:S if(ttrue,x:S,y:S) -> rand(p(x:S),id_inc(y:S)) nonZero(0) -> ffalse nonZero(s(x:S)) -> ttrue p(0) -> 0 p(s(x:S)) -> x:S rand(x:S,y:S) -> if(nonZero(x:S),x:S,y:S) random(x:S) -> rand(x:S,0) ->Strongly Connected Components: There is no strongly connected component The problem is finite.