Algorithms



Go ask our friends Google and Wikipedia about "spanning tree". That will get you started, and probably almost finished too.
Cheers, Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012





Hello,
So how's it coming along? Do you understand the concept?
With Kind Regards,
April
Comm100  Leading Live Chat Software Provider
modified 27May14 8:35am.





Hello All.
I own a classified ad site and need several things done to correct and update the code of the site. A nightmare for me, probable only a few days work for you. who ever can do the work will get life time ads space on my site and on my new sites when they go in to production. when completed the newly updated site will be promote world wide , and will have 975 cities listed on it, your ad will be in the computer and code section for the freelancers and it will be listed in all 975 cities! I will consider more than one code warrior for this gig in case the work i need is too much for one person. all involved in the work will get free, life time ad space, which they can sublet if they want and make a profit. interested parties should contact me here. the name of my active site is : Beyslist.com
Thanks Everyone.





does any one here have any idea of the possibility of creating a classified ad aggregation Algorithm, i am designing a new classified ad service and need in put. we will need such an Algorithm created if we are to move forward, any comments welcome. thanks.
M Bey





For the very large number like 2^2000 how do I calculate its value?





Use logarithms.
"Microsoft  Adding unnecessary complexity to your work since 1987!"






To elaborate on Alan's suggestion...
Let's take a big power of 2, such as: 2 ^ 2000
We first reexpress it using a power of 10: 10 ^ (2000 * log10 (2))
Which yields: 10 ^ 602.05999132796239042747778944899
But we want it reexpressed in the more useful form of: man * 10^exp, the scientific notation (just in case). We know that x^(a+b) == (x^a) * (x^b), where x=10 and (conveniently) a and b can be the integer and the fractional parts of 602.05999132796239042747778944899
In other words: 10 ^ (602 + 0.05999132796239042747778944899) == (10 ^ 602) * (10 ^ 0.05999132796239042747778944899)
We can rearrange it in: 10 ^ 0.05999132796239042747778944899 * 10 ^ 602
Which yields: 1.1481306952742545242328332011881 * 10 ^ 602
And that's the result of 2 ^ 2000: 1.1481306952742545242328332011881e+602
You may calculate this with fixed math, but you won't get as many ULPs and it'll take more time. Either way you're going to get an approximation of the sought value.
The above also works with smaller powers. A quick demonstration for: 5^3 = 125
Here: 5^3 = 10 ^ (3 * log10 (5)) 5^3 = 10 ^ 2.0969100130080564143587833158265 5^3 = 10 ^ (2 + 0.0969100130080564143587833158265) 5^3 = (10 ^ 2) * (10 ^ 0.0969100130080564143587833158265) 5^3 = 10 ^ 0.0969100130080564143587833158265 * 10 ^ 2 5^3 = 1.2499999999999999999999999999985 * 10 ^ 2 5^3 = 1.2499999999999999999999999999985e+2
If we account for the rounding error it becomes familiar: 5^3 = 1.25e+2 5^3 = 125
[edited to improve explanation]
modified 23Oct12 6:43am.





my friend you can use the big integer class it helps you a lot to do such things.





Use binary:
100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b







General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.