How we can generate a random vector E=[e_1,e_2,e_3.…,e_N] in R^N such that sum_i^N e_i=T and 0 <= e_i <= d_i AAi in 1,2,3,…,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.

hommequidort0h 2022-09-14 Answered
How we can generate a random vector E = [ e 1 , e 2 , e 3 . , e N ] R N such that i N e i = T and 0 e i d i i 1 , 2 , 3 , , N where di specifies the upper bound on each element of the vector. Is this problem over constrained?
You can still ask an expert for help

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

Solve your problem for the price of one coffee

  • Available 24/7
  • Math expert for every subject
  • Pay only if we can solve it
Ask Question

Answers (1)

crearti2d4
Answered 2022-09-15 Author has 3 answers
An obvious necessary condition is to have i = 1 N d i T
If you don't care about choosing uniformly, the simplest is to generate N random numbers 0 r i d i , and compute R = i = 1 N r i
In the case R<T, increase the e i one by one to their maximum until the i = 1 N e i = T as needed. The procedure is guaranteed to work if i = 1 N d i T
Otherwise (if R>T), then set e i = T r i / R. Then, by construction,
i = 1 n e i = i = 1 n T r i R = T R i = 1 n r i = T .
Not exactly what you’re looking for?
Ask My Question

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

You might be interested in

asked 2021-05-29
Which of the following expressions are meaningful? Which are meaningless? Explain.
a) (ab)c
(ab)c has ? because it is the dot product of ?.
b) (ab)c
(ab)c has ? because it is a scalar multiple of ?.
c) |a|(bc)
|a|(bc) has ? because it is the product of ?.
d) a(b+c)
a(b+c) has ? because it is the dot product of ?.
e) ab+c
ab+c has ? because it is the sum of ?.
f) |a|(b+c)
|a|(b+c) has ? because it is the dot product of ?.
asked 2021-05-29
Find a vector equation and parametric equations for the line segment that joins P to Q.
P(0, - 1, 1), Q(1/2, 1/3, 1/4)
asked 2021-05-17
Find the scalar and vector projections of b onto a.
a=(4,7,4),b=(3,1,1)
asked 2021-02-11
Let F be a fixed 3x2 matrix, and let H be the set of all matrices A in M2×4 with the property that FA = 0 (the zero matrix in M3×4). Determine if H is a subspace of M2×4
asked 2022-08-21
I am trying to write the vector v = ( 2 , 3 ) in the basis outlined by the set { ( 1 , 1 ) , ( 3 , 5 ) }. I figured that I would take the inverse of the set matrix, and multiply it to v. However, this does not seem to be the solution. Any help would be greatly appreciated.
asked 2021-06-08
Vector A = 5i +1j and vector B = 2i -6j +2k
What is the cross product of A×B,
find the x component?
Find the y component?
Find the z component?
asked 2021-10-29
Find the cosine of the angle between the planes x + y + z = 0 and x + 2y + 3z = 1.

New questions