(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
bits(0) → 0
bits(s(x)) → s(bits(half(s(x))))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
bits(0) → 0
bits(s(z0)) → s(bits(half(s(z0))))
Tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(z0)) → c4(BITS(half(s(z0))), HALF(s(z0)))
S tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(z0)) → c4(BITS(half(s(z0))), HALF(s(z0)))
K tuples:none
Defined Rule Symbols:

half, bits

Defined Pair Symbols:

HALF, BITS

Compound Symbols:

c2, c4

(3) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace BITS(s(z0)) → c4(BITS(half(s(z0))), HALF(s(z0))) by

BITS(s(0)) → c4(BITS(0), HALF(s(0)))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
BITS(s(x0)) → c4

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
bits(0) → 0
bits(s(z0)) → s(bits(half(s(z0))))
Tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(0)) → c4(BITS(0), HALF(s(0)))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
BITS(s(x0)) → c4
S tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(0)) → c4(BITS(0), HALF(s(0)))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
BITS(s(x0)) → c4
K tuples:none
Defined Rule Symbols:

half, bits

Defined Pair Symbols:

HALF, BITS

Compound Symbols:

c2, c4, c4

(5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing nodes:

BITS(s(0)) → c4(BITS(0), HALF(s(0)))
BITS(s(x0)) → c4

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
bits(0) → 0
bits(s(z0)) → s(bits(half(s(z0))))
Tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
S tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
K tuples:none
Defined Rule Symbols:

half, bits

Defined Pair Symbols:

HALF, BITS

Compound Symbols:

c2, c4

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
We considered the (Usable) Rules:

half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
And the Tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [4]   
POL(BITS(x1)) = [4]x1   
POL(HALF(x1)) = [4]   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(half(x1)) = x1   
POL(s(x1)) = [4] + x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
bits(0) → 0
bits(s(z0)) → s(bits(half(s(z0))))
Tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
S tuples:

HALF(s(s(z0))) → c2(HALF(z0))
K tuples:

BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
Defined Rule Symbols:

half, bits

Defined Pair Symbols:

HALF, BITS

Compound Symbols:

c2, c4

(9) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

HALF(s(s(z0))) → c2(HALF(z0))
We considered the (Usable) Rules:

half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
And the Tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(BITS(x1)) = x12   
POL(HALF(x1)) = [2]x1   
POL(c2(x1)) = x1   
POL(c4(x1, x2)) = x1 + x2   
POL(half(x1)) = x1   
POL(s(x1)) = [2] + x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
bits(0) → 0
bits(s(z0)) → s(bits(half(s(z0))))
Tuples:

HALF(s(s(z0))) → c2(HALF(z0))
BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
S tuples:none
K tuples:

BITS(s(s(z0))) → c4(BITS(s(half(z0))), HALF(s(s(z0))))
HALF(s(s(z0))) → c2(HALF(z0))
Defined Rule Symbols:

half, bits

Defined Pair Symbols:

HALF, BITS

Compound Symbols:

c2, c4

(11) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(12) BOUNDS(O(1), O(1))