Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

## #26 2012-02-15 07:18:44

bobbym

Online

### Re: Permutation Generator

Hi;

The numbers am looking to perm will be like

Unless you are through with the question I want to know exactly what numbers you want to permute.

As I understand it you do not want 2 in the same row.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

## #27 2012-02-15 09:18:43

Labodmin
Novice

Offline

### Re: Permutation Generator

Hi they are 1,2,3,4,5,6 on the vertical row and W D A on the horizontal row
what you did looks similar
Its like football pool games where 1,2,3,4,5,6 will be the teams

Eg will be

W   D   A
1    x
2    x
3         x
4                x
5         x
6                x
Many thanks

## #28 2012-02-15 09:38:30

bobbym

Online

### Re: Permutation Generator

Hi;

Okay, I will work on it and post if I have a solution.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

## #29 2012-02-15 09:40:31

Labodmin
Novice

Offline

### Re: Permutation Generator

Hi Bobbym
What you have send looks good.
l will change it round to suit what l need it for.
What formula did you use so that l can follow the same trend to organise larger number like 1,2,3,4,5,6,7,8,9,10?
Best regards

## #30 2012-02-15 09:45:54

bobbym

Online

### Re: Permutation Generator

Hi;

No formula. And for bigger numbers there may be a lot more permutations, thousands or millions. A formula would only tell how many there are, it would not show what they are.

Using a method, I come up with

That means there are 524880 ways to permute those 6 numbers in those 18 boxes.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

## #31 2012-02-15 20:04:10

Labodmin
Novice

Offline

### Re: Permutation Generator

hello, l am looking at the first numbers you sent:
0  0  1
0  0  2
0  0  3
which were all 162 ways.

if l was to do the same for 1,2,3,4,5,6 how many ways will it be all together and can you also help me organise them please?
Many thanks

## #32 2012-02-15 21:56:09

bobbym

Online

### Re: Permutation Generator

Hi Labodmin;

There are 524880 ways to arrange them! That is a very large number.

That is for your problem in post #27. It is quite easy to get the number but to arrange them will require a computer. Do you program?

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

## #33 2012-02-16 06:04:09

Labodmin
Novice

Offline

### Re: Permutation Generator

Hi many thanks for the reply.
I don't program .

## #34 2012-02-16 06:38:55

bobbym

Online

### Re: Permutation Generator

Hi;

Okay, let me know if I can do something else.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

## #35 2012-02-27 06:49:46

aegiziano1
Member

Offline

### Re: Permutation Generator

Hi gAr and bobbym,

Sorry for such a late response.. After our last postings (post 22) I have been crammed with Finals, Papers, Projects and what not.... The project that you guys helped me on was a success , thanks again!...
.. I was wondering (just out of curiosity) since the file would be tremendously large to show all possible solutions, if there is an actual way to break up the solutions to accommodate the file size.

Last edited by aegiziano1 (2012-02-27 06:50:49)

## #36 2012-02-27 06:54:52

bobbym

Online

### Re: Permutation Generator

Break up the solutions? I am not following you.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

## #37 2012-02-27 13:58:21

aegiziano1
Member

Offline

### Re: Permutation Generator

I mean instead of the list of 1,748,533 solutions on one single file, is it possible to put the soultions on multiple files?

## #38 2012-02-27 13:59:42

bobbym

Online

### Re: Permutation Generator

Hi;

I would say so. You could also zip it up to make it smaller.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

## #39 2012-02-27 23:06:25

gAr
Star Member

Offline

### Re: Permutation Generator

Hi aegiziano1,

As a 7z compressed tarball, it's around 514KiB.

"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

## #40 2012-10-29 21:09:30

aegiziano1
Member

Offline

### Re: Permutation Generator

hey guys ,

I was trying to figure out how to write the code to generate a list for the following code.... let me know if you guys can help?

the question was pick 5 number 1-56 ( No repeats) and an extra number 1-52

#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
int cnt = 0;
int x1,x2,x3,x4,x5,y;
for (x1=1;x1<57;x1++)
{
for (x2=x1+1;x2<57;x2++)
{
for (x3=x2+1;x3<57;x3++)
{
for (x4=x3+1;x4<57;x4++)
{
for (x5=x4+1;x5<57;x5++)
{
for (y=1;y<53;y++)
{
if (x1+x2+x3+x4+x5+y == 147)
{
cnt++;
}
}
}
}
}
}
}
printf("%d",cnt);
system("PAUSE");
return 0;
}

## #41 2012-10-29 23:23:44

bobbym

Online

### Re: Permutation Generator

What answer did you get when you put a counter in the middle of that?

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.