Open Side Menu Go to the Top
Register
The Official Math/Physics/Whatever Homework questions thread The Official Math/Physics/Whatever Homework questions thread

05-22-2013 , 07:13 PM
Quote:
Originally Posted by Pokernubz
If a pot is 120k, and a bet is 60k.

IF you can only chop the pot, at best. how do you figure out what % of time you need to be chopping to make the call correct?

Sorry, i've had this kinda theory stuff explained to me a lot and read ToP, but still lack basic understand.
Let x be the probability that you chop, then 1-x is the probability that you lose. If you lose, you lose 60k. If you chop, you have invested 60k to win half of 120k+60k+60k, so your net profit is 60k. Therefore, your expected value is
EV=60k x - 60k (1-x) = 120k x - 60k.
You break even if this is equal to zero, so
0 = 120k x - 60k
120k x = 60k
x = 0.5
So you need to chop at least half of the time.
The Official Math/Physics/Whatever Homework questions thread Quote
05-22-2013 , 07:22 PM
Quote:
Originally Posted by HUstylez
for electrical interactions in chemical systems, how can you show that the following are equal:

E= (q+ * q-)/(4*pi*episilon*r)

and E = 332 kcal/mol * (q+ * q-)/r

i'm not really sure what to do here
Well its roughly like this;

k*q1*q2/r*N= total potential energy if we have N charge-couples q+q- at distance r each, well kind of, its not perfectly accurate, we neglect neighboring pairs etc they kind of cancel etc

K=9*10^9 J/Cb^2*m in SI units, k the 1/(4pi*e)thing.

So if we were to express this as in units of elementary charge 1.6*10^-19 Cb and say Angstrom distances 10^-10 m we would have total energy per mole (=6.023*10^23 pairs of charges)

per mole total energy =N*k*q1*q2/r=6.023*10^23*9*10^9*(1.6*10^-19)^2/10^-10*(q+q-/r in units of elementary charge^2/Angstrom say) =
1387700 J/mole *(q+q-/r in terms of elementary charge units ^2/(distance in Angstrom units) so if its 2 charges e+ and e- at a distance of 1.5 A its basically 1*1/1.5 that q+q-/r thing etc )
(1 cal = 4.18 J)
Now 1387700 J/mole is also 1387700/(4.18*1000) cal/mole or 332 kcal/mol
as you wanted to have.

So basically all you do now is pick a system (eg NaCl say? ) put how many elementary charges is q+,q- each and what is the distance in A (of the "bond") and you use 332kcal/mol q+q-/r for the energy.

Last edited by masque de Z; 05-22-2013 at 07:28 PM.
The Official Math/Physics/Whatever Homework questions thread Quote
05-22-2013 , 07:47 PM
Quote:
Originally Posted by masque de Z
Well its roughly like this;

k*q1*q2/r*N= total potential energy if we have N charge-couples q+q- at distance r each, well kind of, its not perfectly accurate, we neglect neighboring pairs etc they kind of cancel etc

K=9*10^9 J/Cb^2*m in SI units, k the 1/(4pi*e)thing.

So if we were to express this as in units of elementary charge 1.6*10^-19 Cb and say Angstrom distances 10^-10 m we would have total energy per mole (=6.023*10^23 pairs of charges)

per mole total energy =N*k*q1*q2/r=6.023*10^23*9*10^9*(1.6*10^-19)^2/10^-10*(q+q-/r in units of elementary charge^2/Angstrom say) =
1387700 J/mole *(q+q-/r in terms of elementary charge units ^2/(distance in Angstrom units) so if its 2 charges e+ and e- at a distance of 1.5 A its basically 1*1/1.5 that q+q-/r thing etc )
(1 cal = 4.18 J)
Now 1387700 J/mole is also 1387700/(4.18*1000) cal/mole or 332 kcal/mol
as you wanted to have.

So basically all you do now is pick a system (eg NaCl say? ) put how many elementary charges is q+,q- each and what is the distance in A (of the "bond") and you use 332kcal/mol q+q-/r for the energy.
Ahh ok that makes sense! Thanks a lot for your help
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 04:00 PM
I am working on a computer science program and I've run into a spot where I need to do "something" mathematically, but I'm not sure how/what.

The scenario is as follows:

I need to decode a message by shifting every letter by some predetermined amount to the right. For example if the value of shift is found to be 5 then the following "shifts" need to occur:

Quote:
a --> f
b --> g
c --> h
.
.
.
x --> c
y --> d
z --> e
Some more relevant information is that each letter has an integer representation as follows:

Quote:
a = 97
b = 98
.
.
y = 121
z = 122
What I want to do is reassign any given letter so that its new value = integer value + shift value.

The problem is that I don't know how to limit the interval to 97-122 (or 0 - 25). If I shift right at value 122, then I reassign my letters to hold values that change their identities to other random characters when what I want them to do is to "wrap around" the interval.

Is this a difficult function to define?
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 04:06 PM
I assume if you shift "z" one you want to get "a" right?

So you need to write an if statement with logic like

if letter+shift is less than 123
newLetter = letter+shift
else
newLetter = letter+shift-122+97
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 04:06 PM
What you want is the "mod" or "remainder" function.

In most languages, the symbol is '%'

You want to mod out by 26:

45%26 returns 19
26%26 returns 0
112%26 returns 8

If you're using A=97, Z =122, you'll want to define:

def add_five(x):
... assert 97 <= x <= 122
... return [(x+5)%26] + 97
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 04:15 PM
Lulz or you could just use mod
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 04:30 PM
Thanks.

I'm familiar with the mod function but didn't know how to use it for this task. That helps a lot.
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 04:38 PM
(x - 97 + 5) % 26 + 97

