I would like to know the feasibility of the following linear programming problem related to coding theory.
Given a natural number $d$, binary entry matrix $X:=[x(i,j)\in B],\ B:=\{0,1\},\ i\in B^d,\ j\in J,\ J:=\{0,1,\cdots,d-1\}$. $\forall\ i_0:=(b_0,\cdots,b_{j-1},0,b_{j+1},\cdots,b_{d-1})\in B^d,\, i_1:=(b_0,\cdots,b_{j-1},1,b_{j+1},\cdots,b_{d-1})\in B^d,$ $$x(i_0,j)+x(i_1,j)=1. \tag1$$
It is easily seen that for an arbitrary $j\in J$ $$\sum_{(i_0,i_1)}\big(x(i_0,j)+x(i_1,j)\big)=|B^{d-1}|=2^{d-1}.$$ The total sum of the entries is then obviously $$s:=\sum_{j\in J}\sum_{(i_0,i_1)}\big(x(i_0,j)+x(i_1,j)\big)=d2^{d-1}.$$ Since row sum $x_{i,}:=\sum_{j\in J}x(i,j)\le d$ for each row $i$. Given natural number $1\le k\le d$, the number of rows with row sum $x_{i,}\ge k$ $$ f(d,k)\le\min\Big(\Big\lfloor\frac{s}{k}\Big\rfloor,2^d\Big)=\min\Big(\Big\lfloor\frac{d2^{d-1}}{k}\Big\rfloor,2^d\Big).$$
Question:
Does there always exist $X$ such that this upper bound is realized $\displaystyle f(d,k)=\min\Big(\Big\lfloor\frac{s}{k}\Big\rfloor,2^d\Big)$?
In other words, can we arrange the binary entries of $X$ within the constraint Equation $(1)$ so as to concentrate at least $k$ $1$'s on as many rows as possible?