Exercises for Week 06

Exercise 00

  1. The index of concepts for this week is in a separate chapter. Peruse it and make sure that its entries make sense to you (otherwise, click on them to check them out).
  2. The lecture notes start with updates (Chapter Lecture Notes, updates). Make sure to check them out regularly, as they reflect the development of the lecture. This week, make extra sure to read the updates, esp. the new section about the rise and fall of Factorial numbers.
  3. Do take the time to peruse the lecture notes of this week and to reproduce their OCaml content.
  4. Go through the food for thought in the chapter about generic programming with natural numbers and document your verifications in your weekly report.

Mandatory exercises

  • Exercise 00: perusing the index and checking the updates
  • Exercise 04: implementing the exponentiation function as an instance of nat_fold_right
  • Exercise 05: implementing the oddp predicate as an instance of nat_fold_right
  • Exercise 06: implementing make_parity_predicate as an instance of nat_fold_right
  • Exercise 07: investigating four instances of nat_fold_right using the scientific method
  • Exercise 08: implementing nat_fold_right as an instance of nat_parafold_right
  • Exercise 12: implementing nat_of_digits as an instance of nat_fold_right or of nat_parafold_right
  • Exercise 15: implementing the summatorial function
  • Exercise 16: implementing the sum function
  • Exercise 17: implementing the summation operator
  • Exercise 18: summing the digits in a string of digits
  • Exercise 19: finding the missing digit in a 9-digits string
  • Exercise 29: investigating four instances of nat_parafold_right using the scientific method
  • Exercise 31: implementing the linear Fibonacci function as an instance of nat_fold_right

Mandatory mini-project

Version

Added Exercise 29 [18 Feb 2023]

Created [10 Jan 2023]

Table Of Contents

Previous topic

The case of the Fibonacci numbers

Next topic

Index of concepts for Week 06