Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 71 72 [73] 74 75 ... 173

Author Topic: Mathematics Help Thread  (Read 216945 times)

ed boy

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #1080 on: August 15, 2013, 04:55:06 pm »

If you have f(n) = 2n-1, what is lim[n->0, f(n)^n] then?
f(n) = 2n-1 for all real numbers n.
Therefore, for all n, f(n)^n=(2n-1)n=21=2.
So lim[n->0, f(n)^n] = lim[n->0, 2] = 2.

However, note that although lim[n->0, x^n] exists for all x, lim[n->0, f(n)] does not exist.
Logged

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: Mathematics Help Thread
« Reply #1081 on: August 15, 2013, 04:58:22 pm »

If you have f(n) = 2n-1, what is lim[n->0, f(n)^n] then?
f(n) = 2n-1 for all real numbers n.
Therefore, for all n, f(n)^n=(2n-1)n=21=2.
So lim[n->0, f(n)^n] = lim[n->0, 2] = 2.

However, note that although lim[n->0, x^n] exists for all x, lim[n->0, f(n)] does not exist.
Er, I kinda meant this as a counterexample to palsch's wall of text there.
Logged

ed boy

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #1082 on: August 15, 2013, 05:55:05 pm »

Can anyone help?
A basic algorithm for word prediction:
1-Assign each word in your library an integer, starting from 1. Suppose there are n such words in your library
2-Create M, a nxn matrix of zeros. If you want computational efficiency, you'll want a language/module that supports sparse matrices.
3-Calibrate the model with some sample text. Whenever word i is followed by word j, increase the value in row i and column j of M by 1.
And your model is calibrated!

Here are two ways to predict:
1-If we have word i and want to predict the next on, then let S be the sum of all the values in row i of M.
2-Generate a uniform random integer R between 1 and S.
3-Start summing the values in row i again, and as stop as soon as you reach R. The column that you stop in is the predicted word.
Alternatively:
1-Go through row i, keeping track of the highest value so far, H, and how many times it has occured, O.
2-Generate a uniform random integer between 1 and O, R.
3-Go through row i again, counting whenever you find a column with value H. When you reach the Rth such term, that column is the one you want.

Er, I kinda meant this as a counterexample to palsch's wall of text there.
You need to be more careful with your algebra of limits, there. The limit of a product of two functions is only the product of the limits if you can show that all the limits exist and are finite.
Logged

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: Mathematics Help Thread
« Reply #1083 on: August 15, 2013, 06:07:31 pm »

Er, I kinda meant this as a counterexample to palsch's wall of text there.
You need to be more careful with your algebra of limits, there. The limit of a product of two functions is only the product of the limits if you can show that all the limits exist and are finite.
I used neither a product of limits nor a limit of products. I don't know what you're talking about.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Mathematics Help Thread
« Reply #1084 on: August 16, 2013, 03:45:50 am »

I helped spawn a debate on the properties of 0^0 but I still don't have a conclusive way to show that lim[n->0, (1+1/n)^n]=1...
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: Mathematics Help Thread
« Reply #1085 on: August 16, 2013, 03:51:46 am »

If you replace n by 1/x, you get lim[x->infinity, (x+1)^(1/x)], which obviously converges against 1, since x+1 grows smaller than a^x for all a > 1.
Logged

Jim Groovester

  • Bay Watcher
  • 1P
    • View Profile
Re: Mathematics Help Thread
« Reply #1086 on: August 16, 2013, 04:18:36 am »

You need L'Hopital's rule, but you need to fuss around with logarithms and exponents to get it into a form where you can apply L'Hopital's rule.

limn->0 (1 + 1/n)n = limn->0 e ln (1 + 1/n)n = e limn->0 ln (1 + 1/n)n

We can push the limit through the exponent since it's continuous. We'll just look at the expression in the exponent.

limn->0 ln (1 + 1/n)n) = limn->0 n ln (1 + 1/n)

We'll let f = ln (1 + 1/n) and g = n-1, and then use L'Hopital's rule.

f' = 1 / (1 + 1/n) * -1/n2
g' = -1/n2

limn->0 f'/g' = limn->0 ( 1 / (1 + 1/n) * -1/n2 ) / (-1/n2) = limn->0 1 / (1 + 1/n) = limn->0 n / (n + 1) = 0

Substituting this back in:

e0 = 1
Logged
I understood nothing, contributed nothing, but still got to win, so good game everybody else.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Mathematics Help Thread
« Reply #1087 on: August 16, 2013, 05:26:09 am »

If you replace n by 1/x, you get lim[x->infinity, (x+1)^(1/x)], which obviously converges against 1, since x+1 grows smaller than a^x for all a > 1.
Can you expand on the concept? I can't quite see how obvious that is.

@Jim: I haven't learned L'Hopital yet, but my maths teacher thinks he can explain it to me with L'Hoptial's rule. I'll follow up later. ;D
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

da_nang

  • Bay Watcher
  • Argonian Overlord
    • View Profile
Re: Mathematics Help Thread
« Reply #1088 on: August 16, 2013, 07:01:02 am »

