[Solved] CS40032 Assignment 2 -Calculus

$25

File Name: CS40032_Assignment__2__Calculus.zip
File Size: 292.02 KB

SKU: [Solved] CS40032 Assignment – 2 λ-Calculus Category: Tag:
5/5 - (1 vote)
  1. Reduce the following -expressions. Show every step of -, -, and [2 * 7 = 14]
    • (z. z) (y. y y) (x. x a)
    • (z. z) (z. z z) (z. z y)
    • (x. y. x y y) (a. a) b
    • (x. y. x y y) (y. y) y
    • (x. x x) (y. y x) z
    • (x. (y. (x y)) y) z
    • (((x. (y. (x y)) (y. y)) w)
  2. Solve the following using Y combinator [2 + 4 = 6]
    • Write the recursive definition for TriProduct where TriProduct(n) can be defined as

TriProduct(n) = n* (TriProduct(n 1) if n > 3

+ TriProduct(n 2)

TriProduct(n 3)),

= 5, if n = 3

= 2, if n = 2

= 1 if n = 1

Using Y combinator, encode the above recursive definition of TriProduct as -expressions

  • Reduce TriProduct Show every step of and reductions. You may skip -reduction steps with a mention of the step.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS40032 Assignment  2 -Calculus[Solved] CS40032 Assignment 2 -Calculus
$25