A flow S(t) is constrained by an arrival curve α. The flow is fed into a shaper, with shaping curve σ. We assume that

α(s) = min(m + ps, b + rs)

and

σ(s) = min(P s, B + Rs)

We assume that p>r, m ≤ b and P ≥ R.

The shaper has a fixed buffer size equal to X ≥ m. We require that the buffer never overflows.

1. Assume that B = +∞. Find the smallest of P which guarantees that there is no buffer overflow. Let P_{0} be this value.

2. We do not assume that B = +∞ anymore, but we assume that P is set to the value P_{0} computed in the previous question. Find the value (B_{0}, R_{0}) of (B,R) which guarantees that there is no buffer overflow and minimizes the cost function c(B,R) = aB + R, where a is a positive constant. What is the maximum virtual delay if (P, B, R)=(P_{0}, B_{0}, R_{0}) ?