tie-20106 data structures and algorithmstie20106/material/lecture1.pdf · ohj-2016 utilization of...
TRANSCRIPT
TIE-20106 1
TIE-20106 DATA STRUCTURES AND ALGORITHMSAutumn 2013Terhi Kilamo
TIE-20106 2
BibliographyThese lecture notes are based on the notes for the courseOHJ-2016 Utilization of Data Structures. All editorial work isdone by Terhi Kilamo and the content is based ont he work ofProfessor Valmari and lecturer Minna Ruuska.
Most algorithms are originally from the book Introduction toAlgorithms; Thomas H. Cormen, Charles E. Leiserson, Ronald L.Rivest, Clifford Stein.
In addition the following books have been used whencompleting this material:• Introduction to The Design & Analysis of Algorithms; Anany
Levitin•Olioiden ohjelmointi C++:lla; Matti Rintala, Jyke Jokinen• Tietorakenteet ja Algoritmit; Ilkka Kokkarinen, Kirsti
Ala-Mutka
TIE-20106 3
1 The course in 2013Let’s start with the practicalities
The intended learning outcomes, lecture- and exercise timesand places, grading criteria and the contact information ofthe course staff is listed in this chapter. You can also find theinformation about the course material here.
TIE-20106 4
1.1 Learning outcomeThe aim is to gain knowledge in the commonly useddatastructures and the algorithms available for using them
The goal is to also be able to• analyze the asymptotic efficiency of a simple program or
an algorithm (time and memory consumption)• represent the efficiency with the appropriate notation• choose a datastructure most suitable for the problem at
hand and• use the libraries available in programming languages
sensibly
The course assumes that the students already have theneeded basic programming skills
TIE-20106 5
1.2 Taking the courseThe course consists of• Lectures (Thursdays 2h/week)• Exercises (Tuesdays OR Wednesdays 2h/week)• Homework assignments (3, all compulsory)• byTheMark-exercises (60% compulsory)
The focus of the homework assignments is to practise the keytopics of the course in practise
TIE-20106 6
1.3 ExercisesThe weekly exercises are held in two parallel weekly classes:• Tuesdays 10-12 for Finnish speakers•Wednesdays 10-12 for English speakers
Starting on 3.9.
It is not necessary to sign up for the exercises.
Model answers are not published after the exercises.
TIE-20106 7
1.4 Homework AssignmentsThere are three compulsory, individual, programmingassignments on the course
Assignments completed during the OHJ-2010 or OHJ-2016courses are not valid.
The deadline is on the given day at midnightHW Soft deadline Deadline
Algorithm 23.09.2013 30.09.2013Data structure 28.10.2013 04.11.2013
STL 02.12.2013 09.12.2013
The deadlines are not flexible without a valid reason. Contactthe lecturer or the TA before the deadline in case you fall ill orsomething else preventing you from working turns up.
TIE-20106 8
1.5 byTheMarkbyTheMark is an interactive online collection of algorithmsimulation exercises.
The deadline for the exercises is 17.1.2014 and 60 % of thepoints is required.
You get the most out of the exercises by doing them duringthe course.
TIE-20106 9
1.6 GradingThe final grade of the course is determined based on thepoints of the final exam and the points received from thethree homework assignments• the maximum amount of points in the exam is 30• the homework assignments are graded 0-6 points⇒ the maximum is 36 points
0-3 bonus points are available from active attendance to theweekly exercises. These points can be used to upgrade apassed grade roughly by one. A failed course cannot beupgraded to passed with bonus points.
TIE-20106 10
1.7 Course staffLecturer: Terhi Kilamo• [email protected]• office: TF113• phone: 040 849 0723
Terhi is responsible for the contents of the course, lectures,materials, grading and course compensation
Teaching assistant: Anna-Liisa Mattila
• [email protected]• office: TF109• phone: 040 198 1348
Anna-Liisa is responsible for the practical arrangements on thecourse, the homework assignments and the weekly exercises
TIE-20106 11
1.8 Course announcementsMostly static information about completing the course isavailable on the course webpage www.cs.tut.fi/~tie20106The weekly exercise problems and the specifications of thehomework assignments are published there.
The course has an irc channel #tiraka for peer support and forcontacting the staff for help
In order to contact the staff on course related issues, youshould use the email address of the course [email protected]
TIE-20106 12
1.9 MaterialThese lecture notes act as the primary material for the courseand the exam is based on the contents of these.
There are many available books that cover the course topics.Recommendable volumes are:•Cormen, Leiserson, Rivest, Stein: Introduction to Algorithms.
MIT Press• Levitin: Introduction to the Design & Analysis of Algorithms.
Addison Wesleythe latter acts as the course book.
TIE-20106 13
2 IntroductionLet’s talk first about the motivation for studying data structuresand algorithms
Algorithms in the world
TIE-20106 14
2.1 Why?There are no computer programs without algorithms
• algorithms make for example the following applicationspossible:
TIE-20106 15
TIE-20106 16
algorithms are at work whenever a computer is used
TIE-20106 17
Data structures are needed to store and acces the datahandled in the programs easily
• there are several different types of data structures and notall of them are suitable for all tasks⇒ it is the programmer’s job to know which to choose⇒ the behaviour, strengths and weaknesses of thealternatives must be known
Modern programming languages provide easy to use libraryimplementations for data structures (C++ standard library,JCF). Understanding the properties of these and the limitationsthere may be for using them requires theoretical knowledgeon basic data structures.
TIE-20106 18
Ever gotten frustrated on a program running slowly?• functionality is naturally a top priority but effiency and thus
the usability and user experience are not meaningless sideremarks• it is important to take memory- and time consumption into
account when making decisions in programimplementation• using a library implementation seems more straightforward
than is really is
This course discusses these issues