Argue that for any constant $0 \gt \alpha \geq 1/2$, the probability is approximately $1-2\alpha$ that on a random input array, PARTITION produces a split more balanced than $1 - \alpha$ to $\alpha$.
you approach solution in two ways:
1) if the partition has to be more balance than $1 - \alpha$ to $\alpha$ the pivot has to be between $\alpha n$ and $(1 - \alpha )n$. The probability of pivot between $\alpha n$ and $(1 - \alpha )n$ is no of elements between $\alpha n$ and $(1 - \alpha )n$ over total no of elements. $$((1 - \alpha )n - \alpha n )/n$$ $$(1 - 2 \alpha) n /n$$ $$(1 - 2 \alpha)$$ 2) partition can split the array in two ways
[ \alpha n , (1 - \alpha )n ]
[(1 - \alpha )n , \alpha n]
The probability of having less balanced PARTITION than $1 - \alpha$ to $\alpha$ occurs if the pivot is in the first \alpha n or the second \alpha n. The probability of having less balanced PARTITION than $1 - \alpha$ to $\alpha$ is $$2 \alpha n /n $$ $$2 \alpha $$ The probability of PARTITION produces a split more balanced than $1 - \alpha$ to $\alpha$ is = 1 - probability having less balanced PARTITION than $1 - \alpha$ to $\alpha$ $$ 1 - 2 \alpha $$
No comments:
Post a Comment