Here is a set of three threads returning to their starting positions: We are going work out what is happening in the 3-thread example. The first change switches the position of all three threads. You could think of it as doing 2 swaps in one go (R with B then R with G), and it will always give 2 crossings. A single swap can either result in one crossing: sometimes three crossings: …or So if the number of swaps is even/odd, then so are the crossings. This table records what happened in the example given: Letters in the Number of Number of Order Swaps original cycle swaps crossings order? Start: (G,B,R) - 0 0 Y (R,G,B) (R,B) (R,G) 2 2 Y (B,G,R) (R,B) 3 5 N (B,R,G) (G,R) 4 6 Y
Here is a set of three threads returning to their starting positions: We are going work out what is happening in the 3-thread example. The first change switches the position of all three threads. You could think of it as doing 2 swaps in one go (R with B then R with G), and it will always give 2 crossings. A single swap can either result in one crossing: …or sometimes three crossings: So if the number of swaps is even/odd, then so are the crossings. This table records what happened in the example given: Order Swaps Number of swaps Number of crossings Letters in the original cycle order? Start: (G,B,R) - 0 0 Y (R,G,B) (R,B) (R,G) 2 2 Y (B,G,R) (R,B) 3 5 N (B,R,G) (G,R) 4 6 Y
thebook_compressed.docx