1
$\begingroup$

I have an equation like this: $${20 \choose k}\cdot \sum_{i=0}^k {k \choose i}\cdot i \leq 1+f$$.

I want to plot this inequality as the dependency between k and f. I found a commend RegionPlot but I don't know how to correctly use it in such equation.

$\endgroup$
  • $\begingroup$ You have an inequality, not an equation. :) $\endgroup$ – Svend Tveskæg Dec 9 '13 at 13:58
  • $\begingroup$ @SvendTveskæg Yes, you are right ^^ $\endgroup$ – Ziva Dec 9 '13 at 15:32
2
$\begingroup$
ListPlot[Table[{k, Binomial[20, k] Sum[i Binomial[k, i] - 1, {i, 0, k}]}, {k, 1, 20}], Filling->Top]

Mathematica graphics

Or the same using a Log scale

Mathematica graphics

$\endgroup$
2
$\begingroup$

If you want only integer values you can put k in Round:

RegionPlot[Binomial[20, Round[k]] Sum[
  i Binomial[Round[k], i], {i, 0, Round[k]}] <= 1 + f, {k, 1, 20}, {f, 0, 5 10^9}]

enter image description here

Your function is explicit, so it will be better to use ListPlot as in belisarius's answer:

ListPlot[Table[{k - 0.5, Binomial[20, k] Sum[i Binomial[k, i], {i, 0, k}] - 1}, {k, 20}], 
  Filling -> Top, Joined -> True, InterpolationOrder -> 0]

enter image description here

Also one can note that

Sum[i Binomial[k, i], {i, 0, k}]
 2^(-1 + k) k
$\endgroup$
1
$\begingroup$

The inequality you are considering is simplified as follow.

Consequently, we can use RegionPlot easily.

2^(-1+k) k Binomial[20,k]<=1+f
RegionPlot[2^(-1+k) k Binomial[20,k]<=1+f, {k,-4,10},{f,-20,40}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.