## Mathematics Behind The Triangle Offense

It was pointed out to me recently that a few of the articles I have written describing the detailed geometric structure behind the triangle offense is scattered in various places around my blog, so here is a list of the articles in one convenient place:

• The Mathematics of Filling the Triangle (First article)
• Group Theory and Dynamical Systems Theory Behind The Triangle Offense
• A Demonstration That The Triangle Offense is the most efficient/optimal way for 5 players to space the floor.
• By: Dr. Ikjyot Singh Kohli (About the Author)

By: Dr. Ikjyot Singh Kohli (About the Author)

## Basketball – A Game of Geometry

In a previous post, I described the most optimal offensive strategy for the Knicks based on developing relevant joint probability density functions.

In this post, I attempt a solution to the following problem:

Given 5 players on the court, how can one determine (x,y) coordinates for each player such that the spacing / distance between each player is maximized. Thus, mathematically providing a solution in which the arrangement of these 5 players is optimal from an offensive strategy standpoint. The idea is that such an arrangement of these 5 players will always stretch the defense to the maximum.

The problem is then stated as follows. Let $(x_i, y_i)$ be the x and y coordinates of player $i$ on the court. We wish to solve:

Problems of this type are known as multi-objective optimization problems, and in general are quite difficult to solve. Note that in setting up the coordinate system for this problem, we have for convenience placed the basket at $(x,y) = (0,0)$, i.e., at the origin.

Now, for solving this problem we used the Non-dominated Sorting Genetic Algorithm-II (NSGA-II) in the MCO package in R.

In general, what I found were that there are many possible solutions to this problem, all of which are Pareto optimal. Here are some of these results.

Here are some more plots of of player coordinates clearly showing the origin point (which as mentioned earlier, is the location of the basket):

Each plot above shows the x-y coordinates of players on the floor such that the distance between them is a maximum. Thus, these are some possible configurations of 5 players on the floor where the defense of the opposing team would be stretched to a maximum. What is even more interesting is that in each solution displayed above, and indeed, each numerical solution we found that is not displayed here, there is at least one triangle formation. It can therefore be said that the triangle offense is amongst the most optimal offensive strategies that produces maximum spacing of offensive players while simultaneously stretching the defense to a maximum as well. Here is more on the unpredictability of the triangle offense and its structure.

Based on these coordinates, we obtained the following distance matrices showing the maximum / optimal possible distance between player $i$ and player $j$:

Above, we show 5 possible distance matrices out of the several generated for brevity. So, one can see that looking at the fifth matrix for example, players are at a maximum and optimal distance from each other if for example the distance between player 1 and 2 is 9.96 feet, while the distance between player 3 and 4 is 18.703 feet, while the distance between player 4 and 5 is 4.96 feet, and so on.

## The Mathematics of “Filling the Triangle”

I’ve been fascinated by the triangle offense for a long time. I think it is a beautiful way to play basketball, and the right way to play basketball, in the half-court, a “system-based” way to play. For those of you that are interested, I highly recommend Tex Winter’s classic book on the topic.

There is this brief video as well where Tex Winter explains how the triangle offense and a basketball are grounded in geometric principles:

I don’t think people recognize though how deep of a geometry problem this is actually. Looking at when the triangle is filled, as in the video above, we have the following situation:

The problem I wanted to study was given 5 players’ random positions on the court, could a series of equations be solved yielding (x,y) coordinates that would yield where players should “go” to fill the triangle?

Using simple geometry, from the diagram above, we see that each player’s position in the triangle offense is governed by the following system of nonlinear equations:

$\left(x_4-x_2\right) \left(x_4-x_5\right)+\left(y_4-y_2\right) \left(y_4-y_5\right)=\cos (a) \sqrt{\left(x_2-x_4\right){}^2+\left(y_2-y_4\right){}^2} \sqrt{\left(x_4-x_5\right){}^2+\left(y_4-y_5\right){}^2}$

