OCR Output

132 11 MULTIDIMENSIONAL EXPANSION OF THE ALGORYTHMICS...

— The learning environment makes possible the algorithm orchestration
processes (for both searching and sorting algorithms) on random, invisible
sequences.

11.3.6 Computer algorithm “optimization”

Promoting CT assumes sustaining students in distinguishing between tasks
formulated to be performed by human beings versus tasks formulated to be
processed by computers (skill 1). This is relating to the concept of optimizing
computer algorithms versus human-processed algorithms. In Kätai (2014a), an
example is presented on how teachers can make use of the bubble-sorting dance
choreography in this sense.

Table 11.1 shows the sequence to be sorted after each pass (the elements
are indexed from 0 to 9). After each pass, dancers who had reached their final
position (at the end of the sorted list) turned back (bolded elements). Currently,
bolded elements are underlined, too. In the first pass (0..9), the last swapping
operation was swap (a[7],a[8]) (grey cells) and, consequently (according to the
optimized version of the algorithm), both dancers, 8 and 9, turned back. After
the second pass (0..7), by chance, also two elements (6 and 7) were on their final
places, but only one of them (number 7) in a proven way (the last swapping was:
swap (a[6],a[7])). Consequently, only dancer 7 turned back.

A typical question posted by many YouTubers was:

User1: Why did 6 vs. 7 not both turn back but 8 vs. 9 and 5 vs. 6 did?

One of the users answered this question in the following way:

User2: There is a memory of where the last exchange took place, so all values
greater than the memory must be in the correct order, or there would have been
a change. For 6 and 7, there is no proof that they were already in order because
the change took place at the last comparison, so the memory was only of the
value in the highest index.

Since user 1 (as a human being) saw that after the second pass numbers
6 and 7 reached their final places, this tended to shorten the next pass by two
elements. On the other hand, user 2 comprehended that a bubble-sort-algo¬
rithm-guided blind computer “cannot realize” (after the second pass) that cell
a[6] stores the right number.

Questions we suggest to be discussed with regard to the Bubble sort
AlgoRythmic video (see also Figure 7.1):

— How many elements reach certainly their final positions (in the ordered

list) after each traverse the bubble sort algorithm performs?

— Why did two dancers turn back after the first pass?

— Why did only one dancer turn back after the second pass?