Ugrás a tartalomra
mobile

L'Harmattan Open Access platform

  • Keresés
  • OA Gyűjtemények
  • L'Harmattan Archívum
Magyarhu
  • Englishen
  • Françaisfr
  • Deutschde
BejelentkezésRegisztráció
  • Kötet áttekintése
  • Oldal
  • Szöveg
  • Metaadatok
  • Kivágás
Előnézet
022_000145/0000

Algorythmics: Technologically and Artistically Enhanced Computer Science Education

  • Előnézet
  • PDF
  • Metaadatok mutatása
  • Permalink mutatása
Szerző
Zoltán Kátai
Sorozat
Sapientia Books. Natural Sciences
022_000145/0129
  • Kötet áttekintése
  • Oldal
  • Szöveg
  • Metaadatok
  • Kivágás
Oldal 130 [130]
  • Előnézet
  • Permalink mutatása
  • JPG
  • TIFF
  • Előző
  • Következő
022_000145/0129

OCR

4.2 HOW CAN THE PRESENTED METHODS BE IMPROVED... 129 — The worst case time complexity of the linear search algorithm is O(n). Why? (We do not encourage detailed discussion regarding big O notation.) — How many comparison operations does the binary search algorithm imply (for a list with n elements) in the “best case”? — How many comparison operations does the binary search algorithm imply (for a list with n elements) in the “worst case”? — The worst case time complexity of the binary search algorithm is O(log n). Why? [favourable moment for introducing the concept of binary tree] Another variant for students with less mathematical knowledge: — Given the numbers from 1 to 1,000, what is the minimum/maximum number of guesses needed to find a specific number if you are given the hint “guessed”/“missed” (linear search) or “guessed”/“higher”/“lower” (binary search) for each guess you make? The teacher might also guide students in discovering the reasons behind the superiority of binary search strategy against the linear one. A possible approach (that also promotes skill 2) is: the length of a list with n elements versus the height of a binary tree with n nodes. The following questions allow the teacher to introduce the concept of search space, too. In the essay entitled Thinking about computational thinking, the authors suggest methods for familiarizing grade 3 students with this concept (Lu & Fletcher, 2009). — How many elements of the search space are eliminated by each try (comparison operation) in the case of linear/binary search algorithm? (Another perspective: with each try, the current problem is reduced to searching in one shorter vs. half shorter list.) Since in the worst case binary search scenario the algorithm continues with the larger part of the divided sequence, the teacher can help students realize that starting with the middle element is an optimal choice (the larger part of the search space is minimal). After students have studied sorting algorithms too, it can be analysed when the “sorting + binary search” strategy is preferable instead of linear search. According to our experience, the above-presented approach has the potential to support students in realizing the relative value of the studied algorithms. 11.3.3 Exploring sorting strategies from an algorithm complexity perspective We suggest the following question sequence to be analysed: — How many comparison and swapping operations does the selection , bubble, insertion, and merge sort algorithm imply for the samples presented in the videos from figures 7.1, 7.2, 7.3, and 7.5? — What is the “best case”/“worst case” with respect to a sorting algorithm?

Szerkezeti

Custom

Image Metadata

Kép szélessége
1949 px
Kép magassága
2776 px
Képfelbontás
300 px/inch
Kép eredeti mérete
1.16 MB
Permalinkből jpg
022_000145/0129.jpg
Permalinkből OCR
022_000145/0129.ocr

Linkek

  • L'Harmattan Könyvkiadó
  • Open Access Blog
  • Kiadványaink az MTMT-ben
  • Kiadványaink a REAL-ban
  • CrossRef Works
  • ROR ID

Elérhetőség

  • L'Harmattan Szerkesztőség
  • Kéziratleadási szabályzat
  • Peer Review Policy
  • Adatvédelmi irányelvek
  • Dokumentumtár
  • KBART lists
  • eduID Belépés

Social media

  • Facebook
  • Instagram
  • LinkedIn

L'Harmattan Open Access platform

BejelentkezésRegisztráció

Bejelentkezés

eduId Login
Elfelejtettem a jelszavamat
  • Keresés
  • OA Gyűjtemények
  • L'Harmattan Archívum
Magyarhu
  • Englishen
  • Françaisfr
  • Deutschde