/export/starexec/sandbox2/solver/bin/starexec_run_default /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES Problem 1: (VAR m n x y) (RULES app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ) Problem 1: Innermost Equivalent Processor: -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x -> The term rewriting system is non-overlaping or locally confluent overlay system. Therefore, innermost termination implies termination. Problem 1: Dependency Pairs Processor: -> Pairs: APP(add(n,x),y) -> APP(x,y) HIGH(n,add(m,x)) -> IF_HIGH(le(m,n),n,add(m,x)) HIGH(n,add(m,x)) -> LE(m,n) IF_HIGH(false,n,add(m,x)) -> HIGH(n,x) IF_HIGH(true,n,add(m,x)) -> HIGH(n,x) IF_LOW(false,n,add(m,x)) -> LOW(n,x) IF_LOW(true,n,add(m,x)) -> LOW(n,x) IF_QS(false,x,n,y) -> APP(quicksort(x),add(n,quicksort(y))) IF_QS(false,x,n,y) -> QUICKSORT(x) IF_QS(false,x,n,y) -> QUICKSORT(y) LE(s(x),s(y)) -> LE(x,y) LOW(n,add(m,x)) -> IF_LOW(le(m,n),n,add(m,x)) LOW(n,add(m,x)) -> LE(m,n) QUICKSORT(x) -> HEAD(x) QUICKSORT(x) -> HIGH(head(x),tail(x)) QUICKSORT(x) -> IF_QS(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) QUICKSORT(x) -> ISEMPTY(x) QUICKSORT(x) -> LOW(head(x),tail(x)) QUICKSORT(x) -> TAIL(x) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x Problem 1: SCC Processor: -> Pairs: APP(add(n,x),y) -> APP(x,y) HIGH(n,add(m,x)) -> IF_HIGH(le(m,n),n,add(m,x)) HIGH(n,add(m,x)) -> LE(m,n) IF_HIGH(false,n,add(m,x)) -> HIGH(n,x) IF_HIGH(true,n,add(m,x)) -> HIGH(n,x) IF_LOW(false,n,add(m,x)) -> LOW(n,x) IF_LOW(true,n,add(m,x)) -> LOW(n,x) IF_QS(false,x,n,y) -> APP(quicksort(x),add(n,quicksort(y))) IF_QS(false,x,n,y) -> QUICKSORT(x) IF_QS(false,x,n,y) -> QUICKSORT(y) LE(s(x),s(y)) -> LE(x,y) LOW(n,add(m,x)) -> IF_LOW(le(m,n),n,add(m,x)) LOW(n,add(m,x)) -> LE(m,n) QUICKSORT(x) -> HEAD(x) QUICKSORT(x) -> HIGH(head(x),tail(x)) QUICKSORT(x) -> IF_QS(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) QUICKSORT(x) -> ISEMPTY(x) QUICKSORT(x) -> LOW(head(x),tail(x)) QUICKSORT(x) -> TAIL(x) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Strongly Connected Components: ->->Cycle: ->->-> Pairs: LE(s(x),s(y)) -> LE(x,y) ->->-> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->->Cycle: ->->-> Pairs: IF_LOW(false,n,add(m,x)) -> LOW(n,x) IF_LOW(true,n,add(m,x)) -> LOW(n,x) LOW(n,add(m,x)) -> IF_LOW(le(m,n),n,add(m,x)) ->->-> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->->Cycle: ->->-> Pairs: HIGH(n,add(m,x)) -> IF_HIGH(le(m,n),n,add(m,x)) IF_HIGH(false,n,add(m,x)) -> HIGH(n,x) IF_HIGH(true,n,add(m,x)) -> HIGH(n,x) ->->-> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->->Cycle: ->->-> Pairs: APP(add(n,x),y) -> APP(x,y) ->->-> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->->Cycle: ->->-> Pairs: IF_QS(false,x,n,y) -> QUICKSORT(x) IF_QS(false,x,n,y) -> QUICKSORT(y) QUICKSORT(x) -> IF_QS(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) ->->-> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x The problem is decomposed in 5 subproblems. Problem 1.1: Subterm Processor: -> Pairs: LE(s(x),s(y)) -> LE(x,y) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Projection: pi(LE) = 1 Problem 1.1: SCC Processor: -> Pairs: Empty -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Strongly Connected Components: There is no strongly connected component The problem is finite. Problem 1.2: Subterm Processor: -> Pairs: IF_LOW(false,n,add(m,x)) -> LOW(n,x) IF_LOW(true,n,add(m,x)) -> LOW(n,x) LOW(n,add(m,x)) -> IF_LOW(le(m,n),n,add(m,x)) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Projection: pi(IF_LOW) = 3 pi(LOW) = 2 Problem 1.2: SCC Processor: -> Pairs: LOW(n,add(m,x)) -> IF_LOW(le(m,n),n,add(m,x)) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Strongly Connected Components: There is no strongly connected component The problem is finite. Problem 1.3: Subterm Processor: -> Pairs: HIGH(n,add(m,x)) -> IF_HIGH(le(m,n),n,add(m,x)) IF_HIGH(false,n,add(m,x)) -> HIGH(n,x) IF_HIGH(true,n,add(m,x)) -> HIGH(n,x) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Projection: pi(HIGH) = 2 pi(IF_HIGH) = 3 Problem 1.3: SCC Processor: -> Pairs: HIGH(n,add(m,x)) -> IF_HIGH(le(m,n),n,add(m,x)) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Strongly Connected Components: There is no strongly connected component The problem is finite. Problem 1.4: Subterm Processor: -> Pairs: APP(add(n,x),y) -> APP(x,y) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Projection: pi(APP) = 1 Problem 1.4: SCC Processor: -> Pairs: Empty -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Strongly Connected Components: There is no strongly connected component The problem is finite. Problem 1.5: Reduction Pairs Processor: -> Pairs: IF_QS(false,x,n,y) -> QUICKSORT(x) IF_QS(false,x,n,y) -> QUICKSORT(y) QUICKSORT(x) -> IF_QS(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x -> Usable rules: head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil tail(add(n,x)) -> x ->Interpretation type: Linear ->Coefficients: All rationals ->Dimension: 1 ->Bound: 4 ->Interpretation: [head](X) = 4/3.X [high](X1,X2) = X2 [if_high](X1,X2,X3) = X3 [if_low](X1,X2,X3) = X3 [isempty](X) = 1/3.X + 1/4 [le](X1,X2) = 3/2 [low](X1,X2) = X2 [tail](X) = 1/3.X [0] = 1/3 [add](X1,X2) = 3.X1 + 4.X2 + 4 [false] = 3/4 [nil] = 3 [s](X) = 2/3.X + 4 [true] = 3/4 [IF_QS](X1,X2,X3,X4) = 1/4.X1 + 1/4.X2 + 1/4.X4 + 1/2 [QUICKSORT](X) = 1/4.X + 2/3 Problem 1.5: SCC Processor: -> Pairs: IF_QS(false,x,n,y) -> QUICKSORT(y) QUICKSORT(x) -> IF_QS(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Strongly Connected Components: ->->Cycle: ->->-> Pairs: IF_QS(false,x,n,y) -> QUICKSORT(y) QUICKSORT(x) -> IF_QS(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) ->->-> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x Problem 1.5: Reduction Pairs Processor: -> Pairs: IF_QS(false,x,n,y) -> QUICKSORT(y) QUICKSORT(x) -> IF_QS(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x -> Usable rules: head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil tail(add(n,x)) -> x ->Interpretation type: Linear ->Coefficients: All rationals ->Dimension: 1 ->Bound: 2 ->Interpretation: [head](X) = 2.X + 1/2 [high](X1,X2) = X2 [if_high](X1,X2,X3) = X3 [if_low](X1,X2,X3) = 1/2.X1 + 2.X3 [isempty](X) = 1/2.X + 1 [le](X1,X2) = 2 [low](X1,X2) = 2.X2 + 1 [tail](X) = 1/2.X + 1/2 [0] = 0 [add](X1,X2) = X1 + 2.X2 + 2 [false] = 2 [nil] = 2 [s](X) = 2.X + 2 [true] = 0 [IF_QS](X1,X2,X3,X4) = X1 + X4 + 1/2 [QUICKSORT](X) = X + 2 Problem 1.5: SCC Processor: -> Pairs: QUICKSORT(x) -> IF_QS(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) -> Rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil,y) -> y head(add(n,x)) -> n high(n,add(m,x)) -> if_high(le(m,n),n,add(m,x)) high(n,nil) -> nil if_high(false,n,add(m,x)) -> add(m,high(n,x)) if_high(true,n,add(m,x)) -> high(n,x) if_low(false,n,add(m,x)) -> low(n,x) if_low(true,n,add(m,x)) -> add(m,low(n,x)) if_qs(false,x,n,y) -> app(quicksort(x),add(n,quicksort(y))) if_qs(true,x,n,y) -> nil isempty(add(n,x)) -> false isempty(nil) -> true le(0,y) -> true le(s(x),0) -> false le(s(x),s(y)) -> le(x,y) low(n,add(m,x)) -> if_low(le(m,n),n,add(m,x)) low(n,nil) -> nil quicksort(x) -> if_qs(isempty(x),low(head(x),tail(x)),head(x),high(head(x),tail(x))) tail(add(n,x)) -> x ->Strongly Connected Components: There is no strongly connected component The problem is finite.