Skip to main content
added 2 characters in body
Source Link

This question is not research level and would be more appropriate on Mathematics SE. That said, the following is a simple answer.


Let $N$ be the dimension and $\bar1 = (1,\dots,1) \in \mathbb R^N$ the vector of ones. There are three cases:

  • If $K > Nc_\max$, then clearly there is no $v'$ satisfying conditions 2 and 3.
  • If $K = Nc_\max$, then $v' = c_\max\bar1$ is the unique vector satisfying 2 and 3. This is only compatible with condition 1 if $v = \alpha\bar1$ for some $\alpha>0$, otherwise the three conditions cannot all be met.
  • Lastly, suppose $K < Nc_\max$ and let $\delta = \min\{\frac KN,c_\max - \frac KN\} > 0$. Notice that if $w$ is any vector with $\lVert w\rVert_\infty < \delta$ and $w_1+\cdots+w_N = 0$, then $v' = \frac KN\bar1+w$ satisfies 2 and 3. I claim we can find such a $w$ so that 1 holds as well, namely, let $w = \varepsilon(v - \mu\bar1)$ where $\mu = \frac1N(v_1+\cdots+v_N)$ is the mean of the components of $v$ and $\varepsilon > 0$ is small enough that $\lVert w\rVert_\infty < \delta$. (eE.g., $\varepsilon = \frac\delta2\max_i\lvert v_i-\mu\rvert$)$\varepsilon = \frac\delta{2\max_i\lvert v_i-\mu\rvert}$ if $v \ne \mu\bar1$. If $v=\mu\bar1$, then $w=0$ works and $\varepsilon$ is irrelevant.) Then, $v'_j-v'_i = w_j-w_i = \varepsilon(v_j-v_i)$ and so $v_j'>v_i'$ if and only if $v_j>v_j$.

So it's easy to decide given $N,K,c_\max,v$ if there is any such $v'$ and when there is, we can find one using only scaling and taking the mean of the $v_i$.

This question is not research level and would be more appropriate on Mathematics SE. That said, the following is a simple answer.


Let $N$ be the dimension and $\bar1 = (1,\dots,1) \in \mathbb R^N$ the vector of ones. There are three cases:

  • If $K > Nc_\max$, then clearly there is no $v'$ satisfying conditions 2 and 3.
  • If $K = Nc_\max$, then $v' = c_\max\bar1$ is the unique vector satisfying 2 and 3. This is only compatible with condition 1 if $v = \alpha\bar1$ for some $\alpha>0$, otherwise the three conditions cannot all be met.
  • Lastly, suppose $K < Nc_\max$ and let $\delta = \min\{\frac KN,c_\max - \frac KN\} > 0$. Notice that if $w$ is any vector with $\lVert w\rVert_\infty < \delta$ and $w_1+\cdots+w_N = 0$, then $v' = \frac KN\bar1+w$ satisfies 2 and 3. I claim we can find such a $w$ so that 1 holds as well, namely, let $w = \varepsilon(v - \mu\bar1)$ where $\mu = \frac1N(v_1+\cdots+v_N)$ is the mean of the components of $v$ and $\varepsilon > 0$ is small enough that $\lVert w\rVert_\infty < \delta$ (e.g., $\varepsilon = \frac\delta2\max_i\lvert v_i-\mu\rvert$). Then, $v'_j-v'_i = w_j-w_i = \varepsilon(v_j-v_i)$ and so $v_j'>v_i'$ if and only if $v_j>v_j$.

So it's easy to decide given $N,K,c_\max,v$ if there is any such $v'$ and when there is, we can find one using only scaling and taking the mean of the $v_i$.

This question is not research level and would be more appropriate on Mathematics SE. That said, the following is a simple answer.


Let $N$ be the dimension and $\bar1 = (1,\dots,1) \in \mathbb R^N$ the vector of ones. There are three cases:

  • If $K > Nc_\max$, then clearly there is no $v'$ satisfying conditions 2 and 3.
  • If $K = Nc_\max$, then $v' = c_\max\bar1$ is the unique vector satisfying 2 and 3. This is only compatible with condition 1 if $v = \alpha\bar1$ for some $\alpha>0$, otherwise the three conditions cannot all be met.
  • Lastly, suppose $K < Nc_\max$ and let $\delta = \min\{\frac KN,c_\max - \frac KN\} > 0$. Notice that if $w$ is any vector with $\lVert w\rVert_\infty < \delta$ and $w_1+\cdots+w_N = 0$, then $v' = \frac KN\bar1+w$ satisfies 2 and 3. I claim we can find such a $w$ so that 1 holds as well, namely, let $w = \varepsilon(v - \mu\bar1)$ where $\mu = \frac1N(v_1+\cdots+v_N)$ is the mean of the components of $v$ and $\varepsilon > 0$ is small enough that $\lVert w\rVert_\infty < \delta$. (E.g., $\varepsilon = \frac\delta{2\max_i\lvert v_i-\mu\rvert}$ if $v \ne \mu\bar1$. If $v=\mu\bar1$, then $w=0$ works and $\varepsilon$ is irrelevant.) Then, $v'_j-v'_i = w_j-w_i = \varepsilon(v_j-v_i)$ and so $v_j'>v_i'$ if and only if $v_j>v_j$.

So it's easy to decide given $N,K,c_\max,v$ if there is any such $v'$ and when there is, we can find one using only scaling and taking the mean of the $v_i$.

Source Link

This question is not research level and would be more appropriate on Mathematics SE. That said, the following is a simple answer.


Let $N$ be the dimension and $\bar1 = (1,\dots,1) \in \mathbb R^N$ the vector of ones. There are three cases:

  • If $K > Nc_\max$, then clearly there is no $v'$ satisfying conditions 2 and 3.
  • If $K = Nc_\max$, then $v' = c_\max\bar1$ is the unique vector satisfying 2 and 3. This is only compatible with condition 1 if $v = \alpha\bar1$ for some $\alpha>0$, otherwise the three conditions cannot all be met.
  • Lastly, suppose $K < Nc_\max$ and let $\delta = \min\{\frac KN,c_\max - \frac KN\} > 0$. Notice that if $w$ is any vector with $\lVert w\rVert_\infty < \delta$ and $w_1+\cdots+w_N = 0$, then $v' = \frac KN\bar1+w$ satisfies 2 and 3. I claim we can find such a $w$ so that 1 holds as well, namely, let $w = \varepsilon(v - \mu\bar1)$ where $\mu = \frac1N(v_1+\cdots+v_N)$ is the mean of the components of $v$ and $\varepsilon > 0$ is small enough that $\lVert w\rVert_\infty < \delta$ (e.g., $\varepsilon = \frac\delta2\max_i\lvert v_i-\mu\rvert$). Then, $v'_j-v'_i = w_j-w_i = \varepsilon(v_j-v_i)$ and so $v_j'>v_i'$ if and only if $v_j>v_j$.

So it's easy to decide given $N,K,c_\max,v$ if there is any such $v'$ and when there is, we can find one using only scaling and taking the mean of the $v_i$.