Exercises

I will post links to various exercises here -- these are not mandatory, they are provided only to help you do better in the course. The dates on exercises will correspond (more or less) to the date of the lecture that covered the corresponding material.

  • Feb 19. As discussed, conversion to NNF is done in pre-order. Another tark that can be accomplished using pre-order is printing the formulas in polish notation (e.g. (p&q)vr is printed as v&pqr). Generalize to_nnf function so it takes an extra argument - a function to be applied to the node; same way we did to_cnf in the class.
  • Feb 17. Exercises 5.5, 6.2-6.4 in Introduction to Objective Caml.
  • Feb 13. Exercises 4.1 - 4.3 in Introduction to Objective Caml.
  • Feb 10. Exercises 5.4 and 5.8 in Introduction to Objective Caml. Exercise 5.7 will be part of your assignment.
  • Feb 5. Exercises in Chapter 3 of Introduction to Objective Caml, in particular Exercise 3.8 as it will be part of your assignment.
  • Feb 3. Exercise 2.1 in Introduction to Objective Caml.
  • Nov 4. Exercises 1-8 in this paper.
  • Oct 28. Exercises 7.9, 7.11 of Logic, Programming and Prolog (2nd ed)
  • Oct 23. Exercises 5.1, 5.2 in Logic, Programming and Prolog (2nd ed); Exercise 9.1 of Prolog Programming: A First Course; Exercises 5.1-5.3, 10.1-10.3 of Learn Prolog Now!.
  • Oct 21. Exercises 5.1, 5.2 of Logic, Programming and Prolog (2nd ed); Exercise 10.1 of Learn Prolog Now!.
  • Oct 16. Exercises 7.6-7.9 of Logic, Programming and Prolog (2ed); Exercise 8.1 of An introduction to logic programming through Prolog.
  • Oct 7. Exercises for today's lecture are here, the answers are inside.
  • Oct 3. Exercises for today's lecture are here.
  • Sep 23. Exercises for today's lecture are here, the answers are inside.
  • Sep 18. Exercises for today's lecture are here, the answers are inside.
  • Sep 11. Exercises for today's lecture are here, the answers are inside.
  • Sep 9. I recommend to do these exercises (if you can't do 1.5 its ok, if you can -- very good !), and this practice session. Solutions to exercises: here.