Factoring of addition?

In summary, the conversation discussed the concept of "factoring" addition and whether there is a specific name for this concept. The individual provided examples of how to create a sum using different integers and questioned if there are computer programs that can generate these sets. The conversation also mentioned looking up partition functions and a possible source code to generate these sets. Ultimately, the conversation focused on finding a faster way to generate these sets.
  • #1
jopux
1
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
  • #2
Look up partition functions.
 
  • #3
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.
 

1. What is factoring of addition?

Factoring of addition is a mathematical process of breaking down a sum into smaller, simpler parts. It involves finding the common factors of the terms in the sum and rewriting it as a product of those factors.

2. Why is factoring of addition important?

Factoring of addition is important because it helps us simplify complex mathematical expressions and solve equations more easily. It also allows us to identify patterns and relationships between numbers.

3. How do you factor an addition problem?

To factor an addition problem, start by finding the common factors of all the terms. Then, rewrite the sum as a product of those common factors. You can also use the distributive property to factor out a common factor from each term.

4. What are some common techniques used in factoring of addition?

Some common techniques used in factoring of addition include finding the greatest common factor (GCF), factoring by grouping, and using the difference of squares or cubes formula. Another useful technique is to look for patterns or use trial and error to find the factors.

5. Can factoring of addition be applied to other mathematical operations?

Yes, factoring can also be applied to other mathematical operations, such as multiplication, division, and even exponents. The process of factoring involves breaking down a larger expression into smaller parts, which can be helpful in solving a variety of mathematical problems.

Similar threads

  • Linear and Abstract Algebra
Replies
33
Views
3K
Replies
3
Views
489
  • Linear and Abstract Algebra
Replies
8
Views
882
  • Linear and Abstract Algebra
Replies
2
Views
900
  • Linear and Abstract Algebra
Replies
28
Views
2K
  • Linear and Abstract Algebra
Replies
14
Views
2K
  • Precalculus Mathematics Homework Help
Replies
4
Views
3K
  • Precalculus Mathematics Homework Help
Replies
3
Views
884
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
9
Views
1K
Back
Top