MianKing has two labeled unrooted trees SSS,TTT with nnn nodes and he wants to transform SSS to TTT by some operations. In each operation, MianKing can select four distinct nodes x,y,z,wx,y,z,wx,y,z,w which forms a path {(x,y),(y,z),(z,w)}{(x,y),(y,z),(z,w)}{(x,y),(y,z),(z,w)} in the tree SSS. Then he removes edges {(x,y),(y,z),(z,w)}{(x,y),(y,z),(z,w)}{(x,y),(y,z),(z,w)} from SSS , chooses three new edges whose endpoints ∈{x,y,z,w}in {x,y,z,w}∈{x,y,z,w} and adds these new edges to SSS. MianKing has to guarantee that SSS is still a tree after this operation. Now you need to help MianKing to transform SSS to TTT within 10410^4104 operations.
MianKing has two labeled unrooted trees SSS, TTT with nnn nodes and he wants to transform SSS to TTT by some operations. In each operation, MianKing can select four distinct nodes x,y,z,wx,y,z,wx,y,z,w which forms a path {(x,y),(y,z),(z,w)}{(x,y),(y,z),(z,w)}{(x,y),(y,z),(z,w)} in the tree SSS. Then he removes edges {(x,y),(y,z),(z,w)}{(x,y),(y,z),(z,w)}{(x,y),(y,z),(z,w)} from SSS , chooses three new edges whose endpoints ∈{x,y,z,w}in {x,y,z,w}∈{x,y,z,w} and adds these new edges to SSS. MianKing has to guarantee that SSS is still a tree after this operation. Now you need to help MianKing to transform SSS to TTT within 10410^4104 operations.