# I need a mapping from the unit Hypercube [0,1]^n to a given simplex

• I
Homework Helper
I need a mapping from the unit Hypercube ##C^n:= \left[ 0,1\right] ^n## to a given simplex, namely ##S^n:=\left\{ \vec{x} \in\mathbb{R}^n |0\leq x_1\leq 1, 0\leq x_{k}\leq x_{k-1}\text{ for } k=2,3,\ldots , n\right\}##. Anybody know one? I have other requirements I need satisfy, so if you know more than one such mapping (transformation equations) please do post them.

Moderator: I’m not 100% certain that this is the appropriate sub-forum in which to post this question, so please feel free to move it. Thanks!

Homework Helper
Gold Member
You should probably indicate any requirements like continuity, onto, 1-1, etc.
Without those requirements, one mapping that comes to mind is ##f(x_1,x_2,...,x_n) = [x_1/2, x_2/4+1/2, x_3/8+3/4, ... , x_n/(2^n)+(2^{n-1}-1)/2^{n-1}]##
It is continuous but not onto or 1-1. I suspect that this is not what you want.

Homework Helper
I need it for change of variables in an integral, so continuous, differentiable, non-zero Jacobian. Also I require that the integrand times the Jacobian is expressible as a function of one variable, to wit

$$\frac{dx_n dx_{n-1}\dots dx_1}{1-\prod_{k=1}^{n}x_k}\cdot \left|\frac{\partial (x_1,x_2,\ldots , x_n)}{\partial (u_1, u_2, \ldots,u_n)}\right|:=g(u_n)$$

Laundry list I know, but this should allow me to represent the integral over the hypercube as an iterated integral so I can generalize the integral to complex values of n. I hoping to get some ideas and maybe tweak them to work. This is just a practice problem. I may equivalently solve the fractional-integral equation

$$I_{\alpha}g(z)=\zeta (z)$$

where ##\zeta (\cdot )## is the Riemann Zeta function--which may well be easier but I wanted to try it this way to make use of my earlier work.

Homework Helper
Gold Member
CORRECTION: THIS POST AND POST #6 ARE WRONG. I THINK THAT POST #7 IS CORRECT.
##f(x_1,x_2, ... , x_n) = [y_1, y_2, ... , y_n],##
where
##y_1=x_1;##
## y_2=y_1+x_2*y_1+(1-x_2);##
## y_3=y_2+x_3*y_2+(1-x_3);##
## y_4=y_3+x_4*y_3+(1-x_4);##
## ... ##
##y_n=y_{n-1}+x_n*y_{n-1}+(1-x_n);##

The idea here is that each ##y_i## has the value between ##y_{i-1}## and 1, which is the weighted average of those two points with weights ##x_i## and ##(1-x_i)##.

Last edited:
benorin
Homework Helper
Is * multiplication? Or some other operator? Thanks for your help!

Homework Helper
Gold Member
Is * multiplication? Or some other operator? Thanks for your help!
CORRECTION: THIS POST IS WRONG. I THINK THAT POST #7 IS CORRECT.
Yes, it is multiplication. I think that I made an error on the equations. A corrected version would be:
##f(x_1,x_2,...,x_n)=[y_1,y_2,...,y_n],##
where
## y_1=x_1;##
##y_2=(1-x_2)y_1 +x_2;##
##y_3=(1-x_3)y_2 +x_3;##
##y_4=(1-x_4)y_3 +x_4;##
...
##y_n=(1-x_n)y_{n-1} +x_n;##

Sorry for the confusion.

Last edited:
Homework Helper
Gold Member
I misread your definition of ##S^n## and made ##y_i \ge y_{i-1}## where it should have been ##y_i \le y_{i-1}##.

To get that corrected:
##f(x_1,x_2,...,x_n)=[y_1,y_2,...,y_n],##
where
## y_1=x_1;##
##y_2=x_2y_1;##
##y_3=x_3y_2;##
##y_4=x_4y_3;##
...
##y_n=x_ny_{n-1};##

Sorry again for the confusion.

Last edited:
benorin
sysprog
@FactChecker It's really nice of you to, in the process of self-correcting a slightly incorrect explanation, go loud on yourself having earlier slightly erred; tip of the hat to you on that Sir.

benorin and FactChecker
Homework Helper
Gold Member
@FactChecker It's really nice of you to, in the process of self-correcting a slightly incorrect explanation, go loud on yourself having earlier slightly erred; tip of the hat to you on that Sir.
Thanks. I just wish I could be more accurate the first time. It's a problem I have even on subjects that I should be much sharper at.

sysprog
sysprog
Moi aussi -- I think that I'm ok at fixing bugs -- and I think that it would better if I didn't write bug-inclusive code in the first place, but whenever I wake out of laziness, I got to code, it's just a thing.

