Math Is Fun Forum

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

You are not logged in.

#1 2011-03-03 14:11:47

chineseballer06
Member
Registered: 2011-02-01
Posts: 34

Expectation of the word Mississippi

What is the expected value of the number of times that two adjacent letters are the same in a random permutation of the word Mississippi?

I was wondering if someone could help me determine if I got this problem right.

So I let the random variable Xi=1 if there are two adjacent letters that are the same and =0 otherwise. 
I said i=0,...,7 because there can only be a maximum of 7 times where two adjacent letters are the same. 
Ways to arrange Mississippi = 11!/(4!4!2!)=34,650
Ways to arrange Mississippi where there are no adjacent letters that are the same =34,650-4!4!4!2!=7002
P(Xi=0)=(7002/34650)
P(Xi=1)=(27648/34650)
Expected value of the number of times that two adjacent letters are similar in a random permutation
=E(X0+X1+,...,+X7)
=7(P(Xi=1))=7(27648/34650)

=5.585...

Any help is greatly appreciated! smile

Offline

#2 2011-03-03 18:47:40

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

Re: Expectation of the word Mississippi

Hi;

That answer is a little high. I believe that


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 2011-03-03 19:06:15

chineseballer06
Member
Registered: 2011-02-01
Posts: 34

Re: Expectation of the word Mississippi

Hi bobbym,

How did you get that?

Offline

#4 2011-03-03 19:11:15

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

Re: Expectation of the word Mississippi

Hi;

I tallied up all 34560 permutations of the word "Mississippi" and counted the number of adjacent matches. Then took the average which is the same as the expected number. As of yet I do not have any calculation that matches what I think is the correct answer.


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

#5 2011-03-03 19:16:28

chineseballer06
Member
Registered: 2011-02-01
Posts: 34

Re: Expectation of the word Mississippi

Oh okay do you have a program that can do that or something?

Offline

#6 2011-03-03 19:22:53

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

Re: Expectation of the word Mississippi

I use a CAS for all mathematical work and programming now. Before Paul Nahin wrote his books we were doing it. Basically our approach is, we solve problems by back engineering them. I try to start with the answer and work my way back to a method that will make everyone happy.


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 2011-03-03 19:29:10

chineseballer06
Member
Registered: 2011-02-01
Posts: 34

Re: Expectation of the word Mississippi

Oh I see that is very interesting.

Offline

#8 2011-03-03 19:38:06

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

Re: Expectation of the word Mississippi

Is this a personal problem or a school 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

#9 2011-03-03 19:46:05

chineseballer06
Member
Registered: 2011-02-01
Posts: 34

Re: Expectation of the word Mississippi

Its a school problem

Offline

#10 2011-03-03 23:14:38

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

Re: Expectation of the word Mississippi

I got it!

Let

if the letters in positions n and n+1 are the same and

if they are not. Then


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

#11 2011-03-04 01:33:52

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

Re: Expectation of the word Mississippi

Hi bobbym,

Do you know of a way to count the number of arrangements such that no two adjacent letters are the same?
I've been trying since this thread started.


"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

#12 2011-03-04 01:54:59

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

Re: Expectation of the word Mississippi

No, but there are 2016 of them.


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

#13 2011-03-04 01:57:29

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

Re: Expectation of the word Mississippi

Not even generating functions?
And what is the trick to count in a CAS?


"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

#14 2011-03-04 02:15:05

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

Re: Expectation of the word Mississippi

I can not find that problem solved anywhere. In a book that has that problem he recommends a simulation to get the answer.

It can be solved easily with mathematica but it is a functional solution. Mathematica supports the functional paradigm like lisp.

For a procedural language, here is the pseudocode:

1) Start L={m,i,s,s,i,s,s,i,p,p,i}

1.5) For n = 1 to 10;

2) If L[n] = L[n+1] then goto loop

2.5) next n

3) c = c +1

4) loop: generate next permutation

5) print c


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

#15 2011-03-04 02:38:29

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

Re: Expectation of the word Mississippi

Hi,

Ok, thank you.
I too could not find anything except simulations.


"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

#16 2011-03-04 05:12:46

chineseballer06
Member
Registered: 2011-02-01
Posts: 34

Re: Expectation of the word Mississippi

Hi bobbym,
Thank you for the help.
I have a question though, where do u get the multiple of 10 in your solution?

Offline

#17 2011-03-04 05:20:03

chineseballer06
Member
Registered: 2011-02-01
Posts: 34

Re: Expectation of the word Mississippi

Also is there a way I can learn about these simulations your talking about?

Offline

#18 2011-03-04 07:28:46

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

Re: Expectation of the word Mississippi

Hi;

There are 11 letters in that word and matches can occur in position (1,2) or (2,3) or (3,4) all the to (10,11). So there are 10 all with the same probability of course.

For your second question, do you program?


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

#19 2011-03-04 15:06:45

chineseballer06
Member
Registered: 2011-02-01
Posts: 34

Re: Expectation of the word Mississippi

oh okay that makes sense, and no I don't, im thinking about taking some computer science classes though

Offline

#20 2011-03-04 15:09:18

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

Re: Expectation of the word Mississippi

Hi;

That is good. It will help a great deal.


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