Question

Normalize the following untyped applied lambda calculus expressions as much as possible using the call-by-value rules,...

Normalize the following untyped applied lambda calculus expressions as much as possible using the call-by-value rules, showing all steps CLEARLY, please. TYPED answer is preferred.

a) (λx. x * x) 1

b) (λx. x + 4) ((λy. y + 5) 3)

c) (λf g x. g (f x)) (λa. a * a) (λb. b + 1 + 2) 3

d) (λf x. f (f (f x))) (λb. if b then false else true) true

0 0
Add a comment Improve this question Transcribed image text
Answer #1

assume λx.R .....where R is lambda expression.

a) (λx. x * x) 1

Solution: uderline show the lambda expression

put 1 in the lambda expression

x*x = 1*1 = 1 Ans

b) (λx. x + 4) ((λy. y + 5) 3)

solution: step1:  

((λy. y + 5) 3) ----> y + 5) 3) lambda expression

f(x) value is 3 in place of x....

In given expression write such as f(y) = y+3, where y = 3

so value of expression is 3+5 =8

step : now comlete expression reduced to

(λx. x + 4)8

lambda expression is (x + 4)8 so we put value 8 in place of x

step

8+4 = 12 Ans

c) Solution:

(λf g x. g (f x)) (λa. a * a) (λb. b + 1 + 2) 3

Step   (λb. b + 1 + 2) 3 solve first

step

(b + 1 + 2) 3 = 3+1+2 =6

step solve   (λa. a * a)6

(a * a)6 = 6*6 =36

step solve (λf g x. g (f x))36

Add a comment
Know the answer?
Add Answer to:
Normalize the following untyped applied lambda calculus expressions as much as possible using the call-by-value rules,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Which of the following statement is not true regarding sales tax: a)Sales tax is a...

    1. Which of the following statement is not true regarding sales tax: a)Sales tax is a consumption tax b)Sales tax applies to the sale of certain goods and services c) Sales tax is levied at the point of sale d)Sales tax is collected by the retailer and passed on to the government e)Consumers pay sales tax directly to the state f) If a business fails to collect sales tax from a consumer, they are still responsible for paying the uncollected...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT