The Math Behind that Dick Joke in HBO’s “Silicon Valley”
By: Jørgen Veisdal
Tags: Movies, Pop Culture, Science, TV Series, Mathematics

Evaluation

In order to evaluate the efficiency of each strategy, we will next consider the values of the spatial and temporal functions which map the contact area f(s) to the length of the shaft of each individual. For each strategy, we need to evaluate:

f(s) ∈ [0,1], the area of contact between the hand of agent E and the circumference of the shaft of individual i;

S(f), the spatial stimulation function that maps the area of contact f(s) along the shaft of individual i;

T(f), the temporal stimulation function that maps the area of contact f(s) over the duration of the stimulation individual i;

θ, the shaft angle;

Strategy A: “Focus”

The one-person stimulation configuration is fairly simply to evaluate. As stated before, we must here assume that agent E is able to maintain full contact with the shaft of individual i, and so that for the duration of the stimulation f(s) = 1, and so S(1) = 1 and T(1) = 1. We also assume that agent E is able to maintain the shaft angle θ in its equilibrium position until he exceeds each individual’s satisfaction event threshold Λ.

Cross-sectional view of girth of individual i, with area of contact between in blue

Solving for satisfaction per jerk (eq. 2), we obtain S(1) × T(t) = 1. Hence, each jerk transfers an amount of satisfaction equal to 1, and the number of jerks J simply have to exceed each individual’s satisfaction threshold (given in number of jerks):

Satisfaction inequality for the single jerk configuration “Focus”

Strategy B: “Skiing”

The two-person stimulation configuration is the only multi-jerk configuration where satisfaction-per-jerk is assumed to be unaffected by deviations from the equilibrium position of members’ shaft angles. This because as in the single jerk configuration θ remains zero throughout each simulation, a consequence of not having to be matched against the complementary shaft angle of another individual in series or parallel.

Cross-sectional view of girth of individuals i and j, with area of contact between in blue

As such, we can again solve solve for satisfaction per jerk (eq. 2). Again, we obtain S(1) x T(1) = 1 and assume that each jerk transfers an amount of satisfaction equal to 1, and the number of jerks J simply have to exceed each individual’s satisfaction threshold (given in number of jerks):

Satisfaction inequality for the double jerk configuration “Skiing”

Strategy C: “Tip-to-tip”

Cross-sectional view of girth of individuals {i, j} and {k,l} with area of contact between in blue

The “tip-to-tip” strategy TTJ, where agent E stimulates audience members in a serial configuration, the crucial satisfaction-per-jerk measurement is for individual 1 and 2, respectively, given by the equations:

Satisfaction per jerk for individual i and j, respectively

where the cos/sin terms represent the diminishment in stimulation stemming from shaft angle deviation from equilibrium. Solving for satisfaction per jerk (eq. 2), we again assume that agent E is able to maintain full contact with the shaft of individuals i, j, k and l through the duration of the stimulation, but that on average, he is only transferring satisfaction to each individual half the time (since stroke length = shaft length, L = lᵢ + lⱼ). So, S(1) = 1 and T(1/2) = 1/2 gives :

Equation x. Satisfaction inequalities for the quadruple jerk configuration “Tip-to-tip”

Strategy D: “Shaft-to-shaft”

In one sense, the “shaft-to-shaft” strategy SSJ is similar to the other quadruple jerk strategy “tip-to-tip” in that it requires us to incorporate terms for diminishment of satisfaction per jerk due to shaft angle deviation from equilibrium:

Satisfaction per jerk for individual i and j, respectively

In another sense, the “shaft-to-shaft” configuration is the opposite of the other quadruple jerk strategy in that here we here assume that the agent is able to maintain contact with all individuals’ shafts throughout the stimulation. So, here T(1) = 1, but S(1) < 1 is assumed to be less than one due to the configuration of shafts side-by-side. We estimate that the inputs into f(s) would be equal to πr for the individual with the most girth Dᵢ, and range from [πrⱼ / 2 to πrⱼ] for the individual with least girth Dⱼ, as seen below:

