# Fourth Dimensional Volume.

**URL:** <https://boards.straightdope.com/t/fourth-dimensional-volume/843966>\
**Category:** Factual Questions\
**Created:** [November 25, 2019, 4:00pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966 "2019-11-25T16:00:56Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![markn\_1](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@markn\_1](https://boards.straightdope.com/u/markn_1)\
**Post date:** [November 27, 2019, 2:45pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/21 "2019-11-27T14:45:24Z")

</div>

A big sheep just comprises more atoms than a small sheep. There are no real numbers in nature. But Kronecker was referring to mathematical entities, not physical ones.

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [November 27, 2019, 3:00pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/22 "2019-11-27T15:00:32Z")

</div>

> [@markn\_1](#):
>
> A big sheep just comprises more atoms than a small sheep. There are no real numbers in nature. But Kronecker was referring to mathematical entities, not physical ones.

IANAP, but I believe QFT says _energy_ is discrete while quantum _fields_ are continuous (non granular).

---

<div class="post-metadata">

**Author:** ![swampspruce](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/swampspruce/32/261_2.png) [@swampspruce](https://boards.straightdope.com/u/swampspruce)\
**Post date:** [November 27, 2019, 3:23pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/23 "2019-11-27T15:23:51Z")

</div>

> [@markn\_1](#):
>
> No, just as the area of a 2-d square is L[sup]2[/sup] and the volume of a 3-d cube is L[sup]3[/sup], the hypervolume of a 4-d tesseract would be L[sup]4[/sup].

D’oh. i should have seen that relationship. I blame it on insufficient coffee.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [November 28, 2019, 3:08pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/24 "2019-11-28T15:08:07Z")

</div>

_ **For the mathematicians:** _

Since OP’s question has been answered, let me repeat a question I asked in a month-ago thread without an answer.

_How do we choose a random point uniformly distributed on the surface of an N-ball?_ A two-part answer is needed: (A) the algorithm; (B) Proof that the algorithm solves the problem.

A solution which is NOT acceptable is  
(1) Choose a random point in the N-cube -1 \< x[sub]1[/sub], x[sub]2[/sub], x[sub]3[/sub], … x[sub]N[/sub] \< 1  
with each x[sub]i[/sub] independent and drawn from a uniform distribution.  
(2) Set R = x[sub]1[/sub][sup]2[/sup] + x[sub]2[/sub][sup]2[/sup] + x[sub]3[/sub][sup]2[/sup] + … + x[sub]N[/sub][sup]2[/sup]  
(3) Start over from (1) if R \> 1  
(4) Divide each of x[sub]1[/sub], x[sub]2[/sub], x[sub]3[/sub], … x[sub]N[/sub] by √R; present the result as the answer.

The reason that this is unacceptable for largish N, is that R will almost always be greater than 1 in step (3). You will loop for a LONG time. Even when N is as small as 19, you will need to discard 99.9999911% of the N-tuples.

I will show the well-known(?) solution (A) in a Spoiler; and ask for (B) the trivial(?) proof of correctness which I no longer remember. :o  
(A) [SPOILER]Use the algorithm shown above with two changes:

- In (1) use a Gaussian normal distribution instead of a uniform distribution. (You can procure the normal variates using the [Box-Muller transform](https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform).)
- Eliminate Step 3. You no longer need it!!  
[/SPOILER]

(B) ??

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 28, 2019, 3:11pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/25 "2019-11-28T15:11:15Z")

</div>

OK, good, that’s the same solution I was thinking of.

And how to do the proof of correctness depends on what other existing theorems we’re allowed to use.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [November 28, 2019, 4:07pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/26 "2019-11-28T16:07:44Z")

</div>

> [@Chronos](#):
>
> OK, good, that’s the same solution I was thinking of.
> 
> And how to do the proof of correctness depends on what other existing theorems we’re allowed to use.

I suppose my whole post is a painfully embarrassing admission that normal variates confuse me. Will the Central Limit Theorem be enough?

---

<div class="post-metadata">

**Author:** ![octopus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/octopus/32/3716_2.png) [@octopus](https://boards.straightdope.com/u/octopus)\
**Post date:** [November 28, 2019, 4:13pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/27 "2019-11-28T16:13:43Z")

</div>

Can’t you just randomly choose a set of angles that correspond to the n-dimensional analog of spherical coordinates? Obviously, you’d keep r constant.

---

<div class="post-metadata">

**Author:** ![Half\_Man\_Half\_Wit](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/half_man_half_wit/32/21766_2.png) [@Half\_Man\_Half\_Wit](https://boards.straightdope.com/u/Half_Man_Half_Wit)\
**Post date:** [November 28, 2019, 4:41pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/28 "2019-11-28T16:41:30Z")

</div>

> [@octopus](#):
>
> Can’t you just randomly choose a set of angles that correspond to the n-dimensional analog of spherical coordinates? Obviously, you’d keep r constant.

No, that would yield points ‘bunched up’ at the poles, since the area element of the sphere goes with sin(phi), where phi is the angle to the vertical axis. Hence, at the poles (phi = 0 and phi = pi), the area containing (on average) a certain number of points will be smaller than at the equator.

As to why the method of **septimus** works, I think it’s just that the distribution is ~exp(-1/2_x[sub]1[/sub][sup]2[/sup])exp(-1/2x[sub]2[/sub][sup]2[/sup])_ … \* exp(-1/2_x[sub]N[/sub][sup]2[/sup]) = exp(-1/2_| **R** |[sup]2[/sup]), and thus, depends only on the magnitude, but not the direction of **R**. Consequently, the distribution must be rotationally invariant.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 28, 2019, 4:53pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/29 "2019-11-28T16:53:47Z")

</div>

That’d depend on how you chose those random angles. I know that in 3d spherical coordinates, you can do it by choosing longitude uniformly, and choosing the sine of latitude uniformly. And I’m sure that you could generalize that to higher dimensions, but I’m not sure off the top of my head what the formulas would be.

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [November 28, 2019, 9:47pm UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/30 "2019-11-28T21:47:04Z")

</div>

Picking a random point is hard in a real number based system.

Really, really, really hard.

I know of no way to specify selecting a random number between 0 and 1. Even in an abstract, purely theoretical way. Never mind 2 dimensions or more.

(Selecting a random number from the natural numbers or the rationals between 0 and 1 is easy. Just don’t expect anything like a uniform distribution.)

---

<div class="post-metadata">

**Author:** ![Andy\_L](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andy\_L](https://boards.straightdope.com/u/Andy_L)\
**Post date:** [November 29, 2019, 12:47am UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/31 "2019-11-29T00:47:40Z")

</div>

> [@septimus](#):
>
> _ **For the mathematicians:** _
> 
> Since OP’s question has been answered, let me repeat a question I asked in a month-ago thread without an answer.
> 
> _How do we choose a random point uniformly distributed on the surface of an N-ball?_ A two-part answer is needed: (A) the algorithm; (B) Proof that the algorithm solves the problem.
> 
> A solution which is NOT acceptable is  
> (1) Choose a random point in the N-cube -1 \< x[sub]1[/sub], x[sub]2[/sub], x[sub]3[/sub], … x[sub]N[/sub] \< 1  
> with each x[sub]i[/sub] independent and drawn from a uniform distribution.  
> (2) Set R = x[sub]1[/sub][sup]2[/sup] + x[sub]2[/sub][sup]2[/sup] + x[sub]3[/sub][sup]2[/sup] + … + x[sub]N[/sub][sup]2[/sup]  
> (3) Start over from (1) if R \> 1  
> (4) Divide each of x[sub]1[/sub], x[sub]2[/sub], x[sub]3[/sub], … x[sub]N[/sub] by √R; present the result as the answer.
> 
> The reason that this is unacceptable for largish N, is that R will almost always be greater than 1 in step (3). You will loop for a LONG time. Even when N is as small as 19, you will need to discard 99.9999911% of the N-tuples.

I’m missing something - if R\>1, can’t you still divide the vector by root(R) to get an appropriate set of x values?

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [November 29, 2019, 1:48am UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/32 "2019-11-29T01:48:17Z")

</div>

> [@Andy\_L](#):
>
> I’m missing something - if R\>1, can’t you still divide the vector by root(R) to get an appropriate set of x values?

The recipe of uniformly choosing coordinates produces a random point in the n-cube. If there is no restriction on R, then projecting it onto the unit sphere by dividing by the radius squashes the cube down onto the surface of the sphere in a non-uniform way; consider what happens with the corners of the cube. The problem is to pick a point on the sphere such that the random points do not bunch up anywhere (should be rotationally invariant).

---

<div class="post-metadata">

**Author:** ![Andy\_L](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andy\_L](https://boards.straightdope.com/u/Andy_L)\
**Post date:** [November 29, 2019, 2:00am UTC](https://boards.straightdope.com/t/fourth-dimensional-volume/843966/33 "2019-11-29T02:00:13Z")

</div>

Thanks. That makes sense.

[Previous page](https://boards.straightdope.com/t/fourth-dimensional-volume/843966.md?page=1)
