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):
s = floor(sqrt(n))
A = (n - s(s-1) - s) / s
M = 2s + ceiling(A)
The required expression for M:
M = ceiling(2*squrt(n))
any help would be greatly appreciated!!
thanks for that observation... seems i had it wrong. so, i'll paraphrase the question... in hope of some hints/help :-)
so basically we are a point on a number line, with a velocity. initially both velocity and position are zero... the number line is of length n. in each move we can either increase our velocity by one, decrease it by one, or remain the same... then move that many steps along the line. The aim is to reach the end (n steps) in the minimum number of moves, with a velocity of zero at the end. So for example if n=7, then the sequence of moves is [++0-0-].
we have to show that the minimum number of moves is
M = ceiling(2*sqrt(n))
(1) If the maximum velocity achieved is , the minimum number of steps required to achieve this and return to zero is .
(2) Thus the minimum distance moved is .
(3) If , then and thus the minimum number of steps is .
(4) If , then and the number of steps required is .
(5) If , then and the number of steps required is .
(6) Then use to show that in (4) and in (5)
Can you fill in the gaps?
thanks alot for that... your a smart guy!
i sat down again today trying to figure it out... and actually did get to the expressions you have at 4 and 5... but my path was slightly different... I thought i was wrong, because i couldnt reduce it to the required formula...
i did find a couple of identities that i thought would help.. and from what you have said it seems they would, but I still cant get step six out... the identities if found are in the pic below...
also... just another very quick question, are the two following expressions equivalent?