Answer the question
In order to leave comments, you need to log in
Algorithm for automatic search for solutions to test questions with mutually exclusive answers?
Gentlemen, I have been struggling with the solution of the following problem for several days now.
Given:
A test set of n questions, each of which has several mutually exclusive answers, and the correct answer is unknown. The test is made up of a random sample of m questions, where m is much less than n. One point is awarded for each correct answer to a test question. The result of the test is the number of points (because the number of correctly answered questions).
Find:
Correct answers to all test questions.
At the moment I tried a complete search. The solution works, but it is extremely ugly due to its inefficiency. All other solutions that came to mind in the worst case still lead to the complexity of a complete enumeration, which is not even ice at all.
Perhaps someone will advise what you can read in order to finish this puzzle? I would like to find some more elegant solutions, or at least a mathematical justification why such solutions cannot exist (for example, if the problem is np-complete).
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
I came up with another slightly perverse method, using statistics.
At the first launch of the program, we memorize one of the questions for its further identification during subsequent launches.
We select each of the answer options one by one. Then we run the test the same finite number of times N with random input sets, substituting, if necessary, our chosen answer.
With a sufficiently large number of runs, looking at the average score, we can unambiguously determine which of the answers is correct.
Of course, I have strong doubts about the effectiveness of such an approach, but in theory it is possible, and who knows, suddenly, with a large test set dimension, it will be more efficient than brute force.
The advantage of this approach is that when determining the 100th correct answer, you will already have 99 ready.
If you want to test this, you will have to write some kind of model so as not to waste performance on working with a real test.
It seems that the task is more practical than theoretical? So my not-so-mathematical vision:
Let's assume that the test set consists of one question. Obviously, we use exhaustive search.
If the test set consists of two questions, then the answer to the first question can only be obtained if the answer to the second question is known. The outcome when we get a wrong answer to question #2 gives 0+0 or 0+1 points, which is not useful information.
Similarly with case 3 and more, we can find the answer to the third question only knowing the answers to the first and second.
Thus, in practice, we need to run our test, iterating over the input sets until we get the sum of points = m at the output.
In the case of m < n , the only and obvious optimization can be not only saving the correct answers in case of a successful selection run, but also using them for substitution during runs to guess the remaining questions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question