Barbanel–Brams moving-knives procedure

The Barbanel–Brams rotating-knife procedure is a procedure for envy-free cake-cutting of a cake among three partners. It makes only two cuts, so each partner receives a single connected piece.

Its main advantage over the earlier Stromquist moving-knives procedure is that it requires only two moving knives, instead of four. The earlier Robertson–Webb rotating-knife procedure requires only one moving knife, but it works only for a two-dimensional cake, while the Barbanel–Brams procedure works also for a one-dimensional cake.

Procedure
Initially, each partner marks a point such that the cake to its left is worth for them exactly 1/3. The leftmost mark is selected. Suppose this mark belongs to Alice. Alice is then asked to mark another point such that the cake to its left is worth for her exactly 2/3. So now the cake is divided to three pieces that are equal for Alice.

Bob and Carl are asked to evaluate the two rightmost pieces. There are several cases:


 * 1) Each of Bob and Carl prefers a different piece. Then, each receives his preferred piece, and Alice gets the leftmost piece.
 * 2) Both Bob and Carl prefer the middle piece. Alice places two knives in the two endpoints of the middle piece and moves them inwards simultaneously, such that the two external pieces remain equal in her eyes. The value of the middle piece shrinks until, at some point, either Bob or Carl thinks it is equal to an external piece. The first that thinks so shouts "stop" and receives an external piece; Alice receives the other external piece and the non-shouter receives the middle piece.
 * 3) Both Bob and Carl prefer the rightmost piece. Alice places two knives in the two endpoints of the middle piece and moves them rightwards simultaneously, such that the two leftmost pieces remain equal in her eyes. The value of the rightmost piece shrinks until, at some point, either Bob or Carl thinks it is equal to one of the leftmost pieces. The first that thinks so shouts "stop" and receives a leftmost piece; Alice receives the other leftmost piece and the non-shouter receives the rightmost piece.

Dividing a 'bad' cake
The procedure can be adapted for chore division - dividing a cake with a negative value: in the initial step the rightmost cut should be selected instead of the leftmost cut, and in the following steps the directions of movement should be adapted such that the desired piece grows instead of shrinking.