7

I am looking for a (nonlinear) map from $n$-dimensional cube to an $n$-dimensional simplex; to make it simple, assume the following figure which is showing a sample transformation for the case when $n=2$. (sorry for my bad drawing). The two circles in the rectangle, are set of points, which are mapped to the rectangle. Note that, points by this transformation maintain their relative position to each other, as shown in the figure.

mapping from rectangle to trianglehttp://tinypic.com?ref=30bcxzp

Any suggestion how to find such transformation?

JKnecht
  • 6,637
Daniel
  • 2,760

3 Answers3

5

If all you want is a homeomorphism this is pretty simple. I'll do the 2-dimensional case because it's easiest and the leg work for extending to higher dimensions can be annoying if not done carefully.

Let $X=\{(x,y)\in\mathbb{R}^2\:|\:x\in[0,1], y\in[0,1]\}$, let $X'=\{(x,y)\in\mathbb{R}^2\:|\:x\in[0,\frac{1}{2}], y\in[0,\frac{1}{2}]\}$, let $Y=\{(x,y)\in X\:|x+y\leq 1\}\:$. We want a homeomorphism $h\colon X\rightarrow Y$.

Let $g\colon X\rightarrow X'$ be given by $g(x,y)=(\frac{1}{2}x,\frac{1}{2}y)$. Let $f\colon X'\rightarrow Y$ be given by $$f(x,y)=\left\{\begin{array}{lr}(2x-y,y),&\mbox{ if }x\geq y\\ (x,2y-x),&\mbox{ if }x\leq y\end{array}\right.$$ and so both $g$ and $f$ are homeomorphisms and hence their composition $(f\circ g)=h\colon X\rightarrow Y$ is a homeomorphism.

Dan Rust
  • 30,973
  • Nice and simple; thanks... its not hard to generalize to higher dimension.. – Daniel May 08 '13 at 05:54
  • Could someone provide a reference to a textbook, paper, or website that goes in detail on generalizing to higher dimensions? – j_v_wow_d Sep 20 '21 at 18:54
4

For a point $P=(x_1,...,x_n)$ in the unit cube $0 \le x_i \le 1$, define $$s=x_1+\cdots +x_n, \ \ \ m=\max(x_1,...,x_n).$$ Then map $P$ to the point $$f(P)=(x_1 \cdot \frac{m}{s},...,x_n \cdot \frac{m}{s}).$$ This maps the unit cube onto the simplex $x_i \ge 0, \ \sum x_i \le 1.$

This map works by contracing each ray from the origin to $P$ by the right amount so that it ends up inside or on the boundary of the simplex. A few examples in 3-d:

$F(P)=F((1/3,1/3,1/3))=(1/9,1/9/1/9).$ Here $F(P)$ is strictly inside the simplex. If one follows the ray from the origin through $P$ one will hit the remote corner $P'=(1,1,1)$ of the cube, for which $f(P')=(1/3,1/3,1/3),$ a point exactly on the boundary of the simplex.

Or look at $F(P)=F((1/2,1/3,1/4))=(3/13,2/13,3/26)$ inside the simplex, while if we rescale $P$ until its largest coordinate becomes $1$ to obtain $P'=(1,2/3,1/2)$ (so that $P'$ lies on the boundary of the unit cube) we find that $f(P')=(6/13,4/13,3/13)$, again a point exactly on the boundary since its coordinates sum to 1.

coffeemath
  • 30,190
  • 2
  • 34
  • 53
  • Thanks, good solution, but I want the points be spread in all over the simplex. You answer is basically shrinking the big cube, into smaller cube, so that, it could be placed inside the simplex. Yet, it works, but I liked @Daniel Rust's answer more. Thanks anyway ... – Daniel May 08 '13 at 05:58
  • 2
    My map does not shrink the big cube into a smaller cube. Try calculating it in the 2-d case for a lot of points. The map $f(P)$ maps the entire square onto the simplex which is the triangle containing $(0,0),(1,0),(0,1).$ The shrinking factor is not constant since $\max(x,y)/(x+y)$, the shrinking factor, is not constant. (I agree a constant shrinking factor would map the cube into a smaller cube). For example check that the two points $(1,0),(0,1)$ map to themselves, and points on opposite edges to $(0,0)$ map to the line segment joining these two, the simplex edge opposite $(0,0)$. – coffeemath May 08 '13 at 11:58
0

I have a new idea for this problem. The idea is to treat a point in the simplex as a set of contest winning probabilities. In this contest each player $i$ has performance $X_i = a_i + \nu_i$ where $\nu_i \sim N(0,1)$. It is possible to take the k-simplex element $p$ and imply a vector $a = (a_1,\dots,a_{k+1})$ of relative abilities. Then the point in the cube we want is $(\Phi(a_2-a_1), \Phi(a_3-a_1),\dots, \Phi(a_{k+1}-a_1))$ where $\Phi$ is the normal cumulative distribution. Here's what happens to concentric triangles in the simplex as they are mapped to the cube.

In order to compute this map, you'll likely need the winning package unless someone other than me has implemented the map $p \rightarrow a$. The code for both directions is here.

concentric

Peter Cotton
  • 101
  • 1