From: hagman on
On 4 Okt., 14:31, Kaba <n...(a)here.com> wrote:
> Hi,
>
> Let
>
> n in N (positive integers)
> s in R+ (positive reals)
>
> f : [1, n] sub N -> R :
> f(m) = m^2 (s - 1)^2 / n + 2 m^2 (s - 1) / n + m

= (s^2 -1) m^2 / n + m

>
> Problem:
>
> 1) Find m_min which minimizes f
>
> 2) Find m_max which maximizes f
>
> Any ideas?

If n=1, then trivially
m_min = m_max = 1.
Hence assume n>=2 from now on.

We have
f(m+1) - f(m) = (s^2-1)*(2m+1)/n + 1.
If s>=1, the right hand side is positive, i.e. f is a strictly
increasing
function, hence
m_min = 1, m_max = n.

Next assume sqrt(2)/2 <= s < 1.
Then for m<n
f(m+1) - f(m) = 1 - (1-s^2)*(2m+1)/n >= 1 - (m+ 1/2)/n >0
Hence f is still strictly increasing and
m_min = 1, m_max = n.

For the rest assume 0 < s < sqrt(2)/2 and let a = 1-s^2 (thus 1/2 < a
< 1).
Then
f(m) = -a m^2 / n + m = -a/n * (m - n/(2a))^2 + n/(4a)
This is a downward parabola, hence the maximum is at the integer
closest to n/(2a) (observe that n/2 < n/(2a) < n):
m_max = round(n/(2-2s^2))
and the minimum occurs at the boundary, i.e. either at 1 or at n.
We have to compare
f(1) </=/> f(n)
<->
(s^2 -1) / n + 1 </=/> (s^2 -1) n + n
<->
n - 1 </=/> s^2 (n^2 -1)
<->
1 </=/> s^2 (n+1)
Thus
m_min = 1 if s^2*(n+1) > 1
and
m_min = n if s^2*(n+1) < 1
If s^2*(n+1) = 1, the minimum is occurs at both ends.
(similarly, the maximum is taken at two values if
n/(2-2s^2) is exactly halfway between two integers).
From: Kaba on
Kaba wrote:
> If s > 1 / sqrt(2), then f is decreasing in [1, n]. Thus
> m_min = f(n)
> m_max = f(1)

Clearly not of my best days.

m_min = n
m_max = 1

> Otherwise, if s <= 1 / sqrt(2):
> m_min = min {f(floor(m)), f(floor(m) + 1)}
> m_max = max {f(1), f(n)}

m_min =
floor(m), if f(floor(m)) <= f(floor(m) + 1)
floor(m) + 1, otherwise

m_max =
1, if f(1) >= f(n)
n, otherwise

> Right?
>
> In the latter case:
>
> m_min = min {f(floor(m)), f(floor(m) + 1)} =
> f(floor(m)), if m - floor(m) <= 1 / 2
> f(floor(m) + 1), otherwise

m_min =
floor(m), if m - floor(m) <= 1 / 2
floor(m) + 1, otherwise

> m_max = max {f(1), f(n)} =
> f(1), if s >= 1 / sqrt(n + 1)
> f(n), otherwise

m_max =
1, if s >= 1 / sqrt(n + 1)
n, otherwise

--
http://kaba.hilvi.org
From: Kaba on
Thanks hagman, that seems correct.

--
http://kaba.hilvi.org
From: Kaba on
Thanks for help, Tonio.

--
http://kaba.hilvi.org
From: Stephen J. Herschkorn on
Tonico wrote:

>On Oct 4, 2:31 pm, Kaba <n...(a)here.com> wrote:
>
>
>>Let
>>
>>n in N (positive integers)
>>s in R+ (positive reals)
>>
>>f : [1, n] sub N -> R :
>>f(m) = m^2 (s - 1)^2 / n + 2 m^2 (s - 1) / n + m
>>
>>Problem:
>>
>>1) Find m_min which minimizes f
>>
>>2) Find m_max which maximizes f
>>
>>Any ideas?
>>
>>
>
>
>
>Yes: what about adding some parentheses to understand clearly what is
>numerator and what ia denominator? This is the least one could expect
>from a graduate student...
>
>

It seemed clear of me.

{[m^2 (s - 1)^2] / n} + {[2 m^2 (s - 1)] / n} + m

(Or would you prefer even more parentheses, brackets, and braces?)

Don't you know standard precedence of arithmetic operations? This is
the least once could expect from someone who chastises graduate students...


--
Stephen J. Herschkorn sjherschko(a)netscape.net
Math Tutor on the Internet and in Central New Jersey