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

Login

Username

Password

Not registered yet?

#1 2013-10-06 21:34:01

bobbym
Administrator

Online

A stumper?

Hi;

This came up on another discussion group. Here I will show how easy this is to do with mathematica.

There are 5 different red balls, 5 different green balls, 5 different blue balls and 5 different black balls. In how many ways can they be arranged so that no two balls of same color are adjacent ?

The whole problem condenses down to this expression. ( I want to thank Robert Israel for showing me this idea.)



This produces an extremely large polynomial in 4 variables. The coefficient of



is the answer. We get it with the extremely powerful command:

Coefficient[ans, w^5 x^5 y^5 z^5]

the answer is 134631576.


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.

#2 2013-10-06 23:19:58

anonimnystefy
Real Member

Offline

Re: A stumper?

How does it work?


The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#3 2013-10-06 23:23:32

bobbym
Administrator

Online

Re: A stumper?

It looks like it is the matrix version of a gf. How it works, I never did figure out, but I can use it.


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.

#4 2014-03-18 22:56:29

gAr
Star Member

Offline

Re: A stumper?

Hi,

I think I got a hang of doing things in J.

Here's a simulation for an approximate answer:

Code:

sim=: 3 : '0=+/+/(2 4 8 16)=/2+/\(20?20){5#1 2 4 8'
((!20)%(!5)^4)*(+/%#)(sim "0) 1000000#0

= 135712661.692608


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

#5 2014-03-19 01:51:13

bobbym
Administrator

Online

Re: A stumper?

Hi gAr;

That is close!


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.

#6 2014-03-19 02:09:49

gAr
Star Member

Offline

Re: A stumper?

Hi,

Yes!
Is there any command in Mm to get moving averages?


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

#7 2014-03-19 02:22:25

bobbym
Administrator

Online

Re: A stumper?

M, is bloated to the extreme. There is command for everything. Whenever I do not find a command that does exactly what I want I always think I did not look in the right place!

Try MovingAverage in the help.


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.

#8 2014-03-19 03:08:09

gAr
Star Member

Offline

Re: A stumper?

Ah, yes!
I should have searched before asking!


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

#9 2014-03-19 03:09:15

bobbym
Administrator

Online

Re: A stumper?

Hi;

No problem. Glad to help.


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.

Board footer

Powered by FluxBB