benorin
Homework Helper
I misread your definition of ##S^n## and made ##y_i \ge y_{i-1}## where it should have been ##y_i \le y_{i-1}##.

To get that corrected:
##f(x_1,x_2,...,x_n)=[y_1,y_2,...,y_n],##
where
## y_1=x_1;##
##y_2=x_2y_1;##
##y_3=x_3y_2;##
##y_4=x_4y_3;##
...
##y_n=x_ny_{n-1};##

Sorry again for the confusion.

Thanks, that’s much easier to work with.

sysprog
Homework Helper
I get that ##y_1=x_1## and for ##y_{k-1}\neq 0## we have ##x_k=\frac{y_k}{y_{k-1}}## for ##k=2,3,\ldots , n##. So we have that

$$\frac{\partial x_i}{\partial y_j}= \begin{cases} 1, & i=j=1 \\ \frac{1}{y_{i-1}}, & i=j\neq 1 \\ -\frac{y_i}{y_{i-1}^2}, & i=j+1 \\ 0, & \text{otherwise} \end{cases}$$

So the Jacobian determinant is just the product along the diagonal, correct? So it's ##J=\frac{1}{y_1 y_2\cdots y_{n-1}}##?

Homework Helper
Gold Member
So you are looking at the inverse function of ##f##, right? Each ##y_i## is a function of all ##y_j, j\lt i##, so I think that makes it more complicated. Since you are talking about the inverse of the function ##f##, I don't think that you can consider the ##y_i##s as being independent variables. I think that this is getting beyond my comfort level and I will leave it to others to help you further.

Homework Helper
Now I see that I made a mistake and the integral equation that I could alternatively solve should have been

$$\lim_{x\to a} I_{\alpha}f(x)=\zeta (\alpha )$$

Whereas I had not included the limit and also had ##\zeta (z)## on the right hand side back in post #3.

Homework Helper
So I solved the fractional-Integral equation but with the Hadamard Left Fractional Integral Operator instead of the R-L fractional integral operator, and it turns out that post #12 has the Jacobian determinant correct. I arrived at this conclusion in a round about way. Beginning with the well known integral

$$\Gamma (z) \zeta (z)=\int_{u=0}^{\infty} \frac{u^{z-1}}{e^u-1}\, du, \, \, \Re\left[ z\right] >1$$

Make the substitution ##u= \log \frac{x}{t}\Rightarrow du=-\frac{dt}{t}## and use the negative from du to flip the bounds of integration to get

$$\zeta (z)=\frac{1}{\Gamma (z)}\int_{t=0}^{x} \log ^{z-1}\left( \frac{x}{t}\right) \frac{1}{\frac{x}{t}-1}\, \frac{dt}{t}, \, \, \Re\left[ z\right] >1$$

which, after setting ##x=1## in the factor of the integrand following the log factor, is exactly the Hadamard fractional integral of ##\frac{t}{1-t}## of order z and, get this, the Hadamard FI operator interpolates the n-fold integral

$$\int_{0}^{x_0}\int_{0}^{x_1}\cdots\int_{0}^{x_{n-1}}f(x_n)\frac{dx_n\ldots dx_1}{x_n \cdots x_1} = \frac{1}{\Gamma (n) }\int_0^{x_0}\log ^{n-1}\left( \frac{x_0}{t}\right) f(t) \frac{dt}{t}$$

Hence the integral we were looking at in this thread should have been

$$\int_{0}^{y_0}\int_{0}^{y_1}\cdots\int_{0}^{y_{n-1}}\frac{y_n}{1-y_n}\frac{dy_n\ldots dy_1}{y_{n}\cdots y_1}$$

so the Jacobian determinant of post #12 was correct after multiplying by a factor of ##\frac{y_n}{y_n}##.

sysprog
zinq
One way to conceive of such a mapping is: First map one vertex v of the cube [0,1]n to some vertex f(v) of the simplex ∆n. Then extend this to the n edges of [0,1]n emanating from v ... to the n edges of ∆n emanating from f(p) — just map each of them linearly.

Now consider the far vertices of those n edges of the cube — call them v1, ..., vn. Now each line from the original vertex v that heads into the cube will pass through a unique convex combination of the vj's. (That is, a linear combination of the vj's whose coefficients are non-negative real numbers whose sum equals 1.) For each such convex combination (call it w), send the line in the cube from v through w until it exits the cube to the corresponding line from f(v) through the corresponding convex combination of the f(vj)'s until it exits the simplex. Again, just map the first interval linearly onto the second for each convex combination.

It shouldn't be hard to derive a formula from this. But don't expect it to be a diffeomorphism (differentiable homeomorphism with differentiable inverse) from the entire closed cube to the entire closed simplex, because that will not exist.

benorin and sysprog
microprediction
Very interesting problem. I'm having trouble piecing together the solution suggested but would like to.

Meanwhile I can share a draft of an article I'm writing on precisely this problem here.