Google | onsite | randomly assign cell to 4 players
Anonymous User
822

your are given a 8 x 8 matrix, and there are 4 players. you need to assign cells to 4 players follow a uniform distribution.
if a cell is assign to player one, then one of its four neighbour should also be assigned to player one.
uniform distribution means the probility that a cell assign to each player is the same.

follow up:
what if the matrix is very big ?

Comments (5)