Star#
Monochrome star \(\mathrm{St}_n\), one center and n - 1 leaves: the
graph of largest variance (Theorem “Exact variance maximizer” of the exact
stabilization-time paper).
A leaf is a peak iff its label exceeds the center’s, and the center is a
peak iff its label is the largest: with the center of label rank r among
n, \(S = n - r\) for r < n and \(S = 1\) for r = n.
- tinto.theory.star.law(n)[source]#
Exact law of the number of peaks on the monochrome star with n nodes.
\(P(S = 1) = 2/n\) and \(P(S = s) = 1/n\) for \(2 \le s \le n - 1\), that is \(P(T = j) = 1/n\) for \(1 \le j \le n - 2\) and \(P(T = n - 1) = 2/n\).
- Parameters:
n (
int) – Number of nodes,n >= 2.- Returns:
\(P(S = s)\) for
s = 0, ..., n.- Return type:
Examples
>>> [str(x) for x in law(4)] ['0', '1/2', '1/4', '1/4', '0']
- tinto.theory.star.mean(n)[source]#
Exact mean stabilization time on the monochrome star with n nodes.
\[\mathbb E\, T = \frac{(n-1)(n+2)}{2n}.\]Examples
>>> mean(4) Fraction(9, 4)