14 October 2025
Scoring competition participants on a curve (content warning: MATH π±)
by ashley
Iβve been working on a scoring system that assigns points to participants in a competition based on their final placement in the event. The goal is to stack participants over a number of events based on their performance relative to other participants.
I want the system to be defined as a continuous increasing function such that each placement gains at least 1 point over the previous placement. So, 2nd-to-last place should gain at least 1 point over last place. Ideally, the system also rewards 1st place more than 2nd, 2nd more than 3rd, 3rd more than 4th, and so on until last place. The scoring function should be bounded between a minimum score and maximum score, and I should be able to vary the steepness of the curve.
That sounds a lot likeβ¦
The bezier curve!
B ( a , b , r , t ) = ( 1 β t ) 2 a + 2 ( 1 β t ) t r + t 2 b \Large
B(a,b,r,t) = (1-t)^{2}a + 2(1 - t)tr + t^{2}b B ( a , b , r , t ) = ( 1 β t ) 2 a + 2 ( 1 β t ) t r + t 2 b
The quadratic bezier is a second-order interpolant. Its basically a fancy parabola, where the intermediate control value r r r varies the slope of the curve over t t t . We can vary the inputs of B in order to shape the curve.
The score function
We need to be able to set:
theΒ numberΒ ofΒ participants:Β N 0 , { β
N 0 β N β
β | β
β 2 β€ N 0 β
} theΒ lowerΒ scoreΒ bound:Β S 0 , { β
S 0 β N β
β | β
β 1 β€ S n β
} theΒ upperΒ scoreΒ bound:Β S n , { β
S n β N β
β | β
β S 0 < S n β
} theΒ controlΒ coefficient:Β r c , { β
r c β R β
β | β
β 0 β€ r c β€ 1 β
} \begin{align*}
\text{the number of participants: } & N_0, \Set { N_0 \in \N | 2 \le N_0 } \\
\text{the lower score bound: } & S_0, \Set { S_0 \in \N | 1 \le S_n } \\
\text{the upper score bound: } & S_n, \Set { S_n \in \N | S_0 < S_n } \\
\text{the control coefficient: } & r_c, \Set { r_c \in \R | 0 \le r_c \le 1 } \\
\end{align*} theΒ numberΒ ofΒ participants:Β theΒ lowerΒ scoreΒ bound:Β theΒ upperΒ scoreΒ bound:Β theΒ controlΒ coefficient:Β β N 0 β , { N 0 β β N β£ 2 β€ N 0 β } S 0 β , { S 0 β β N β£ 1 β€ S n β } S n β , { S n β β N β£ S 0 β < S n β } r c β , { r c β β R β£ 0 β€ r c β β€ 1 } β
We can calculate the intermediate control r r r as S r S_r S r β :
{ S m = S 0 + S n 2 S r = ( 1 β r c ) S m + r c S 0 \large
\begin{cases}
S_m & = \LARGE{\frac{S_0 + S_n}{2} } \\
S_r & = (1 - r_c)S_m + r_cS_0 \\
\end{cases} β© β¨ β§ β S m β S r β β = 2 S 0 β + S n β β = ( 1 β r c β ) S m β + r c β S 0 β β
And define the scoring functions:
{ T ( p ) = ( 1 β p β 1 N 0 β 1 ) { β
p β N β
β | β
β 1 β€ p β€ N 0 β
} S ( p ) = B ( S 0 , Β S n , Β S r , Β T ( p ) ) { β
p β N β
β | β
β 1 β€ p β€ N 0 β
} \large
\begin{cases}
T(p) & = \bigg(1 - \frac{p - 1}{N_0 - 1}\bigg) & \Set{ p \in \N | 1 \leq p \leq N_0 } \\
S(p) & = B(S_0,\ S_n,\ S_r,\ T(p)) & \Set{ p \in \N | 1 \leq p \leq N_0 }
\end{cases} β© β¨ β§ β T ( p ) S ( p ) β = ( 1 β N 0 β β 1 p β 1 β ) = B ( S 0 β , Β S n β , Β S r β , Β T ( p )) β { p β N β£ 1 β€ p β€ N 0 β } { p β N β£ 1 β€ p β€ N 0 β } β
The scoring function so far is pretty simple. We can plot it and vary the inputs to get a curve with increasing steps between each place as p p p approaches 1.
Constraining the step size
Depending on the values of our inputs, this function can provide a score for every placement. Lets define the differential score of two places as Ξ S ( p ) \Delta S(p) Ξ S ( p ) :
Ξ S ( p ) = S ( p ) β S ( p + 1 ) Β forΒ allΒ { β
p β N β
β | β
β 1 β€ p < N 0 β
} \Large
\Delta S(p) = S(p) - S(p + 1) \text{ for all } \Set{ p \in \N | 1 \le p < N_0 } Ξ S ( p ) = S ( p ) β S ( p + 1 ) Β forΒ allΒ { p β N β 1 β€ p < N 0 β }
For example: Ξ S ( 1 ) \Delta S(1) Ξ S ( 1 ) gives us the 1st and 2nd place differential score, and Ξ S ( N 0 β 1 ) \Delta S(N_0-1) Ξ S ( N 0 β β 1 ) gives us the differential score for second-to-last and last place. Given any parameterization of the inputs, we need to ensure that for all values of p p p in N \mathbb N N , we must ensure the following Differential Constraint is always true:
{ β
p β N β
β | β
β 1 β€ p β€ N 0 β 1 Β andΒ Ξ S ( p ) β₯ 1 β
} \Large
\Set{ p \in \N | 1 \le p \le N_0 - 1 \large{\text{ and }} \Large \Delta S(p) \ge 1 } { p β N β 1 β€ p β€ N 0 β β 1 Β andΒ Ξ S ( p ) β₯ 1 }
Variations in r c \large r_c r c β can cause the Differential Constraint to fail given a small enough N 0 N_0 N 0 β , or small enough S n β S 0 S_n - S_0 S n β β S 0 β . So, we should find a set R c \large R_c R c β of all r c \large r_c r c β for which the Differential Constraint is true:
R c = { β
r c β R β
β | β
β 0 β€ r c β€ 1 Β andΒ Ξ S ( p ) β₯ 1 β
} \Large
R_c = \Set{ r_c \in \R | 0 \le r_c \le 1 \large{\text{ and }} \Large \Delta S(p) \ge 1 } R c β = { r c β β R β 0 β€ r c β β€ 1 Β andΒ Ξ S ( p ) β₯ 1 }
Expanding Ξ S ( p ) \Delta S(p) Ξ S ( p ) gives:
Ξ S ( p ) = S ( p ) β S ( p + 1 ) = B ( S 0 , Β S n , Β S r , Β T ( p ) ) β B ( S 0 , Β S n , Β S r , Β T ( p + 1 ) ) = ( ( 1 β T ( p ) ) 2 S 0 + 2 ( 1 β T ( p ) ) T ( p ) S r + T ( p ) 2 S n ) β Β Β Β Β Β ( ( 1 β T ( p + 1 ) ) 2 S 0 + 2 ( 1 β T ( p + 1 ) ) T ( p + 1 ) S r + T ( p + 1 ) 2 S n ) = ( ( 1 β T ( p ) ) 2 S 0 + 2 ( 1 β T ( p ) ) T ( p ) S r + ( T ( p ) ) 2 S n ) β Β Β Β Β Β ( ( 1 β T ( p + 1 ) ) 2 S 0 + 2 ( 1 β T ( p + 1 ) ) T ( p + 1 ) S r + ( T ( p + 1 ) ) 2 S n ) = β 2 S r T ( p + 1 ) + 2 S r T ( p ) + 2 S r T ( p + 1 ) 2 β 2 S r T ( p ) 2 + Β Β Β Β Β Β 2 S 0 T ( p + 1 ) β 2 S 0 T ( p ) β S 0 T ( p + 1 ) 2 + S 0 T ( p ) 2 β Β Β Β Β Β Β S n T ( p + 1 ) 2 + S n T ( p ) 2 \large
\begin{equation*}
\begin{split}
\Delta S(p) &= S(p) - S(p + 1) \\
&= B(S_0,\ S_n,\ S_r,\ T(p)) - B(S_0,\ S_n,\ S_r,\ T(p + 1)) \\
&= \bigg((1 - T(p))^{2}S_0 + 2(1 - T(p))T(p)S_r + T(p)^{2}S_n\bigg) - {}\\
&\ \ \ \ \ \bigg((1 - T(p + 1))^{2}S_0 + 2(1 - T(p + 1))T(p + 1)S_r + T(p + 1)^{2}S_n\bigg) \\
&= \bigg((1 - T(p))^{2}S_0 + 2(1 - T(p))T(p)S_r + (T(p))^{2}S_n\bigg) - {}\\
&\ \ \ \ \ \bigg((1 - T(p + 1))^{2}S_0 + 2(1 - T(p + 1))T(p + 1)S_r + (T(p + 1))^{2}S_n\bigg) \\
&= -2S_rT(p + 1) + 2S_rT(p) + 2S_rT(p + 1)^2 - 2S_rT(p)^2 + {}\\
&\ \ \ \ \ \ 2S_0T(p + 1) - 2S_0T(p) - S_0T(p + 1)^2 + S_0T(p)^2 - {}\\
&\ \ \ \ \ \ S_nT(p + 1)^2 + S_nT(p)^2\\
\end{split}
\end{equation*} Ξ S ( p ) β = S ( p ) β S ( p + 1 ) = B ( S 0 β , Β S n β , Β S r β , Β T ( p )) β B ( S 0 β , Β S n β , Β S r β , Β T ( p + 1 )) = ( ( 1 β T ( p ) ) 2 S 0 β + 2 ( 1 β T ( p )) T ( p ) S r β + T ( p ) 2 S n β ) β Β Β Β Β Β ( ( 1 β T ( p + 1 ) ) 2 S 0 β + 2 ( 1 β T ( p + 1 )) T ( p + 1 ) S r β + T ( p + 1 ) 2 S n β ) = ( ( 1 β T ( p ) ) 2 S 0 β + 2 ( 1 β T ( p )) T ( p ) S r β + ( T ( p ) ) 2 S n β ) β Β Β Β Β Β ( ( 1 β T ( p + 1 ) ) 2 S 0 β + 2 ( 1 β T ( p + 1 )) T ( p + 1 ) S r β + ( T ( p + 1 ) ) 2 S n β ) = β 2 S r β T ( p + 1 ) + 2 S r β T ( p ) + 2 S r β T ( p + 1 ) 2 β 2 S r β T ( p ) 2 + Β Β Β Β Β Β 2 S 0 β T ( p + 1 ) β 2 S 0 β T ( p ) β S 0 β T ( p + 1 ) 2 + S 0 β T ( p ) 2 β Β Β Β Β Β Β S n β T ( p + 1 ) 2 + S n β T ( p ) 2 β β
We only care about the smallest value of Ξ S ( p ) \Delta S(p) Ξ S ( p ) . We know that as p p p approaches 0 0 0 , Ξ S ( p ) \Delta S(p) Ξ S ( p ) will increase, therefore the smallest value will always be Ξ S ( N 0 β 1 ) \Delta S(N_0 - 1) Ξ S ( N 0 β β 1 ) , given the constraints on p p p defined by Ξ S ( p ) \Delta S(p) Ξ S ( p ) . We can simplify for Ξ S ( N 0 β 1 ) \Delta S(N_0 - 1) Ξ S ( N 0 β β 1 ) as:
T ( N 0 ) = 1 β N 0 β 1 N 0 β 1 = 1 β 1 = 0 T ( N 0 β 1 ) = 1 β N 0 β 1 β 1 N 0 β 1 = 1 β N 0 β 2 N 0 β 1 = N 0 β 1 N 0 β 1 β N 0 β 2 N 0 β 1 = N 0 β N 0 + 2 β 1 N 0 β 1 = 1 N 0 β 1 Ξ S ( N 0 β 1 ) = β 2 S r T ( N 0 ) + 2 S r T ( N 0 β 1 ) + 2 S r T ( N 0 ) 2 β 2 S r T ( N 0 β 1 ) 2 + Β Β Β Β Β Β 2 S 0 T ( N 0 ) β 2 S 0 T ( N 0 β 1 ) β S 0 T ( N 0 ) 2 + S 0 T ( N 0 β 1 ) 2 β Β Β Β Β Β Β S n T ( N 0 ) 2 + S n T ( N 0 β 1 ) 2 = β 2 S r 0 + 2 S r 1 N 0 β 1 + 2 S r T 0 2 β 2 S r 1 N 0 β 1 2 + Β Β Β Β Β Β 2 S 0 0 β 2 S 0 1 N 0 β 1 β S 0 0 2 + S 0 1 N 0 β 1 2 β Β Β Β Β Β Β S n 0 2 + S n 1 N 0 β 1 2 = 2 S r 1 N 0 β 1 + β 2 S 0 1 N 0 β 1 + β 2 S r 1 N 0 β 1 2 + S 0 1 N 0 β 1 2 + S n 1 N 0 β 1 2 = 2 S r β 2 S 0 N 0 β 1 + β 2 S r + S 0 + S n ( N 0 β 1 ) 2 \large
\begin{equation*}
\begin{split}
T(N_0) &= 1 - \frac{N_0 - 1}{N_0 - 1}\\
&= 1 - 1\\
&= 0\\
T(N_0 - 1) &= 1 - \frac{N_0 - 1 - 1}{N_0 - 1}\\
&= 1 - \frac{N_0 - 2}{N_0 - 1}\\
&= \frac{N_0 - 1}{N_0 - 1} - \frac{N_0 - 2}{N_0 - 1}\\
&= \frac{\cancel{N_0 - N_0} + 2 - 1}{N_0 - 1}\\
&= \frac{1}{N_0 - 1}\\
\Delta S(N_0 - 1) &= -2S_rT(N_0) + 2S_rT(N_0 - 1) + 2S_rT(N_0)^2 - 2S_rT(N_0 - 1)^2 + {}\\
&\ \ \ \ \ \ 2S_0T(N_0) - 2S_0T(N_0 - 1) - S_0T(N_0)^2 + S_0T(N_0 - 1)^2 - {}\\
&\ \ \ \ \ \ S_nT(N_0)^2 + S_nT(N_0 - 1)^2\\
&= \cancel{-2S_r0} + 2S_r\frac{1}{N_0 - 1} + \cancel{2S_rT0^2} - 2S_r\frac{1}{N_0 - 1}^2 + {}\\
&\ \ \ \ \ \ \cancel{2S_00} - 2S_0\frac{1}{N_0 - 1} - \cancel{S_00^2} + S_0\frac{1}{N_0 - 1}^2 - {}\\
&\ \ \ \ \ \ \cancel{S_n0^2} + S_n\frac{1}{N_0 - 1}^2\\
&= 2S_r\frac{1}{N_0-1} + -2S_0\frac{1}{N_0-1} + -2S_r\frac{1}{N_0-1}^{2} + S_0\frac{1}{N_0-1}^{2} + S_n\frac{1}{N_0-1}^{2}\\
&= \frac{2S_r - 2S_0}{N_0-1} + \frac{-2S_r + S_0 + S_n}{(N_0-1)^2}\\
\end{split}
\end{equation*} T ( N 0 β ) T ( N 0 β β 1 ) Ξ S ( N 0 β β 1 ) β = 1 β N 0 β β 1 N 0 β β 1 β = 1 β 1 = 0 = 1 β N 0 β β 1 N 0 β β 1 β 1 β = 1 β N 0 β β 1 N 0 β β 2 β = N 0 β β 1 N 0 β β 1 β β N 0 β β 1 N 0 β β 2 β = N 0 β β 1 N 0 β β N 0 β β + 2 β 1 β = N 0 β β 1 1 β = β 2 S r β T ( N 0 β ) + 2 S r β T ( N 0 β β 1 ) + 2 S r β T ( N 0 β ) 2 β 2 S r β T ( N 0 β β 1 ) 2 + Β Β Β Β Β Β 2 S 0 β T ( N 0 β ) β 2 S 0 β T ( N 0 β β 1 ) β S 0 β T ( N 0 β ) 2 + S 0 β T ( N 0 β β 1 ) 2 β Β Β Β Β Β Β S n β T ( N 0 β ) 2 + S n β T ( N 0 β β 1 ) 2 = β 2 S r β 0 β + 2 S r β N 0 β β 1 1 β + 2 S r β T 0 2 β β 2 S r β N 0 β β 1 1 β 2 + Β Β Β Β Β Β 2 S 0 β 0 β β 2 S 0 β N 0 β β 1 1 β β S 0 β 0 2 β + S 0 β N 0 β β 1 1 β 2 β Β Β Β Β Β Β S n β 0 2 β + S n β N 0 β β 1 1 β 2 = 2 S r β N 0 β β 1 1 β + β 2 S 0 β N 0 β β 1 1 β + β 2 S r β N 0 β β 1 1 β 2 + S 0 β N 0 β β 1 1 β 2 + S n β N 0 β β 1 1 β 2 = N 0 β β 1 2 S r β β 2 S 0 β β + ( N 0 β β 1 ) 2 β 2 S r β + S 0 β + S n β β β β
S r \large S_r S r β needs to be expanded before we can simplify futher:
S r = ( 1 β r c ) ( S 0 + S n 2 ) + r c S 0 = ( 1 β r c ) ( S 0 + S n ) 2 + r c S 0 = S 0 + S n β S 0 r c β S n r c 2 + r c S 0 = S 0 + S n β S n r c + S 0 r c 2 2 S r = S 0 + S n β S n r c + S 0 r c \large
\begin{equation*}
\begin{split}
S_r &= (1 - r_c)(\frac{S_0 + S_n}{2}) + r_cS_0\\
&= \frac{(1 - r_c)(S_0 + S_n)}{2} + r_cS_0\\
&= \frac{S_0 + S_n - S_0r_c - S_nr_c}{2} + r_cS_0\\
&= \frac{S_0 + S_n - S_nr_c + S_0r_c}{2}\\
2S_r &= S_0 + S_n - S_nr_c + S_0r_c\\
\end{split}
\end{equation*} S r β 2 S r β β = ( 1 β r c β ) ( 2 S 0 β + S n β β ) + r c β S 0 β = 2 ( 1 β r c β ) ( S 0 β + S n β ) β + r c β S 0 β = 2 S 0 β + S n β β S 0 β r c β β S n β r c β β + r c β S 0 β = 2 S 0 β + S n β β S n β r c β + S 0 β r c β β = S 0 β + S n β β S n β r c β + S 0 β r c β β β
Substituting all 2 S r 2S_r 2 S r β in our simplified Ξ S ( N 0 β 1 ) \Delta S(N_0 -1) Ξ S ( N 0 β β 1 ) , we are able to simplify even further:
Ξ S ( N 0 β 1 ) = S 0 + S n β S n r c + S 0 r c β 2 S 0 N 0 β 1 + β S 0 β S n + S n r c β S 0 r c + S 0 + S n ( N 0 β 1 ) 2 = S n β S n r c + S 0 r c β S 0 N 0 β 1 + S n r c β S 0 r c ( N 0 β 1 ) 2 = ( S n β S n r c + S 0 r c β S 0 ) ( N 0 β 1 ) ( N 0 β 1 ) 2 + S n r c β S 0 r c ( N 0 β 1 ) 2 = S n N 0 β S n r c N 0 + S 0 r c N 0 β S 0 N 0 β S n + S n r c β S 0 r c + S 0 + S n r c β S 0 r c ( N 0 β 1 ) 2 = S n N 0 β S n r c N 0 + S 0 r c N 0 β S 0 N 0 β S n + 2 S n r c β 2 S 0 r c + S 0 ( N 0 β 1 ) 2 \large
\begin{equation*}
\begin{split}
\Delta S(N_0 -1) &= \frac{S_0 + S_n - S_nr_c + S_0r_c - 2S_0}{N_0-1} + \frac{-S_0 - S_n + S_nr_c - S_0r_c + S_0 + S_n}{(N_0-1)^2}\\
&= \frac{S_n - S_nr_c + S_0r_c - S_0}{N_0-1} + \frac{S_nr_c - S_0r_c}{(N_0-1)^2}\\
&= \frac{(S_n - S_nr_c + S_0r_c - S_0)(N_0-1)}{(N_0-1)^2} + \frac{S_nr_c - S_0r_c}{(N_0-1)^2}\\
&= \frac{S_nN_0 - S_nr_cN_0 + S_0r_cN_0 - S_0N_0 - S_n + S_nr_c - S_0r_c + S_0 + S_nr_c - S_0r_c}{(N_0-1)^2}\\
&= \frac{S_nN_0 - S_nr_cN_0 + S_0r_cN_0 - S_0N_0 - S_n + 2S_nr_c - 2S_0r_c + S_0}{(N_0-1)^2}\\
\end{split}
\end{equation*} Ξ S ( N 0 β β 1 ) β = N 0 β β 1 S 0 β + S n β β S n β r c β + S 0 β r c β β 2 S 0 β β + ( N 0 β β 1 ) 2 β S 0 β β S n β + S n β r c β β S 0 β r c β + S 0 β + S n β β = N 0 β β 1 S n β β S n β r c β + S 0 β r c β β S 0 β β + ( N 0 β β 1 ) 2 S n β r c β β S 0 β r c β β = ( N 0 β β 1 ) 2 ( S n β β S n β r c β + S 0 β r c β β S 0 β ) ( N 0 β β 1 ) β + ( N 0 β β 1 ) 2 S n β r c β β S 0 β r c β β = ( N 0 β β 1 ) 2 S n β N 0 β β S n β r c β N 0 β + S 0 β r c β N 0 β β S 0 β N 0 β β S n β + S n β r c β β S 0 β r c β + S 0 β + S n β r c β β S 0 β r c β β = ( N 0 β β 1 ) 2 S n β N 0 β β S n β r c β N 0 β + S 0 β r c β N 0 β β S 0 β N 0 β β S n β + 2 S n β r c β β 2 S 0 β r c β + S 0 β β β β
Now that we have Ξ S ( N 0 β 1 ) \Delta S(N_0 -1) Ξ S ( N 0 β β 1 ) in terms of r c \large r_c r c β , we can rephrase as an inequality and solve for r c \large r_c r c β :
1 β₯ β S n N 0 r c + S 0 N 0 r c + 2 S n r c β 2 S 0 r c + S n N 0 β S 0 N 0 β S n + S 0 ( N 0 β 1 ) 2 1 β₯ β S n N 0 r c + S 0 N 0 r c + 2 S n r c β 2 S 0 r c + S n N 0 β S 0 N 0 β S n + S 0 ( N 0 β 1 ) 2 ( N 0 β 1 ) 2 β₯ β S n N 0 r c + S 0 N 0 r c + 2 S n r c β 2 S 0 r c + S n N 0 β S 0 N 0 β S n + S 0 ( N 0 β 1 ) 2 β S n N 0 + S 0 N 0 + S n β S 0 β₯ r c ( β S n N 0 + S 0 N 0 + 2 S n β 2 S 0 ) r c ( β S n N 0 + S 0 N 0 + 2 S n β 2 S 0 ) β€ ( N 0 β 1 ) 2 β S n N 0 + S 0 N 0 + S n β S 0 r c β€ ( N 0 β 1 ) 2 β S n N 0 + S 0 N 0 + S n β S 0 β S n N 0 + S 0 N 0 + 2 S n β 2 S 0 r c β€ N 0 2 β 2 N 0 + 1 β S n N 0 + S 0 N 0 + S n β S 0 β S n N 0 + S 0 N 0 + 2 S n β 2 S 0 \large
\begin{equation*}
\begin{split}
1 &\ge \frac{- S_nN_0r_c + S_0N_0r_c + 2S_nr_c - 2S_0r_c + S_nN_0 - S_0N_0 - S_n + S_0}{(N_0-1)^2}\\
1 &\ge \frac{- S_nN_0r_c + S_0N_0r_c + 2S_nr_c - 2S_0r_c + S_nN_0 - S_0N_0 - S_n + S_0}{(N_0-1)^2}\\
(N_0 - 1)^2 &\ge - S_nN_0r_c + S_0N_0r_c + 2S_nr_c -2S_0r_c + S_nN_0 - S_0N_0 - S_n + S_0\\
(N_0 - 1)^2 - S_nN_0 + S_0N_0 + S_n - S_0 &\ge r_c(-S_nN_0 + S_0N_0 + 2S_n - 2S_0)\\
r_c(-S_nN_0 + S_0N_0 + 2S_n - 2S_0) &\le (N_0 - 1)^2 - S_nN_0 + S_0N_0 + S_n - S_0\\
r_c &\le \frac{(N_0 - 1)^2 - S_nN_0 + S_0N_0 + S_n - S_0}{-S_nN_0 + S_0N_0 + 2S_n - 2S_0}\\
r_c &\le \frac{N_0^2 - 2N_0 + 1 - S_nN_0 + S_0N_0 + S_n - S_0}{-S_nN_0 + S_0N_0 + 2S_n - 2S_0}\\
\end{split}
\end{equation*} 1 1 ( N 0 β β 1 ) 2 ( N 0 β β 1 ) 2 β S n β N 0 β + S 0 β N 0 β + S n β β S 0 β r c β ( β S n β N 0 β + S 0 β N 0 β + 2 S n β β 2 S 0 β ) r c β r c β β β₯ ( N 0 β β 1 ) 2 β S n β N 0 β r c β + S 0 β N 0 β r c β + 2 S n β r c β β 2 S 0 β r c β + S n β N 0 β β S 0 β N 0 β β S n β + S 0 β β β₯ ( N 0 β β 1 ) 2 β S n β N 0 β r c β + S 0 β N 0 β r c β + 2 S n β r c β β 2 S 0 β r c β + S n β N 0 β β S 0 β N 0 β β S n β + S 0 β β β₯ β S n β N 0 β r c β + S 0 β N 0 β r c β + 2 S n β r c β β 2 S 0 β r c β + S n β N 0 β β S 0 β N 0 β β S n β + S 0 β β₯ r c β ( β S n β N 0 β + S 0 β N 0 β + 2 S n β β 2 S 0 β ) β€ ( N 0 β β 1 ) 2 β S n β N 0 β + S 0 β N 0 β + S n β β S 0 β β€ β S n β N 0 β + S 0 β N 0 β + 2 S n β β 2 S 0 β ( N 0 β β 1 ) 2 β S n β N 0 β + S 0 β N 0 β + S n β β S 0 β β β€ β S n β N 0 β + S 0 β N 0 β + 2 S n β β 2 S 0 β N 0 2 β β 2 N 0 β + 1 β S n β N 0 β + S 0 β N 0 β + S n β β S 0 β β β β
We can plug in some sample inputs to spot-check that our inequality makes sense:
N 0 = 500 S 0 = 1000 S n = 100 , 000 r c β€ 50 0 2 β 2 ( 500 ) + 1 β 100000 ( 500 ) + 1000 ( 500 ) + 100000 β 1000 β 100000 ( 500 ) + ( 1000 ) ( 500 ) + 2 ( 100000 ) β 2 ( 1000 ) r c β€ β 49151999 β 49302000 r c β€ 49151999 49302000 r c βͺ
0.9969575067948562 \large
\begin{equation*}
\begin{split}
N_0 &= 500\\
S_0 &= 1000\\
S_n &= 100,000\\
r_c &\le \frac{500^2 - 2(500) + 1 - 100000(500) + 1000(500) + 100000 - 1000}{-100000(500) + (1000)(500) + 2(100000) - 2(1000)}\\
r_c &\le \frac{β49151999}{β49302000}\\
r_c &\le \frac{49151999}{49302000}\\
r_c &\lessapprox 0.9969575067948562\\
\end{split}
\end{equation*} N 0 β S 0 β S n β r c β r c β r c β r c β β = 500 = 1000 = 100 , 000 β€ β 100000 ( 500 ) + ( 1000 ) ( 500 ) + 2 ( 100000 ) β 2 ( 1000 ) 50 0 2 β 2 ( 500 ) + 1 β 100000 ( 500 ) + 1000 ( 500 ) + 100000 β 1000 β β€ β 49302000 β 49151999 β β€ 49302000 49151999 β βͺ
0.9969575067948562 β β
Evaluating Ξ S ( N 0 β 1 ) \Delta S(N_0 - 1) Ξ S ( N 0 β β 1 ) with r c = 49151999 49302000 r_c = \frac{49151999}{49302000} r c β = 49302000 49151999 β should then yield 1 1 1 :
Ξ S ( N 0 β 1 ) = S n N 0 β S n r c N 0 + S 0 r c N 0 β S 0 N 0 β S n + 2 S n r c β 2 S 0 r c + S 0 ( N 0 β 1 ) 2 = 100000 ( 500 ) β 100000 r c ( 500 ) + 1000 r c ( 500 ) β 1000 ( 500 ) β 100000 + 2 ( 100000 ) r c β 2 ( 1000 ) r c + 1000 ( 500 β 1 ) 2 = 50000000 β 50000000 r c + 500000 r c β 500000 β 100000 + 200000 r c β 2000 r c + 1000 249001 = 50000000 β 500000 β 100000 + 1000 + r c ( β 50000000 + 500000 + 200000 β 2000 ) 249001 = 49401000 β 49302000 r c 249001 = 49401000 β 49302000 49151999 49302000 249001 = 249001 249001 = 1 \large
\begin{equation*}
\begin{split}
\Delta S(N_0 - 1) &= \frac{S_nN_0 - S_nr_cN_0 + S_0r_cN_0 - S_0N_0 - S_n + 2S_nr_c - 2S_0r_c + S_0}{(N_0 - 1)^2}\\
&= \frac{100000(500) - 100000r_c(500) + 1000r_c(500) - 1000(500) - 100000 + 2(100000)r_c - 2(1000)r_c + 1000}{(500 - 1)^2}\\
&= \frac{50000000 - 50000000r_c + 500000r_c - 500000 - 100000 + 200000r_c - 2000r_c + 1000}{249001}\\
&= \frac{50000000 - 500000 - 100000 + 1000 + r_c(-50000000 + 500000 + 200000 - 2000)}{249001}\\
&= \frac{49401000 β 49302000r_c}{249001}\\
&= \frac{49401000 β 49302000\frac{49151999}{49302000} }{249001}\\
&= \frac{249001}{249001}\\
&= 1\\
\end{split}
\end{equation*} Ξ S ( N 0 β β 1 ) β = ( N 0 β β 1 ) 2 S n β N 0 β β S n β r c β N 0 β + S 0 β r c β N 0 β β S 0 β N 0 β β S n β + 2 S n β r c β β 2 S 0 β r c β + S 0 β β = ( 500 β 1 ) 2 100000 ( 500 ) β 100000 r c β ( 500 ) + 1000 r c β ( 500 ) β 1000 ( 500 ) β 100000 + 2 ( 100000 ) r c β β 2 ( 1000 ) r c β + 1000 β = 249001 50000000 β 50000000 r c β + 500000 r c β β 500000 β 100000 + 200000 r c β β 2000 r c β + 1000 β = 249001 50000000 β 500000 β 100000 + 1000 + r c β ( β 50000000 + 500000 + 200000 β 2000 ) β = 249001 49401000 β 49302000 r c β β = 249001 49401000 β 49302000 49302000 49151999 β β = 249001 249001 β = 1 β β
Excellent (:
Finally, we can define R c \large R_c R c β in terms of our inequality on r c \large r_c r c β :
R c = { β
r c β R β
β | β
β 0 β€ r c β€ N 0 2 β 2 N 0 + 1 β S n N 0 + S 0 N 0 + S n β S 0 β S n N 0 + S 0 N 0 + 2 S n β 2 S 0 β
} \Large
R_c = \Set{ r_c \in \R | 0 \le r_c \le \frac{N_0^2 - 2N_0 + 1 - S_nN_0 + S_0N_0 + S_n - S_0}{-S_nN_0 + S_0N_0 + 2S_n - 2S_0}} R c β = β© β¨ β§ β r c β β R β 0 β€ r c β β€ β S n β N 0 β + S 0 β N 0 β + 2 S n β β 2 S 0 β N 0 2 β β 2 N 0 β + 1 β S n β N 0 β + S 0 β N 0 β + S n β β S 0 β β β β¬ β« β
This set implies Ξ S ( p ) β₯ 1 \Delta S(p) \ge 1 Ξ S ( p ) β₯ 1 because r c β€ N 0 2 β 2 N 0 + 1 β S n N 0 + S 0 N 0 + S n β S 0 β S n N 0 + S 0 N 0 + 2 S n β 2 S 0 r_c \le \large \frac{N_0^2 - 2N_0 + 1 - S_nN_0 + S_0N_0 + S_n - S_0}{-S_nN_0 + S_0N_0 + 2S_n - 2S_0} r c β β€ β S n β N 0 β + S 0 β N 0 β + 2 S n β β 2 S 0 β N 0 2 β β 2 N 0 β + 1 β S n β N 0 β + S 0 β N 0 β + S n β β S 0 β β was solved from the inequality Ξ S ( p ) β₯ 1 \Delta S(p) \ge 1 Ξ S ( p ) β₯ 1 .
A better curve
The curve created by S ( p ) S(p) S ( p ) does fulfill my original requirements, but I feel it should reward better placements more dramatically. I want to be able to control how dramaticaly the slope rises as p p p approaches 1 1 1 from N 0 N_0 N 0 β . Iβll try by createing an n-th order variant of our score function.
Lets define a new input - the control exponent r e \large r_e r e β :
{ β
r e β R β
β | β
β r e β₯ 1 β
} \Large
\Set{ r_e \in \R | r_e \ge 1 } { r e β β R β r e β β₯ 1 }
And redefine the score functions to include r e r_e r e β :
{ T ( p ) = ( 1 β p β 1 N 0 β 1 ) { β
p β N β
β | β
β 1 β€ p β€ N 0 β
} S ( p ) = B ( S 0 , Β S n , Β S r , Β T ( p ) r e ) { β
p β N β
β | β
β 1 β€ p β€ N 0 β
} \large
\begin{cases}
T(p) &= \bigg(1 - \frac{p - 1}{N_0 - 1}\bigg) & \Set{ p \in \N | 1 \leq p \leq N_0 } \\
S(p) &= B(S_0,\ S_n,\ S_r,\ T(p)^{r_e}) & \Set{ p \in \N | 1 \leq p \leq N_0 }\\
\end{cases} β© β¨ β§ β T ( p ) S ( p ) β = ( 1 β N 0 β β 1 p β 1 β ) = B ( S 0 β , Β S n β , Β S r β , Β T ( p ) r e β ) β { p β N β£ 1 β€ p β€ N 0 β } { p β N β£ 1 β€ p β€ N 0 β } β
Just as with our 2nd-order S ( p ) S(p) S ( p ) , the Differential Constraint should remain true:
{ Ξ S ( p ) = S ( p ) β S ( p + 1 ) Β forΒ allΒ { β
p β N β
β | β
β 1 β€ p < N 0 β
} Ξ S ( p ) β₯ 1 Β forΒ allΒ { β
p β N β
β | β
β 1 β€ p β€ N 0 β 1 β
} \large
\begin{cases}
\Delta S(p) = S(p) - S(p + 1) &\text{ for all } \Set{ p \in \N | 1 \le p < N_0 }\\
\Delta S(p) \ge 1 &\text{ for all } \Set{ p \in \N | 1 \le p \le N_0 - 1 }\\
\end{cases} β© β¨ β§ β Ξ S ( p ) = S ( p ) β S ( p + 1 ) Ξ S ( p ) β₯ 1 β Β forΒ allΒ { p β N β£ 1 β€ p < N 0 β } Β forΒ allΒ { p β N β£ 1 β€ p β€ N 0 β β 1 } β
Unfourtunately, given the higher order T ( p ) r e T(p)^{r_e} T ( p ) r e β , small variations in r e \large{r_e} r e β can cause the Differential Constraint to fail given a small enough N 0 N_0 N 0 β , large enough r c r_c r c β , or small enough S n β S 0 S_n - S_0 S n β β S 0 β . So, we should find a set E \large E E of all r e \large r_e r e β and r c \large r_c r c β for which the Differential Constraint is true:
E = { β
( r c , r e ) β R c Γ R β
β | β
β r e β₯ 1 Β andΒ Ξ S ( p ) β₯ 1 β
} \Large
E = \Set { (r_c, r_e) \in R_c \times \R | r_e \ge 1 \large{\text{ and }} \Large \Delta S(p) \ge 1 } E = { ( r c β , r e β ) β R c β Γ R β r e β β₯ 1 Β andΒ Ξ S ( p ) β₯ 1 }
Just as with our 2nd order S ( p ) S(p) S ( p ) , weβre going to need to solve Ξ S ( p ) \Delta S(p) Ξ S ( p ) in terms of r e \large r_e r e β . We can reuse the original expansion of Ξ S ( p ) \Delta S(p) Ξ S ( p ) , because the T ( p ) T(p) T ( p ) substitutions are unaltered in the simplified form of Ξ S ( p ) \Delta S(p) Ξ S ( p ) :
Ξ S ( p ) = S ( p ) β S ( p + 1 ) = B ( S 0 , Β S n , Β S r , Β T ( p ) r e ) β B ( S 0 , Β S n , Β S r , Β T ( p + 1 ) r e ) = β 2 S r T ( p + 1 ) r e + 2 S r T ( p ) r e + 2 S r T ( p + 1 ) 2 r e β 2 S r T ( p ) 2 r e + Β Β Β Β Β Β 2 S 0 T ( p + 1 ) r e β 2 S 0 T ( p ) r e β S 0 T ( p + 1 ) 2 r e + S 0 T ( p ) 2 r e β Β Β Β Β Β Β S n T ( p + 1 ) 2 r e + S n T ( p ) 2 r e \large
\begin{equation*}
\begin{split}
\Delta S(p) &= S(p) - S(p + 1) \\
&= B(S_0,\ S_n,\ S_r,\ T(p)^{r_e}) - B(S_0,\ S_n,\ S_r,\ T(p + 1)^{r_e}) \\
&= -2S_rT(p + 1)^{r_e} + 2S_rT(p)^{r_e} + 2S_rT(p + 1)^{2r_e} - 2S_rT(p)^{2r_e} + {}\\
&\ \ \ \ \ \ 2S_0T(p + 1)^{r_e} - 2S_0T(p)^{r_e} - S_0T(p + 1)^{2r_e} + S_0T(p)^{2r_e} - {}\\
&\ \ \ \ \ \ S_nT(p + 1)^{2r_e} + S_nT(p)^{2r_e}\\
\end{split}
\end{equation*} Ξ S ( p ) β = S ( p ) β S ( p + 1 ) = B ( S 0 β , Β S n β , Β S r β , Β T ( p ) r e β ) β B ( S 0 β , Β S n β , Β S r β , Β T ( p + 1 ) r e β ) = β 2 S r β T ( p + 1 ) r e β + 2 S r β T ( p ) r e β + 2 S r β T ( p + 1 ) 2 r e β β 2 S r β T ( p ) 2 r e β + Β Β Β Β Β Β 2 S 0 β T ( p + 1 ) r e β β 2 S 0 β T ( p ) r e β β S 0 β T ( p + 1 ) 2 r e β + S 0 β T ( p ) 2 r e β β Β Β Β Β Β Β S n β T ( p + 1 ) 2 r e β + S n β T ( p ) 2 r e β β β
Just as with our 2nd order variant, we only care about the smallest value of Ξ S ( p ) \Delta S(p) Ξ S ( p ) , which will be Ξ S ( N 0 β 1 ) \Delta S(N_0 - 1) Ξ S ( N 0 β β 1 ) as we showed earlier. We can reuse a simplification that preserves our T T T invocations, adding in our exponent:
Ξ S ( N 0 β 1 ) = 2 S r 1 N 0 β 1 r e + β 2 S 0 1 N 0 β 1 r e + β 2 S r 1 N 0 β 1 2 r e + S 0 1 N 0 β 1 2 r e + S n 1 N 0 β 1 2 r e \large
\begin{equation*}
\begin{split}
\Delta S(N_0 - 1) &= 2S_r\frac{1}{N_0-1}^{r_e} + -2S_0\frac{1}{N_0-1}^{r_e} + -2S_r\frac{1}{N_0-1}^{2r_e} + S_0\frac{1}{N_0-1}^{2r_e} + S_n\frac{1}{N_0-1}^{2r_e}
\end{split}
\end{equation*} Ξ S ( N 0 β β 1 ) β = 2 S r β N 0 β β 1 1 β r e β + β 2 S 0 β N 0 β β 1 1 β r e β + β 2 S r β N 0 β β 1 1 β 2 r e β + S 0 β N 0 β β 1 1 β 2 r e β + S n β N 0 β β 1 1 β 2 r e β β β
Lets substitute out 1 N 0 β 1 r e \Large \frac{1}{N_0-1}^{r_e} N 0 β β 1 1 β r e β with a term N N N :
Ξ S ( N 0 β 1 ) = 2 S r N β 2 S r N 2 β 2 S 0 N + S 0 N 2 + S n N 2 = S 0 N 2 + S n N 2 β S r N 2 β 2 S 0 N + 2 S r N = ( S 0 + S n β 2 S r ) N 2 + ( β 2 S 0 + 2 S r ) N \large
\begin{equation*}
\begin{split}
\Delta S(N_0 - 1) &= 2S_rN - 2S_rN^2 - 2S_0N + S_0N^2 + S_nN^2\\
&= S_0N^2 + S_nN^2 - S_rN^2 - 2S_0N + 2S_rN\\
&= (S_0 + S_n - 2S_r)N^2 + (-2S_0+2S_r)N\\
\end{split}
\end{equation*} Ξ S ( N 0 β β 1 ) β = 2 S r β N β 2 S r β N 2 β 2 S 0 β N + S 0 β N 2 + S n β N 2 = S 0 β N 2 + S n β N 2 β S r β N 2 β 2 S 0 β N + 2 S r β N = ( S 0 β + S n β β 2 S r β ) N 2 + ( β 2 S 0 β + 2 S r β ) N β β
Now we can rephrase the quadratic interms of N N N :
a = S 0 + S n β 2 S r b = β 2 S 0 + 2 S r Ξ S ( N 0 β 1 ) = a N 2 + b N \large
\begin{equation*}
\begin{split}
a &= S_0 + S_n - 2S_r \\
b &= -2S_0 + 2S_r \\
\Delta S(N_0 - 1) &= aN^2 +bN\\
\end{split}
\end{equation*} a b Ξ S ( N 0 β β 1 ) β = S 0 β + S n β β 2 S r β = β 2 S 0 β + 2 S r β = a N 2 + b N β β
Once we solve for N N N , we can then rearrange to solve for all values of r e r_e r e β that fulfill our inequality, in terms of r c , S 0 , S n , N 0 r_c, S_0, S_n, N_0 r c β , S 0 β , S n β , N 0 β :
1 β€ a N 2 + b N \large
1 \le aN^2 + bN 1 β€ a N 2 + b N
Before solving the quadratic, lets consider the roots. We can simplify a a a and b b b into the the simplest terms:
a = S 0 + S n β 2 S r = S 0 + S n β 2 ( ( 1 β r c ) S m + r c S 0 ) = S 0 + S n β 2 ( ( 1 β r c ) S 0 + S n 2 + r c S 0 ) = S 0 + S n β 2 ( S 0 + S n β r c S 0 β r c S n 2 + r c S 0 ) = S 0 + S n β S 0 β S n + r c S 0 + r c S n β 2 r c S 0 = r c S 0 + r c S n β 2 r c S 0 = r c S n β r c S 0 = r c ( S n β S 0 ) b = β 2 S 0 + 2 S r = β 2 S 0 + 2 ( ( 1 β r c ) S m + r c S 0 ) = β 2 S 0 + S 0 + S n β r c S 0 β r c S n + 2 r c S 0 = β S 0 + S n β r c S n + r c S 0 = r c ( S 0 β S n ) β S 0 + S n = ( S 0 β S n ) ( r c β 1 ) \large
\begin{equation*}
\begin{split}
a &= S_0 + S_n - 2S_r \\
&= S_0 + S_n - 2((1-r_c)S_m + r_cS_0)\\
&= S_0 + S_n - 2((1 - r_c)\frac{S_0 + S_n}{2} + r_cS_0)\\
&= S_0 + S_n - 2(\frac{S_0 + S_n - r_cS_0 - r_cS_n}{2} + r_cS_0)\\
&= S_0 + S_n - S_0 - S_n + r_cS_0 + r_cS_n - 2r_cS_0\\
&= r_cS_0 + r_cS_n - 2r_cS_0\\
&= r_cS_n - r_cS_0\\
&= r_c(S_n - S_0)\\\\
b &= -2S_0 + 2S_r \\
&= -2S_0 + 2((1-r_c)S_m + r_cS_0) \\
&= -2S_0 + S_0 + S_n - r_cS_0 - r_cS_n + 2r_cS_0\\
&= -S_0 + S_n - r_cS_n + r_cS_0\\
&= r_c(S_0 - S_n) - S_0 + S_n\\
&= (S_0 - S_n)(r_c - 1)\\
\end{split}
\end{equation*} a b β = S 0 β + S n β β 2 S r β = S 0 β + S n β β 2 (( 1 β r c β ) S m β + r c β S 0 β ) = S 0 β + S n β β 2 (( 1 β r c β ) 2 S 0 β + S n β β + r c β S 0 β ) = S 0 β + S n β β 2 ( 2 S 0 β + S n β β r c β S 0 β β r c β S n β β + r c β S 0 β ) = S 0 β + S n β β S 0 β β S n β + r c β S 0 β + r c β S n β β 2 r c β S 0 β = r c β S 0 β + r c β S n β β 2 r c β S 0 β = r c β S n β β r c β S 0 β = r c β ( S n β β S 0 β ) = β 2 S 0 β + 2 S r β = β 2 S 0 β + 2 (( 1 β r c β ) S m β + r c β S 0 β ) = β 2 S 0 β + S 0 β + S n β β r c β S 0 β β r c β S n β + 2 r c β S 0 β = β S 0 β + S n β β r c β S n β + r c β S 0 β = r c β ( S 0 β β S n β ) β S 0 β + S n β = ( S 0 β β S n β ) ( r c β β 1 ) β β
We can then clearly see that when r c = 0 , Β a = 0 S n β 0 S 0 = 0 \large r_c = 0, \ a = 0S_n - 0S_0 = 0 r c β = 0 , Β a = 0 S n β β 0 S 0 β = 0 , and that when r c = 1 , Β b = S 0 ( 1 β 1 ) + S n ( 1 β 1 ) = 0 \large r_c = 1, \ b = S_0(1 - 1) + S_n(1-1) = 0 r c β = 1 , Β b = S 0 β ( 1 β 1 ) + S n β ( 1 β 1 ) = 0 . Therefore, there are equations to consider:
1 β€ a N 2 + b N Β whenΒ 0 < r c < 1 1 β€ b N Β whenΒ r c = 0 1 β€ a N 2 Β whenΒ r c = 1 \large
\begin{align*}
1 &\le aN^2 + bN &\text{ when } &0 < r_c < 1 \\
1 &\le bN &\text{ when } &r_c = 0 \\
1 &\le aN^2 &\text{ when } &r_c = 1 \\
\end{align*} 1 1 1 β β€ a N 2 + b N β€ b N β€ a N 2 β Β whenΒ Β whenΒ Β whenΒ β 0 < r c β < 1 r c β = 0 r c β = 1 β
Then we must solve for N N N in all three cases:
β b + b 2 + 4 a 2 a β€ N β€ β b β b 2 + 4 a 2 a Β whenΒ 0 < r c < 1 1 b β€ N Β whenΒ r c = 0 1 a β€ N Β whenΒ r c = 1 \large
\begin{align}
\frac{-b + \sqrt{b^2 + 4a}}{2a} \le N &\le \frac{-b - \sqrt{b^2 + 4a}}{2a} &\text{ when } &0 < r_c < 1 \\
% \frac{1}{2}\bigg(\frac{\sqrt{b^2 - 4ac} - b}) \le N &\le &0 < r_c < 1\\
\frac{1}{b} &\le N &\text{ when } &r_c = 0 \\
\sqrt{\frac{1}{a}} &\le N &\text{ when } &r_c = 1 \\
\end{align}
% \begin{equation*}
% \begin{split}
% \frac{-b + \sqrt{b^2 + 4a}}{2a} \le N &\le \frac{-b - \sqrt{b^2 + 4a}}{2a}\\
% \end{split}
% \end{equation*} 2 a β b + b 2 + 4 a β β β€ N b 1 β a 1 β β β β€ 2 a β b β b 2 + 4 a β β β€ N β€ N β Β whenΒ Β whenΒ Β whenΒ β 0 < r c β < 1 r c β = 0 r c β = 1 β β
Lets start by substituting & solving the two simple cases:
1 S n β S 0 β€ N Β whenΒ r c = 0 1 S n β S 0 β€ N Β whenΒ r c = 1 \large
\begin{align*}
\frac{1}{S_n - S_0} &\le N &\text{ when } &r_c = 0 \\
\sqrt{\frac{1}{S_n - S_0}} &\le N &\text{ when } &r_c = 1 \\
\end{align*} S n β β S 0 β 1 β S n β β S 0 β 1 β β β β€ N β€ N β Β whenΒ Β whenΒ β r c β = 0 r c β = 1 β
solving r e r_e r e β when r c = 0 r_c = 0 r c β = 0
Substituting N:
N β₯ 1 S n β S 0 ( 1 N 0 β 1 ) r e β₯ 1 S n β S 0 \large
\begin{align*}
N &\ge \frac{1}{S_n - S_0}\\
\bigg(\frac{1}{N_0 - 1}\bigg)^{r_e} &\ge \frac{1}{S_n - S_0}\\
\end{align*} N ( N 0 β β 1 1 β ) r e β β β₯ S n β β S 0 β 1 β β₯ S n β β S 0 β 1 β β
Solving for r e r_e r e β with change of base:
r e ln β‘ 1 N 0 β 1 β₯ ln β‘ 1 S n β S 0 r e β€ ln β‘ 1 S n β S 0 / ln β‘ 1 N 0 β 1 \large
\begin{align*}
r_e \ln \frac{1}{N_0 - 1} &\ge \ln \frac{1}{S_n - S_0}\\
r_e &\le \ln \frac{1}{S_n - S_0} \Bigg/ \ln \frac{1}{N_0 - 1}\\
\end{align*} r e β ln N 0 β β 1 1 β r e β β β₯ ln S n β β S 0 β 1 β β€ ln S n β β S 0 β 1 β / ln N 0 β β 1 1 β β
Solving for an example value to spot check with:
N 0 = 200 S 0 = 1000 S n = 100000 r e β€ ln β‘ 1 100000 β 1000 / ln β‘ 1 200 β 1 r e β€ ln β‘ 1 99000 / ln β‘ 1 199 r e βͺ
2.173098944800602 \large
\begin{align*}
N_0 &= 200\\
S_0 &= 1000\\
S_n &= 100000\\
r_e &\le \ln \frac{1}{100000 - 1000} \Bigg/ \ln \frac{1}{200 - 1}\\
r_e &\le \ln \frac{1}{99000} \Bigg/ \ln \frac{1}{199}\\
r_e &\lessapprox 2.173098944800602
\end{align*} N 0 β S 0 β S n β r e β r e β r e β β = 200 = 1000 = 100000 β€ ln 100000 β 1000 1 β / ln 200 β 1 1 β β€ ln 99000 1 β / ln 199 1 β βͺ
2.173098944800602 β
Plugging the value back in to Ξ S ( p ) \large \Delta S(p) Ξ S ( p ) , which should get a value close to 1 1 1 :
S m = 1000 + 100000 2 = 50500 S r = ( 1 β 0 ) 50500 + 0 ( 1000 ) = 50500 r e β 2.173098944800602 T ( 199 ) r e β ( 1 199 β 1 ) 2.173098944800602 β 0.0000102121996910658 T ( 200 ) r e β ( 1 200 β 1 ) 2.173098944800602 β 0.00001010101010101007 S ( 199 ) = B ( 1000 , 100000 , 50500 , 0.0000102121996910658 ) β 1001 S ( 200 ) = B ( 1000 , 100000 , 50500 , 0.00001010101010101007 ) β 1000 Ξ S ( 199 ) β 1001 β 1000 β 1 \large
\begin{align*}
S_m &= \frac{1000 + 100000}{2} = 50500\\
S_r &= (1 - 0)50500 + 0(1000) = 50500\\
r_e &\approx 2.173098944800602\\
T(199)^{r_e} &\approx \bigg(\frac{1}{199 - 1}\bigg)^{2.173098944800602} \approx 0.0000102121996910658 \\
T(200)^{r_e} &\approx \bigg(\frac{1}{200 - 1}\bigg)^{2.173098944800602} \approx 0.00001010101010101007 \\
S(199) &= B(1000, 100000, 50500, 0.0000102121996910658) \approx 1001\\
S(200) &= B(1000, 100000, 50500, 0.00001010101010101007) \approx 1000\\
\Delta S(199) &\approx 1001 - 1000 \approx 1
\end{align*} S m β S r β r e β T ( 199 ) r e β T ( 200 ) r e β S ( 199 ) S ( 200 ) Ξ S ( 199 ) β = 2 1000 + 100000 β = 50500 = ( 1 β 0 ) 50500 + 0 ( 1000 ) = 50500 β 2.173098944800602 β ( 199 β 1 1 β ) 2.173098944800602 β 0.0000102121996910658 β ( 200 β 1 1 β ) 2.173098944800602 β 0.00001010101010101007 = B ( 1000 , 100000 , 50500 , 0.0000102121996910658 ) β 1001 = B ( 1000 , 100000 , 50500 , 0.00001010101010101007 ) β 1000 β 1001 β 1000 β 1 β
Yippee!!!
solving r e r_e r e β when r c = 1 r_c = 1 r c β = 1
Iβll follow the same process. Subsituting for N and solving for r e r_e r e β with change of base:
N β₯ 1 S n β S 0 ( 1 N 0 β 1 ) r e β₯ 1 S n β S 0 r e ln β‘ 1 N 0 β 1 β₯ ln β‘ 1 S n β S 0 r e β€ ln β‘ 1 S n β S 0 / ln β‘ 1 N 0 β 1 \large
\begin{align*}
N &\ge \sqrt{\frac{1}{S_n - S_0}}\\
\bigg(\frac{1}{N_0 - 1}\bigg)^{r_e} &\ge \sqrt{\frac{1}{S_n - S_0}}\\
r_e \ln \frac{1}{N_0 - 1} &\ge \ln \sqrt{\frac{1}{S_n - S_0}}\\
r_e &\le \ln \sqrt{\frac{1}{S_n - S_0}} \Bigg/ \ln \frac{1}{N_0 - 1}\\
\end{align*} N ( N 0 β β 1 1 β ) r e β r e β ln N 0 β β 1 1 β r e β β β₯ S n β β S 0 β 1 β β β₯ S n β β S 0 β 1 β β β₯ ln S n β β S 0 β 1 β β β€ ln S n β β S 0 β 1 β β / ln N 0 β β 1 1 β β
Solving for an example value to spot check with:
N 0 = 200 S 0 = 1000 S n = 100000 r e β€ ln β‘ 1 100000 β 1000 / ln β‘ 1 200 β 1 r e β€ ln β‘ 1 99000 / ln β‘ 1 199 r e βͺ
1.086549472400301 \large
\begin{align*}
N_0 &= 200\\
S_0 &= 1000\\
S_n &= 100000\\
r_e &\le \ln \sqrt{\frac{1}{100000 - 1000}} \Bigg/ \ln \frac{1}{200 - 1}\\
r_e &\le \ln \sqrt{\frac{1}{99000}} \Bigg/ \ln \frac{1}{199}\\
r_e &\lessapprox 1.086549472400301
\end{align*} N 0 β S 0 β S n β r e β r e β r e β β = 200 = 1000 = 100000 β€ ln 100000 β 1000 1 β β / ln 200 β 1 1 β β€ ln 99000 1 β β / ln 199 1 β βͺ
1.086549472400301 β
Plugging the value back in to Ξ S ( p ) \large \Delta S(p) Ξ S ( p ) , which should get a value close to 1 1 1 :
S m = 1000 + 100000 2 = 50500 S r = ( 1 β 0 ) 50500 + 0 ( 1000 ) = 50500 r e β 1.086549472400301 T ( 199 ) r e β ( 1 199 β 1 ) 1.086549472400301 β 0.0000102121996910658 T ( 200 ) r e β ( 1 200 β 1 ) 1.086549472400301 β 0.00001010101010101007 S ( 199 ) = B ( 1000 , 100000 , 50500 , 0.0000102121996910658 ) β 1001 S ( 200 ) = B ( 1000 , 100000 , 50500 , 0.00001010101010101007 ) β 1000 Ξ S ( 199 ) β 1001 β 1000 β 1 \large
\begin{align*}
S_m &= \frac{1000 + 100000}{2} = 50500\\
S_r &= (1 - 0)50500 + 0(1000) = 50500\\
r_e &\approx 1.086549472400301\\
T(199)^{r_e} &\approx \bigg(\frac{1}{199 - 1}\bigg)^{1.086549472400301} \approx 0.0000102121996910658 \\
T(200)^{r_e} &\approx \bigg(\frac{1}{200 - 1}\bigg)^{1.086549472400301} \approx 0.00001010101010101007 \\
S(199) &= B(1000, 100000, 50500, 0.0000102121996910658) \approx 1001\\
S(200) &= B(1000, 100000, 50500, 0.00001010101010101007) \approx 1000\\
\Delta S(199) &\approx 1001 - 1000 \approx 1
\end{align*} S m β S r β r e β T ( 199 ) r e β T ( 200 ) r e β S ( 199 ) S ( 200 ) Ξ S ( 199 ) β = 2 1000 + 100000 β = 50500 = ( 1 β 0 ) 50500 + 0 ( 1000 ) = 50500 β 1.086549472400301 β ( 199 β 1 1 β ) 1.086549472400301 β 0.0000102121996910658 β ( 200 β 1 1 β ) 1.086549472400301 β 0.00001010101010101007 = B ( 1000 , 100000 , 50500 , 0.0000102121996910658 ) β 1001 = B ( 1000 , 100000 , 50500 , 0.00001010101010101007 ) β 1000 β 1001 β 1000 β 1 β
Yayy!!!
solving r e r_e r e β when 0 < r c < 1 0 < r_c < 1 0 < r c β < 1
Now I can worry about the tougher one. Lets substitute and simplify both sides of the quadratic while taking care to retain the rootβs sign & inequality:
β ( S 0 β S n ) ( r c β 1 ) Β± [ ( S 0 β S n ) ( r c β 1 ) ] 2 + 4 r c ( S n β S 0 ) 2 r c ( S n β S 0 ) ( S n β S 0 ) ( r c β 1 ) 2 r c ( S n β S 0 ) Β± ( S 0 β S n ) 2 ( r c β 1 ) 2 + 4 r c ( S n β S 0 ) 4 r c 2 ( S n β S 0 ) 2 r c β 1 2 r c Β± β ( S n β S 0 ) ( S 0 β S n ) ( r c β 1 ) 2 + 4 r c ( S n β S 0 ) 4 r c 2 ( S n β S 0 ) 2 r c β 1 2 r c Β± ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) \large
\begin{align*}
& \frac{-(S_0 - S_n)(r_c - 1) \pm \sqrt{[(S_0 - S_n)(r_c - 1)]^2 + 4r_c(S_n - S_0)}}{2r_c(S_n - S_0)}\\
& \frac{\cancel{(S_n - S_0)}(r_c - 1)}{2r_c\cancel{(S_n - S_0)}} \pm \sqrt{\frac{(S_0 - S_n)^2(r_c - 1)^2 + 4r_c(S_n - S_0)}{4r_c^2(S_n - S_0)^2}}\\
& \frac{r_c - 1}{2r_c} \pm \sqrt{\frac{-\cancel{(S_n - S_0)}(S_0 - S_n)(r_c - 1)^2 + 4r_c\cancel{(S_n - S_0)}}{4r_c^2(S_n - S_0)^{\cancel{2}}}}\\
& \frac{r_c - 1}{2r_c} \pm \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}}\\
\end{align*} β 2 r c β ( S n β β S 0 β ) β ( S 0 β β S n β ) ( r c β β 1 ) Β± [( S 0 β β S n β ) ( r c β β 1 ) ] 2 + 4 r c β ( S n β β S 0 β ) β β 2 r c β ( S n β β S 0 β ) β ( S n β β S 0 β ) β ( r c β β 1 ) β Β± 4 r c 2 β ( S n β β S 0 β ) 2 ( S 0 β β S n β ) 2 ( r c β β 1 ) 2 + 4 r c β ( S n β β S 0 β ) β β 2 r c β r c β β 1 β Β± 4 r c 2 β ( S n β β S 0 β ) 2 β β ( S n β β S 0 β ) β ( S 0 β β S n β ) ( r c β β 1 ) 2 + 4 r c β ( S n β β S 0 β ) β β β 2 r c β r c β β 1 β Β± 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β β
Fitting the simplified form back into the inequality with the appropriate signs & direction preserved, so that I can solve for r e r_e r e β
r c β 1 2 r c + ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) β€ N β€ r c β 1 2 r c β ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) \large
\begin{align*}
\frac{r_c - 1}{2r_c} + \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}} \le N \le \frac{r_c - 1}{2r_c} - \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}}\\
\end{align*} 2 r c β r c β β 1 β + 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β β€ N β€ 2 r c β r c β β 1 β β 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β β
We can perform a change of base to solve for r e r_e r e β . Note the direction of inequality has changed due to the division of the decreasing function l n ( 1 N 0 β 1 ) ln(\frac{1}{N_0 - 1}) l n ( N 0 β β 1 1 β ) , which has the limit lim β‘ N 0 βΆ β l n ( 1 N 0 β 1 ) = β β Β forΒ allΒ { N 0 β R β£ N 0 > 1 } \lim\limits_{N_0\longrightarrow\infty} ln(\frac{1}{N_0 - 1}) = -\infty \text{ for all } \lbrace N_0 \in \mathbb{R} \mid N_0 > 1\rbrace N 0 β βΆ β lim β l n ( N 0 β β 1 1 β ) = β β Β forΒ allΒ { N 0 β β R β£ N 0 β > 1 } .
ln β‘ ( r c β 1 2 r c + ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) ) ln β‘ ( 1 N 0 β 1 ) β₯ r e β₯ ln β‘ ( r c β 1 2 r c β ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) ) ln β‘ ( 1 N 0 β 1 ) \large
\begin{align*}
\frac{\ln(\frac{r_c - 1}{2r_c} + \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}})}{\ln(\frac{1}{N_0 - 1})} \ge r_e &\ge \frac{\ln(\frac{r_c - 1}{2r_c} - \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}})}{\ln(\frac{1}{N_0 - 1})} \\
\end{align*} ln ( N 0 β β 1 1 β ) ln ( 2 r c β r c β β 1 β + 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β ) β β₯ r e β β β₯ ln ( N 0 β β 1 1 β ) ln ( 2 r c β r c β β 1 β β 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β ) β β
I may have some cases where the solution to parts of this expression are imaginary:
( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) β C Β whenΒ ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) < 0 Β orΒ ln β‘ ( r c β 1 2 r c Β± ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) ) β C Β whenΒ r c β 1 2 r c Β± ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) < 0 \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}} \in \Complex \text{ when } \frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)} < 0 \\
\text{ or }\\
\ln(\frac{r_c - 1}{2r_c} \pm \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}}) \in \Complex \text{ when } \frac{r_c - 1}{2r_c} \pm \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}} < 0 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β β C Β whenΒ 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β < 0 Β orΒ ln ( 2 r c β r c β β 1 β Β± 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β ) β C Β whenΒ 2 r c β r c β β 1 β Β± 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β < 0
It turns out that ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) < 0 \frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)} < 0 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β < 0 is never true, because it implies ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c < 0 (S_n - S_0)(r_c - 1)^2 + 4r_c < 0 ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β < 0 . r c β 1 r_c - 1 r c β β 1 can be negative when r c < 1 r_c < 1 r c β < 1 - so always for 0 < r c < 1 0 < r_c < 1 0 < r c β < 1 - but that expression is squared, so the result will always be positive. Therefore, the inner square root will never be imaginary.
However, the logarithm can be imaginary. The root scales by S n S_n S n β and S 0 S_0 S 0 β , and will always be greater than r c β 1 2 r c \frac{r_c - 1}{2r_c} 2 r c β r c β β 1 β . Taking a look at the inequality:
r c β 1 2 r c Β± ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) < 0 Β± ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) < r c β 1 2 r c 2 Β± ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) < ( r c β 1 ) 2 4 r c 2 Β± ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) < ( S n β S 0 ) ( r c β 1 ) 2 4 r c 2 ( S n β S 0 ) \large
\begin{align*}
\frac{r_c - 1}{2r_c} \pm \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}} &< 0\\
\pm \frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)} &< \frac{r_c - 1}{2r_c}^2\\
\pm \frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)} &< \frac{(r_c - 1)^2}{4r_c^2}\\
\pm \frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)} &< \frac{(S_n - S_0)(r_c - 1)^2}{4r_c^2(S_n - S_0)}\\
\end{align*} 2 r c β r c β β 1 β Β± 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β Β± 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β Β± 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β Β± 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β < 0 < 2 r c β r c β β 1 β 2 < 4 r c 2 β ( r c β β 1 ) 2 β < 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 β β
Since the sides are equivalent other than the + 4 r c + 4r_c + 4 r c β in the numerator on the left side, which is always positive, this inequality has no real solutions with the positive root. In contrast this inequality is always true when the root is negative. Therefore, ln β‘ ( r c β 1 2 r c β ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) ) \ln(\frac{r_c - 1}{2r_c} - \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}}) ln ( 2 r c β r c β β 1 β β 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β ) is always imaginary, and ln β‘ ( r c β 1 2 r c + ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) ) \ln(\frac{r_c - 1}{2r_c} + \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}}) ln ( 2 r c β r c β β 1 β + 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β ) is never imaginary. Iβll define a set E r E_r E r β :
E r = { β
r c β R β
β | β
β 0 < r c < 1 ( β r e β R ) [ 1 β€ r e β€ ln β‘ ( r c β 1 2 r c + ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) ) / ln β‘ ( 1 N 0 β 1 ) ] β
} β΅ Ξ S ( p ) β₯ 1 β
β βΈ β
β ln β‘ ( r c β 1 2 r c + ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) ) / ln β‘ ( 1 N 0 β 1 ) \large
\begin{align*}
E_r &= \Set { r_c \in \R | 0 < r_c < 1 (\exists r_e \in \R)\Bigg[1 \le r_e \le \ln\bigg(\frac{r_c - 1}{2r_c} + \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}}\bigg) \Bigg/ \ln(\frac{1}{N_0 - 1}) \Bigg]}\\
&\because \Delta S(p) \ge 1 \impliedby \ln\bigg(\frac{r_c - 1}{2r_c} + \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}}\bigg) \Bigg/ \ln(\frac{1}{N_0 - 1})\\
\end{align*} E r β β = β© β¨ β§ β r c β β R β 0 < r c β < 1 ( β r e β β R ) [ 1 β€ r e β β€ ln ( 2 r c β r c β β 1 β + 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β ) / ln ( N 0 β β 1 1 β ) ] β β¬ β« β β΅ Ξ S ( p ) β₯ 1 βΈ ln ( 2 r c β r c β β 1 β + 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β ) / ln ( N 0 β β 1 1 β ) β
Now I can verify by plugging in some values:
r c = 0.5 N 0 = 500 S 0 = 1000 S n = 100 , 000 r e β€ ln β‘ ( 0.5 β 1 2 ( 0.5 ) + ( 100000 β 1000 ) ( 0.5 β 1 ) 2 + 4 ( 0.5 ) 4 ( 0.5 ) 2 ( 100000 β 1000 ) ) ln β‘ ( 1 500 β 1 ) r e β€ ln β‘ ( β 1 2 + 24752 99000 ) ln β‘ ( 1 499 ) r e βͺ
1.73996998737 \large
\begin{equation*}
\begin{split}
r_c &= 0.5\\
N_0 &= 500\\
S_0 &= 1000\\
S_n &= 100,000\\
re &\le \frac{\ln(\frac{0.5 - 1}{2(0.5)} + \sqrt{\frac{(100000 - 1000)(0.5 - 1)^2 + 4(0.5)}{4(0.5)^2(100000 - 1000)}})}{\ln(\frac{1}{500 - 1})}\\
re &\le \frac{\ln(-\frac{1}{2} + \sqrt{\frac{24752}{99000}})}{\ln(\frac{1}{499})}\\
re &\lessapprox 1.73996998737\\
\end{split}
\end{equation*} r c β N 0 β S 0 β S n β re re re β = 0.5 = 500 = 1000 = 100 , 000 β€ ln ( 500 β 1 1 β ) ln ( 2 ( 0.5 ) 0.5 β 1 β + 4 ( 0.5 ) 2 ( 100000 β 1000 ) ( 100000 β 1000 ) ( 0.5 β 1 ) 2 + 4 ( 0.5 ) β β ) β β€ ln ( 499 1 β ) ln ( β 2 1 β + 99000 24752 β β ) β βͺ
1.73996998737 β β
Plugging the value back in to Ξ S ( p ) \large \Delta S(p) Ξ S ( p ) , which should get a value close to 1 1 1 :
S m = 1000 + 100000 2 = 50500 S r = ( 1 β 0.5 ) 50500 + 0.5 ( 1000 ) = 25750 r e β 1.73996998737 T ( 499 ) r e β ( 1 499 β 1 ) 1.73996998737 β 0.00002027224725513445 T ( 500 ) r e β ( 1 500 β 1 ) 1.73996998737 β 0.00002020161209699543 S ( 499 ) = B ( 1000 , 100000 , 25750 , 0.00002027224725513445 ) β 1001 S ( 500 ) = B ( 1000 , 100000 , 25750 , 0.00002020161209699543 ) β 1000 Ξ S ( 499 ) β 1001 β 1000 β 1 \large
\begin{align*}
S_m &= \frac{1000 + 100000}{2} = 50500\\
S_r &= (1 - 0.5)50500 + 0.5(1000) = 25750\\
r_e &\approx 1.73996998737\\
T(499)^{r_e} &\approx \bigg(\frac{1}{499 - 1}\bigg)^{1.73996998737} \approx 0.00002027224725513445 \\
T(500)^{r_e} &\approx \bigg(\frac{1}{500 - 1}\bigg)^{1.73996998737} \approx 0.00002020161209699543 \\
S(499) &= B(1000, 100000, 25750, 0.00002027224725513445) \approx 1001\\
S(500) &= B(1000, 100000, 25750, 0.00002020161209699543) \approx 1000\\
\Delta S(499) &\approx 1001 - 1000 \approx 1
\end{align*} S m β S r β r e β T ( 499 ) r e β T ( 500 ) r e β S ( 499 ) S ( 500 ) Ξ S ( 499 ) β = 2 1000 + 100000 β = 50500 = ( 1 β 0.5 ) 50500 + 0.5 ( 1000 ) = 25750 β 1.73996998737 β ( 499 β 1 1 β ) 1.73996998737 β 0.00002027224725513445 β ( 500 β 1 1 β ) 1.73996998737 β 0.00002020161209699543 = B ( 1000 , 100000 , 25750 , 0.00002027224725513445 ) β 1001 = B ( 1000 , 100000 , 25750 , 0.00002020161209699543 ) β 1000 β 1001 β 1000 β 1 β
Yippee!!!
Sum of the parts
Given our constraints on the parameters, lets define sets that describe the valid domain of r e \large r_e r e β such that the Differential Constraint is fullfilled:
E 0 = { β
( r c , r e ) β R c Γ N β
β | β
β r c = 0 β§ 1 β€ r e β€ ln β‘ 1 S n β S 0 / ln β‘ 1 N 0 β 1 β
} E 1 = { β
( r c , r e ) β R c Γ N β
β | β
β r c = 1 β§ 1 β€ r e β€ ln β‘ 1 S n β S 0 / ln β‘ 1 N 0 β 1 β
} E r = { β
( r c , r e ) β R c Γ N β
β | β
β 0 < r c < 1 β§ 1 β€ r e β€ ln β‘ ( r c β 1 2 r c + ( S n β S 0 ) ( r c β 1 ) 2 + 4 r c 4 r c 2 ( S n β S 0 ) ) / ln β‘ 1 N 0 β 1 β
} \large
\begin{equation*}
\begin{split}
E_0 &= \Set{(r_c, r_e) \in R_c \times \N | r_c = 0 \land 1 \le r_e \le \ln \frac{1}{S_n - S_0} \Bigg/ \ln \frac{1}{N_0 - 1}}\\
E_1 &= \Set{(r_c, r_e) \in R_c \times \N | r_c = 1 \land 1 \le r_e \le \ln \sqrt{\frac{1}{S_n - S_0}} \Bigg/ \ln \frac{1}{N_0 - 1}}\\
E_r &= \Set{(r_c, r_e) \in R_c \times \N | 0 < r_c < 1 \land 1 \le r_e \le \ln\bigg(\frac{r_c - 1}{2r_c} + \sqrt{\frac{(S_n - S_0)(r_c - 1)^2 + 4r_c}{4r_c^2(S_n - S_0)}}\bigg) \Bigg/ \ln\frac{1}{N_0 - 1}}\\
\end{split}
\end{equation*} E 0 β E 1 β E r β β = { ( r c β , r e β ) β R c β Γ N β r c β = 0 β§ 1 β€ r e β β€ ln S n β β S 0 β 1 β / ln N 0 β β 1 1 β } = { ( r c β , r e β ) β R c β Γ N β r c β = 1 β§ 1 β€ r e β β€ ln S n β β S 0 β 1 β β / ln N 0 β β 1 1 β } = β© β¨ β§ β ( r c β , r e β ) β R c β Γ N β 0 < r c β < 1 β§ 1 β€ r e β β€ ln ( 2 r c β r c β β 1 β + 4 r c 2 β ( S n β β S 0 β ) ( S n β β S 0 β ) ( r c β β 1 ) 2 + 4 r c β β β ) / ln N 0 β β 1 1 β β β¬ β« β β β
Then the set of all valid r e \large r_e r e β can be redefined as:
E = E 0 β§ E 1 β§ E r \large
E = E_0 \land E_1 \land E_r E = E 0 β β§ E 1 β β§ E r β
So long as r e \large r_e r e β is in E E E , that implies that r c \large r_c r c β is in R c R_c R c β ! Weβve fully constrainted both r c \large r_c r c β and r e \large r_e r e β . The scoring function S ( p ) S(p) S ( p ) can be varied for any valid inputs, and it will output a useful score that represents relative performance.
Thanks for reading my nerd post <3
tags: math