LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
fj_char_max_discrete.h File Reference

Characteristic maximum of a lattice random variable. More...

#include <cmath>
#include <cstddef>
#include <vector>
#include "line/api/fj/fj_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for fj_char_max_discrete.h:

Go to the source code of this file.

Classes

struct  line::fj::FJCharMaxDiscreteResult< T >
 [MK, mK, exact] of fj_char_max_discrete. More...

Namespaces

namespace  line
namespace  line::fj

Enumerations

enum class  line::fj::FJDiscreteDist { line::fj::Geometric , line::fj::Poisson }
 The lattice laws for which the characteristic maximum is closed. More...

Functions

template<class T>
FJCharMaxDiscreteResult< T > line::fj::fj_char_max_discrete (unsigned K, FJDiscreteDist dist, const T &par)
 Characteristic maximum of a lattice random variable.

Detailed Description

Characteristic maximum of a lattice random variable.

Templated port of matlab/src/api/fj/fj_char_max_discrete.m.

With m_K the smallest integer at which P(X > m_K) <= 1/K,

M_K = m_K + K sum_{k >= m_K} P(X > k),

which upper bounds the expected maximum of K i.i.d. copies at O(1) instead of the alternating binomial sum. Two lattice laws close the tail sum:

geometric, P(X = k) = (1-p) p^k: m_K = ceil(-ln K / ln p), M_K = m_K + K p^(m_K+1)/(1-p), exact E[Y_K] = sum_k C(K,k) (-1)^(k+1) p^k/(1-p^k); Poisson: M_K = m_K (1 - K P(X > m_K)) + K theta P(X > m_K - 1).

Definition in file fj_char_max_discrete.h.