Click here to Skip to main content
15,889,651 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: an optimal elevator-use algorithm Pin
BillWoodruff19-Sep-12 4:35
professionalBillWoodruff19-Sep-12 4:35 
QuestionPlease, poke holes in my cryptographic function... Pin
Saul Johnson13-Sep-12 0:52
Saul Johnson13-Sep-12 0:52 
QuestionWhat kind of checksum can this be? Pin
GrooverFromHolland9-Sep-12 9:18
GrooverFromHolland9-Sep-12 9:18 
AnswerRe: What kind of checksum can this be? PinPopular
Alan N9-Sep-12 11:55
Alan N9-Sep-12 11:55 
GeneralRe: What kind of checksum can this be? Pin
GrooverFromHolland9-Sep-12 22:15
GrooverFromHolland9-Sep-12 22:15 
QuestionLinear Regression Most Efficient algorithm calc Line of Best Fit Pin
A*****4-Sep-12 19:24
A*****4-Sep-12 19:24 
AnswerRe: Linear Regression Most Efficient algorithm calc Line of Best Fit PinPopular
Peter_in_27804-Sep-12 20:17
professionalPeter_in_27804-Sep-12 20:17 
QuestionRunning out of Memory - Maths Check Pin
M-Badger3-Sep-12 7:52
M-Badger3-Sep-12 7:52 
So, a quick maths check.
If I want to store the results of an iterative algorithm for every pixel in an image (fractals!) then I think it's a dumb thing to start with but want to check before I even start bothering to write the class that would store the results.

Assume image size is 1000 x 1000, so 1 million pixels
Algorithm is an iteration of Zn+1 = Zn^2 + Z0 up to a maximum of say 10,000 times
Each iteration results in a complex number
A complex number is a structure with 2 doubles (let's assume it occupies 128 bits for simplicty)

Theoretically this could result in 10,000 x 1,000,000 complex number instances
This is 1 x 10^10 instances, at 128 bits each that 1.28 x 10^12 bits
Which is:
1.6 x 10^11 bytes
1.56 x 10^8 K bytes
152,588 M bytes
149 G bytes

That would seem a dumb thing to do
But I'm assuming that my maths is correct and there aren't memory optimisations I know nothing about.

Mike
AnswerRe: Running out of Memory - Maths Check Pin
Andrei Straut3-Sep-12 9:03
Andrei Straut3-Sep-12 9:03 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger3-Sep-12 10:11
M-Badger3-Sep-12 10:11 
GeneralRe: Running out of Memory - Maths Check Pin
Andrei Straut3-Sep-12 10:56
Andrei Straut3-Sep-12 10:56 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger3-Sep-12 11:18
M-Badger3-Sep-12 11:18 
GeneralRe: Running out of Memory - Maths Check Pin
harold aptroot3-Sep-12 21:54
harold aptroot3-Sep-12 21:54 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger4-Sep-12 0:26
M-Badger4-Sep-12 0:26 
AnswerRe: News Page Pin
M-Badger3-Sep-12 21:12
M-Badger3-Sep-12 21:12 
AnswerRe: Running out of Memory - Maths Check Pin
YvesDaoust3-Sep-12 23:21
YvesDaoust3-Sep-12 23:21 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger4-Sep-12 0:29
M-Badger4-Sep-12 0:29 
AnswerRe: Running out of Memory - Maths Check Pin
Member 91314964-Sep-12 1:56
Member 91314964-Sep-12 1:56 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger4-Sep-12 9:29
M-Badger4-Sep-12 9:29 
GeneralRe: Running out of Memory - Maths Check Pin
Member 91314965-Sep-12 2:00
Member 91314965-Sep-12 2:00 
SuggestionRe: Running out of Memory - Maths Check Pin
Jeremy David Thomson5-Sep-12 1:36
Jeremy David Thomson5-Sep-12 1:36 
GeneralRe: Running out of Memory - Maths Check Pin
M-Badger5-Sep-12 5:54
M-Badger5-Sep-12 5:54 
AnswerRe: Running out of Memory - Maths Check Pin
Member 31409626-Sep-12 20:36
Member 31409626-Sep-12 20:36 
GeneralRe: Running out of Memory - Maths Check Pin
Stefan_Lang7-Sep-12 4:29
Stefan_Lang7-Sep-12 4:29 
AnswerRe: Running out of Memory - Maths Check Pin
Stefan_Lang7-Sep-12 4:49
Stefan_Lang7-Sep-12 4:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.