New answers tagged

2 votes

How to define variables $a$,$b$,$c$,$d$ are all elements of set $\{2,3,5,7\}$?

One idea is to use Element with the Region primitive Point. Let ...
user avatar
  • 124k
2 votes

How to define variables $a$,$b$,$c$,$d$ are all elements of set $\{2,3,5,7\}$?

Or another Alternatives And@@Thread[{a, b, c, d}==Alternatives@@{2, 3, 5, 7}] ...
user avatar
  • 31.1k
6 votes
Accepted

How to define variables $a$,$b$,$c$,$d$ are all elements of set $\{2,3,5,7\}$?

And @@ Or @@@ (Thread[# == {2, 3, 5, 7}] & /@ {a, b, c, d}) ...
user avatar
  • 36.6k
5 votes
Accepted

LinearOptimization - how to solve with vector constraints?

Note: I have assumed that $p_k = \delta^k(1-\delta)^{n-k}$, as in OPs code. Solution 1. One could use Minimize: ...
user avatar
  • 5,308

Top 50 recent answers are included