maximizing sum over feasible set of vectors
Let [5] be the set of the first 5 positive integers. We let α_=(αA)A≠∅,A⊆[5] consist of a vector with 31 real entries, where each αA is associated with a subset A⊆[5].
Define OBJ(α_)=∑A⊆[5],A≠∅αAlog(|A|), v(α_)=∑A⊆[5],A≠∅αA, and E(α_)=∑A,B:A∩B≠∅αAαB, where the sum for E(α_) is taken over all unordered pairs of disjoint nonempty sets A and B, where A,B⊆[5].
Also define FEAS(1/4) to be the set of all such vectors α_ with nonnegative real entries such that v(α_)=1 and E(α_)≥1/4.
I want to learn how to program the following optimization problem: OPT(1/4):=maxα_∈FEAS(1/4)OBJ(α_)
I was told that I can do this in SageMath. I have some basic knowledge of how to use Sage. How could I create the set FEAS(1/4)? I think that from there I may be able to figure out how to maximize OBJ(α_) over this set.
Homework ?
Also, go easy on (pseudo-)formalism: I can't make head or tails of your definition of α_... For another example, you define A as a subset of [5] ; but now, what is log(|A|) ???
|A| means the number of elements in A. To have α_ be a vector one should choose an ordering of the (nonempty) subsets of [5], e.g. by identifying them with binary strings of length 5 (not equal to 00000).
Okay. you want to (pedantly) number the components of α_ in binary. And to ignore α0. Right ?
A is therefore an index of the 31 components of α_,v(α_) is ∑32i=1αi−1. Still right ?
I didn't ask the question, but yes that's right. The binary ordering was just a (natural) suggestion. Of course the ordering is irrelevant, but probably some ordering is necessary for the implementation.