Partitioning Problem: Solving for Pairs & Triplets

  • Thread starter ramsey2879
  • Start date
In summary, the conversation discusses finding the number and sorted position of pairs and triplets in a set A of non-negative numbers with a sum less or equal to N. A pattern can be observed by writing out the pairs and triplets in a grid and using ideas from partition theory and Pascal's triangle. This method can also be applied to sorted sets with more than three parts.
  • #1
ramsey2879
841
3
Let A be the complete set of ordered pairs of non-negative numbers which have a sum less or equal to N.
1. How many pairs are in the set?
2. If set A is sorted in ascending order 1st by the sum of the elements then by the value of each number reading from left to right the first such pair would be (0,0) the second (0,1), but can you find the sorted position of pair (a,b) as a function of a and b?
3. Answer questions 1 and 2 under the same assumptions but when dealing with triplets instead of pairs.
For the solutions to 1 and 2 see http://answers.yahoo.com/question/;...A3N1YmplY3Q-;_ylv=3?qid=20080103222238AAh2KWA
 
Last edited:
Physics news on Phys.org
  • #2
How I'd solve them:

1. What is the number of pairs with sum equal to N? Try building them one by one: how many numbers can you pick first and then how many choices are there to complement the pair?

2. Try writing out the first ... and see if you can find a pattern. Hint: write them in a grid:
Code:
(2, 0) (2, 1) ...
(1, 0) (1, 1) (1, 2)
(0, 0) (0, 1) (0, 2) (0, 3)
and try to draw the ordering in it.

3. Repeat with three numbers: more work, probably same ideas

Nicest is if you can do it without looking at the answers in the link you provided.
 
  • #3
CompuChip said:
How I'd solve them:

1. What is the number of pairs with sum equal to N? Try building them one by one: how many numbers can you pick first and then how many choices are there to complement the pair?

2. Try writing out the first ... and see if you can find a pattern. Hint: write them in a grid:
Code:
(2, 0) (2, 1) ...
(1, 0) (1, 1) (1, 2)
(0, 0) (0, 1) (0, 2) (0, 3)
and try to draw the ordering in it.

3. Repeat with three numbers: more work, probably same ideas

Nicest is if you can do it without looking at the answers in the link you provided.
Sure but what if you take it to partitions of more than 3 parts, the same method applies also. Since it is hard to work with grids of more than 2 dimensions. I think that I should point out that the answers for sorted ordered sets of K non-negative integers would also be based upon the properties of Pascal's triangle as are the solutions for K = 2 and 3. Also, partition theory can be applied if you can figure how many permutations there are of partitions of less than K parts padded with zeros to make K parts. I think the solution(s) I found for sorted ordered sets of 2 and 3 parts respectively can be generalized for sorted sets of more than 3 parts. See also my blog entry https://www.physicsforums.com/blogs/ramsey2879-21221/help-needed-with-n-dimensional-table-1229/
 
Last edited by a moderator:

What is the partitioning problem?

The partitioning problem is a mathematical problem that involves dividing a set of numbers into smaller subsets or groups based on a given criteria. It is often used in data analysis and optimization to find the most efficient way to divide a set of items.

What is the difference between solving for pairs and triplets in the partitioning problem?

Solving for pairs involves dividing a set of numbers into two subsets, while solving for triplets involves dividing a set of numbers into three subsets. The number of subsets can vary depending on the specific partitioning problem being solved.

What are some common algorithms used to solve the partitioning problem?

Some common algorithms used to solve the partitioning problem include the greedy algorithm, dynamic programming, and branch and bound. These algorithms use different approaches to find the optimal solution for a given partitioning problem.

How is the partitioning problem used in real-world applications?

The partitioning problem has many real-world applications, including data clustering, resource allocation, and scheduling. It is used in industries such as finance, manufacturing, and transportation to optimize processes and make more efficient decisions.

What are some challenges in solving the partitioning problem?

One of the main challenges in solving the partitioning problem is finding the most efficient and optimal solution. This can be difficult as the problem can become more complex with larger datasets or different criteria to be met. Additionally, the computational complexity of the problem can make it challenging to find a solution in a reasonable amount of time.

Similar threads

Replies
2
Views
974
  • Linear and Abstract Algebra
Replies
10
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
736
  • Quantum Interpretations and Foundations
2
Replies
54
Views
3K
  • Linear and Abstract Algebra
Replies
33
Views
3K
  • Quantum Interpretations and Foundations
2
Replies
45
Views
3K
Replies
9
Views
1K
  • General Math
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
11
Views
1K
Back
Top