For these insights, the restrictions do not apply to the end lines because oscillations cannot happen between an intermediate line and an end line. See What are Oscillations? for the formal definition of an oscillation.
When referring to the parity of a line, we are referring to the parity of the number of players in that line when a player enters it excluding the entering player.
When a player
Proof
For this proof, we will use induction.
Proposition
Let
Base Case
Let
Inductive Hypothesis
Assume
Inductive Step
We must show
Let
Therefore,
Odd Number of Players
Following the same steps in the proof for even number of players, let's say that
Conclusion
We have shown that if a player enters a line with an even number of players, they will not return to the line they were originally from. We have also shown that the opposite is true: if the line has an odd number of players, the player will return to the line they were originally from.
The parity of the starting line will change on the first pass of the drill. It will remain constant for all subsequent passes.
Proof
On the first pass, the starting line will lose a player. This changes the parity of the starting line because the next time a player enters this line, the number of players in the line excluding the entering player will be of a different parity than the number of players in the line before the first pass. For all following passes, the starting line will receive a player before losing one, so the parity will remain constant.
The parity of all intermediate lines excluding the starting line will remain the same over the course of the drill.
Proof
The parity of non-starting intermediate lines will never change because every time one of these lines passes and loses a player, they would have gained a player in the previous pass. Let's say we have lines
Over infinite passes, the drill will never have a player oscillate if and only if the number of players in the starting line are odd (assuming the starting line is not one of the end lines) and the number of players in each intermediate line are even. This will subsequently be referred to as a perfect drill. Conversely, the drill will have a player oscillate if and only if any of the intermediate lines have an odd number of players or the starting line has an even number of players (imperfect drill).
Proof
Because the starting line's parity changes on the first pass (Lemma 2), the starting line must start with an odd number of players since we need an even number of players in the line to guarantee 0 oscillations (Lemma-1).
Because non-starting intermediate lines will not change parity (Lemma 3), they must start with an even number of players to guarantee 0 oscillations (Lemma-1).
Given any valid drill run for
First, we must check the parity of the drill's lines against the conditions set in Lemma 4. If all of the conditions are met, we know that the player will never oscillate.
Once we rule out the possibility of a perfect drill, we must figure out if the player's first oscillation is within
Let's call the line that
- Find number of passes it takes to get from the starting line to the line with the
$p$ in it. Add that to the total pass count. - Find the number of passes it takes to get
$p$ to the start of the line they are currently in. Add that to the total pass count.
Finding the value
Each player ahead of
To find the number of passes it takes for the ball to return to
-
Find the closest intermediate line to
$l$ that has an odd number of players in the direction that$p$ will first pass. This will be the line that$p$ oscillates between. In the case that there is no intermediate line with an odd number of players in that direction, it must either be$l$ or somewhere in the other direction. In this case, you must search at the other direction inclusive of the$l$ for the first line with an odd number of players starting with$l$ . -
Run the following loop:
function find_first_oscillation(p):
l <- the line that p starts in
passes <- number of passes total # this includes the calculations from steps 1 and 2
end_line <- the line found in step 3
# over the current number of passes, p is now at the beginning of l and has the ball
# now p will pass the ball in the direction of the pass
passes += 1
l = next line in the direction of the pass
while l != end_line:
passes <- add the number of passes for p to get to the beginning of l
passes += 1 # account for p's pass to the next line
l = next line in the direction of the pass
passes += 1 # account for the pass where p oscillates
return passes
- Now that we have the number of passes it takes for
$p$ to oscillate, we can determine if it is within$n$ passes. If it is, we can determine between which two lines$p$ oscillates by checking end_line and the line before it.