If you replace n by 1/x, you get lim[x->infinity, (x+1)^(1/x)], which obviously converges against 1, since x+1 grows smaller than a^x for all a > 1.
Can you expand on the concept? I can't quite see how obvious that is.

@Jim: I haven't learned L'Hopital yet, but my maths teacher thinks he can explain it to me with L'Hoptial's rule. I'll follow up later. ;D
If you rewrite it as an exponential expression with base e, the convergence can be seen due to the logarithm growing slower than any power function. Granted, 1/x approaches to zero as x approaches infinity but it approaches it much faster than the logarithm would approach infinity. A comparison would be limx->∞ P(x)/Q(x) where P(x) and Q(x) are polynomials and Q(x) is of a higher polynomial degree. That limit will always be zero.

Or with L'Hopital:
Spoiler (click to show/hide)
Logged
"Deliver yesterday, code today, think tomorrow."
Ceterum censeo Unionem Europaeam esse delendam.
Future supplanter of humanity.

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Mathematics Help Thread
« Reply #1089 on: August 16, 2013, 07:41:24 am »

Can anyone help?

Programming help or representing a stochastic matrix for your second part?

If I'm understanding the logic of your algorithm as you intend it to run, for a given row in your stochastic matrix, you're ignoring all non-maximal entries, so just replace the stochastic matrix with a new one with all non-maximal entries in a row set to zero, and the remaining entries scaled by the appropriate factor.

That's a very good simplification, but... would it really just be sufficient to describe it like that? I was under the impression that such descriptions wouldn't be... rigorous enough. Or that any such operations should be able to be condensed into a function.

Maybe I'm just being stupid?


A basic algorithm for word prediction: <snip>

Thanks, but I already made an algorithm similar to this and implemented it - just need help explaining the last leg of the process. Or is that what you were trying to show?
Logged

Another

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #1090 on: August 16, 2013, 09:11:43 am »

After some thinking and looking around I am now rather convinced that 0^0=1 directly follows from the most common strict definition of exponentiation and can be used without problems.

But. As long as you consider your 0 power an integer number. For real valued powers the definition of exponentiation is different. You may of course say that 0^0.0 is exactly the same as 0^0 and in some cases that would be justified. However if you get 0.0^0.0 as a result of calculus operations (e.g. your integral evaluates to f(x)^g(x) and there is no problem just computing values of f(x) and g(x) at x=0, both being strictly zero) then the value would depend on the nature of functions f(x) and g(x) that were there (those can be innocuous, perfectly defined, continuous at x=0 functions). Here people argued for 980 posts about this problem.
Logged

da_nang

  • Bay Watcher
  • Argonian Overlord
    • View Profile
Re: Mathematics Help Thread
« Reply #1091 on: August 16, 2013, 10:04:44 am »

Eh. Take two variables x,y ∈ ℝ and let the function f(x,y) = xy.

If you can show that lim(x,y)->(0,0) f(x,y) = L exists where L ∈ ℝ, then you have a reason to define f(0,0) = L as a "removable singularity".

If it doesn't then 00 will remain indeterminate and whatever you define it as will not have any effect on the general conclusion.

Since the L = 1 when approaching from y = 0 and L = 0 when approaching from x = 0, the limit does not exist.

Thus by defining it as something else in a specific context, you're simply choosing a specific approach direction. In the case of 00 = 1, you're following the y = 0 approach direction (or some other direction where L = 1 such as y = x).
Logged
"Deliver yesterday, code today, think tomorrow."
Ceterum censeo Unionem Europaeam esse delendam.
Future supplanter of humanity.

Jim Groovester

  • Bay Watcher
  • 1P
    • View Profile
Re: Mathematics Help Thread
« Reply #1092 on: August 16, 2013, 03:44:54 pm »

That's a very good simplification, but... would it really just be sufficient to describe it like that? I was under the impression that such descriptions wouldn't be... rigorous enough. Or that any such operations should be able to be condensed into a function.

Yeah totally.

I did an internship this summer with a bunch of applied math professors. Nobody would bat an eye if you took an analytical step like this.
Logged
I understood nothing, contributed nothing, but still got to win, so good game everybody else.

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: Mathematics Help Thread
« Reply #1093 on: August 16, 2013, 03:46:45 pm »

Cool, thanks. :)
Logged

ZetaX

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #1094 on: August 20, 2013, 09:10:04 am »

Eh. Take two variables x,y ∈ ℝ and let the function f(x,y) = xy.

If you can show that lim(x,y)->(0,0) f(x,y) = L exists where L ∈ ℝ, then you have a reason to define f(0,0) = L as a "removable singularity".

If it doesn't then 00 will remain indeterminate and whatever you define it as will not have any effect on the general conclusion.

Since the L = 1 when approaching from y = 0 and L = 0 when approaching from x = 0, the limit does not exist.

Thus by defining it as something else in a specific context, you're simply choosing a specific approach direction. In the case of 00 = 1, you're following the y = 0 approach direction (or some other direction where L = 1 such as y = x).

Would you at least read my posts on that before giving such a response¿ I spent already three posts on explaining that the limit is irrelevant.
Logged
Pages: 1 ... 71 72 [73] 74 75 ... 173