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

You are not logged in.

|
Options

bobbym
2014-03-19 03:09:15

Hi;

gAr
2014-03-19 03:08:09

Ah, yes!
I should have searched before asking!

bobbym
2014-03-19 02:22:25

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.

gAr
2014-03-19 02:09:49

Hi,

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

bobbym
2014-03-19 01:51:13

Hi gAr;

That is close!

gAr
2014-03-18 22:56:29

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

bobbym
2013-10-06 23:23:32

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

anonimnystefy
2013-10-06 23:19:58

How does it work?

bobbym
2013-10-06 21:34:01

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]