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

  • Context: High School 
  • Thread starter Thread starter xeon123
  • Start date Start date
  • Tags Tags
    Partition
Click For Summary

Discussion Overview

The discussion revolves around finding a formula for calculating partitions of a set of numbers, specifically how to categorize numbers into defined subsets based on their values. The scope includes mathematical reasoning and conceptual clarification regarding the nature of partitions.

Discussion Character

  • Mathematical reasoning
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant describes a specific partitioning of numbers from 1 to 210 into three groups based on ranges.
  • Another participant clarifies the general definition of a partition and suggests a method for partitioning based on whether the number of subsets evenly divides the total number of elements.
  • A different participant seeks a specific equation that assigns a partition number to each individual number within the set.
  • Another participant proposes a matrix approach to define the relationship between numbers, partitions, and their indices.
  • A further variation is introduced, where the set starts from 0 instead of 1, and a method using the INT function is suggested to determine the partition number based on the adjusted ranges.

Areas of Agreement / Disagreement

Participants express varying interpretations of what constitutes a partition and how to calculate it, leading to multiple competing views on the approach to take. The discussion remains unresolved regarding the best method or formula to use.

Contextual Notes

There are assumptions regarding the definitions of partitions and the specific ranges used for categorization. The discussion does not resolve the mathematical steps or the implications of different starting points for the set of numbers.

xeon123
Messages
90
Reaction score
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
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.
 
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
 
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?
 
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
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K