Question: 1. Consider the following lambda expression (lambda~x.~(lambda~y.y+x) ((lambda~z.z+x)x) 3) ( x . ( y . y + x ) ( ( z . z +

1. Consider the following lambda expression (\lambda~x.~(\lambda~y.y+x) ((\lambda~z.z+x)x) 3) ( x . ( y . y + x ) ( ( z . z + x ) x ) 3 ) What is the outcome after the first reduction step that eliminates the right-most lambda?

a. ((\lambda~y.y+3) ((\lambda~z.z+3)3))

b. (\lambda~x.~((\lambda~z.z+x)x)+x) 3)

c. (\lambda~x.~(x+x+x) 3)

d. ((\lambda~y.y+3) (3+3))

e. none of the above

2. Consider the following lambda expression

1. Consider the following lambda expression (\lambda~x.~(\lambda~y.y+x) ((\lambda~z.z+x)x) 3) ( x .( x. ( y.y+x)(( z.z+x)x)3)( x. ( y.y+x)(( z.z+x)x)3)

What is the outcome after the first reduction step that eliminates the left-most lambda?

a. ( y . y + x ) ( ( z . z

b. + x ) x ) 3 ) What is the outcome after

c. the first reduction step that eliminates the right-most lambda? a. ((\lambda~y.y+3) ((\lambda~z.z+3)3))

d. b. (\lambda~x.~((\lambda~z.z+x)x)+x) 3) c. (\lambda~x.~(x+x+x) 3) d. ((\lambda~y.y+3) (3+3)) e. none of

e. none of the above

Does using a sequence of left-most or a sequence of right-most reductions of lambda expressions always yields the same normal form (if it exists)?

a. True
b. False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!