Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/hoca/flatten)

The rewrite relation of the following TRS is considered.

walk#1(Leaf(x2)) cons_x(x2) (1)
walk#1(Node(x5,x3)) comp_f_g(walk#1(x5),walk#1(x3)) (2)
comp_f_g#1(comp_f_g(x4,x5),comp_f_g(x2,x3),x1) comp_f_g#1(x4,x5,comp_f_g#1(x2,x3,x1)) (3)
comp_f_g#1(comp_f_g(x7,x9),cons_x(x2),x4) comp_f_g#1(x7,x9,Cons(x2,x4)) (4)
comp_f_g#1(cons_x(x2),comp_f_g(x5,x7),x3) Cons(x2,comp_f_g#1(x5,x7,x3)) (5)
comp_f_g#1(cons_x(x5),cons_x(x2),x4) Cons(x5,Cons(x2,x4)) (6)
main(Leaf(x4)) Cons(x4,Nil) (7)
main(Node(x9,x5)) comp_f_g#1(walk#1(x9),walk#1(x5),Nil) (8)
The evaluation strategy is innermost.

Property / Task

Determine bounds on the runtime complexity.

Answer / Result

An upperbound for the complexity is O(n).

Proof (by AProVE @ termCOMP 2023)

1 Bounds

The given TRS is match-(raise)-bounded by 2. This is shown by the following automaton.