You are not logged in.
Hi bobbym,
And a J simulation:
pos=.40$1+i.7
cards=.4#1+i.10
sim=: 3 : '0=+/((40?40){cards)=pos'
(+/%#)(sim"0)100000#0
Hi bobbym,
Hi ShivamS,
Hi bobbym,
Hi bobbym,
Ah, okay then. I wasn't sure which definition to hold true. Thanks for the clarification.
You're welcome.
Hi bobbym,
Mmm, yes. I wanted to tell 1+ (pos# mod 7), I overlooked it.
I suppose you got it from a torrent.
Even if you manage to crack the password, it may not actually have the data you expect.
Never download huge compressed files, unless you're sure it's not password protected.
I thought those evils only use people.
Production means the servers used to interact with the users.
Hi,
Hi,
Here's a book on graph theory with Sage: latest-r1991
A pack of forty cards numbered 1-10 and four suits are well shuffled and placed face up on the floor.
After placing the cards sequentially, the positions are numbered like this
[1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5]
A card numbered 1 must not occupy a position numbered 1, and same restriction for cards 2-7. Cards 8-10 are free to be placed anywhere.
What's the probability of such an arrangement?
Okay, taking a break, see you later.
Why does the simplest idea not work but the complicated ones do?
Why, wan't #7 simple?
Wait, an easier workaround!
solve([y==sqrt(x-1),y==sqrt(x+1)-1],x,y)
[[x == (5/4), y == (1/2)]]
which is just perfect!
Hi,
Its syntax is
solve([sqrt(x-1)-sqrt(x+1)==-1],x)
But it doesn't solve it though, Sage and maxima seems to have a problem when square roots are involved like that.
That has frustrated me a few times.
So we need to either manually eliminate the roots or write a program to eliminate roots, and then give that equation to solve.
Introduces some extra solutions, so we need to weed out the extras later.
For now, use this input instead:
solve([(8*sqrt(x + 1)*sqrt(x - 1)*x)^2==(8*x^2 - 5)^2],x)
[x == (-5/4), x == (5/4)]
So, for the original equation, x=5/4
Hi bobbym,
You're welcome!
Hi ElainaVW,
Hope that you both enjoyed as much as I did!
It gets rid of the dreadful casework to come up with a recurrence, in some problems it's even hardly possible.
I think it's also possible to solve tiling problems like this.
Hi,
Yes, nice, isn't it?!
A formal variable for the g.f.
Looks like you subtracted from a ones-matrix!
Even maxima gets it right:
am:matrix(
[0 , 0 , 1 , 6 , 1 , 1],
[0 , 1 , 1 , 6 , 1 , 1],
[0 , 1 , 1 , 6 , 1 , 1],
[0 , 1 , 1 , 6 , 1 , 1],
[0 , 1 , 1 , 6 , 1 , 0],
[0 , 1 , 1 , 6 , 0 , 1]
)$
id:matrix(
[1,0,0,0,0,0],
[0,1,0,0,0,0],
[0,0,1,0,0,0],
[0,0,0,1,0,0],
[0,0,0,0,1,0],
[0,0,0,0,0,1]
)$
iam:invert(id-x*am)$
ratsimp(sum(iam[1,i],i,1,6));
Update:
Even better, we can directly get the generating function for every entry in the matrix.
In our example 2, we add up the g.f's in the first row.
In Sage:
am=matrix([
[0 , 0 , 1 , 6 , 1 , 1],
[0 , 1 , 1 , 6 , 1 , 1],
[0 , 1 , 1 , 6 , 1 , 1],
[0 , 1 , 1 , 6 , 1 , 1],
[0 , 1 , 1 , 6 , 1 , 0],
[0 , 1 , 1 , 6 , 0 , 1]
])
sum((identity_matrix(6)-x*am).inverse()[0]).full_simplify()