external files

derarief

In algorithms 2 we took that in external files applications the most affective manner to divide your date in two files is "according to fibo series" so you put in the first 1, in two 1, 1 : 2, 2:3 and so on
anyone have any idea to proof that ??

An optimist may see a light where there is none, but why must the pessimist always run to blow it out?

Rene Descartes

خيارات عرض التعليق

اختر الطريقة التي تفضلها لعرض التعليقات، ثم اضغط على "احفظ الإعدادات" لتفعل التغيرات.
derarief

Where are You?
No ideas ?? No proofs ??? Crying or Very Sad
I know ...you are waiting BMW group Laughing
don't ask me about them
thank you anymore

An optimist may see a light where there is none, but why must the pessimist always run to blow it out?

Rene Descartes

ammar_halaby

This way size(file1) ~ phi * size(file2),
but I didn't know why that is good for the merge sort algorithm......maybe this constant(phi) makes the balance between the number of hard disk access operations and the well known comlexity of O(n.log(n)) Rolling Eyes

Nature uses only the longest threads to weave her patterns, so each small piece of her fabric reveals the organization of the entire tapestry
Richard Feynman

strontium90

كتب "derarief":
In algorithms 2 we took that in external files applications the most affective manner to divide your date in two files is "according to fibo series" so you put in the first 1, in two 1, 1 : 2, 2:3 and so on
anyone have any idea to proof that ??

I searched the web for the keywords "external sort" and "fibonacci distribution", and this is what I basically came up with:
http://oopweb.com/Algorithms/Documents/Sman/VolumeFrames.html?/Algorithms/Documents/Sman/Volume/ExternalSorts_files/s_ext.htm

No proof is offered there. Sorry.
There's an implementation in C, however.

Read the rules
Use the search engine

Believe in healthy, hearty laughter, at the expense of the whole human race, if needs be.
H. Allen Smith

derarief

we know lim(X(n)/X(n-1)) = constant when n--> infinite
so in large data base dealing with external files we have to balance between the two files so fibonnacci series is affective, with this thought i think that any another series which have the same property can be used in external sorting Sad

An optimist may see a light where there is none, but why must the pessimist always run to blow it out?

Rene Descartes

derarief

thank you strontium90 for this site..
it is comprehensive and contains a lot of subjects related with "Algorithms 2" and supported with implementations code in c++ .

An optimist may see a light where there is none, but why must the pessimist always run to blow it out?

Rene Descartes

strontium90

كتب "derarief":
thank you strontium90 for this site..
it is comprehensive and contains a lot of subjects related with "Algorithms 2" and supported with implementations code in c++ .

I believe presented implementations aren't C++.
They're plain C - better said ISO/IEC 9899:1990.

Read the rules
Use the search engine

Believe in healthy, hearty laughter, at the expense of the whole human race, if needs be.
H. Allen Smith