How we can generate a random vector $E =[e_1, e_2,e_3.\dots, e_N] \in R^N$ such that $\sum_i^N e_i = T \;$ and $ 0 \le e_ i \le d_i$ $\forall i \in 1,2,3,\dots,N$ where $d_i$ specifies the upper bound on each element of the vector. Is this problem over constrained? if yes, any guidance to for relaxation.
2026-03-26 16:03:30.1774541010
How to generate a random vector with fixed sum and bounded elements
446 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in VECTORS
- Proof that $\left(\vec a \times \vec b \right) \times \vec a = 0$ using index notation.
- Constrain coordinates of a point into a circle
- Why is the derivative of a vector in polar form the cross product?
- Why does AB+BC=AC when adding vectors?
- Prove if the following vectors are orthonormal set
- Stokes theorem integral, normal vector confusion
- Finding a unit vector that gives the maximum directional derivative of a vector field
- Given two non-diagonal points of a square, find the other 2 in closed form
- $dr$ in polar co-ordinates
- How to find reflection of $(a,b)$ along $y=x, y = -x$
Related Questions in RANDOM-VARIABLES
- Prove that central limit theorem Is applicable to a new sequence
- Random variables in integrals, how to analyze?
- Convergence in distribution of a discretized random variable and generated sigma-algebras
- Determine the repartition of $Y$
- What is the name of concepts that are used to compare two values?
- Convergence of sequences of RV
- $\lim_{n \rightarrow \infty} P(S_n \leq \frac{3n}{2}+\sqrt3n)$
- PDF of the sum of two random variables integrates to >1
- Another definition for the support of a random variable
- Uniform distribution on the [0,2]
Related Questions in CONSTRAINTS
- Optimization - If the sum of objective functions are similar, will sum of argmax's be similar
- Find all local maxima and minima of $x^2+y^2$ subject to the constraint $x^2+2y=6$. Does $x^2+y^2$ have a global max/min on the same constraint?
- Constrained eigenvalue problem
- Constrained optimization where the choice is a function over an interval
- MILP constraints with truth table
- Convexify this optimization problem with one nonlinear (bilinear) constraint
- Second-order cone constraints
- Matching position and rotation of moving target.
- Existence of global minimum $f(x,y,z) = x + y + z$ under the constraint $x^2+xy+2y^2-z=1$
- Constrained Optimization: Lagrange Multipliers
Related Questions in RANDOM-MATRICES
- Distribution of min/max row sum of matrix with i.i.d. uniform random variables
- The Cauchy transform of Marchenko-Pastur law
- Is scaling (related to matrix size $n$) and eigenvalue calculation exchangeable when discussing eigenvalue distribution of random matrix
- What is an Operator Matrix for the operation which happens in the reverse direction?
- Variance of $\mathrm{Proj}_{\mathcal{R}(A^T)}(z)$ for $z \sim \mathcal{N}(0, I_m)$.
- How to simulate a random unitary matrix with the condition that each entry is a complex number with the absolute value 1 in matlab
- Explaining a model that obtain matrice A and B from M by solving optimization problem
- How to bound the L-2 norm of the product of two non-square matrices
- Expected number of operations until matrix contains no zeros.
- How should I proceed to solve the below mentioned non-convex optimisation problem?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
An obvious necessary condition is to have $\sum_{i=1}^N d_i \ge T$.
If you don't care about choosing uniformly, the simplest is to generate $N$ random numbers $0 \le r_i \le d_i$, and compute $R = \sum_{i=1}^N r_i$.
In the case $R<T$, increase the $e_i$ one by one to their maximum until the $\sum_{i=1}^N e_i = T$ as needed. The procedure is guaranteed to work if $\sum_{i=1}^N d_i \ge T$.
Otherwise (if $R > T$), then set $e_i = T r_i/R$. Then, by construction, $$ \sum_{i=1}^n e_i = \sum_{i=1}^n \frac{T r_i}{R} = \frac{T}{R} \sum_{i=1}^n r_i = T. $$