Data Structures and algorithms II
Simo Juvaste, School of Computing, University of Eastern Finland, Joensuu campus.
Matti Nykänen, Kuopio campus.
(Tietorakenteet ja algoritmit II, 3 op)
Course will be given in English at Joensuu and in Finnish in Kuopio. This page is common for both. Most of page is in English, but there are links to Finnish material as well. All the Finnish language text on this page is links to Finnish version of the material, and/or relevant for Kuopio students only.
There is no Moodle page for this course. All information should be found here and/or sent by email.
Finnish language version of this page (and 2018 course) can be found here
Suomenkielinen versio tästä sivusta ja 2018 kurssista löytyy täältä
Contents
Course description from Study Plan
Data Structures and algorithms II (3 cp) 3621318
- Lectures 20 h, Exercises 12 h
- Learning outcomes:
The student can analyse recursive algorithms and is able to measure and extrapolate time complexity of programs.
Student understands the elementary concepts of graphs, properties of different
graphs, and graphs as abstract data type.
Student knows the principle of most common graphs algorithms and is able to desing and implement simple graph algorithms.
Student know most important algorithm strategies and is able to apply those.
Student is able to use mass storage efficiently and is able to analyse time complexity of an algorithm that uses mass storage.
- Contents:
More complex time complexity analyis, graphs as data structure, using graphs, algorithm strategies, mass storage data structures.
Course status
- obligatory part of BSc studies (CS major intermediate studies)
- second part of one of the key parts of intermediate studies
Course contents
Prerequisites
- Elementary time complexity analysis.
- Elementary data structures (lists, arrays, tree, hash tables)
- Reasonable Java programming skill, including generics
- Ability to simplify simple mathematical equations
Course contents
- Time complexity analysis (recap, contine from DSA I)kertausta, jatkoa): 5 h
- Recap of asymptotical analysis
- Emprirical time measurements
- Recursion recurrencies in time complexity analysis
- Amortized time complexity
- Proof of lower bounds
- Strategies: 5 h
- Breadth/depth first
- greedy
- divide-and-conquer
- back-tracking
- branch and bound
- heuristics
- dynamic programming
- string algorithm
- Advanced data strucutres 3 h
- Elementary algorithms: 5 h
- Breadth/depth first searh
- shortest path (Dijkstra and Floyd)
- minimum spanning tree (Prim and Kruskal)
- topological sort
- matching
- maximum flow
- External graph algorithms: 2 h
Programming languages used
- Lecture examples are given in Java-based pseudocode.
- Most of the exercises are made in Java (using Java API and custom libraries).
Goal
- Raise the abstraction level of programs and programmers.
- Remember efficiency.
Schedule at Spring 2017
Joensuu / Simo Juvaste
Lectures 20 h
Exercises 12 h
- 31.3. -- 11.5.2017
- Group 1
31.03.17 FRI 08-10 TD106B
07.04.17 FRI 08-10 TD106B
21.04.17 FRI 08-10 TD106B
28.04.17 FRI 08-10 TD106B
05.05.17 FRI 08-10 TD106B
11.05.17 THU 08-10 TD106B
- Group 2
31.03.17 FRI 10-12 TD106B
07.04.17 FRI 10-12 TD106B
21.04.17 FRI 10-12 TD106B
28.04.17 FRI 10-12 TD106B
05.05.17 FRI 10-12 TD106B
11.05.17 THU 10-12 TD106B
Tutoring
- For problems occuring in solving the exercises.
- If needed
- Thu 30.3. 10-11 T/B247.
- Wed 5.4. 13-15 T/B247.
- Wed 19.4. 13-15 T/B247.
- Wed 26.4. 14-15 T/B247.
- Tue 2.5. 14-15 T/B247.
Kuopio / Matti Nykänen
- Luennot 20.3. -- ~3.5.2017
- 20.03.17 ma 14-16 TTA
21.03.17 ti 14-16 E16+17
27.03.17 ma 14-16 E16+17
03.04.17 ma 14-16 E16+17
04.04.17 ti 14-16 E16+17
10.04.17 ma 14-16 E16+17
24.04.17 ma 14-16 E16+17
25.04.17 ti 14-16 E16+17
02.05.17 ti 14-16 E16+17
04.05.17 to 08-10 E16+17 (huom: muuttunut päivä)
Harjoitukset 30.3. -- 11.5.2017
- Ryhmä 1
30.03.17 to 12-14 F211
06.04.17 to 08-10 E26
20.04.17 to 08-10 E26
27.04.17 to 12-14 F211
04.05.17 to 12-14 F211
11.05.17 to 12-14 F211
- Ryhmä 2
30.03.17 to 14-16 F211
05.04.17 ke 08-10 E26
20.04.17 to 10-12 E26
27.04.17 to 14-16 F211
04.05.17 to 14-16 F211
11.05.17 to 14-16 F211
Harjoitustehtäväohjausta järjestetään tarvittaessa.
Course exam
- Fri 12.05.17 12:00-16:00, class OTS100 (Joensuu) / SN100 (Kuopio)
Registration through Oodi.
- Exam retake Fri 16.6.2017 12:00-16:00 OTS100 (Joensuu) / CA101
Registration through Oodi.
General exams
Time budjet
For an average student, for an average grade:
Data structures and algorithms II, time budjet |
|
|
Weeks (h/l) |
6 |
5 |
|
Weekly |
Total |
Lectures |
4 |
20 |
Recap |
1.2 |
6 |
|
|
|
Exercises |
2 |
12 |
Making |
6 |
36 |
|
|
|
Course exam |
|
2 |
Preparation |
|
4 |
|
|
|
Total (h) |
14.2 |
80 |
Total (cp) |
|
3.00 |
26.67 |
|
|
Time usage varies weekly and individually. For an excellent grade, you might need more work.
Grading on Spring 2017
Grading 2017:
- 30-40% of grade based on obligatory practical exercises (2-3 such exercises/course). Submitted before exercise class. Web address and instructions for submission will be given later.
- The rest based on course exam.
- If you make more than 1/3 of ordinary exercises, max 10% bonus. If you make less using the same formula negative bonus (at most -5%). Bonus = 10% * (n-N/3)/(2N/3), where n = # of exercises you did and N = total # of ordinary exercises (40-42, depending on the number of obligatory exercises).
- Ordinary exercises are discussed and checked at exercise classes only, no need to submit beforehand.
If you participate a general exam, then grading is based on the exam only.
Material/literature
Literature
- Liang: Introduction to Java Programming, comprehensive 7th edition (or later).
- Weiss: Data Structures and Algorithm Analysis [in C | Pascal | C++ | Java | etc]
- Cormen, Leiserson, Rivest: Introduction to Algorithms
- Knuth: The Art of Computer Programming
- Lecture material in A4: (to appear)
- PDF material (only uef.fi) (PDF, extended and updated during the course). From outside uef.fi -network, retrieve from password-protected folder of lecture recordings, link below.
- Lecture recordings.
- English lectures at Joensuu will be recorded. Recordings will be available after lectures (few hours)
here. Username is first four letters of the course name, password is first four letters of the second word of the course name. All lower case.
- Originals are 1920x616 resolution, ~1.7GB/lecture.
- _small are 1024x330 resolution, ~130MB/lecture.
- You can watch these, e.g., using mplayer:
mplayer http://user:pass@cs.uef.fi/pages/sjuva/dsaII_vid/dsaII_2017_lecture02.mp4
-
- Using UEF account, you can also see these at media.uef.fi (Playlist Data Structures and Algorithms II).
- Lecture contents, Joensuu 2017:
- 1. 28.3. Administrative stuff, course motivation, time complexity recap, recursive time complexity (fib and mergesort examples)
- 2. 29.3. Fibonacci example, recursion tree, impact of number size example, measuring time compl
exity
- 3. 3.4. Recap of experimental time complexity, extrapolation, decision tree, intro to graphs,graphs as ADT, depth first search (quickly)
- 4. 4.4. Recap of DFS, classification of DFS edges, finding cycles, Dijkstra algorithm
- 5. 10.4. Floyd, topological sort, strongly connected components, undirected graph, minimum spanning tree (Prim and Kruskal)
- 6. 11.4. Breadth first search, articulation points, bipartite graph matching, maximum flow
- 7. 25.4. Implementing graphs, greedy algorithms, divide-and-conquer, dynamic programming, amortized analysis
- 8. 26.4. Randomized algorithms, branch-and-bound, string matching, approzimate matching
- 9. 2.5. Mass storage, file usage and buffering, main memory, external sorting
- 10. 3.5. Using file as a collection, B-tree.
Suomenkielinen materiaali
- Luentorunko:
- PDF luentorunko (vain uef.fi) (1.3Mt, 67s), sama löytyy myös allakuvatussa luentonauhoitusten hakemistosta salasanan takaa, mutta myös ue
f.fi:n ulkopuolelta.
- PDF -versio 2014 monisteesta (mustavalko) (vain uef.fi
) (500kt, 96s)
Kevään 2016 luentojen nauhoitukset:
- Video- ja materiaalihakemisto. Käyttäjätunnus on tämän kurssin nimen ensimmäisen sanan (alkaa t-kirjaimella) viisi ensimmäistä kirjainta ja salasana on tämän kurssin nimen toisen pidemmän sanan
(alkaa a-kirjaimella) viisi ensimmäistä kirjainta. Kaikki pienillä kirjaimilla.
- TraII_2016_luentoX.mp4 on alkuperäinen MP4 tiedosto (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10; AAC) ~700Mt/kpl 1376x444 resoluutio). TraII_2016_luentoX_pieni.mp4 on tiivistetympi 1024x328 resoluutio, n. 95Mt/kpl.
- Näitä voi katsoa vaikka mplayer:llä komennolla
mplayer http://tunnus:salasana@cs.uef.fi/pages/sjuva/traII_vid/TraII_2016_luento1.mp4
Joensuun 2016 luentojen aiheet
- 1. 4.4. Kurssin tavoittet ja sisältö, aikavaativuuskertaus, rekursiivinen aikavaativuus Fibonacci-esimerkin ylärajatarkasteluun saakka.
- 2. 6.4. Fib alarajatarkastelu, rekursiopuu, sanapituusesimerkki, kokeellinen aikavaativuusanalyysi
- 3. 11.2. Kokeellisen aikavaativuuden kertaus, extrapolointi, päätöspuu, johdanto verkkoihin, verkon operaatiot
- 4. 13.4. Syvyyssuuntainen haku, kehän etsiminen, Dijkstran algoritmi
- 5. 18.4. Dijkstra kertaus, Floyd, topologinen lajittelu, vahvasti yhtenäiset komponentit (ei algoritmia), suuntaamaton verkko, minimipainoinen virittävä puu (Primin algoritmi)
- 6. 20.4. Kruskalin algoritmi, leveyssuuntainen haku, leikkaussolmut, sovitus, maksimivirta
- 7. 25.4 Verkon toteuttaminen, algoritmistrategiat (ahne, hajoita-ja-hallitse, dynaaminen ohjelmointi, tasoitettu aikavaativuus)
- 8. 27.4. Algoritmistrategiat (haun rajoittaminen, satunnaistetut algoritmit), merkkijonon haku
- 9. 2.5. Ulkoinen muisti, puskurointi, ulkoinen lajittelu
- 10. 4.5. Joukon toteutus massamuistiin (organisointitapoja, hajautus, B-puu)
Lecture examples, exercise skeletons, etc.
WWW-links to DSA material
Compilers
Data structure library
- We use a library having tree, binary tree, set, priority queue, and graph implementations.
- At cs you can use:
Compile trajc Program.java
- Run: traj Program
- In general (java = java6 or later, ja path/tra.jar is where you have tra.jar)
- Compile: javac -cp path/tra.jar:. Program.java
- Run: java -cp path/tra.jar:. Program
- In windows replace : with ;
- Using Eclipse:
- In project, use 2nd mouse button for Build Path -> Configure Build Path -> (Java Build Path ->) Libraries -> Add External JARs -> choose downloaded file tra_j6.jar (or tra.jar if Java5), Order and Export, select tra_j6.jar.
- Using IntelliJ IDEA:
- For project: File -> Project Structure -> Libraries -> + -> choose downloaded file tra_j6.jar.
- Using Netbeans (not checked, instructions are approximate!)
- For project: File -> Project Properties -> Libraries -> Add jar/directory -> choose downloaded file tra_j6.jar.
- Dokumentation online
- Download jar here:
Exercises
Execercises given here and at exercise class a week before.
Lecture examples, exercise skeletons, etc.
Last modified
Thu May 4 15:26:29 EEST 2017
Simo Juvaste