Cross-sectional view of girth of individuals i and j, with area of contact between in blue

Given this, solving for satisfaction per jerk (eq. 2) we obtain for individuals i, k: Sᵢ(πrᵢ) = 1/2:

and for individuals j,l: Sⱼ(πrⱼ/2) = 1/ 4 to Sⱼ(πrⱼ) = 1/2:

Thus, if Dᵢ = Dⱼ, the area of contact between agent E’s hand and the shafts of individuals i and j is the same and S(πr) = 1/2.

Hypothetical scenario

Finally, let us consider a hypothetical scenario and solve for number of jerks numerically, with the goal of coming up with an estimate of which strategy will be the most efficient given n = 800 guys and Tmax = 10 min.

Let the mean satisfaction threshold of an audience member be Λ = 100 strokes. Assume that the audience is sorted by D2F and so the mean shaft angle θ is 60°. Let the complementary shaft angle (bar theta) be given by β and equal 90°-60° = 30°. For the shaft-to-shaft strategy, assume mean girths of individuals i,k to be r = 1 and individuals j,l to be r = 2. Given this mismatch, it is fair to assume that f(s) = 1/4 for shafts j and l. We can now easily obtain the number of strokes required to achieve satisfaction events, by their respective inequalities: Single jerk: J ≥ Λ

Double jerk: J ≥ Λ

Tip-to-tip i,l: J x 1/2 x cos(θ) ≥ Λ

Tip-to-tip j,k: J x 1/2 x sin(β) ≥ Λ

Shaft-to-shaft i,l: J x πr x 1/2 x cos(θ) ≥ Λ

Shaft to shaft j,k: J x πr x sin(β) ≥ Λ Satisfaction per jerk

We immediately notice that single and double jerk strategies are equally as efficient on a per individual basis, such that the number of jerks required is equal to the satisfaction threshold Λ = 100. For the tip-to-tip strategy, we obtain J x 1/2 x 1/2 = J x 1/4 for both individuals in each pair, telling us that per jerk the strategy is 25% as efficient as single and double jerk strategies given shaft angles of 60° for individual i,l and complementary shaft angles of 30° for individuals j,k. As such, a mean number of strokes J = 400 will be necessary to exceed the satisfaction threshold of Λ = 100. For the shaft-to-shaft strategy, we obtain J x 1/4 for individuals i,k and J x 1/2 for individuals j,l. Compared to the tip-to-tip strategy, we observe that for individuals i,k the strategy is half as efficient (12.5%), and for individuals j,l equally as efficient (25%). Satisfaction of the whole crowd

Common parameters to all jerking sessions is n = 800 guys, the time constraint of Tmax = 600s and the mean satisfaction threshold of 100 jerks: For the single jerk strategy, agent E has 600s to jerk 800 guys 100 times, requiring a rate of (800 x 100) / 600 = 133.33 jerks per second. For the double jerk strategy, agent E has 600s to jerk 400 guys 100 times, requiring a rate of (400 x 100) / 600 = 66.67 jerks per second. For the tip-to-tip strategy, agent E has 600s to jerk 200 guys 400 times, requiring a rate of (200 x 400) / 600 = 133.33 jerks per second. For the shaft-to-shaft strategy, agent E has 600s to jerk 200 guys (600 + 400)/2 times, requiring a rate of (200 x 500) / 600 = 166.67 jerks per second.

Conclusion

In conclusion, we’ve found that of the four strategies evaluated (‘focus’, ‘skiing’, ‘tip-to-tip’ and ‘shaft-to-shaft’), given reasonable assumptions and parameters, agent E should go for the double jerk (“skiing”) strategy which is evaluated to be twice as efficient as single jerk and tip-to-tip strategies.

I encourage everyone interested to read the original paper “Optimal Tip-to-Tip Efficiency” by Misra (2014), which this essay was based on.