CMPSCI 250: Introduction to Computation

Final Exam Fall 2018

David Mix Barrington and Marius Minea

Exam given 20 December 2018

Text posted 31 December 2018


  Q1: 30 points
  Q2: 30 points
  Q3: 30+10 points
  Q4: 30 points
Total: 120+10 points

Here are definitions of some terms, sets, predicates, and statements used on this exam.

Question 1 deals with the following scenario:

During one cold week in December, each dog in the set S = {c, d, n, p} = {Cardie, Duncan, Nina, Pushkin} went for a walk on each day in the set Y = {Mon, Tue, Wed, Thu, Fri}. On each day, each dog chose whether to wear a coat, based on the temperature that morning.

Let Z be the set of integers {..., -3, -2, -1, 0, 1, 2, 3,...}. Let f be the function from S to Z defined so that f(x) is the "critical temperature" (in Celsius) for dog x: the meaning of this will come from Statement I below. Let t be the function from Y to Z defined so that t(y) is the outdoor temperature, in Celsius, on the morning of day y. Let W be the predicate defined so that W(x, y) means "dog x wore a coat on day y".

Question 1 also refers to the following four statements, where the variables are of type "dog", type "day", or type "integer":

The statements are:

N is the set of naturals (non-negative integers, {0, 1, 2, 3,...}.

The Koch snowflake is obtained by recursively defining the polygons Sn in the following way:

Last modified 31 December 2018