Joe Riel

9660 Reputation

23 Badges

20 years, 17 days

MaplePrimes Activity


These are replies submitted by Joe Riel

Notwithstanding the "bug," one can directly check for equality of eigenvalues, but the exp must first be converted to complex cartesian form

with(LinearAlgebra);
Equal(Eigenvalues(A), Eigenvalues(evalc~(B)));
                                                      true

Notwithstanding the "bug," one can directly check for equality of eigenvalues, but the exp must first be converted to complex cartesian form

with(LinearAlgebra);
Equal(Eigenvalues(A), Eigenvalues(evalc~(B)));
                                                      true

I'm not seeing how it is a common factor.  It appears in the two factors of the numerator, but factoring it (or g^(1/3)) out of either one won't obviously make them simpler. 

Ah yes, I just skimmed the post.  Here's a nifty way to do it in Maple13:

L := [seq(1..12)]:
`[]`~(L[..-2],L[2..]);
[[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12]]

Ah yes, I just skimmed the post.  Here's a nifty way to do it in Maple13:

L := [seq(1..12)]:
`[]`~(L[..-2],L[2..]);
[[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12]]

With the change, you'll need a check to ensure that ListThing is not empty.

With the change, you'll need a check to ensure that ListThing is not empty.

The equation E(f(x)) = f(x) is used to define f(x).  That is, we assume such an f exists and then use the computation of E(f(x)) to find a shifted equation that f must satisfy for all x. Similar to formulating and solving a differential equation.

The example you give isn't a counterexample---there are specific cases that can be solved.  The general case, for any W and L, leads to a non-polynomial equation of the form

     (K*q)^(W/L) - K + p^(L/W) = 0

where you have to solve for K.

The equation E(f(x)) = f(x) is used to define f(x).  That is, we assume such an f exists and then use the computation of E(f(x)) to find a shifted equation that f must satisfy for all x. Similar to formulating and solving a differential equation.

The example you give isn't a counterexample---there are specific cases that can be solved.  The general case, for any W and L, leads to a non-polynomial equation of the form

     (K*q)^(W/L) - K + p^(L/W) = 0

where you have to solve for K.

First I'll repeat the analysis for a fair game.

A game is considered fair if the expected value of a player's future fortune equals its current value.  Assume that at each step, player 1 either wins or loses an amount amount W or loses amount L, with probabilities p and q, respectively (p + q = 1). His expected change in fortune is then E(delta) = p*W - q*L.  For a fair game E(delta) = 0, so p*W = q*L.

Assume that player 1 wins if he accumulates T amount and loses if his fortune reaches 0. Let p(x) be the probabilty he wins assuming his current fortuneis x. The expected value of this game for player 1 is then E(x) = p(x)*T + (1-p(x)*0.  Because the game is fair, the expected value does not change, so p(x)*T = x, hence p(x) = x/T.

Now assume that W=L, but p < q, so the game is not fair.  Consequently, the expected fortune is not constant.  By redefining the meaning of a player's fortune we can make its expected value constant.  Let f(x) be a function that maps player 1's current accumulation to hisfortune.  Previously this was the identity function.  What we want is

   E(f(x)) = p*f(x+W) + q*f(x-W) = f(x)

A general solution for such an equation is

   f(x) = (q/p)^(x/W)

To see this, compute

f := (q/p)^(x/W):
Ef := eval(p*f, x=x+W) + eval(q*f, x=x-W):
eval(factor(expand(Ef)), q+p=1);
                                       (x/W)
                                  (q/p)


Again, let p(x) be the probability that the player wins, given his current holdings are x.
The expected value of his fortune when he wins (obtains T cash) is

   E(f(x)) = p(x)*f(T) + (1-p(x))*f(0) = f(x)

Solving for p(x) gives

  p(x) = (f(x) - f(0))/(f(T) - f(0) = ((q/p)^(x/W) - 1)/((q/p)^(T/W) - 1).

Note that if W <> L and the game is unfair, there is, I believe, no nice result.  The general solution for f has the form K^x, with a K a constant that depends on p, q, W and L, but there is no closed-form solution for K.

First I'll repeat the analysis for a fair game.

A game is considered fair if the expected value of a player's future fortune equals its current value.  Assume that at each step, player 1 either wins or loses an amount amount W or loses amount L, with probabilities p and q, respectively (p + q = 1). His expected change in fortune is then E(delta) = p*W - q*L.  For a fair game E(delta) = 0, so p*W = q*L.

Assume that player 1 wins if he accumulates T amount and loses if his fortune reaches 0. Let p(x) be the probabilty he wins assuming his current fortuneis x. The expected value of this game for player 1 is then E(x) = p(x)*T + (1-p(x)*0.  Because the game is fair, the expected value does not change, so p(x)*T = x, hence p(x) = x/T.

Now assume that W=L, but p < q, so the game is not fair.  Consequently, the expected fortune is not constant.  By redefining the meaning of a player's fortune we can make its expected value constant.  Let f(x) be a function that maps player 1's current accumulation to hisfortune.  Previously this was the identity function.  What we want is

   E(f(x)) = p*f(x+W) + q*f(x-W) = f(x)

A general solution for such an equation is

   f(x) = (q/p)^(x/W)

To see this, compute

f := (q/p)^(x/W):
Ef := eval(p*f, x=x+W) + eval(q*f, x=x-W):
eval(factor(expand(Ef)), q+p=1);
                                       (x/W)
                                  (q/p)


Again, let p(x) be the probability that the player wins, given his current holdings are x.
The expected value of his fortune when he wins (obtains T cash) is

   E(f(x)) = p(x)*f(T) + (1-p(x))*f(0) = f(x)

Solving for p(x) gives

  p(x) = (f(x) - f(0))/(f(T) - f(0) = ((q/p)^(x/W) - 1)/((q/p)^(T/W) - 1).

Note that if W <> L and the game is unfair, there is, I believe, no nice result.  The general solution for f has the form K^x, with a K a constant that depends on p, q, W and L, but there is no closed-form solution for K.

You could avoid the anonymous procedure in map by doing

map(`&^`, a, 43214342341) mod 5423524532:

or in 13

`&^`~(a,43214342341) mod 5423524532:

You could avoid the anonymous procedure in map by doing

map(`&^`, a, 43214342341) mod 5423524532:

or in 13

`&^`~(a,43214342341) mod 5423524532:

Note that this same proof outline can be extended to an n-player game where, for each hand, all players bet the same amount and the probability of each of them winning that hand is equal.  That is, if at any time during the game a player has x dollars, and the total dollars in play is T, then the probability of that player winning the game (i.e. all the cash) is x/T. There is a nifty technique that permits easily computing the result when the winning probability of each player for any hand is constant but unequal.

Note that this same proof outline can be extended to an n-player game where, for each hand, all players bet the same amount and the probability of each of them winning that hand is equal.  That is, if at any time during the game a player has x dollars, and the total dollars in play is T, then the probability of that player winning the game (i.e. all the cash) is x/T. There is a nifty technique that permits easily computing the result when the winning probability of each player for any hand is constant but unequal.

First 110 111 112 113 114 115 116 Last Page 112 of 195