Math Is Fun Forum

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

You are not logged in.

#1 2014-08-30 01:26:31

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Permutation Problems

In how many ways can you arrange the characters of MATHEMATICS with the vowels in that order?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#2 2014-08-30 01:31:49

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

Re: Permutation Problems

Hi;

EM:

s1 = Permutations[{m, a, t, h, e, m, a, t, i, c, s}, {11}];
Cases[s1, {___, a, ___, e, ___, a, ___, i, ___}] // Length

Analytically:


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

#3 2014-09-06 15:15:06

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Permutation Problems

Hi,

Using bobbym's idea to do it with Sage and unix-like systems utilities:

import os
plst = Permutations("mathematics").list() 
fo = open("tmpf", "w")
for pp in plst:
     fo.write(''.join(pp)+"\n")
fo.close()
os.system("cat tmpf | grep ".*a.*e.*a.*i" | wc -l") 

"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."

Offline

#4 2014-09-06 21:05:21

danaj
Member
Registered: 2014-03-03
Posts: 29

Re: Permutation Problems

Since I just added a permutation iterator to my module yesterday, this is a convenient time to try it.  Using the hash to not count duplicates.

my %h;
my @m = split "", "mathematics";
forperm {
  my $s = join "", @m[@_];
  undef $h{$s} if $s =~ /a.*e.*a.*i/;
  # alternate:  undef $h{$s} if $s =~ tr/aeiou//cdr eq "aeai"
} scalar(@m);
say scalar keys %h;

Result match's Bobbym's analytic answer.  Thanks for the fun!

Offline

#5 2014-09-14 20:08:51

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Permutation Problems

2. In how many ways can you pick 4 objects from 5 kabooblydos, 4 carrots, 3 transparent soaps and arrange them on four different plates such that each contains exactly one object?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#6 2014-09-15 00:26:25

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

Re: Permutation Problems

Hi;

I am not following the plate idea. How does that make it different from any arrangement 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

#7 2014-09-15 00:34:11

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Permutation Problems

It is the same thing, you just pick four objects and arrange them. E.g, KCTT and TTCK are distinct.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#8 2014-09-15 00:39:29

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

Re: Permutation Problems

Repetitions are allowed, you are sure?


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

#9 2014-09-15 00:40:43

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

Re: Permutation Problems

I am getting 80, but might be incorrect. Had to do it by hand.


“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

#10 2014-09-15 00:48:24

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Permutation Problems

bobbym wrote:

Repetitions are allowed, you are sure?

example?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#11 2014-09-15 00:49:36

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

Re: Permutation Problems

80 is correct.


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

#12 2014-09-15 00:50:03

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

Re: Permutation Problems

I think repetitions must be allowed. If not, the solution is 0.


“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

#13 2014-09-15 00:51:57

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

Re: Permutation Problems

A sim is needed.


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

#14 2014-09-15 01:03:22

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Permutation Problems

It cannot be called a sim but I will write it.

Unfortunately, the person who will review the solution knows nothing about EM


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#15 2014-09-15 01:04:45

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

Re: Permutation Problems

Examine and multiply by the correct constant the coefficient of x^4.

Permutations[{k, k, k, k, k, c, c, c, c, t, t, t}, {4}]//Length


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

#16 2014-09-15 01:07:12

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Permutation Problems

Why is each term of the gf divided by some factorial?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#17 2014-09-15 01:08:38

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

Re: Permutation Problems

Because this is an exponential gf not an ordinary one. Exponential ones count when order counts.


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

#18 2014-09-15 01:11:48

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

Re: Permutation Problems

I also did it with that GF.


“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

#19 2014-09-15 01:12:37

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Permutation Problems

Unfortunately the person reviewing the solution is 16 and has no idea what a GF is, nor do I know enough to explain him about it.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#20 2014-09-15 01:14:24

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

Re: Permutation Problems

16 is old enough.

You can do it by casework, then.


“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

#21 2014-09-15 01:15:00

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

Re: Permutation Problems

I know you did.

Unfortunately, the person who will review the solution knows nothing about EM

There are many ways to solve a problem. Good mathematicians do not criticize how you do it generally. See the big boys on the SE.


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

#22 2014-09-15 01:18:19

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Permutation Problems

I will have to ask Rakesh to solve it for him.

Can I see the casework solution please?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#23 2014-09-15 01:19:58

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

Re: Permutation Problems

It will take time to write up it is lengthy and ugly.


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

#24 2014-09-15 01:20:45

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

Re: Permutation Problems

Hm, you just list out all the 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

#25 2014-09-15 01:22:17

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

Re: Permutation Problems

That is why casework is junk and I prefer generating functions. It will take me about an hour to latex it up and therefore it will take several hours.


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