$\left(x_4-x_2\right) \left(x_2-x_5\right)+\left(y_4-y_2\right) \left(y_2-y_5\right)=\cos (b) \sqrt{\left(x_2-x_4\right){}^2+\left(y_2-y_4\right){}^2} \sqrt{\left(x_2-x_5\right){}^2+\left(y_2-y_5\right){}^2}$

$\left(x_2-x_5\right) \left(x_4-x_5\right)+\left(y_2-y_5\right) \left(y_4-y_5\right)=\cos (c) \sqrt{\left(x_2-x_5\right){}^2+\left(y_2-y_5\right){}^2} \sqrt{\left(x_4-x_5\right){}^2+\left(y_4-y_5\right){}^2}$

$\left(x_2-x_1\right) \left(x_2-x_5\right)+\left(y_2-y_1\right) \left(y_2-y_5\right)=\cos (d) \sqrt{\left(x_1-x_2\right){}^2+\left(y_1-y_2\right){}^2} \sqrt{\left(x_2-x_5\right){}^2+\left(y_2-y_5\right){}^2}$

$\left(x_2-x_1\right) \left(x_1-x_5\right)+\left(y_2-y_1\right) \left(y_1-y_5\right)=\cos (e) \sqrt{\left(x_1-x_2\right){}^2+\left(y_1-y_2\right){}^2} \sqrt{\left(x_1-x_5\right){}^2+\left(y_1-y_5\right){}^2}$

$\left(x_1-x_5\right) \left(x_2-x_5\right)+\left(y_1-y_5\right) \left(y_2-y_5\right)=\cos (f) \sqrt{\left(x_1-x_5\right){}^2+\left(y_1-y_5\right){}^2} \sqrt{\left(x_2-x_5\right){}^2+\left(y_2-y_5\right){}^2}$

$\left(x_1-x_3\right) \left(x_1-x_5\right)+\left(y_1-y_3\right) \left(y_1-y_5\right)=\cos (h) \sqrt{\left(x_1-x_3\right){}^2+\left(y_1-y_3\right){}^2} \sqrt{\left(x_1-x_5\right){}^2+\left(y_1-y_5\right){}^2}$

$\left(x_1-x_3\right) \left(x_3-x_5\right)+\left(y_1-y_3\right) \left(y_3-y_5\right)=\cos (i) \sqrt{\left(x_1-x_3\right){}^2+\left(y_1-y_3\right){}^2} \sqrt{\left(x_3-x_5\right){}^2+\left(y_3-y_5\right){}^2}$

$\left(x_1-x_5\right) \left(x_3-x_5\right)+\left(y_1-y_5\right) \left(y_3-y_5\right)=\cos (g) \sqrt{\left(x_1-x_5\right){}^2+\left(y_1-y_5\right){}^2} \sqrt{\left(x_3-x_5\right){}^2+\left(y_3-y_5\right){}^2}$

Further, the angles obviously must satisfy the following constraints:

$a + b + c = \pi, \quad d + e + f = \pi, \quad g + h + i = \pi$

Finally, we require that each player be about 15-20 feet apart in the triangle offense (because the offense is predicated on spacing), and thus have some additional constraints:

$15\leq \sqrt{\left(x_2-x_4\right){}^2+\left(y_2-y_4\right){}^2}\leq 20$

$15\leq \sqrt{\left(x_4-x_5\right){}^2+\left(y_4-y_5\right){}^2}\leq 20$

$15\leq \sqrt{\left(x_2-x_5\right){}^2+\left(y_2-y_5\right){}^2}\leq 20$

$15\leq \sqrt{\left(x_1-x_2\right){}^2+\left(y_1-y_2\right){}^2}\leq 20$

$15\leq \sqrt{\left(x_1-x_5\right){}^2+\left(y_1-y_5\right){}^2}\leq 20$

$15\leq \sqrt{\left(x_1-x_3\right){}^2+\left(y_1-y_3\right){}^2}\leq 20$

$15\leq \sqrt{\left(x_3-x_5\right){}^2+\left(y_3-y_5\right){}^2}\leq 20$

Solving this highly nonlinear system of equations with constraints is not a trivial problem! It fact, because of the high degree of nonlinearity and dimension of the problem, it is safe to assume that no closed-form solution exists, and therefore, must be solved numerically.

For this task, we used MATLAB, and experimented with the lsqnonlin() and fsolve() commands. The only issue is that (as with all such numerical algorithms) convergence depends very highly on the choice of initial conditions. It is very difficult to choose a priori this many initial conditions, so I wrote a script that randomized initial conditions. I then ran several numerical experiments and obtained the following results:

In the plot above, I have labeled the plots that converged to the triangle formation with the title “this one”. In addition, the five black circles denote the initial positions of the players on the court before they fill the triangles in the offense. One sees just by the diagram above, how difficult such a problem is to solve mathematically, even through a numerical approach. Running more trials would perhaps yield better results, but, it works! I am truly fascinated by this. In the coming days, I will work on optimizing the numerical algorithm, and post my updates as they come.

Here is an animation of one of the scenarios above when the algorithm converges correctly:

In this animation above, the black dots represent the positions of the players on the court. They begin at initial (random) positions and attempt to fill the triangles as described above.

## Black Holes, Black Holes Everywhere

Nowadays, one cannot watch a popular science tv show, read a popular science book, take an astrophysics class without hearing about black holes. The problem is that very few people discuss this topic appropriately. This is further evidenced that these same people also claim that the universe’s expansion is governed by the Friedmann equation as applied to a Friedmann-Lemaitre-Robertson-Walker (FLRW) universe.

The fact is that black holes despite what is widely claimed, are not astrophysical phenomena, they are a phenomena that arise from mathematical general relativity. That is, we postulate their existence from mathematical general relativity, in particular, Birkhoff’s theorem, which states the following (Hawking and Ellis, 1973):

Any $C^2$ solution of Einstein’s vacuum equations which is spherically symmetric in some open set V is locally equivalent to part of the maximally extended Schwarzschild solution in V.

In other words, if a spacetime contains a region which is spherically symmetric, asymptotically flat/static, and empty such that $T_{ab} = 0$, then the metric inn this region is described by the Schwarzschild metric:

$\boxed{ds^2 = -\left(1 - \frac{2M}{r}\right)dt^2 + \frac{dr^2}{1-\frac{2M}{r}} + r^2\left(d\theta^2 + \sin^2 \theta d\phi^2\right)}$

The concept of a black hole then occurs because of the $r = 0$ singularity that occurs in this metric.

The problem then arises in most discussions nowadays, because the very same astrophysicists that claim that black holes exist, also claim that the universe is expanding according to the Einstein field equations as applied to a FLRW metric, which are frequently written nowadays as:

The Raychaudhuri equation:

$\boxed{\dot{H} = -H^2 - \frac{1}{6} \left(\mu + 3p\right)}$,

(where $H$ is the Hubble parameter)

The Friedmann equation:

$\boxed{\mu = 3H^2 + \frac{1}{2} ^{3}R}$,

(where $\mu$ is the energy density of the dominant matter in the universe and $^{3}R$ is the Ricci 3-scalar of the particular FLRW model),

and

The Energy Conservation equation:

$\boxed{\dot{\mu} = -3H \left(\mu + p\right)}$.

The point is that one cannot have it both ways! One cannot claim on one hand that black holes exist in the universe, while also claiming that the universe is FLRW! Since, by Birkhoff’s theorem, external to the black hole source must be a spherically symmetric and static spacetime, for which a FLRW is not static nor asymptotically flat, because of a lack of global timelike Killing vector.

I therefore believe that models of the universe that incorporate both black holes and large-scale spatial homogeneity and isotropy should be much more widely introduced and discussed in the mainstream cosmology community. One such example are the Swiss-Cheese universe models. These models assume a FLRW spacetime with patches “cut out” in such a way to allow for Schwarzschild solutions to simultaneously exist. Swiss-Cheese universes actually have a tremendous amount of explanatory power. One of the mysteries of current cosmology is the origin of the existence of dark energy. The beautiful thing about Swiss-Cheese universes is that one is not required to postulate the existence of hypothetical dark energy to account for the accelerated expansion of the universe. This interesting article from New Scientist from a few years ago explains some of this.

