       Re: Re: Maximization problems

• To: mathgroup at smc.vnet.net
• Subject: [mg96780] Re: [mg96753] Re: Maximization problems
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Wed, 25 Feb 2009 04:00:17 -0500 (EST)

```Binomial is not an integer function

Binomial[3.2, 1.6]

3.79518

Binomial[1.6, 3.2]

-0.0498545

It is not even restricted to Reals

Binomial[m, n] // FunctionExpand

Gamma[m + 1]/(Gamma[n + 1]*Gamma[m - n + 1])

Binomial[2. + 3 I, 1 - 2 I]

91.9097-72.4149 I

Bob Hanlon

---- dh <dh at metrohm.com> wrote:

=============

Hi,

from your input, Mathematica assunmes a domain of Reals. But then it can not

evaluate the integer function Binomial. If you specify an Integer

domain, Mathematica will duly return (after a long time):

{60, {b -> 10, m -> 10, s -> 10, a -> 10, n -> 10, r -> 10}}

hope this helps, Daniel

replicatorzed at gmail.com wrote:

> Dear Group,

>

> consider a toy function 'func' of 6 parameters, and a set of

> constraints 'cons' for this function:

>

> In:= func[b_, m_, s_, a_, n_, r_] := Total[{b, m, s, a, n, r}];

> cons[b_, m_, s_, a_, n_, r_] :=

>   And[3 <= a <= 10, 1 <= n <= 10, 1 <= r <= n, 3 <= b <= 10,

>    1 <= m <= b, 1 <= s <= m, Binomial[b, m] <= a^n];

>

> In:= NMaximize[{func[b, m, s, a, n, r],

>   And[cons[b, m, s, a, n, r]]

>   }, {b, m, s, a, n, r}]

>

> Out= {60., {b -> 10., m -> 10., s -> 10., a -> 10., n -> 10.,

>   r -> 10.}}

>

> In:= Maximize[{func[b, m, s, a, n, r],

>   And[cons[b, m, s, a, n, r]]

>   }, {b, m, s, a, n, r}]

>

> Out= Maximize[{a + b + m + n + r + s,

>   3 <= a <= 10 && 1 <= n <= 10 && 1 <= r <= n && 3 <= b <= 10 &&

>    1 <= m <= b && 1 <= s <= m && Binomial[b, m] <= a^n}, {b, m, s, a,

>   n, r}]

>

> While NMaximize gives the correct answer, Maximize is returned

> unevaluated. If I remove the last constraint from cons, then Maximize

> succeeds as well. Now why is it, that the symbolic method can't

> maximize the function? Any idea?

>

> Istvan Zachar

```

• Prev by Date: Re: newbie: how to define, typeset a multi-rule function?
• Next by Date: Re: newbie: how to define, typeset a multi-rule function?
• Previous by thread: Re: Maximization problems
• Next by thread: Optimization problem