Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
711 views

Calculation of Expected number of inversions in a changing array [closed]

Problem: We have an array of size n and we are am allowed to perform at most K operations where each operation can be decrease the number of inversions by 1. make a random shuffle of the whole array....
v78's user avatar
  • 2,933
-1 votes
2 answers
287 views

What's the expected number of moves in this puzzle?

A binary matrix of size n x n is given. At each step a function checks whether each row and each column of the given matrix has at least one 1. If not, a purely random coordinate is chosen, say i, j ...
ABcDexter's user avatar
  • 2,941
1 vote
0 answers
405 views

To find expected value after performing some operations on array

I find problems in solving these kinds of questions Suppose there is an array A[1....n] and we can perform two kinds of operations on the array: Randomly Select Two Indexes p and q with p < q ...
jaig's user avatar
  • 207