What Is the Term for Decomposing Numbers into Additive Combinations?

jopux
Messages
1
Reaction score
0
"Factoring" of addition?

Is there a name for "factoring" addition? For example...let's say I'm working in a basis of all integers greater than 3. I can make 7 from 3+4; 8 from 4+4 or 3+5; 9 from 3+3+3 or 4+5 or 6+3...

Is there a name for this? And if so...are there computer programs that will generate these sets for me?
 
Physics news on Phys.org
Look up partition functions.
 
jopux said:
are there computer programs that will generate these sets for me?

try this

Code:
#include <stdio.h>

#define LOWEST 3

int n, c[1024];
FILE *out;

void add (int pos, int a, int sum) {
	int i;
	c[pos]=a;
	if (sum>n) return;
	if (sum==n) {
		for (i=0;i<=pos;i++) fprintf(out, "%d ", c[i]);
		fprintf(out, "\n");
		return;
	}
	for (i=a;i>=LOWEST;i--) add(pos+1, i, sum+i);
}

int main () {
	int i;
	printf("n: ");
	scanf("%d", &n);
	out=fopen("results.txt", "wt");
	for (i=n-LOWEST;i>=LOWEST;i--) add(0, i, i);
	fclose(out);
	return 0;
}

this is very slow, i'll try to think of a way to make it faster.

if source code is not allowed in the math forum, i am sorry, delete the post.
 
I asked online questions about Proposition 2.1.1: The answer I got is the following: I have some questions about the answer I got. When the person answering says: ##1.## Is the map ##\mathfrak{q}\mapsto \mathfrak{q} A _\mathfrak{p}## from ##A\setminus \mathfrak{p}\to A_\mathfrak{p}##? But I don't understand what the author meant for the rest of the sentence in mathematical notation: ##2.## In the next statement where the author says: How is ##A\to...
The following are taken from the two sources, 1) from this online page and the book An Introduction to Module Theory by: Ibrahim Assem, Flavio U. Coelho. In the Abelian Categories chapter in the module theory text on page 157, right after presenting IV.2.21 Definition, the authors states "Image and coimage may or may not exist, but if they do, then they are unique up to isomorphism (because so are kernels and cokernels). Also in the reference url page above, the authors present two...
##\textbf{Exercise 10}:## I came across the following solution online: Questions: 1. When the author states in "that ring (not sure if he is referring to ##R## or ##R/\mathfrak{p}##, but I am guessing the later) ##x_n x_{n+1}=0## for all odd $n$ and ##x_{n+1}## is invertible, so that ##x_n=0##" 2. How does ##x_nx_{n+1}=0## implies that ##x_{n+1}## is invertible and ##x_n=0##. I mean if the quotient ring ##R/\mathfrak{p}## is an integral domain, and ##x_{n+1}## is invertible then...

Similar threads

Replies
33
Views
4K
Replies
8
Views
1K
Replies
17
Views
8K
Replies
7
Views
1K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
5
Views
2K
Back
Top