Exercises to LogicTraffic 1. Filling of the truth table and automatic creation of formulas This exercise is about getting to know the program LogicTraffic. a) Open Situation 1 (Menu File, open Situation) and fill the safe column of the truth table such that no collisions can occur. Hint: The values on the safe column change by mouse clicks. b) Set in the formula form combo box Simplest. What is the corresponding formula in propositional logic to this truth table? How would you formulate this formula colloquial? c) Change the formula form combo box to CDNF. What is now the corresponding formula? How would you formulate this formula colloquial? d) Given your answers to b) and c), what can be inferred with respect to a truth table and corresponding formulas? 2. Interpretation of a formula This exercise deepens the understanding of formulas. a) What is the optimal safe formula in CNF to Situation 3? Optimal means that all safe traffic light settings are accepted. Hint: Proceed analogously as in exercise 1a). b) How would you formulate this formula colloquial? c) Take at look at the same formula in the Implication form. How would you interpret this in colloquial language? Remark: The implication AB can be read as “if A then B”. 3. Size of the truth table a) Open Situation 10. How many rows has the corresponding truth table? Hint: There are two display modes for truth tables: “shrink” shows the whole table and “scroll” with fix row height and scroll bar, if needed. What is the relation between the number of rows in the truth table and the number of used variables b) What do you infer from your finding from a) with respect to filling out of a truth table to a situation with many lanes (variables, respectively). 4. Direct creation of a formula Situations with many lanes have a large truth table. To fill this completely out is laborious. But formulas can be created directly. a) Provide directly an optimal and safe formula for Situation 7 in the formula editor. Hint: With the update button you can update the status indication and with the button you can copy the formula to the truth table; beware of the status indication. Think about how a safe formula should sound like in colloquial language. Note and check your formula in the editor. 1 LogicTraffic: advanced exercises 5. Optimal safe formulas for Situation 4 In this exercise the different forms for formulas are compared. a) Write down the optimal safe formula for Situation 4 in every of the six forms provided by LogicTraffic (DNF, CNF, CDNF, CCNF, Implication, Simplest). Note to each formula, how you would you formulate this formula colloquial. b) Consider the formula in CNF. Do you find a method with which you can directly create a formula in CNF to a given traffic situation? Note your method. c) Take a look at the formula in the Implication form. Note again a method with which you can directly create such a formula to a given traffic situation. 6. Optimal safe formula for Situation 5 a) What ist he optimal safe formula for Situation 5 in CNF? b) How can you use the optimal safe formula to Situation 4 in CNF to find a optimal safe formula in CNF for Situation 5? Hint: Notice the similarity between the situations 4 and 5. 7. Three or four variables? a) What ist he optimal safe formula to Situation 6 in CNF? b) Why is there no variable D in this formula? c) Compare the optimal safe formula in CNF to Situation 6 to the optimal safe formula in CNF to Situation 3. What can be said about these two formulas? 8. An all safe crossroad? a) What is the most compact optimal safe formula to Situation 11? b) How do you interpret this formula? 9. A standard form for formulas in propositional logic This exercise is about finding a method, with which to a given truth table an according formula can be generated. a) What ist he optimal safe formula to Situation 3 in CDNF? b) Compare this formula to the truth table. Do you see a connection? Hint: What happens for example, if you change one value in the safe column of the truth table? Try to formulate a connection between truth table and the corresponding formula in CDNF. Note a method, with which to a given truth table a corresponding formula in CDNF Can be generated. 2 LogicTraffic: test exercises (on paper) 10. Note formulas directly, 3 lanes Note an optimal and safe formula for the following situation. C A B 11. Note formulas directly, 4 lanes a) Provide an optimal safe formula fort he following situation. b) Must or can in the formula from a) occur the variable C? Give reasons to your answer. D A B C 12. Drawing of an corresponding situation Sketch a traffic situation analogous to the pictures above for which(¬A¬C) (¬A¬D)(¬B¬D)(¬C¬D)is an optimal safe formula. 13. CDNF form a truth table a) What is he formula corresponding to the following truth table in canonical disjunctive normal form (CDNF)? b) What does the equivalent, shortest formula look like? Hint: The desired formula needs only one variable. 3