ADVANCE DATA HANDLING CONCEPTS

It is a topic on Chapter 8 in the book Programming logic and Design, Comprehensive, 8th edition by Joyce Farrel.
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 UNDERSTANDING THE NEED FOR SORTING DATA

Go down 
Go to page : Previous  1, 2
AuthorMessage
jennyy
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Mon Oct 15, 2018 4:42 pm

rach wrote:
rachellgrace wrote:
Can you suggest guys another way of sorting data?
invented by Donald Shell
Algorithm

   start separation = number of elements / 2
   compare a[i] and a[i+separation]
   swap if necessary
   do for each element of array i = 0 to a.length – separation
   set separation = separation /2
   recompare all the elements

separation calculation

   shell suggested /2
   other sequences give great improvement
   note figure 7.3 does not / 2 properly

Code Methods: shellsort
Average Case Shellsort : Open Problem
Mergesort

Code Methods: mergesort (2), merge
Worst Case: O(NlogN)
Recursively merges two sorted lists
Time to merge two sorted lists is linear (N-1 comparisons)
1 13 24 26 merge 2 15 27 38 gives 1 2 13 15 24 26 27 38
Classic Divide and Conquer Strategy
If more than one element, divide and merge sort the first and second
half
Analysis
Recurrance Relation
T(1) = 1
T(N) = 2T(N/2) + N
T(N)/ N = T(N/2)/N/2 + 1
T(N/2) / N/2 = T(N/4) / N/4 + 1
T(2) / 2 = T(1)/1 + 1
Sum up all of the equations
T(N)/N = T(1)/1 + logN <- this logN is the sum of the 1’s
T(N) = NlogN + N = O(NlogN)
Uses extra memory to merge and copy back into array
Merging is cornerstone of external sorting routines
Not often used for main memory sorts
Can also do it not recursively
Or can use less memory – much more complex algorithm (impractical)

Back to top Go down
View user profile
johnrobert
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:33 am

ahnmaria wrote:
What is the meaning of ASCII?
ASCII Code. ASCII, stands for American Standard Code for Information Interchange. It's a 7-bit character code where every single bit represents a unique character.
Back to top Go down
View user profile
johnrobert
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:34 am

jennyy wrote:
rach wrote:
rachellgrace wrote:
Can you suggest guys another way of sorting data?
invented by Donald Shell
Algorithm

   start separation = number of elements / 2
   compare a[i] and a[i+separation]
   swap if necessary
   do for each element of array i = 0 to a.length – separation
   set separation = separation /2
   recompare all the elements

separation calculation

   shell suggested /2
   other sequences give great improvement
   note figure 7.3 does not / 2 properly

Code Methods: shellsort
Average Case Shellsort : Open Problem
Mergesort

   Code Methods: mergesort (2), merge
   Worst Case: O(NlogN)
   Recursively merges two sorted lists
   Time to merge two sorted lists is linear (N-1 comparisons)
   1 13 24 26 merge 2 15 27 38 gives 1 2 13 15 24 26 27 38
   Classic Divide and Conquer Strategy
   If more than one element, divide and merge sort the first and second
   half
   Analysis
       Recurrance Relation
       T(1) = 1
       T(N) = 2T(N/2) + N
       T(N)/ N = T(N/2)/N/2 + 1
       T(N/2) / N/2 = T(N/4) / N/4 + 1
       T(2) / 2 = T(1)/1 + 1
       Sum up all of the equations
       T(N)/N = T(1)/1 + logN <- this logN is the sum of the 1’s
       T(N) = NlogN + N = O(NlogN)
   Uses extra memory to merge and copy back into array
   Merging is cornerstone of external sorting routines
   Not often used for main memory sorts
   Can also do it not recursively
   Or can use less memory – much more complex algorithm (impractical)

that is a big help thanks! hope you post some more.
Back to top Go down
View user profile
johnrobert
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:35 am

