function herman() { int x1 := 0; int x2 := 0; int x3 := 0; int x4 := 0; int x5 := 0; int x6 := 0; int x7 := 0; int x8 := 0; int x9 := 0; int x10 := 0; int x11 := 0; int x12 := 0; int x13 := 0; int x14 := 0; int x15 := 0; int x16 := 0; int x17 := 0; int x18 := 0; int x19 := 0; int x20 := 0; int x21 := 0; int oldx1 := 0; int oldx2 := 0; int oldx3 := 0; int oldx4 := 0; int oldx5 := 0; int oldx6 := 0; int oldx7 := 0; int oldx8 := 0; int oldx9 := 0; int oldx10 := 0; int oldx11 := 0; int oldx12 := 0; int oldx13 := 0; int oldx14 := 0; int oldx15 := 0; int oldx16 := 0; int oldx17 := 0; int oldx18 := 0; int oldx19 := 0; int oldx20 := 0; int oldx21 := 0; // determine starting token setup on the ring. {x1 := 0;} [] {x1 := 1;} {x2 := 0;} [] {x2 := 1;} {x3 := 0;} [] {x3 := 1;} {x4 := 0;} [] {x4 := 1;} {x5 := 0;} [] {x5 := 1;} {x6 := 0;} [] {x6 := 1;} {x7 := 0;} [] {x7 := 1;} {x8 := 0;} [] {x8 := 1;} {x9 := 0;} [] {x9 := 1;} {x10 := 0;} [] {x10 := 1;} {x11 := 0;} [] {x11 := 1;} {x12 := 0;} [] {x12 := 1;} {x13 := 0;} [] {x13 := 1;} {x14 := 0;} [] {x14 := 1;} {x15 := 0;} [] {x15 := 1;} {x16 := 0;} [] {x16 := 1;} {x17 := 0;} [] {x17 := 1;} {x18 := 0;} [] {x18 := 1;} {x19 := 0;} [] {x19 := 1;} {x20 := 0;} [] {x20 := 1;} {x21 := 0;} [] {x21 := 1;} // finds a ring configuration with exactly one token in the ring. while((x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13 + x14 + x15 + x16 + x17 + x18 + x19 + x20 + x21) != 1) { oldx1 := x1; oldx2 := x2; oldx3 := x3; oldx4 := x4; oldx5 := x5; oldx6 := x6; oldx7 := x7; oldx8 := x8; oldx9 := x9; oldx10 := x10; oldx11 := x11; oldx12 := x12; oldx13 := x13; oldx14 := x14; oldx15 := x15; oldx16 := x16; oldx17 := x17; oldx18 := x18; oldx19 := x19; oldx20 := x20; oldx21 := x21; if(x1 = oldx21) { {x1 := 0;} [0.5] {x1 := 1;} } else { x1 := oldx21; } oldx21 := 0; if(x2 = oldx1) { {x2 := 0;} [0.5] {x2 := 1;} } else { x2 := oldx1; } oldx1 := 0; if(x3 = oldx2) { {x3 := 0;} [0.5] {x3 := 1;} } else { x3 := oldx2; } oldx2 := 0; if(x4 = oldx3) { {x4 := 0;} [0.5] {x4 := 1;} } else { x4 := oldx3; } oldx3 := 0; if(x5 = oldx4) { {x5 := 0;} [0.5] {x5 := 1;} } else { x5 := oldx4; } oldx4 := 0; if(x6 = oldx5) { {x6 := 0;} [0.5] {x6 := 1;} } else { x6 := oldx5; } oldx5 := 0; if(x7 = oldx6) { {x7 := 0;} [0.5] {x7 := 1;} } else { x7 := oldx6; } oldx6 := 0; if(x8 = oldx7) { {x7 := 0;} [0.5] {x7 := 1;} } else { x8 := oldx7; } oldx7 := 0; if(x9 = oldx8) { {x9 := 0;} [0.5] {x9 := 1;} } else { x9 := oldx8; } oldx8 := 0; if(x10 = oldx9) { {x10 := 0;} [0.5] {x10 := 1;} } else { x10 := oldx9; } oldx9 := 0; if(x11 = oldx10) { {x11 := 0;} [0.5] {x11 := 1;} } else { x11 := oldx10; } oldx10 := 0; if(x12 = oldx11) { {x12 := 0;} [0.5] {x12 := 1;} } else { x12 := oldx11; } oldx11 := 0; if(x13 = oldx12) { {x13 := 0;} [0.5] {x13 := 1;} } else { x13 := oldx12; } oldx12 := 0; if(x14 = oldx13) { {x14 := 0;} [0.5] {x14 := 1;} } else { x14 := oldx13; } oldx13 := 0; if(x15 = oldx14) { {x15 := 0;} [0.5] {x15 := 1;} } else { x15 := oldx14; } oldx14 := 0; if(x16 = oldx15) { {x16 := 0;} [0.5] {x16 := 1;} } else { x16 := oldx15; } oldx15 := 0; if(x17 = oldx16) { {x17 := 0;} [0.5] {x17 := 1;} } else { x17 := oldx16; } oldx16 := 0; if(x18 = oldx17) { {x18 := 0;} [0.5] {x18 := 1;} } else { x18 := oldx17; } oldx17 := 0; if(x19 = oldx18) { {x19 := 0;} [0.5] {x19 := 1;} } else { x19 := oldx18; } oldx18 := 0; if(x20 = oldx19) { {x20 := 0;} [0.5] {x20 := 1;} } else { x20 := oldx19; } oldx19 := 0; if(x21 = oldx19) { {x21 := 0;} [0.5] {x21 := 1;} } else { x21 := oldx20; } oldx20 := 0; } }