Also, the original Swiss-Cheese universe model in its simplest foundational form was actually proposed by Einstein and Strauss in 1945.

The basic idea is as follows, and is based on Israel’s junction formalism (See Hervik and Gron’s book, and Israel’s original paper for further details. I will just describe the basic idea in what follows). Let us take a spacetime and partition it into two:

$\boxed{M = M^{+} \cup M^{-}}$

with a boundary

$\boxed{\Sigma \equiv \partial M^{+} \cap \partial M^{-}}$.

Now, within these regions we assume that the Einstein Field equations are satisfied, such that:

$\boxed{\left[R_{uv} - \frac{1}{2}R g_{uv}\right]^{\pm} = \kappa T_{uv}^{\pm}}$,

where we also induce a metric on $\Sigma$ as:

$\boxed{d\sigma^2 = h_{ij}dx^{i} dx^{j}}$.

The trick with Israel’s method is understanding is understanding how $\Sigma$ is embedded in $M^{\pm}$.  This can be quantified by the covariant derivative on some basis vector of $\Sigma$:

$\boxed{K_{uv}^{\pm} = \epsilon n_{a} \Gamma^{a}_{uv}}$.

The projections of the Einstein tensor is then given by Gauss’ theorem and the Codazzi equation:

$\boxed{\left[E_{uv}n^{u}n^{v}\right]^{\pm} = -\frac{1}{2}\epsilon ^{3}R + \frac{1}{2}\left(K^2 - K_{ab}K^{ab}\right)^{\pm}}$,

$\boxed{\left[E_{uv}h^{u}_{a} n^{v}\right]^{\pm} = -\left(^{3}\nabla_{u}K^{u}_{a} - ^{3}\nabla_{a}K\right)^{\pm}}$,

$\boxed{\left[E_{uv}h^{u}_{a}h^{v}_{b}\right]^{\pm} = ^{(3)}E_{ab} + \epsilon n^{u} \nabla_{u} \left(K_{ab} - h_{ab}K\right)^{\pm} - 3 \left[\epsilon K_{ab}K\right]^{\pm} + 2 \epsilon \left[K^{u}_{a} K_{ub}\right]^{\pm} + \frac{1}{2}\epsilon h_{ab} \left(K^2 + K^{uv}K_{uv}\right)^{\pm}}$

Defining the operation $[T] \equiv T^{+} - T^{-}$, the Einstein field equations are given by the Lanczos equation:

$\boxed{\left[K_{ij}\right] - h_{ij} \left[K\right] = \epsilon \kappa S_{ij}}$,

where $S_{ij}$ results from defining an energy-momentum tensor across the boundary, and computing

$\boxed{S_{ij} = \lim_{\tau \to 0} \int^{\tau/2}_{-\tau/2} T_{ij} dy}$.

The remaining dynamical equations are then given by

$\boxed{^{3}\nabla_{j}S^{j}_{i} + \left[T_{in}\right] = 0}$,

and

$\boxed{S_{ij} \left\{K^{ij}\right\} + \left[T_{nn}\right] = 0}$,

with the constraints:

$\boxed{^{3}R - \left\{K\right\}^2 + \left\{K_{ij}\right\} \left\{K^{ij}\right\} = -\frac{\kappa^2}{4} \left(S_{ij}S^{ij} - \frac{1}{2}S^2\right) - 2 \kappa \left\{T_{nn}\right\}}$.

$\boxed{\left\{^{3} \nabla_{j}K^{j}_{i} \right\} - \left\{^{3}\nabla_{i}K\right\} = -\kappa \left\{T_{in}\right\}}$.

Therefore:

