1147.77/291.91 WORST_CASE(Omega(n^1), ?) 1148.12/291.94 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 1148.12/291.94 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1148.12/291.94 1148.12/291.94 1148.12/291.94 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 1148.12/291.94 1148.12/291.94 (0) CpxTRS 1148.12/291.94 (1) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 1148.12/291.94 (2) TRS for Loop Detection 1148.12/291.94 (3) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 1148.12/291.94 (4) BEST 1148.12/291.94 (5) proven lower bound 1148.12/291.94 (6) LowerBoundPropagationProof [FINISHED, 0 ms] 1148.12/291.94 (7) BOUNDS(n^1, INF) 1148.12/291.94 (8) TRS for Loop Detection 1148.12/291.94 1148.12/291.94 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (0) 1148.12/291.94 Obligation: 1148.12/291.94 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 1148.12/291.94 1148.12/291.94 1148.12/291.94 The TRS R consists of the following rules: 1148.12/291.94 1148.12/291.94 average(x, y) -> if(ge(x, y), x, y) 1148.12/291.94 if(true, x, y) -> averIter(y, x, y) 1148.12/291.94 if(false, x, y) -> averIter(x, y, x) 1148.12/291.94 averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) 1148.12/291.94 ifIter(true, x, y, z) -> z 1148.12/291.94 ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0))) 1148.12/291.94 append(nil, y) -> y 1148.12/291.94 append(cons(n, x), y) -> cons(n, app(x, y)) 1148.12/291.94 low(n, nil) -> nil 1148.12/291.94 low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) 1148.12/291.94 if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) 1148.12/291.94 if_low(true, n, cons(m, x)) -> low(n, x) 1148.12/291.94 high(n, nil) -> nil 1148.12/291.94 high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) 1148.12/291.94 if_high(false, n, cons(m, x)) -> high(n, x) 1148.12/291.94 if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) 1148.12/291.94 quicksort(x) -> ifquick(isempty(x), x) 1148.12/291.94 ifquick(true, x) -> nil 1148.12/291.94 ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) 1148.12/291.94 plus(0, y) -> y 1148.12/291.94 plus(s(x), y) -> s(plus(x, y)) 1148.12/291.94 isempty(nil) -> true 1148.12/291.94 isempty(cons(n, x)) -> false 1148.12/291.94 head(nil) -> error 1148.12/291.94 head(cons(n, x)) -> n 1148.12/291.94 tail(nil) -> nil 1148.12/291.94 tail(cons(n, x)) -> x 1148.12/291.94 ge(x, 0) -> true 1148.12/291.94 ge(0, s(y)) -> false 1148.12/291.94 ge(s(x), s(y)) -> ge(x, y) 1148.12/291.94 a -> b 1148.12/291.94 a -> c 1148.12/291.94 1148.12/291.94 S is empty. 1148.12/291.94 Rewrite Strategy: INNERMOST 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (1) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 1148.12/291.94 Transformed a relative TRS into a decreasing-loop problem. 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (2) 1148.12/291.94 Obligation: 1148.12/291.94 Analyzing the following TRS for decreasing loops: 1148.12/291.94 1148.12/291.94 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 1148.12/291.94 1148.12/291.94 1148.12/291.94 The TRS R consists of the following rules: 1148.12/291.94 1148.12/291.94 average(x, y) -> if(ge(x, y), x, y) 1148.12/291.94 if(true, x, y) -> averIter(y, x, y) 1148.12/291.94 if(false, x, y) -> averIter(x, y, x) 1148.12/291.94 averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) 1148.12/291.94 ifIter(true, x, y, z) -> z 1148.12/291.94 ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0))) 1148.12/291.94 append(nil, y) -> y 1148.12/291.94 append(cons(n, x), y) -> cons(n, app(x, y)) 1148.12/291.94 low(n, nil) -> nil 1148.12/291.94 low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) 1148.12/291.94 if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) 1148.12/291.94 if_low(true, n, cons(m, x)) -> low(n, x) 1148.12/291.94 high(n, nil) -> nil 1148.12/291.94 high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) 1148.12/291.94 if_high(false, n, cons(m, x)) -> high(n, x) 1148.12/291.94 if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) 1148.12/291.94 quicksort(x) -> ifquick(isempty(x), x) 1148.12/291.94 ifquick(true, x) -> nil 1148.12/291.94 ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) 1148.12/291.94 plus(0, y) -> y 1148.12/291.94 plus(s(x), y) -> s(plus(x, y)) 1148.12/291.94 isempty(nil) -> true 1148.12/291.94 isempty(cons(n, x)) -> false 1148.12/291.94 head(nil) -> error 1148.12/291.94 head(cons(n, x)) -> n 1148.12/291.94 tail(nil) -> nil 1148.12/291.94 tail(cons(n, x)) -> x 1148.12/291.94 ge(x, 0) -> true 1148.12/291.94 ge(0, s(y)) -> false 1148.12/291.94 ge(s(x), s(y)) -> ge(x, y) 1148.12/291.94 a -> b 1148.12/291.94 a -> c 1148.12/291.94 1148.12/291.94 S is empty. 1148.12/291.94 Rewrite Strategy: INNERMOST 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (3) DecreasingLoopProof (LOWER BOUND(ID)) 1148.12/291.94 The following loop(s) give(s) rise to the lower bound Omega(n^1): 1148.12/291.94 1148.12/291.94 The rewrite sequence 1148.12/291.94 1148.12/291.94 plus(s(x), y) ->^+ s(plus(x, y)) 1148.12/291.94 1148.12/291.94 gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. 1148.12/291.94 1148.12/291.94 The pumping substitution is [x / s(x)]. 1148.12/291.94 1148.12/291.94 The result substitution is [ ]. 1148.12/291.94 1148.12/291.94 1148.12/291.94 1148.12/291.94 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (4) 1148.12/291.94 Complex Obligation (BEST) 1148.12/291.94 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (5) 1148.12/291.94 Obligation: 1148.12/291.94 Proved the lower bound n^1 for the following obligation: 1148.12/291.94 1148.12/291.94 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 1148.12/291.94 1148.12/291.94 1148.12/291.94 The TRS R consists of the following rules: 1148.12/291.94 1148.12/291.94 average(x, y) -> if(ge(x, y), x, y) 1148.12/291.94 if(true, x, y) -> averIter(y, x, y) 1148.12/291.94 if(false, x, y) -> averIter(x, y, x) 1148.12/291.94 averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) 1148.12/291.94 ifIter(true, x, y, z) -> z 1148.12/291.94 ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0))) 1148.12/291.94 append(nil, y) -> y 1148.12/291.94 append(cons(n, x), y) -> cons(n, app(x, y)) 1148.12/291.94 low(n, nil) -> nil 1148.12/291.94 low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) 1148.12/291.94 if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) 1148.12/291.94 if_low(true, n, cons(m, x)) -> low(n, x) 1148.12/291.94 high(n, nil) -> nil 1148.12/291.94 high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) 1148.12/291.94 if_high(false, n, cons(m, x)) -> high(n, x) 1148.12/291.94 if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) 1148.12/291.94 quicksort(x) -> ifquick(isempty(x), x) 1148.12/291.94 ifquick(true, x) -> nil 1148.12/291.94 ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) 1148.12/291.94 plus(0, y) -> y 1148.12/291.94 plus(s(x), y) -> s(plus(x, y)) 1148.12/291.94 isempty(nil) -> true 1148.12/291.94 isempty(cons(n, x)) -> false 1148.12/291.94 head(nil) -> error 1148.12/291.94 head(cons(n, x)) -> n 1148.12/291.94 tail(nil) -> nil 1148.12/291.94 tail(cons(n, x)) -> x 1148.12/291.94 ge(x, 0) -> true 1148.12/291.94 ge(0, s(y)) -> false 1148.12/291.94 ge(s(x), s(y)) -> ge(x, y) 1148.12/291.94 a -> b 1148.12/291.94 a -> c 1148.12/291.94 1148.12/291.94 S is empty. 1148.12/291.94 Rewrite Strategy: INNERMOST 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (6) LowerBoundPropagationProof (FINISHED) 1148.12/291.94 Propagated lower bound. 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (7) 1148.12/291.94 BOUNDS(n^1, INF) 1148.12/291.94 1148.12/291.94 ---------------------------------------- 1148.12/291.94 1148.12/291.94 (8) 1148.12/291.94 Obligation: 1148.12/291.94 Analyzing the following TRS for decreasing loops: 1148.12/291.94 1148.12/291.94 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 1148.12/291.94 1148.12/291.94 1148.12/291.94 The TRS R consists of the following rules: 1148.12/291.94 1148.12/291.94 average(x, y) -> if(ge(x, y), x, y) 1148.12/291.94 if(true, x, y) -> averIter(y, x, y) 1148.12/291.94 if(false, x, y) -> averIter(x, y, x) 1148.12/291.94 averIter(x, y, z) -> ifIter(ge(x, y), x, y, z) 1148.12/291.94 ifIter(true, x, y, z) -> z 1148.12/291.94 ifIter(false, x, y, z) -> averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0))) 1148.12/291.94 append(nil, y) -> y 1148.12/291.94 append(cons(n, x), y) -> cons(n, app(x, y)) 1148.12/291.94 low(n, nil) -> nil 1148.12/291.94 low(n, cons(m, x)) -> if_low(ge(m, n), n, cons(m, x)) 1148.12/291.94 if_low(false, n, cons(m, x)) -> cons(m, low(n, x)) 1148.12/291.94 if_low(true, n, cons(m, x)) -> low(n, x) 1148.12/291.94 high(n, nil) -> nil 1148.12/291.94 high(n, cons(m, x)) -> if_high(ge(m, n), n, cons(m, x)) 1148.12/291.94 if_high(false, n, cons(m, x)) -> high(n, x) 1148.12/291.94 if_high(true, n, cons(m, x)) -> cons(average(m, m), high(n, x)) 1148.12/291.94 quicksort(x) -> ifquick(isempty(x), x) 1148.12/291.94 ifquick(true, x) -> nil 1148.12/291.94 ifquick(false, x) -> append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x))))) 1148.12/291.94 plus(0, y) -> y 1148.12/291.94 plus(s(x), y) -> s(plus(x, y)) 1148.12/291.94 isempty(nil) -> true 1148.12/291.94 isempty(cons(n, x)) -> false 1148.12/291.94 head(nil) -> error 1148.12/291.94 head(cons(n, x)) -> n 1148.12/291.94 tail(nil) -> nil 1148.12/291.94 tail(cons(n, x)) -> x 1148.12/291.94 ge(x, 0) -> true 1148.12/291.94 ge(0, s(y)) -> false 1148.12/291.94 ge(s(x), s(y)) -> ge(x, y) 1148.12/291.94 a -> b 1148.12/291.94 a -> c 1148.12/291.94 1148.12/291.94 S is empty. 1148.12/291.94 Rewrite Strategy: INNERMOST 1148.24/292.06 EOF