Dave is taking a multiple choice test online. The test has Q questions and each question offers 4 responses. Every submission must answer all of the questions, and Dave passes only if every answer is correct. The only thing he learns after a submission is whether he passed.
For each question Dave knows the probability that each of the 4 responses is the correct one, independently of the other questions. Given the number of submissions M he is allowed, Dave picks his answers so that the probability of passing is as large as possible.
Compute the probability that Dave passes when he picks his answers optimally.