The rewrite relation of the following TRS is considered.
and(tt,X) | → | activate(X) | (1) |
plus(N,0) | → | N | (2) |
plus(N,s(M)) | → | s(plus(N,M)) | (3) |
x(N,0) | → | 0 | (4) |
x(N,s(M)) | → | plus(x(N,M),N) | (5) |
activate(X) | → | X | (6) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
and#(tt,z0) |
plus#(z0,0) |
plus#(z0,s(z1)) |
x#(z0,0) |
x#(z0,s(z1)) |
activate#(z0) |
and(tt,z0) | → | activate(z0) | (7) |
activate(z0) | → | z0 | (17) |
and#(tt,z0) | → | c(activate#(z0)) | (8) |
x#(z0,0) | → | c3 | (14) |
activate#(z0) | → | c5 | (18) |
[c(x1)] | = | 1 · x1 + 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[x(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[plus(x1, x2)] | = | 1 · x1 + 0 |
[and#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[plus#(x1, x2)] | = | 0 |
[x#(x1, x2)] | = | 1 · x2 + 0 |
[activate#(x1)] | = | 1 + 1 · x1 |
[0] | = | 1 |
[s(x1)] | = | 1 · x1 + 0 |
[tt] | = | 1 |
and#(tt,z0) | → | c(activate#(z0)) | (8) |
plus#(z0,0) | → | c1 | (10) |
plus#(z0,s(z1)) | → | c2(plus#(z0,z1)) | (12) |
x#(z0,0) | → | c3 | (14) |
x#(z0,s(z1)) | → | c4(plus#(x(z0,z1),z0),x#(z0,z1)) | (16) |
activate#(z0) | → | c5 | (18) |
plus#(z0,0) | → | c1 | (10) |
x#(z0,s(z1)) | → | c4(plus#(x(z0,z1),z0),x#(z0,z1)) | (16) |
[c(x1)] | = | 1 · x1 + 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[x(x1, x2)] | = | 3 + 3 · x1 |
[plus(x1, x2)] | = | 3 + 3 · x2 |
[and#(x1, x2)] | = | 3 + 3 · x1 + 3 · x2 |
[plus#(x1, x2)] | = | 3 |
[x#(x1, x2)] | = | 3 · x2 + 0 |
[activate#(x1)] | = | 3 + 3 · x1 |
[0] | = | 3 |
[s(x1)] | = | 3 + 1 · x1 |
[tt] | = | 1 |
and#(tt,z0) | → | c(activate#(z0)) | (8) |
plus#(z0,0) | → | c1 | (10) |
plus#(z0,s(z1)) | → | c2(plus#(z0,z1)) | (12) |
x#(z0,0) | → | c3 | (14) |
x#(z0,s(z1)) | → | c4(plus#(x(z0,z1),z0),x#(z0,z1)) | (16) |
activate#(z0) | → | c5 | (18) |
plus#(z0,s(z1)) | → | c2(plus#(z0,z1)) | (12) |
[c(x1)] | = | 1 · x1 + 0 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c5] | = | 0 |
[x(x1, x2)] | = | 2 · x1 + 0 + 1 · x2 + 2 · x1 · x2 |
[plus(x1, x2)] | = | 2 + 1 · x1 + 2 · x2 |
[and#(x1, x2)] | = | 2 + 1 · x1 + 2 · x2 + 2 · x2 · x2 + 2 · x1 · x2 + 1 · x1 · x1 |
[plus#(x1, x2)] | = | 2 · x2 + 0 |
[x#(x1, x2)] | = | 2 · x1 · x2 + 0 |
[activate#(x1)] | = | 1 · x1 + 0 + 2 · x1 · x1 |
[0] | = | 0 |
[s(x1)] | = | 2 + 1 · x1 |
[tt] | = | 1 |
and#(tt,z0) | → | c(activate#(z0)) | (8) |
plus#(z0,0) | → | c1 | (10) |
plus#(z0,s(z1)) | → | c2(plus#(z0,z1)) | (12) |
x#(z0,0) | → | c3 | (14) |
x#(z0,s(z1)) | → | c4(plus#(x(z0,z1),z0),x#(z0,z1)) | (16) |
activate#(z0) | → | c5 | (18) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).