65.8k views
4 votes
Let A be an array of length n of a random permutation of n distinct integers. Compute the

expected number of increasing subarrays (i.e., contiguous subsequence) in A of length k, for
k ≤ n.

User GPierre
by
7.0k points

1 Answer

1 vote

Final answer:

To calculate the expected number of increasing subarrays of length k in a permutation of n distinct integers, one must consider the (n - k + 1) potential starting points and the probability 1/k! of each being increasing, resulting in an expectation of (n - k + 1) / k!.

Step-by-step explanation:

The question at hand requires the computation of the expected number of increasing subarrays of length k within a permutation of n distinct integers. To solve this problem, we need a combination of combinatorial mathematics and probability theory. Since the array contains a random permutation of integers, each element has an equal chance of being in an increasing subarray.

Considering the positions in the array, for a fixed k, there are (n - k + 1) possible starting points for a subarray of length k. Since every number is distinct and the permutation is random, the probability of any such subarray being increasing is 1/k! because there are k! possible orders for k numbers and only one of them is increasing.

Therefore, the expected number of increasing subarrays of length k is the product of the number of possible starting points and the probability of each being increasing, which turns out to be (n - k + 1) / k!.

User Seephor
by
8.1k points