Not sure if this is the right place to post, but here goes...
We have been asked to deduce an expression given certain constraints. Now I have deduced a correct expression (i believe) but have been unable to reduce it to the required expression, due to my in experience with the floor and ceiling functions.
My expression for M (given n):
let,
s = floor(sqrt(n))
A = (n - s(s-1) - s) / s
then,
M = 2s + ceiling(A)
The required expression for M:
M = ceiling(2*squrt(n))
any help would be greatly appreciated!!


LinkBack URL
About LinkBacks



