Question: I should have a function in Standard ML language bites : int -> int * int such that for any natural number n, bites n

I should have a function in Standard ML language

bites : int -> int * int

such that for any natural number n, bites n computes a pair (x,y): x + y = n and x = y or x = y + 1. That is, x should be n/2 rounded up and y should be n/2 rounded down. These pairs should be computed by recursion, so only the use of addition and subtraction of numerals is allowed.

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!