We need to talk about languages, and the distinction between natural and formal languages. The rules above are in a natural language, specifically English, and natural languages are ambiguous. The rule “You must take Probability and Statistics or Algebra and Geometry”, for example, is ambiguous in multiple ways. There is the distinction between inclusive and exclusive “or”, for example. Are you allowed to take both Probability and Statistics and Algebra and Geometry or do you have to choose only one pair? How do the Boolean operators “and” and “or” split the phrase “Probability and Statistics or Algebra and Geometry” into meaningful pieces? Are there two possibilities, “Probability and Statistics” and “Algebra and Geometry”, where you have to take one pair or the other? In other words, does the word “or” join separate phrases, each joined by an “and”? Or is it the other way around? In other words, do you have to take Probability, either Statistics or Algebra, and Geometry, three modules where in one case you have a choice between two? Are you allowed to take any modules beyond the ones listed? Does the phrase “Probability and Statistics” even refer to a pair of modules named “Probability” and “Statistics” or is there a single module named “Probability and Statistics”?
You may well be able to guess the intended meaning of the sentence but you’re only able to do so from knowing a lot of context and you may guess wrong. Your guesses for this rule and for others will probably give the same word different meanings in different sentences. It’s likely, for example, that you interpreted the “or” in the sentence above exclusively, so that students cannot take both pairs of modules. But in a statement of prerequisites, like “Before taking Partial Differential Equations you must take Techniques in Theoretical Physics or Ordinary Differential Equations” you’d probably interpret it inclusively, so that a student who had taken both of those modules would also be allowed to take Partial Differential Equations.
To avoid ambiguities like the ones above we need formal languages. Formal languages have a precisely described grammar, which then determines how they are parsed. If you want to program to check module choices it needs them to be expressed in a formal language. Some human will then need to translate from the rules from the natural language they’re expressed in a course handbook to a formal language. That formal language may look superficially like a natural language. We could, for example, continue to use “and” and “or” as logical connectives. But they’d now be used in a way which permits purely mechanical processing rather than human intuition, and they might therefore be interpreted in a way which doesn’t accord with your intuition.