Math Is Fun Forum

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

You are not logged in.

#26 2012-08-30 09:00:53

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Combinations and Permutations "Rules"

It may simply have run out of time ... I know it took a while on my PC.

Try a slightly smaller one and see if it works


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#27 2012-08-30 09:50:14

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

Hi MIF

It works for a,a,b,c,d. But, functioning for inputs smaller than 10 input characters isn't very practical. Maybe you can use some other method for calculating their number (using e.g. a script written in a mathematical package).


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#28 2012-08-30 10:07:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Hi MIF;

It may simply have run out of time ... I know it took a while on my PC.

Yes, it takes some time on mine too. It seems to be working fine for smaller ones.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#29 2012-08-30 10:10:39

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

What input did you take, bobbym?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#30 2012-08-30 10:12:55

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Hi;

Where?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#31 2012-08-30 10:18:21

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

bobbym wrote:

Yes, it takes some time on mine too.

What did you enter as an input (which letters) that gave the slow output?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#32 2012-08-30 10:22:35

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Hi;

Post #17.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#33 2012-08-30 10:31:36

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

"m,a,t,h,e,m,a,t,i,c,s"? I get the results pretty fast for that one.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#34 2012-08-30 10:33:20

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Hi anonimnystefy;

What settings and what answer did you get?

I use:

11
5
Yes
No

see the first drawing in post #17.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#35 2012-08-30 13:12:51

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

11
5
No
No


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#36 2012-08-30 16:01:55

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Hi;

That is not the same problem.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#37 2012-08-30 19:41:48

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Combinations and Permutations "Rules"

The calculations are done on your own PC, so results may vary.

And so it is hard for me to write a program that will finish within the "timeout" that is imposed by Flash.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#38 2012-08-30 19:49:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Hi MathsIsFun;

No problem. It works for the smaller problems that I have tried on it so far.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#39 2012-08-31 00:07:19

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

Hi bobbym

You are right. It takes much more time and it comes out empty.

Hi MIF

I would suggest that for very large output (more than 10^7 possibilities), you do not show the whole output, just the number of possibilities.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#40 2012-08-31 01:21:53

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Hi;

10^7 is a little bit too large. The above problem only has 13000 permutations. Maybe 10^5 is better.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#41 2012-08-31 01:29:27

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

Either way, it should skip the printing when the number is large.

How did you calculate the number of the possible combinations?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#42 2012-08-31 01:31:46

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

I didn't. I counted the number of permutations.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#43 2012-08-31 01:39:15

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

What permutations?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#44 2012-08-31 01:41:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

The problem in post #17 is a permutation.

As you were taught, you try not to work on a problem that you do not already know the answer to. Remember back engineering? You work from the answer to the question, filling in the details.

Normally to do that I would have just counted them up first. But here MIF already does that with his program so you should use what to get the answer?

GF's of course!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#45 2012-08-31 02:13:54

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

When you choose a number of objects out of a larger set of objects, those can be only combinations or variations, not permutations.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#46 2012-08-31 02:19:49

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Did you look at post #17? When order counts we are talking about a permutation.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#47 2012-08-31 02:23:03

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

No, when order counts, it is a variation.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#48 2012-08-31 02:30:34

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

Hi;

http://www.askamathematician.com/2010/0 … nt-matter/

You will notice that in this exact type of problem he calls it an arrangement or permutation.

Anyways, it is calculated in the same way.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#49 2012-08-31 02:33:55

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Combinations and Permutations "Rules"

Just because he calls it that, doesn't mean it should be called that way.

I can't seem to calculate those using GFs.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#50 2012-08-31 02:39:35

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Combinations and Permutations "Rules"

http://en.wikipedia.org/wiki/Permutatio … binatorics

Post #17 is similar to a mississippi problem, which is definitely a permutation.

I can't seem to calculate those using GFs.

Well of course you can not if you call it a variation. There are ogf's for combinations and egf's for permutations.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB