Questions tagged [integer-partitions]

Partitions of an integer n are different ways of writing n as sum of smaller integers.

19 questions
5
votes
1 answer

Practical Implementation for Refinement Order on Integer Partitions

The refinement order on partitions of an integer $n$ can be defined as follows: $\lambda=(\lambda_1,\dots,\lambda_k)\leq\mu=(\mu_1,\dots,\mu_\ell)$ if there is a partition of the parts of $\lambda$ into blocks whose sums are the parts of $\mu$. It…
5
votes
4 answers

Divide an integer into the sum of consecutive positive numbers

Today I am trying to solve an classical problem: For any $n\in \Bbb{N}^+$, If it can be represent as the sum of consecutive positive numbers, find out them. For example: $$15 = 1+2+3+4+5$$ $$15=4+5+6$$ $$15=7+8$$ And I have an ugly method, its…
Laura
  • 291
  • 3
  • 7
5
votes
0 answers

Optimization problem with discrete and continuous components

Suppose we have a sequence of $m$ tokens $(T_1, T_2, \ldots, T_m)$. We can split this sequence considering two parameters $w$ (which is the width of the window) and $x$ which is the overlap between windows. This is depicted in the following…
4
votes
2 answers

A problem on constrained combinatorics

Not sure if this is a proper place, but I really don't know where else to ask. I'm craving for an algorithm generating certain sequences of numbers (the problem comes from physics). I'm looking for all such sequences of $a_n$ an $b_n$…
mavzolej
  • 177
  • 6
3
votes
2 answers

Subset Sum With Interval Target

Define the subset sum with interval target problem (SSITP) as follows: SSITP Input: A multiset $S = \{a_1, …, a_p\}$ of positive integers $a_i$ such that $\sum_{a_i \in S} a_i = T$. SSITP Output: True, if there is a subset $S’ \subseteq S$ such…
3
votes
1 answer

Number of ways n can be written as sum of at least two positive integers

I found a solution in Python for this problem, but do not understand it. The problem is how many ways an integer n can be written as the sum of at least two positive integers. For example, take n = 5. The number 5 can be written as 4 + 1 3 + 2 3 +…
ktm5124
  • 173
  • 6
2
votes
0 answers

Generating a distinct k-partition of n

Let us consider a specific case of an extended Kakuro puzzle. Given an integer $n$, we must form $n$ as the sum of $k$ distinct positive integers each less than or equal to $r$. From a mathematical standpoint we know that any number including, and…
2
votes
1 answer

Finding a specific "balls-into-bins" partition given its index in the lexicographical ordering

Given numbers $n,k\in \mathbb{N}$, we consider $\mathcal P$ to be the set of all possible partitions of $n$ balls into $k$ bins. Alternatively, $\mathcal P$ is the set of all $k$-ary vectors in $\{0,1,\ldots,n\}^k$ such that the sum of the entries…
R B
  • 2,644
  • 17
  • 35
1
vote
2 answers

A physical algorithm that finds all integer partitions of a number

If this is not the right forum for this question let me know. I am looking for a physical algorithm that can be easily followed by anyone not knowing much mathematics to get integer partitions of a number. I have come up with the following way - but…
user13107
  • 119
  • 3
1
vote
1 answer

Given a valid combination, how to get its index in the sequence of integer partition

This question is extended from this Algorithm to generate integer sets fulfills restrictions, in the answer I learned the formal term of this problem, and the recursive algorithm described in that answer also gives me the desired sequence - as much…
Li Wang
  • 33
  • 4
1
vote
3 answers

Divide N sticks among M boys as homogeneously as possible (ignoring order)

There are $N$ sticks. $N$ is an integer greater than zero. I want to divide it among $M$ boys. $M$ is also a positive integer. Partitioning $N$ among $M$ is easy, but doing it as evenly as possible is difficult for me to think through. Can someone…
user_1_1_1
  • 163
  • 7
1
vote
1 answer

Applications in Computer Sciences of Partition Functions

A partition function computes the number of ways an integer $n$ can be represented as the sum of $m$ other integers. For some value $n$, we have a partition function $p(n)$. These were studied extensively in mathematics by MacMahon, Hardy,…
1
vote
1 answer

Does this Qualify as Sub-Exponential?

I don't have a strong CS background so apologies if the question is trivially simple: So I am working on an algorithm, say $A(n)$ , which runs over all integer partitions of $n$. Now the algorithm calls a sub-routine $S(\pi)$ for each of the…
SagarM
  • 183
  • 7
1
vote
0 answers

prove that Integer partition problem is NP complete using Hamiltonian Cycle

Show that Integer parition problem is NP-complete using the fact that Hamiltonian cycle is NP-Complete My Thoughts : Integer paritition problem is about partitioning a given set of integers into two sets with equal sums. If I could show that…
1
vote
0 answers

Optimal partitioning of n-arrays

You're given N integer arrays. Each array can have different size and contains unique values. However same integers can be found in different arrays. The goal is to partition those arrays into K groups such that: Arrays grouped together don't share…
1
2