I have following recursive equation

    y(0) = 0

    x(0) = 0

    y(n+1) = If((x(n)<50) then (y(n)+1) else (y(n)-1))

    x(n+1) = If((If((If((x(n)<50) then (y(n)+1) else (y(n)-1))<0) then 1 
             else 0)==0) then (x(n)+1) else x(n))

Where function x(),y() return integer and n natual number.

I know x(N)==100 is true. Want to find the value of N. In the paper, we can try to find x(N-1),x(N-2)... till we are able to find x(0)=0. Is there any other way to do that.Please suggest

  • $\begingroup$ So I guess that the semantics of If(X,Y,Z) means "If 'X', then 'Y' else 'Z', right ? $\endgroup$ – Zubzub Oct 11 '17 at 9:49
  • $\begingroup$ yes I have updated in question $\endgroup$ – Tom Oct 11 '17 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.