What is the formula for calculating partitions for a given set of numbers?

  • Thread starter xeon123
  • Start date
  • Tags
    Partition
In summary, to calculate the partition number for a given number N in a set of N numbers with n size and m partitions, use the formula INT(N/p), where p is the size of each partition (n/m). This will give you a number from 0 to m-1, which represents the partition that N belongs to.
  • #1
xeon123
90
0
I've a set of [itex]N[/itex] numbers with n size, and I want to find to each partition they belong. E.g., a set with numbers from 1 to 210, with 3 partitions. So, the numbers from 1 to 70 goes to partition 1, from 71 to 140 goes to partition 2, and from 141 to 210 goes to partition 3. How can I calculate this?

Thanks,
 
Mathematics news on Phys.org
  • #2
A "partition" of a set is any collection of subsets such that each member of the set belongs to one and only one of the subsets. But you seem to be thinking of something much more specific- you want a partition in which every subset (except possibly one) contains a sequence of numbers from the set: 1 to m, in one subset, m+1 to 2m in another, etc. Is that correct?

In that case it is very simple: to partition a set with n members into m such subsets:
1) if m evenly divides n, as in the example given, there will be n/m subsets, the first containing 1 through m, the second m+1 through 2m, etc. n That is, the kth subset contains (k-1)m+ 1 through km.

2) if m does not evenly divide m, let [itex]\lfloor n/m\rfloor[/itex] be the largest integer less than or equal to m/n. There will be [itex]\lfloor n/m\rfloor[/itex] subsets containing exactly m members of the set, again, the kth such subset containing (k-1)m+1 through km, and one additional set with only the last [itex]n- m\lfloor n/m\rfloor[/itex] members.
 
  • #3
But I want the an equation that gives me the partition number. E.g.,
1*(something)=1
2*(something)=1
...
69*(something)=1
70*(something)=1
71*(something)=2
...
139*(something)=2
140*(something)=2
141*(something)=3
...
210*(something)=3
 
  • #4
I think the solution is:

If I put the values in a matrix, row 0 goes from 1 to m, row1 goes from m+1 to 2m, etc... So let me define the variables,
n is a number from 1 to 210
i is the number of the column
j is the number of the row
m is the number of partitions
p is the size of the partition (n/m)

So, n=i*p+j

Is it correct?
 
  • #5
Here's a slight variation on your setup. Instead of the integers 1, 2, ..., 210, let's say you have 0, 1, 2, ..., 209. You still have 210 numbers. Also, instead of having partition 1, 2, and 3, let's number them 0, 1, and 2.

The first partition will be 0, 1, ..., 69
The second will be 70, 71, ..., 139
The third will be 140, 141, ..., 209

If N is a number in your list, then INT(N/70) will evaluate to 0, 1, or 2, with INT being a function in Excel and other spreadsheets.
Some examples.
1. N = 37
INT(37/70) = 0

2. N = 75
INT(75/70) = 1

3. N = 70
INT(70/70) = 1

4. N = 208
INT(208/70) = 2
 

What is "Get the partition number" and why is it important?

"Get the partition number" is a mathematical concept that refers to the number of ways a positive integer can be written as a sum of positive integers. This concept is important in various fields such as number theory, combinatorics, and computer science.

How is the partition number calculated?

The partition number is calculated using a recursive formula known as the "partition function". This function takes into account the number's factors and uses them to determine the number of partitions.

What is the relationship between the partition number and other mathematical concepts?

The partition number is closely related to other mathematical concepts such as the Fibonacci sequence, the binomial coefficients, and the Euler's totient function. It also has connections to topics such as prime numbers, partitions of a set, and generating functions.

Are there any real-life applications of the partition number?

Yes, the partition number has various real-life applications. It is used in cryptography to generate secure keys, in computer science to optimize algorithms, and in physics to analyze phase transitions. It also has applications in music theory, where it is used to understand and create musical scales and chords.

Is there a limit to the partition number?

Yes, there is a limit to the partition number. As the number gets larger, the number of partitions also increases, but it grows at a slower rate. This phenomenon is known as "asymptotic growth", and the limit of the partition number is known as "Hardy-Ramanujan-Rademacher constant".

Similar threads

  • General Math
Replies
2
Views
1K
  • General Math
Replies
1
Views
2K
Replies
3
Views
2K
  • General Math
Replies
2
Views
989
  • Quantum Physics
Replies
9
Views
790
  • Thermodynamics
Replies
3
Views
858
  • Advanced Physics Homework Help
Replies
1
Views
1K
Replies
7
Views
1K
Replies
5
Views
2K
  • General Math
Replies
3
Views
2K
Back
Top