1. If black holes exist, then by Birkhoff’s theorem, the spacetime external to the black hole source must be spherically symmetric and static, and cannot represent our universe.
2. Perhaps, a more viable model for our universe is then a spatially inhomogeneous universe on the level of Lemaitre-Tolman-Bondi, Swiss-Cheese, the set of $G_{2}$ cosmologies, etc… The advantage of these models, particular in the case of Swiss-Cheese universes is that one does not need to postulate a hypothetical dark energy to explain the accelerated expansion of the universe, this naturally comes out out of such models.

Under a more general inhomogeneous cosmology, the Einstein field equations now take the form:

Raychauhduri’s Equation:

$\boxed{\dot{H} = -H^2 + \frac{1}{3} \left(h^{a}_{b} \nabla_{a}\dot{u}^{b} + \dot{u}_{a}\dot{u}^{a} - 2\sigma^2 + 2 \omega^2\right) - \frac{1}{6}\left(\mu + 3p\right)}$

Shear Propagation Equation:

$\boxed{h^{a}_{c}h^{b}_{d} \dot{\sigma}^{cd} = -2H\sigma^{ab} + h^{(a}_ch^{b)}_{d}\nabla^{c}\dot{u}^{d} + \dot{u}^{a}\dot{u}^{b} - \sigma^{a}_{c} \sigma^{bc} - \omega^{a}\omega^{b} - \frac{1}{3}\left(h^{c}_{d}\nabla_{c}\dot{u}^{d} + \dot{u}_{c}\dot{u}^{c} - 2\sigma^2 - \omega^2\right)h^{ab} - \left(E^{ab} - \frac{1}{2}\pi^{ab}\right)}$

Vorticity Propagation Equation:

$\boxed{h^{a}_{b}\dot{\omega}^{b} = -2H\omega^{a} + \sigma^{a}_{b}\omega^{b} - \frac{1}{2}\eta^{abcd}\left(\nabla_{b} \omega_{c} + 2\dot{u}_{b}\omega_{c}\right)u_{d} + q^{a}}$

Constraint Equations:

$\boxed{h^{a}_{c} h^{c}_{d} \nabla_{b} \sigma^{cd} - 2h^{a}_{b}\nabla^{b}H - \eta^{abcd}\left(\nabla_{b}\omega_{c} + 2 \dot{u}_{b} \omega_{c}\right)u_{d} + q^{a} = 0}$,

$\boxed{h^{a}_{b} \nabla_{a}\omega^{b} - \dot{u}_{a}\omega^{a} = 0}$,

$\boxed{H_{ab} - 2\dot{u}_{(a}\omega_{b)} - h^{c}_{(a}h^{d}_{b)}\nabla_{c} \omega_{d} + \frac{1}{3} \left(2\dot{u}_{c}\omega_{c} + h^{c}_{d} \nabla_{c}\omega^{d}\right)h_{ab} - h^{c}_{(a}h^{d}_{b)} \eta_{cefg}\left(\nabla^{e}\sigma^{f}_{d}\right)u^{g}=0}$.

Matter Evolution Equations through the Bianchi identities:

$\boxed{\dot{\mu} = -3H\left(\mu + p\right) - h^{a}_{b}\nabla_{a}q^{b} - 2\dot{u}_{a}q^{a} - \sigma^{a}_{b}\pi^{b}_{a}}$,

$\boxed{h^{a}_{b}\dot{q}^{b} = -4Hq^{a} - h^{a}_{b}\nabla^{b}p - \left(\mu + p\right)\dot{u}^{a} - h^{a}_{c}h^{b}_{d}\nabla_{b} \pi^{cd} - \dot{u}_{b}\pi^{ab} - \sigma^{a}_{b}q^{b} + \eta^{abcd}\omega_{b}q_{c}u_{d}}$.

One also has evolution equations for the Weyl curvature tensors $E_{ab}$ and $H_{ab}$, these can be found in Ellis’ Cargese Lectures.

Despite the fact that these modifications are absolutely necessary if one is to take seriously the notion that our universe has black holes in it, most astronomers and indeed most astrophysics courses continue to use the simpler versions assuming that the universe is spatially homogeneous and isotropic, which contradicts by definition the notion of black holes existing in our universe.