VOVOFRIEND wrote:
ahnmaria wrote:
What is the difference between sequential and chronological order?
Sequential ; Something that is sequential follows a fixed order and thus forms a pattern. ex. The pages are numbered sequentially.
Chronological ; If things are described or shown in chronological order, they are described or shown in the order in which they happened. It relates to the timings of the happenings.
chronological is something that is arrange properly and sequential is like event you set step by step
Back to top Go down
View user profile
sofiaa
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:51 am

chelsey wrote:
Data Structure - Sorting Techniques. Sorting refers to arranging data in a particular format. Sorting algorithm specifies the way to arrange data in a particular order.
thank you for this information.
Back to top Go down
View user profile
sofiaa
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:52 am

jennyy wrote:
rach wrote:
rachellgrace wrote:
Can you suggest guys another way of sorting data?
invented by Donald Shell
Algorithm

   start separation = number of elements / 2
   compare a[i] and a[i+separation]
   swap if necessary
   do for each element of array i = 0 to a.length – separation
   set separation = separation /2
   recompare all the elements

separation calculation

   shell suggested /2
   other sequences give great improvement
   note figure 7.3 does not / 2 properly

Code Methods: shellsort
Average Case Shellsort : Open Problem
Mergesort

   Code Methods: mergesort (2), merge
   Worst Case: O(NlogN)
   Recursively merges two sorted lists
   Time to merge two sorted lists is linear (N-1 comparisons)
   1 13 24 26 merge 2 15 27 38 gives 1 2 13 15 24 26 27 38
   Classic Divide and Conquer Strategy
   If more than one element, divide and merge sort the first and second
   half
   Analysis
       Recurrance Relation
       T(1) = 1
       T(N) = 2T(N/2) + N
       T(N)/ N = T(N/2)/N/2 + 1
       T(N/2) / N/2 = T(N/4) / N/4 + 1
       T(2) / 2 = T(1)/1 + 1
       Sum up all of the equations
       T(N)/N = T(1)/1 + logN <- this logN is the sum of the 1’s
       T(N) = NlogN + N = O(NlogN)
   Uses extra memory to merge and copy back into array
   Merging is cornerstone of external sorting routines
   Not often used for main memory sorts
   Can also do it not recursively
   Or can use less memory – much more complex algorithm (impractical)

can you give this a reference rachell?
Back to top Go down
View user profile
sofiaa
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:55 am

ahnmaria wrote:
What is the difference between sequential and chronological order?
there are no difference between the two haha
Back to top Go down
View user profile
sofiaa
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:56 am

ahnmaria wrote:
What is the meaning of ASCII?
ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort. ASCII was developed a long time ago and now the non-printing characters are rarely used for their original purpose. Below is the ASCII character table and this includes descriptions of the first 32 non-printing characters.
Back to top Go down
View user profile
sofiaa
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:58 am

ralfh wrote:
ahnmaria wrote:
What is the difference between sequential and chronological order?
actually there is no difference because it is same that sort data but maybe sequence is about having a descending or ascending of any type of character and chronological is about numbers only.
I agree on you. but maybe it depends on the one who will give condition on sequence
Back to top Go down
View user profile
sofiaa
Guru


Posts : 10
Join date : 2018-10-16

PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   Tue Oct 16, 2018 9:58 am

This blog is beneficial to those who start on making a program
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: UNDERSTANDING THE NEED FOR SORTING DATA   

Back to top Go down
 
UNDERSTANDING THE NEED FOR SORTING DATA
Back to top 
Page 2 of 2Go to page : Previous  1, 2
 Similar topics
-
» Understanding the Marshall Attack (2010)
» Stuck on getting data centers?
» how to get map data back from maps already published yours and others
» *NEW METHOD* How to get your level data back from the broken http://droni.es/getdata.php?l=
» Translate the site

Permissions in this forum:You cannot reply to topics in this forum
ADVANCE DATA HANDLING CONCEPTS :: Algorithm-
Jump to: