Looking for a good way to distribute n numbers in the region [0,1]

  • Thread starter Thread starter mikeph
  • Start date Start date
  • Tags Tags
    Numbers
AI Thread Summary
The discussion revolves around distributing n numbers in the range [0,1], with the first and last numbers fixed at 0 and 1. The simplest method proposed is equal spacing, but the user seeks a general formulation for non-uniform spacings, such as linear increases or sinusoidal distributions. A mathematical approach is suggested, using arithmetic series to express the increments and derive relationships between them. The user successfully derives formulas for the increments and provides an example with specific values, demonstrating that the method yields a valid series. Overall, the thread explores various mathematical strategies for achieving desired distributions within the specified range.
mikeph
Messages
1,229
Reaction score
18
So say I have n real number to chose in the range [0,1], and the first and last are 0 and 1. So in essence my problem is to determine the n-1 spacings between adjacent numbers, so call these values S(1), S(2), ... S(n-1).

The simplest would be an equal spacing: S(1) = S(2) = ... = S(n-1). For example, n=11, then all the spacings are 0.1.

Is there a good formulation for generalising this to non-uniform spacings?

For example, I want to consider:

1. Linear increase: S(i+1) = 2*S(i) (which to me looks like n-2 equations for n-1 unknowns- how to determine s(1)?)

Or also any other interesting ways of distributing the numbers, for example sinusoidally: taking the equal spacing example above, then taking the arcsin of each point from 0 to 1 to get a squashed distribution in [0,pi/2] then dividing by pi/2 to return to the [0,1] range.



Is there any easy way to express this? I am just writing ramblings on paper and for all I know this has a name or something I can research.

Thanks,
Mike
 
Mathematics news on Phys.org
Oh, just noticed for the first problem,

The sum should equal 1, so

S(1) + 2*S(1) + 4*S(1) + ... + 2^(n-1))*S(1) = 1
so
s(1)*(2^(n-1) - 1) = 1?
 
It seems like a pretty simple application of arithmetic series Mikey. Let the initial increment be "d" and the increase in the increment be "e". Then the (n-1) increments are :

d, d+e, d+2e, d+3e ... d+(n-2)e

Using the above and applying the arithmetic series formula you can express the n sample points as:

0, d, 2d+e, 3d+3e, 4d+6e, ... kd+k(k-1)/2 e, ... (n-1)d + (n-1)(n-2)e/2

Since you want the last increment to be twice the first then :

d + (n-2)e=2d

Which gives,

e=\frac{d}{n-2}

Also since the last term in the series is 1 you need :

(n-1)d + (n-1)(n-2)e / 2 = 1

Which gives,

(n-1)d + (n-1)d/2 = 1

d = \frac{2}{3(n-1)}

Example : n=4

d=2/(3(n-1)) = 2/9, and e=d/(n-2)=1/9

So the series is : [0, 2/9, 5/9, 9/9] which seems to work ok. :)
 
Last edited:
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Back
Top