FixedPointCombinators.init() FixedPointCombinators.expression FixedPointCombinators.clarification FixedPointCombinators.answer FixedPointCombinators.option1 FixedPointCombinators.option2 FixedPointCombinators.option3 FixedPointCombinators.option4

Using our two shortcut notations, define Q to be equal to:

expression

clarification Now, suppose that we apply Q to itself n times, yielding the expression (Q Q ... Q) that contains n + 1 copies of Q. Let us call this expression Rn. For example, in the expression R2 = (Q Q Q), Q is applied to itself twice. So R2 contains 3 copies of Q.

After all of this setup, we are now ready for the punch line: if we pick the right value of n, Rn is a fixed-point combinator, just like the Y combinator!

What is the value of n so that Rn is a fixed-point combinator?

answer
  • option1
  • option2
  • option3
  • option4

What λ expression results if we apply Q to itself once, that is, what is R1 = (Q Q)? Keep Q intact whenever possible; that is, expand Q into its full expression only when needed. For now, perform only ONE β-reduction.

What λ expression results if we apply (Q Q) to Q, that is, what is R2 = (Q Q Q)? Perform only ONE more β-reduction for now.

What λ expression results if we apply (Q Q Q) to Q, that is, what is R3 = (Q Q Q Q)? Again, perform only ONE more β-reduction.

If you see a pattern emerge, generalize it to answer the question. Otherwise, do as many β-reductions as it takes until you get the answer.

The correct answer is: answer