A method for generating an exam is disclosed. The method includes setting
initial conditions for the exam, wherein the initial conditions comprises
a number of true propositions p, a number of false propositions q, and a
number of random propositions r, and determining numbers of different
propositions in the exam according to the initial conditions. The method
further includes selecting the p number of true propositions, and
numbering each of the p number of true propositions with a running
number, selecting q number of false propositions, grouping the q number
of false propositions, numbering each of the groups with a group number,
selecting the r number of propositions, grouping the r number of
propositions, numbering each of the groups with a group number. The
method further includes generating an exam according to the p number of
true propositions, the q number of false propositions, and the r number
of propositions.