Help Logs Database

Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Ircnet  |  Dalnet
Page: 1 2 3 4 5 6 7 8 9

<tyler-> where my prof had SUM(i=1 to n) 1/n * i
<tyler-> and she took 1/n out of the sum for some reason
<tyler-> so it turned into 1/n SUM(i=1 to n) i
<cjohnson> they're the same
<cjohnson> err, no they're not
<cjohnson> yes, they are
<tyler-> cjohnson: so SUM(i=1 to n) 1/n == 1/n?
<cjohnson> No
<kelt> yeah, I'm kinda depressed tyler- ... I guess I better shut up and stop trying to think. :P
<cjohnson> sum(i=1 to n) 1/n *i = 1/n * sum(i=1 to n) i
<cjohnson> you have 1/n in every term
<cjohnson> so pull it out
<tyler-> ahh
<tyler-> 1/n is a constant.
<kelt> yeah.
<tyler-> I always think anything involving a letter variable is...well....variable. :)
<kelt> hmm... could you say that the sum(1 to n) 1/i = 1/ {sum(1 to n) i} ?
<kelt> yeah, guess that wouldn't be good.
<cjohnson> no.. 1/1 + 1/2 != 1/3
<tyler-> kelt: stop thinking :)
<tyler-> ok guys...thanks for the help
<tyler-> sometime it helps to just describe my problem...then I find the answer when I write it out
<tyler-> makes me think about it
<kelt> well, 1/2 + 1/3 = {([2,3]/2) + ([2,3]/3)} / [2,3] right?
<kelt> so if you had 1/2 + 1/3 + 1/4 you could say that was the same as (1/2 + 1/3) + 1/4 which is (1/1 + ... + 1/(k-1)) + 1/k
<kelt> so if you find the least common multiple of 1/2 to 1/k
<kelt> which would just be... erm... k! no?
<kelt> well, not least common multiple...
<kelt> but definately a multiple...
<kelt> since [a,b] = ab/(a,b)
<Riddle_Box> how would i solve 15x+25y = 1330 x+y=60
<kelt> hmm Riddle_Box you can do elimination
<kelt> or subsitution
<Riddle_Box> can you show me how
<kelt> yes
<Riddle_Box> i know the answers is 15(17) + 25(43) but i did trial and error, i just wanna know an algebric way to solve it
<kelt> what happens if you multiply x+y=60 by -15? then add that to 15x + 25y = 1330
<kelt> you get rid of x... and solve for y right?
<Riddle_Box> oh i see
<Riddle_Box> yeah
<kelt> so (25 - 15) y = 1330 - 15(60)
<kelt> that is 15 y = 1330 - 15(60)
<kelt> divide 15
<kelt> 1330/15 - 60
<Extim> whats the period of y = -3sin(4x + pi)? anyone help?
<kelt> err.
<kelt> I'm sure I did something wrong.. lol
<kelt> oh
<Riddle_Box> err, so 15(x+y=60) giving me -15x-15y = -15(60)?
<kelt> yeah, -15...
<Kampen> @math 100!
<mbot> Kampen: 93326215443944152681699238856266700490715968264381621468592963895217599
<mbot> 993229\
<mbot> 91560894146397615651828625369792082722375825118521091686400000000000000000000\
<mbot> 0000
<eigenlambda> @math 200!
<mbot> eigenlambda: 788657867364790503552363213932185062295135977687173263294742533244
<mbot> 35944996340\
<mbot> 33429203042840119846239041772121389196388302576427902426371050619266249528299\
<mbot> 31113462857270763317237396988943922445621451664240254033291864131227428294853\
<kelt> 15 * 60 = 900 right?
<Riddle_Box> yes
<Riddle_Box> but 1330 / 900 = 1.4 something
<kelt> so now... you have -15x-15y = -900
<kelt> now add that equation to your other one
<Riddle_Box> so set em equal?
<Riddle_Box> 430 = 25y?
<Riddle_Box> err 10y
<Riddle_Box> okay i see it works now
<Riddle_Box> ^_^ thanks
<kelt> (15x+25y = 1330) + (-15x + -15y = -900)
<kelt> x's cancel out... and you solve for y
<kelt> 10y = 430
<kelt> yep.
<kelt> so you get y = 43
<Kampen> eigenlambda: you have any idea how to analytically determine how many zeros would be at the end of 100!?
<kelt> now to solve for x, you can just plug in your y and solve for x
<Kampen> or anyone, for that matter
<Extim> whats the period of y = -3sin(4x + pi)? anyone help?
<Kampen> divide the natural period by the coefficient of x, extim
<kelt> x + 43 = 60
<kelt> solve for x and you sould get... 17 I think
<kelt> is that what you got for the answers?
<Kampen> so 2pi/4 = pi/2
<kelt> I'm still stumped on the 1/i think
<eigenlambda> http://keithschofield.com/pi/std.html
<eigenlambda> the patron saint of imperfection frees us from our sin...
<eigenlambda> kampen: take the number of multiples of 2 and 5 in there
<eigenlambda> and the minimum of that
<eigenlambda> will be the number of zeros on the end
<kelt> if you had 1/i for 1...n could you say that was 1/p1p2p3 (some non-constant) and would that constant be some sort of special number?
<eigenlambda> @math 10!
<mbot> eigenlambda: 3628800
<eigenlambda> note the two zeros
<Kampen> and 2*5
<eigenlambda> because there are two multiples of 5
<Kampen> so 1 + 1 = 2
<kelt> err... non-constant = composite constant
<Kampen> ok, got it, thanks
<Extim> yea i got pi/2
<Extim> thanks
<kelt> okay, #math... is there some special constant that is related to "n" when we take a sum of (1 to n) 1/i that we get 1/(some primes) * (composite constant related to "n")
<polvi> is a the null set in latex just a \phi ?
<polvi> seems like it is more a zero with a line through it
<Geren> hi
<Geren> a question :)
<Geren> You are given an array with integers between 1 and 1,000,000. One integer is in the array twice. How can you determine which one? Can you think of a way to do it using little extra memory.
<Geren> basically come up with a efficient way to identify the sole repeating integer in that array
<Kampen> polvi: try "emptyset"
<Geren> what's that?
<polvi> Kampen: that was it! thanks!
<Geren> oh
<Kampen> no problem
<Geren> u r not tlakng to me :(
<ramanujan> Geren: can't you just sort the array and then look for repetitions?
<ramanujan> this will take time O(n lg n)
<Geren> ramanujan, yea
<Geren> but what if i sum from 1 to million, then compare that to the real sum of the array
<Geren> would i get anywhere with that?
<ramanujan> uhm does the array have ALL the integers from 1 to 10000000?
<Geren> the array has size 10000000
<Cale> then summing it doesn't tell you much of anything
<Geren> hmm?
<Geren> ok lets reduce the problem
<Geren> say the array has size 10, and each member can be [1,10]
<Geren> and i know exactly one member appears twice in the array
<Geren> how can i quickly identify that member
<Cale> create another mutable array of 10000000 cells and increment the cell at i if you run into the value i. Test if that cell is over 1. If it is, then you've found the duplicate.
<Geren> huh?
<Geren> ther'es no math solution to this?
<Cale> That's O(n)
<ramanujan> what exactly are you looking for? you were already given two solutions
<Cale> You could build a binary search tree of the values, which would be effectively the same as sorting them.
<ramanujan> he has an array of size n
<ramanujan> there are exactly n integers from 1 to n
<Geren> yes!
<Geren> thats what i'm saying
<ramanujan> and since the array ahs just one 1 repetetion, this means that n-1 of of the first n integers appear in the array
<Geren> why first?
<ramanujan> by "first n integers" i mean integers in [1,...,n]
<Geren> ok
<Geren> yea
<ramanujan> or {1,...,n}, rather
<Geren> so can we take advantage of that property?
<Cale> So suppose that i is left out and j is duplicated
<JabberWalkie> suppose you could take the average of it.......
<JabberWalkie> that would give you some info....
<Cale> then your sum will be n(n+1)/2 - i + j = n(n+1)/2 - (i - j)
<Cale> so you can extract the difference of i and j from the sum of the numbers
<Cale> but that isn't terribly useful, I don't think


Return to math
or
Go to some related logs:

chatzone
ru5ty_grl irc
iptables multiple matches
rock

Copyright © 2005 www.irclogs.ws. All rights reserved. » disclaimer » contact