NO
0 QTRS
↳1 QTRS Reverse (⇔, 0 ms)
↳2 QTRS
↳3 DependencyPairsProof (⇔, 13 ms)
↳4 QDP
↳5 DependencyGraphProof (⇔, 0 ms)
↳6 AND
↳7 QDP
↳8 UsableRulesProof (⇔, 0 ms)
↳9 QDP
↳10 MRRProof (⇔, 4 ms)
↳11 QDP
↳12 QDPOrderProof (⇔, 0 ms)
↳13 QDP
↳14 PisEmptyProof (⇔, 0 ms)
↳15 YES
↳16 QDP
↳17 UsableRulesProof (⇔, 0 ms)
↳18 QDP
↳19 MRRProof (⇔, 2 ms)
↳20 QDP
↳21 QDPOrderProof (⇔, 0 ms)
↳22 QDP
↳23 PisEmptyProof (⇔, 0 ms)
↳24 YES
↳25 QDP
↳26 UsableRulesProof (⇔, 0 ms)
↳27 QDP
↳28 DependencyGraphProof (⇔, 0 ms)
↳29 TRUE
↳30 QDP
↳31 UsableRulesProof (⇔, 0 ms)
↳32 QDP
↳33 DependencyGraphProof (⇔, 0 ms)
↳34 TRUE
↳35 QDP
↳36 UsableRulesProof (⇔, 0 ms)
↳37 QDP
↳38 QDPSizeChangeProof (⇔, 0 ms)
↳39 YES
↳40 QDP
↳41 UsableRulesProof (⇔, 0 ms)
↳42 QDP
↳43 QDPSizeChangeProof (⇔, 0 ms)
↳44 YES
↳45 QDP
↳46 UsableRulesProof (⇔, 0 ms)
↳47 QDP
↳48 NonTerminationLoopProof (⇒, 601 ms)
↳49 NO
begin(end(x)) → rewrite(end(x))
begin(a(x)) → rotate(cut(Ca(guess(x))))
begin(b(x)) → rotate(cut(Cb(guess(x))))
guess(a(x)) → Ca(guess(x))
guess(b(x)) → Cb(guess(x))
guess(a(x)) → moveleft(Ba(wait(x)))
guess(b(x)) → moveleft(Bb(wait(x)))
guess(end(x)) → finish(end(x))
Ca(moveleft(Ba(x))) → moveleft(Ba(Aa(x)))
Cb(moveleft(Ba(x))) → moveleft(Ba(Ab(x)))
Ca(moveleft(Bb(x))) → moveleft(Bb(Aa(x)))
Cb(moveleft(Bb(x))) → moveleft(Bb(Ab(x)))
cut(moveleft(Ba(x))) → Da(cut(goright(x)))
cut(moveleft(Bb(x))) → Db(cut(goright(x)))
goright(Aa(x)) → Ca(goright(x))
goright(Ab(x)) → Cb(goright(x))
goright(wait(a(x))) → moveleft(Ba(wait(x)))
goright(wait(b(x))) → moveleft(Bb(wait(x)))
goright(wait(end(x))) → finish(end(x))
Ca(finish(x)) → finish(a(x))
Cb(finish(x)) → finish(b(x))
cut(finish(x)) → finish2(x)
Da(finish2(x)) → finish2(a(x))
Db(finish2(x)) → finish2(b(x))
rotate(finish2(x)) → rewrite(x)
rewrite(a(b(b(a(x))))) → begin(b(a(a(b(x)))))
rewrite(b(a(b(x)))) → begin(a(b(b(b(x)))))
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
END(begin(x)) → END(rewrite(x))
A(guess(x)) → BA(moveleft(x))
B(guess(x)) → BB(moveleft(x))
END(guess(x)) → END(finish(x))
END(guess(x)) → FINISH(x)
BA(moveleft(Ca(x))) → AA(Ba(moveleft(x)))
BA(moveleft(Ca(x))) → BA(moveleft(x))
BA(moveleft(Cb(x))) → AB(Ba(moveleft(x)))
BA(moveleft(Cb(x))) → BA(moveleft(x))
BB(moveleft(Ca(x))) → AA(Bb(moveleft(x)))
BB(moveleft(Ca(x))) → BB(moveleft(x))
BB(moveleft(Cb(x))) → AB(Bb(moveleft(x)))
BB(moveleft(Cb(x))) → BB(moveleft(x))
A(wait(goright(x))) → BA(moveleft(x))
B(wait(goright(x))) → BB(moveleft(x))
END(wait(goright(x))) → END(finish(x))
END(wait(goright(x))) → FINISH(x)
FINISH(Ca(x)) → A(finish(x))
FINISH(Ca(x)) → FINISH(x)
FINISH(Cb(x)) → B(finish(x))
FINISH(Cb(x)) → FINISH(x)
FINISH(cut(x)) → FINISH2(x)
FINISH2(Da(x)) → A(finish2(x))
FINISH2(Da(x)) → FINISH2(x)
FINISH2(Db(x)) → B(finish2(x))
FINISH2(Db(x)) → FINISH2(x)
A(b(b(a(rewrite(x))))) → B(a(a(b(begin(x)))))
A(b(b(a(rewrite(x))))) → A(a(b(begin(x))))
A(b(b(a(rewrite(x))))) → A(b(begin(x)))
A(b(b(a(rewrite(x))))) → B(begin(x))
B(a(b(rewrite(x)))) → B(b(b(a(begin(x)))))
B(a(b(rewrite(x)))) → B(b(a(begin(x))))
B(a(b(rewrite(x)))) → B(a(begin(x)))
B(a(b(rewrite(x)))) → A(begin(x))
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
BB(moveleft(Cb(x))) → BB(moveleft(x))
BB(moveleft(Ca(x))) → BB(moveleft(x))
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
BB(moveleft(Cb(x))) → BB(moveleft(x))
BB(moveleft(Ca(x))) → BB(moveleft(x))
BB(moveleft(Cb(x))) → BB(moveleft(x))
POL(BB(x1)) = x1
POL(Ca(x1)) = 2·x1
POL(Cb(x1)) = 1 + x1
POL(moveleft(x1)) = 2·x1
BB(moveleft(Ca(x))) → BB(moveleft(x))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
BB(moveleft(Ca(x))) → BB(moveleft(x))
POL(BB(x1)) = x1
POL(Ca(x1)) = 1 + x1
POL(moveleft(x1)) = x1
BA(moveleft(Cb(x))) → BA(moveleft(x))
BA(moveleft(Ca(x))) → BA(moveleft(x))
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
BA(moveleft(Cb(x))) → BA(moveleft(x))
BA(moveleft(Ca(x))) → BA(moveleft(x))
BA(moveleft(Cb(x))) → BA(moveleft(x))
POL(BA(x1)) = x1
POL(Ca(x1)) = 2·x1
POL(Cb(x1)) = 1 + x1
POL(moveleft(x1)) = 2·x1
BA(moveleft(Ca(x))) → BA(moveleft(x))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
BA(moveleft(Ca(x))) → BA(moveleft(x))
POL(BA(x1)) = x1
POL(Ca(x1)) = 1 + x1
POL(moveleft(x1)) = x1
B(a(b(rewrite(x)))) → B(b(a(begin(x))))
B(a(b(rewrite(x)))) → B(b(b(a(begin(x)))))
B(a(b(rewrite(x)))) → B(a(begin(x)))
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
B(a(b(rewrite(x)))) → B(b(a(begin(x))))
B(a(b(rewrite(x)))) → B(b(b(a(begin(x)))))
B(a(b(rewrite(x)))) → B(a(begin(x)))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
b(guess(x)) → guess(Cb(x))
b(guess(x)) → wait(Bb(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Ab(goright(x)) → goright(Cb(x))
Aa(goright(x)) → goright(Ca(x))
A(b(b(a(rewrite(x))))) → A(b(begin(x)))
A(b(b(a(rewrite(x))))) → A(a(b(begin(x))))
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
A(b(b(a(rewrite(x))))) → A(b(begin(x)))
A(b(b(a(rewrite(x))))) → A(a(b(begin(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(begin(x)) → guess(Ca(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
a(guess(x)) → wait(Ba(moveleft(x)))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(guess(x)) → guess(Cb(x))
b(guess(x)) → wait(Bb(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Ab(goright(x)) → goright(Cb(x))
Aa(goright(x)) → goright(Ca(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
FINISH2(Db(x)) → FINISH2(x)
FINISH2(Da(x)) → FINISH2(x)
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
FINISH2(Db(x)) → FINISH2(x)
FINISH2(Da(x)) → FINISH2(x)
From the DPs we obtained the following set of size-change graphs:
FINISH(Cb(x)) → FINISH(x)
FINISH(Ca(x)) → FINISH(x)
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
FINISH(Cb(x)) → FINISH(x)
FINISH(Ca(x)) → FINISH(x)
From the DPs we obtained the following set of size-change graphs:
END(wait(goright(x))) → END(finish(x))
END(guess(x)) → END(finish(x))
end(begin(x)) → end(rewrite(x))
a(begin(x)) → guess(Ca(cut(rotate(x))))
b(begin(x)) → guess(Cb(cut(rotate(x))))
a(guess(x)) → guess(Ca(x))
b(guess(x)) → guess(Cb(x))
a(guess(x)) → wait(Ba(moveleft(x)))
b(guess(x)) → wait(Bb(moveleft(x)))
end(guess(x)) → end(finish(x))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Aa(goright(x)) → goright(Ca(x))
Ab(goright(x)) → goright(Cb(x))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
end(wait(goright(x))) → end(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
END(wait(goright(x))) → END(finish(x))
END(guess(x)) → END(finish(x))
finish(Ca(x)) → a(finish(x))
finish(Cb(x)) → b(finish(x))
finish(cut(x)) → finish2(x)
finish2(Da(x)) → a(finish2(x))
finish2(Db(x)) → b(finish2(x))
finish2(rotate(x)) → rewrite(x)
b(begin(x)) → guess(Cb(cut(rotate(x))))
b(guess(x)) → guess(Cb(x))
b(guess(x)) → wait(Bb(moveleft(x)))
b(wait(goright(x))) → wait(Bb(moveleft(x)))
b(a(b(rewrite(x)))) → b(b(b(a(begin(x)))))
a(begin(x)) → guess(Ca(cut(rotate(x))))
Bb(moveleft(Ca(x))) → Aa(Bb(moveleft(x)))
Bb(moveleft(Cb(x))) → Ab(Bb(moveleft(x)))
Bb(moveleft(cut(x))) → goright(cut(Db(x)))
Ab(goright(x)) → goright(Cb(x))
Aa(goright(x)) → goright(Ca(x))
a(guess(x)) → guess(Ca(x))
a(guess(x)) → wait(Ba(moveleft(x)))
a(wait(goright(x))) → wait(Ba(moveleft(x)))
a(b(b(a(rewrite(x))))) → b(a(a(b(begin(x)))))
Ba(moveleft(Ca(x))) → Aa(Ba(moveleft(x)))
Ba(moveleft(Cb(x))) → Ab(Ba(moveleft(x)))
Ba(moveleft(cut(x))) → goright(cut(Da(x)))