
theoretical computer science introduction
... – It is easy to merge two lists of numbers, each of which is already sorted, into a single sorted list – So: divide the list into two equal parts, sort each part with some method, then merge the two sorted lists into a single sorted list – … actually, to sort each of the parts, we can again use Merg ...
... – It is easy to merge two lists of numbers, each of which is already sorted, into a single sorted list – So: divide the list into two equal parts, sort each part with some method, then merge the two sorted lists into a single sorted list – … actually, to sort each of the parts, we can again use Merg ...
Introduction
... If a prime appears in both lists, choose it and remove it from both lists and repeat the process until there are no common elements. The product of all the chosen numbers is the GCD. Question: How old is this algorithm? Example: 948 and 156 948 = 2 x 2 x 3 x 79 156 = 2 x 2 x 3 x 13 Common prime fact ...
... If a prime appears in both lists, choose it and remove it from both lists and repeat the process until there are no common elements. The product of all the chosen numbers is the GCD. Question: How old is this algorithm? Example: 948 and 156 948 = 2 x 2 x 3 x 79 156 = 2 x 2 x 3 x 13 Common prime fact ...