Note that we have expressed the algorithm as a decision function that will return true if there exists a binarization of p with fan-out not greater than f , and false otherwise.
the algorithm can easily be modified to return a reduction producing such a binarization, by adding to each endpoint set ∆ ∈ workingSet two pointers to the adjacent endpoint sets that were used to obtain it.