The x - 97 shifts the numbers down to 0-25. Then add 5. The % 26 gives the remainder when divided by 26. So if the sum is 25 or less it stays the same, but 26 becomes 0, 27 becomes 1, 28 becomes 2, etc. Then add 97 to get back to 97-122.
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 04:46 PM
You need to subtract the value of 'a' actually.

What I wrote doesn't quite work.

return [(x+5-<value of a>)%26] + <value of a>

Last edited by Wyman; 05-23-2013 at 04:46 PM. Reason: sorry, 8 minutes slow i guess :p
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 04:47 PM
The solutions above are the mathematical ones. For programming, I think the simpler solution is (e.g., in C)

Code:
letter += shift;
if (letter > 'z')
  letter -= 26;
It also communicates better what is going on.
The Official Math/Physics/Whatever Homework questions thread Quote
05-23-2013 , 05:40 PM
letter = letter + (letter < 118? 5 : -21); add 5 with modulo wrap
The Official Math/Physics/Whatever Homework questions thread Quote
05-24-2013 , 09:40 AM
Quote:
Originally Posted by Cangurino
The solutions above are the mathematical ones. For programming, I think the simpler solution is (e.g., in C)

Code:
letter += shift;
if (letter > 'z')
  letter -= 26;
It also communicates better what is going on.
Thanks, this ended up being a real breakthrough.
The Official Math/Physics/Whatever Homework questions thread Quote
05-28-2013 , 02:33 PM
So I was finding a limit. The original expression reduced to 0/0 after substituting, so I used L'Hopital's rule. The denominator's derivative is 2, the numerator's derivative was an expression and after all was said and done, substituting again gave me a result of (0/0)/2. I can use L'Hopital again on the numerator but it was getting ugly and I didn't feel like it.

So I fed the entire original quotient to Wolfram and it said the limit does not exist.

Does Wolfram not use L'Hopital's rule automatically, or do expressions like that sometimes really not have a limit? If not, I take it that means L'Hopital would eventually return +/- infinity or a/0? And is that the only way to know that the limit does not exist, or is there a shortcut so that you don't have to use L'Hopital 20 times to find out it was for nothing?
The Official Math/Physics/Whatever Homework questions thread Quote
05-28-2013 , 03:20 PM
Well tested another l'hopital example in Wolfram and it got the answer, so it does use l'hopital.

My expression just doesn't have a limit, and I didn't think of it before but that can be figured out quickly by just graphing it lol.
The Official Math/Physics/Whatever Homework questions thread Quote
05-28-2013 , 03:24 PM
L'Hopital's rule is not the only way to compute a limit, so reducing Wolfram to either using L'Hopital or not is overly simplistic.
The Official Math/Physics/Whatever Homework questions thread Quote
05-28-2013 , 06:50 PM
Trying to learn the fundamentals of poker better and so I am currently working on basic hand combinations. I think the following passage is correct, but I would appreciate if someone could tell me if and where it is wrong.

I push into my opponent looking for a fold with a2, he is on a 25% calling range. 60% of which is aces (14.9% of total range). By virtue of me having A2 I cancel out 1/4 of his ace range bringing his calling range down to 14.9-3.725+10=21.75?
The Official Math/Physics/Whatever Homework questions thread Quote
05-29-2013 , 01:58 AM
Quote:
Originally Posted by sheeprustler
Trying to learn the fundamentals of poker better and so I am currently working on basic hand combinations. I think the following passage is correct, but I would appreciate if someone could tell me if and where it is wrong.

I push into my opponent looking for a fold with a2, he is on a 25% calling range. 60% of which is aces (14.9% of total range). By virtue of me having A2 I cancel out 1/4 of his ace range bringing his calling range down to 14.9-3.725+10=21.75?
Basically yes, but remember that you also block out some of his folding range. So the probability that he calls is greater than 21.75%.
The Official Math/Physics/Whatever Homework questions thread Quote
05-29-2013 , 10:32 AM
Ah, didn't consider that. Thanks.
The Official Math/Physics/Whatever Homework questions thread Quote
05-29-2013 , 11:51 AM
Hm, did not expect to find a subforum maths on twoplustwo, sweet!
I'll just go ahead and ask my question here then! ^^

I've got a problem with a differential equation: y'' = a y
with y(0) = 0 and y(pi) = 0

I've found the solution, but the problem is: the parameter a = 0 in order to fit the conditions y(0) = y(pi) = 0 ... so nothing much left of the differential equation.

Any ideas?

Thanks in advance!
The Official Math/Physics/Whatever Homework questions thread Quote
05-29-2013 , 11:55 AM
Which solution did you find?
The Official Math/Physics/Whatever Homework questions thread Quote
05-29-2013 , 12:00 PM
y = C1*sinh(sqrt(a)*x) + C2*cosh(sqrt(a)*x)
or the same but in exponential form
so with those conditions -> C2 = 0 and a = 0, so y = 0 O_o confused
The Official Math/Physics/Whatever Homework questions thread Quote
05-29-2013 , 12:02 PM
What's wrong with y=sin(x) with a=-1?
The Official Math/Physics/Whatever Homework questions thread Quote
05-29-2013 , 12:08 PM
Nothing! hm it just didn't occur in my general solution. But there's 2 general solutions, one for a > 0 and one for a < 0 (complex) so indeed the sinus could be good! Lemme check it out.
Thanks =)
The Official Math/Physics/Whatever Homework questions thread Quote
05-29-2013 , 12:13 PM
The general solution should be c*e^(sqrt(a) x) or something like that... if a is negative this gives an imaginary argument to the exponential function, which can be written in terms of sin and cos.
The Official Math/Physics/Whatever Homework questions thread Quote

      
m