You are given k candidate functions. For each one, decide whether it is the characteristic function of some real random variable — and when it is not, name the first reason why.
Each candidate is one of the following types, with parameters given as decimals:
RATIO a b — phi(t) = (1 + a t^2) / (1 + b t^2), with 0.01 <= a, b <= 10.DAMPCOS a b — phi(t) = exp(-a t^2) * cos(b t), with 0.01 <= a <= 5, 0.1 <= b <= 20.COSMIX w b — phi(t) = 1 - w + w cos(b t), with 0.01 <= w <= 2, 0.1 <= b <= 20.BUMP a b — phi(t) = (1 + b) * max(0, 1 - |t| / a), with 0.1 <= a <= 10, 0 <= b <= 1.GAUSSQ a c — phi(t) = exp(-a t^2 - c t^4), with 0.01 <= a <= 1, 0 <= c <= 5.For each candidate, one line:
VALID — if the function is a characteristic function;INVALID ZERO — if phi(0) != 1;INVALID POINT — if phi(0) = 1 but |phi(t)| > 1 for some real t;INVALID PSD — if phi(0) = 1 and |phi(t)| <= 1 everywhere, but the function is still not a characteristic function.A candidate that is not a characteristic function may fail more than one of these conditions; report the first failing category in the order ZERO, POINT, PSD.
The first line contains k (1 <= k <= 6). Each of the next k lines contains a type tag and its two parameters.
This is a standard problem: a submission scores full points if it produces the correct output for every test case, and zero otherwise.
3 RATIO 0.5 2 COSMIX 1.5 3 BUMP 2 0.25
VALID INVALID POINT INVALID ZERO
2 DAMPCOS 0.2 12 GAUSSQ 0.3 1.5
VALID INVALID PSD