IBM Interview Question

Logical tasks, probability and combinatorics