America's Cup: The F1 of Sailing

When Ben Ainslie said that the America's Cup was "the Formula One of sailing" he was more right than he may have realised. Recent rumours that Oracle Team USA's boat had an automatic foil control system fitted to it half way through the regatta are raising speculation about a possible legal challenge by Team New Zealand on technical grounds. Rule circumvention by clever engineers has been at the heart of F1 for decades, and now it's making a front page appearance in sailing. Without passing judgement on the legality of Oracle's system, here I have a look at the differences between the mature F1 technical regulations and the AC72 class rule which is, of course, a first edition.

For clarity, the suspicion is that the Oracle system modulates the angles of the foils using hydraulic power produced by sailors grinding winches, but is controlled by a computer fed with information from various sensors on the boat. It may turn out that it is actually a passive mechanical system.

If the America's Cup is the Formula One of sailing, then perhaps the AC can take something from the rules of F1 regarding automatic control of things like foils. The F1 technical regulations have been preventing automatic control in several areas for a while, so they're far more developed in this area than the Racing Rules of Sailing, or even the AC72 class rule. For example, the F1 rule that prevents computer controlled ABS (Anti-skid Braking System) is 11.1.4:

Any change to, or modulation of, the brake system whilst the car is moving must be made by the driver's direct physical input, may not be pre-set and must be under his complete control at all times.

The key phrase here is 'under his complete control at all times', which means that you can't have something that plays around with the brakes without going via the driver's head. You can have things which present information to the driver, but you can't control the brakes independently of the driver. Note that the rule doesn't go into detail about what specific devices are allowed and what mechanisms can or cannot be involved, it just says that the driver is the only control device allowed.

The AC72 class rule has a more round-about way of trying to achieve the same thing, firstly, it says that stored energy (batteries etc.) is not allowed, except for several things, including:

[19.2] (e) for electrical operation of
(i) hydraulic valves. These operations shall only provide the input for the
position of the valve;

So from that it seems that having electrically operated valves is fine, BUT, read the rest of 19.2 and you find the bit where they tried to prevent computer control of things:

The operation for (i) [valves] and (ii) [clutches] above, shall not receive external input from any source other than manual input. Any data acquisition system, associated sensors or electronics shall be physically separate and completely isolated from any electrical operation referred to in (i) and (ii) with the exception of the voltage supply.

The problem with rules as specific as this is that it's relatively easy to get around them: the rule specifically bans computer control of valves that are operated by stored energy. It doesn't ban computer control of valves which are driven directly from a dynamo on a winch, for example. In fact it doesn't ban computer control of anything that's not operated using stored energy, as those things don't even fall into rule 19.

If the AC wants to be the F1 of sailing, then the technical regs need to be written like the F1 technical regs - ban general concepts, like automatic control, rather than the specific instances that the rule writers happen to have thought of. If you collect the kind of engineers that Larry can afford, then you can run rings around regulations like the AC72 class rule.

The Quickest Way to Rack Pool Balls

Whilst playing pool in the college bar years ago my friend Chris posed an interesting question: after removing the balls from the end of the table and randomly dropping them into the triangle, what is the minimum number of 'moves' necessary to rearrange the balls into the correct pattern? Where a 'move' is swapping the positions of two balls.

It turns out that if the black ball starts off in one of the centre positions (marked with an 'X' in Fig 1) then you can always get to the correct pattern in 3 swaps or fewer. If the black starts off in one of the outside positions then you can still get to the correct pattern in 3 swaps 75% of the time, the remaining 25% require one additional swap. An explanation of this result is given below...

The correct pattern, as defined by the World Eightball Pool Federation, is shown on the left in Fig 1:

The official pattern (left) and symmetrical variations of it (right).

Fig 1: The official pattern (left) and symmetrical variations of it (right).

To make our lives easier, we will also allow the three patterns on the right of the figure, as these are all symmetrical, in colour or side, versions of the official pattern. The table is symmetrical, so these 4 are all equivalent. We also note that turning the triangle 1/3 of a turn either way is very easy, so we will not count this as a 'move'. This means that all 3 rotated versions of each of the above 4 patterns are counted as correct. In total then we have 12 patterns which we consider to be 'solved'.

Let's number the positions, starting from 1 at the bottom left corner, and counting to the right along the bottom row, up to 5, then left to right along the second row, from 6 to 9 etc... If we represent each red ball as a '1', each yellow ball as a '0', and the black as a '2', then we can write down the pattern of balls in the official arrangement (left of Fig 1) as a list of numbers, or vector, namely:

[1 0 0 1 0 0 1 0 1 1 2 0 0 1 1]

If we swap the bottom left red with the yellow on its right (positions 1 and 2), we get a slightly different pattern:

[0 1 0 1 0 0 1 0 1 1 2 0 0 1 1]

If we have these two vectors on a computer we can easily find which elements don't match by using the 'not equal to' operation, in Matlab this is denoted by '~=', so for example:

[1 0 0 1 0 0 1 0 1 1 2 0 0 1 1]

~=

[0 1 0 1 0 0 1 0 1 1 2 0 0 1 1]

=

[1 1 0 0 0 0 0 0 0 0 0 0 0 0 0]

In this way we can identify which, and how many, balls differ in position from one pattern to the other. One swap changes the positions of two balls, so if we divide the number of differences between any two patterns by two we get the number of swaps necessary to get from one pattern to the other. We have to round this number up, if it's not an integer, because if two patterns differ by the positions of three balls (one of which must be black) then two swaps will be required to change one into the other. We can't do one and a half swaps!

It is a fairly simple operation to compute all patterns that are possible with seven '1's, seven '0's and one '2'; there are 51,480 of them. Using the above method we can find the number of swaps necessary to change each of the 51,480 possible patterns into each of the 12 solutions. Taking the smallest of these 12 numbers for each pattern we find the answer to our question:

If the black is in one of the central positions (which happens in 3 of every 15 patterns) then the pattern can always be solved in 3 swaps; if the black is not in the centre then the pattern can be solved in three swaps 75% of the time, and always in 4 swaps!