Example
Consider the input B = {a, b} where a = (1,2)(3,4) and b = (1,3)(2,4). Take x = 1 and set T = M = {1}.
Now create a new generation N = {a(1), b(1)} = {2,3} and create the corresponding tree:
Now we reset M = {2,3} and repeat: N = {a(2), a(3), b(2), b(3)}\{1,2,3} = {1, 4, 4, 1}\{1,2,3} = {4}, so we can add the labeled edge [2,4;b]. The following three results.
Next M = {4} and Step 2 gives N = {a(4), b(4)}\{1,2,3,4} is the empty set, so we are done: the above tree on 1, 2, 3, 4 is the entire Schreier tree.