Minimums in overlapping intervals

184 Views Asked by At

Problem : Consider an array of randomly generated integers . What is the probability that $i_{1} = min(l_{1},r_{1})$ and $i_{2} = min(l_{2},r_{2})$ ... $i_{n}=(l_{n},r_{n})$ i.e $P(i_{1} = min(l_{1},r_{1}),i_{2} = min(l_{2},r_{2})..., min(l_{2},r_{2})$ ... $i_{n}=(l_{n},r_{n}) $ ? Here $ min(l_{1},r_{1})$ gives the index i $(l_{1}<=i<=r_{1})$ such that Array[i] is the minimum among $Array[l_{1}] ... Array[r_{1}]$ (In plain words - what is the probability that n intervals (maybe overlapping will have some specific $a_{i}$ s as their minimum). Assume $i_{1}<i_{2}<i_{3}..<i_{n} , l_{1}<l_{2}<l_{3}...<l_{n} , r_{1}<r_{2}<..<r_{n} , l_{i}<r_{i} $

Looking at case n=2, I feel that probably a good expression does not exist for this problem. I need help regarding how to solve this problem on a computer.

Case n=2:

enter image description here

Also , since it looks like some standard problem, I would be grateful if someone could point be towards relevant literature/blogs,etc.