PORTALE DELLA DIDATTICA

PORTALE DELLA DIDATTICA

PORTALE DELLA DIDATTICA

Elenco notifiche



Algorithms and data structures

01URNLM, 01URNYF

A.A. 2025/26

Course Language

Inglese

Degree programme(s)

1st degree and Bachelor-level of the Bologna process in Ingegneria Informatica (Computer Engineering) - Torino

Course structure
Teaching Hours
Lezioni 45
Esercitazioni in aula 20
Esercitazioni in laboratorio 15
Lecturers
Teacher Status SSD h.Les h.Ex h.Lab h.Tut Years teaching
Cheminod Manuel - Corso 2   Docente esterno e/o collaboratore   45 20 0 0 1
Quer Stefano - Corso 1 Professore Associato IINF-05/A 45 20 0 0 5
Co-lectures
Espandi

Context
SSD CFU Activities Area context
ING-INF/05 8 B - Caratterizzanti Ingegneria informatica
2025/26
The course is held at the first semester of the third year. The course allows the student to acquire adequate knowledge and skills in algorithms, data structures and their implementation in C to solve complex problems. The student should gradually evolve from more analytic to more design-oriented skills. Algorithmic solutions to “classical” problems are introduced, together with their theoretical foundations, and the implementations in C language. Advanced aspects of C are considered, like pointers, dynamic memory allocation, modularity and Abstract Data Type implementation. The student has the opportunity to analyze practical examples, describing solutions to complex problems, and the related algorithmic paradigms. Knowledge and programming skills are applied during lab sessions.
Offered in the first semester of the second year of the Computer Engineering curriculum, this course equips students with essential knowledge and practical skills in problem-solving, algorithmic design, fundamental data structures, and their C language implementation. The course initially explores "classical" algorithmic problems, delving into their theoretical underpinnings and demonstrating their C language implementations. Building upon this foundation, it then shifts focus to tackling problem-solving scenarios of progressively increasing complexity. To facilitate this, advanced C language features are introduced and extensively utilized, including pointers, dynamic memory allocation, sophisticated modular design, and Abstract Data Types (ADTs). Students will engage with practical examples, learning to articulate solutions to intricate problems and identify relevant algorithmic paradigms. Practical application of knowledge and programming abilities occurs during hands-on lab sessions. These sessions are designed to help students gradually transition from analytical thinking to more design-oriented problem-solving skills.
At the end of the course the student will be able to: - Dynamically allocate memory, using pointers and dynamic data structures in C language - Evaluate algorithm complexity and improve efficiency in terms of execution time and/or memory allocation - Write standard algorithms to solve basic problems such as sorting, searching, etc. - Manipulate complex data structures, such as linked lists, stacks, queues, heaps, trees, hash tables and graphs - Write modular programs in C language adopting several programming paradigms such as recursive programming, greedy approaches, dynamic programming and memorization - Exploit tools for program development and problem solving, based on design of data structures and algorithms.
At the end of this course, students will be skilled in: • Managing memory dynamically in C using pointers and dynamic data structures. • Evaluating algorithmic complexity and enhancing efficiency in terms of speed and memory. • Coding standard algorithms to address core problems (e.g., sorting, searching). • Operating on complex data structures like linked lists, stacks, queues, heaps, trees, hash tables, and graphs. • Writing modular C code using various programming approaches, including recursion, greedy methods, dynamic programming, and memoization. • Employing software tools for effective program development and problem-solving centered on data structures and algorithms.
Due to the incremental nature of the course with respect to the first year class “Computer Science”, there are several strict prerequisites in terms of programming skills and programming language knowledge, with particular emphasis on the following topics: • Elementary computer systems architecture (Von Neumann model). • Syntax of C, basic data types and constructs. • Basic programming skills in C, using conditional and iterative constructs, scalar and aggregate data, standard I/O, text files and functions. • Skills in elementary (algorithmic) problem solving.
This course assumes successful completion and mastery of topics from "Computer Science" and "Programming Techniques." Students must demonstrate: • Knowledge of the Von Neumann model of computer architecture. • Proficiency in C language syntax, basic data types, and constructs. • Practical C programming skills: including conditionals, iteration, scalar/aggregate data, standard I/O, text files, functions, and pointer usage (for parameter passing and array equivalence). • Experience in elementary algorithmic problem-solving (e.g., search, sorting, connectivity). • Understanding of asymptotic complexity analysis basics.
• Review of basic language construct and basic problem solving (12h) • Algorithm analysis (3h) o Asymptotic worst-case complexity analysis o O, theta, omega notations o Recurrence equations • Sorting algorithms (6h) o Iterative sorting (bubble sort, selection sort, insertion sort, shell sort, counting sort) o Recursive sorting (mergesort, quicksort, heapsort) • Static and dynamic data structures and their implementation in C (13h) o Data representation in memory and runtime memory management o Pointers (or references to objects) o Static, on stack and dynamic memory allocation o Linked structures o Strategies for data structure selection • Modularity and modular implementation of algorithms and data structures (10h) o The implementation-interface-client model o Implementation in C of programs with multiple source and header files o Basic use of development and debug tools, like make, gdb, cvs • Recursion and recursive programs (10h) o The notion of recursion o Mathematical recursive functions o Simple recursive procedures o Backtrack and implementation of recursion • Abstract objects, collections of objects and ADTs (8h) o Modular examples of composed structures, like arrays of lists and multilists o Linked lists, stacks, FIFO queues, generalized queues, priority queues, heaps • Algorithmic paradigms (8h) o Divide and conquer • Problem solving (14h) o Analysis and definition of strategies for data structures and algorithms o Search and optimization problems o Techniques to explore the state space based on combinatorics • Data structures for symbol tables (4h) o Binary search trees o Hash tables • Graph theory (12h) o Graph representation o Depth-first and breadth-first search and their applications o Shortest paths o Minimum spanning trees.
• Introduction (6.0 h): o Course introduction. o Review on C and problem solving. o Problem-solving and practice. • Dynamic memory allocation in C (10.5 h): o Data representation in memory. o Pointers (or references to objects). o Runtime memory management (dynamic memory allocation). o Problem-solving and practice. • Static and dynamic linear Abstract Data Types (ADT, 7.5 h): o Simple and multiple linked structures. o Stack and queues. o Strategies for data structure selection. o Problem-solving and practice. • Recursion and recursive programs (4.5 h): o The notion of recursion and the divide-and-conquer paradigm. o Mathematical recursive functions. o Simple recursive procedures. o Problem-solving and practice. • Recursive sorting (mergesort, quicksort, heapsort) (3.0h). • Combinatorial principles and their implementation (7.5h). o Backtrack and implementation of recursion. o Problem-solving and practice. • Modularity and modular implementation of algorithms and data structures (4.5 h): o The implementation-interface-client model. o Implementation in C of programs with multiple source and header files. o Basic use of development and debug tools, like make and gdb. o Problem-solving and practice. • Abstract objects, collections of objects, and ADTs (7.5 h): o Classification, definition, and examples. o Trees. o Binary search trees. o Hash tables. o Priority queues, heaps, and heap-sort. o Problem-solving and practice. • Greedy algorithm (1.5 h). • Dynamic programming (1.5 h). • Graph theory (11.0 h): o Graph representation. o Visits (depth-first and breadth-first search) and their applications. o Single-source shortest paths. o Minimum spanning trees. o Problem-solving and practice. • Laboratory practice (15.0 h).
The class can be divided into theory lectures, practice lessons and laboratories. There is no formal distinction between theory and practice as almost all course topics involve theory and practice aspects developed during the classroom lessons by the teacher. Lectures (80h) include practice lessons. Lectures and practice are extended with 20 additional hours in laboratory to consolidate what the student has learned. Laboratories allow students to solve problems (writing, compiling and debugging C language programs on a personal computer) and applying all theory and practice aspects analyzed during the classroom lessons.
This course is delivered through a combination of integrated classroom learning and essential hands-on laboratory work: • Classroom Sessions (approx. 65.0 hours): Theoretical principles and practical problem-solving techniques are taught cohesively by the instructor. Most topics will involve both theoretical exploration and applied exercises within these sessions. • Laboratory Sessions (approx. 15.0 hours): Designed to consolidate learning, labs require students to write, compile, and debug C programs on personal computers. This allows for the direct application of concepts covered in lectures. Participation in laboratory work is integral to the course and plays a very important role in developing practical programming proficiency.
Handouts and slides used during the classroom lessons are available on the teacher or course WEB site. The World Wide Web is also an excellent source of material for almost all topics introduced in the class (see Wikipedia, for example). Among the printed material, during the class, we make explicit usage of the following books: • T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein, “Introduction to Algorithms”, McGraw-Hill. • S. Quer, "Advanced Programming and Problem-Solving Strategies in C. Part II: Algorithms and Data Structures", 2nd Edition, 2018, CLUT • S. Quer, "Advanced Programming and Problem-Solving Strategies in C. Part IV: Exam-Based Problems", 2nd eEdition, 2018, CLUT Other sources are the followings: • R. Sedgewick, “Algorithms in C, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching” Addison-Wesley Professional. • R. Sedgewick, “Algorithms in C, Part 5: Graph Algorithms”, Addison-Wesley Professional. • B. W. Kernighan, D. M. Ritchie, “The C Programming Language”, Prentice Hall, second edition. • P. Deitel, H. Deitel, “C: how to program”, Prentice Hall, eight edition.
Handouts and slides used during the classroom lessons are available on the teacher or course WEB site. The World Wide Web is also an excellent source of material for almost all topics introduced in the class (see Wikipedia, for example). Among the printed material, during the class, we make explicit usage of the following books: • T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein, “Introduction to Algorithms,” McGraw-Hill. • S. Quer, "Advanced Programming and Problem-Solving Strategies in C. Part II: Algorithms and Data Structures," 2nd Edition, 2018, CLUT. • S. Quer, "Advanced Programming and Problem-Solving Strategies in C. Part IV: Exam-Based Problems," 2nd Edition, 2018, CLUT. Other printed sources are the following: • R. Sedgewick, “Algorithms in C, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching,” Addison-Wesley Professional. • R. Sedgewick, “Algorithms in C, Part 5: Graph Algorithms,” Addison-Wesley Professional. • P. Prinz and T. Crawford, “C in a Nutshell. The definitive reference," O'Reilly, second edition.
Slides; Dispense; Libro di testo; Libro di esercitazione; Esercizi; Esercizi risolti; Esercitazioni di laboratorio; Esercitazioni di laboratorio risolte; Video lezioni dell’anno corrente; Video lezioni tratte da anni precedenti; Strumenti di auto-valutazione;
Lecture slides; Lecture notes; Text book; Practice book; Exercises; Exercise with solutions ; Lab exercises; Lab exercises with solutions; Video lectures (current year); Video lectures (previous years); Self-assessment tools;
Modalità di esame: Test informatizzato in laboratorio;
Exam: Computer lab-based test;
... The examination includes two separate parts: - A written test - An oral evaluation. The written test comprehends two parts: • Exercises/questions on theoretical aspects to check the acquired knowledge. • A programming part to check the acquired abilities and programming skills. The theory section: • Consists of open questions or exercises on theory topics. • Amounts up to 12 points on the final mark. • Has a minimum threshold of 6 points out of 12. • Has to be delivered after 50-60 minutes from the beginning of the written test. The programming section (100-120 minutes) is available in two different flavor: • A complete design and development of a program in C to solve a problem, the emphasis being on problem-solving and design skills. This standard programming part has a maximum value of 18 points and a minimum threshold of 9 points. It implies the design of a "standard" "complex" C program to check the candidate knowledge of the C language syntax, data structures, algorithms, and program designing (problem-solving) ability. • A guided development of the solution to a problem, with less emphasis on design and problem-solving skills and more on the ability to use advanced C features (pointers, dynamic allocation, recursion) and on the knowledge of basic data structures and algorithms. This simplified programming part has a maximum value of 12 points and a minimum threshold of 6 points. It is usually made-up by three "shorter" "partial" C programs. Those exercises are aimed to check the knowledge of the candidate in terms of C language syntax, data structures, and algorithms but they are less demanding from the designing. i.e., problem-solving, point of view than the "standard" part. The two parts can be selected by the candidate in alternative (mixing is not allowed). Both modes require the same approach to the subject. The theory and programming written tests have to be taken during the same session. No books or notes are allowed during the examination. Laptop, cellular phones, etc. are forbidden. After the written test, all students have some days to correct their program (programs) and check-it (them) out to carry out an auto-evaluation. If the student finally decides to take the exam, he/she has to deliver the final working (complete and debugged version of the) program (programs) to the teacher, following the written rules specified during the class. More specifically, each student must: • Make a copy of the program at the end of the written part (using carbon copy paper or a camera). • Verify the correctness of the program. • Upload on the course web page within 3 working days: a report (max 3 pages) describing the solution (data structures, algorithm, etc.) and a copy of the working program, showing the changes with respect to the version handed in for ranking. In case the above material is not uploaded, the written exam will not be ranked. Notice that, to take the exam, it is mandatory to deliver a working program (more working programs if the simplified version of the programming part has been selected), even if the evaluation is made on the written text delivered during the test and not on the program written at home. To be able to implement at home the program developed during the written test, students are invited to take with them a photo camera (or a cell-phone with camera) or some copy-paper. The oral examination is the final part of the exam. Students that failed the written test, i.e., have a mark smaller than 15/30, are invited not to take the oral examination and to re-take the entire exam during the next examination session. Students with a written test mark larger than 15/30 and smaller than 18/30 must take the oral examination to pass the exam. For all other students the oral examination is optional. This means that, from the one hand, those students have the discretion to ask for the oral examination to improve their final mark but, on the other one, that the teacher has the right to demand an oral examination to any student he may have evaluation doubts on. Notice, however, that the oral examination (in all cases) can adjust the written mark in both the positive and the negative direction, such that the final mark will range from fail to 30 with honor. The oral examination checks the capacity of the student to explain his/her design choices, to use correct technical terms, and to describe algorithms. It consists in: • Questions on all the topics of the course, the goal being to rank the grade of theoretical knowledge. • Programs in C to evaluate skills related to the implementation and manipulation of data structures by means of advanced C programming constructs and to the implementation of variants of standard algorithms. • Questions on uploaded laboratory exercises.
Gli studenti e le studentesse con disabilità o con Disturbi Specifici di Apprendimento (DSA), oltre alla segnalazione tramite procedura informatizzata, sono invitati a comunicare anche direttamente al/la docente titolare dell'insegnamento, con un preavviso non inferiore ad una settimana dall'avvio della sessione d'esame, gli strumenti compensativi concordati con l'Unità Special Needs, al fine di permettere al/la docente la declinazione più idonea in riferimento alla specifica tipologia di esame.
Exam: Computer lab-based test;
Exam Overview. The course concludes with a 3.0-hour written examination conducted on-site via laptop, utilizing the university's "Esami" platform. No oral examination is included. Students must bring their own laptops and check their hardware and software before the exam. Instructors will provide assistance and supervision. Student Conduct & Responsibilities. Students must comply with all University exam regulations and the ethical code. This includes ensuring they have the necessary hardware/software and promptly reporting any infrastructural issues. In case of irregularities, professors may conduct an oral verification on all course topics. Exam Structure & Content: The written exam features two parts: • Theory: Exercises and questions on theoretical aspects, standard algorithms, and data structures from lectures. • Problem-Solving: Tasks involving C language programming, software design, code comprehension, and debugging. Typically, the exam comprises: • 9 closed-answer (auto-corrected) questions (6 theory, 3 problem-solving). • 4 open-answer (manually graded) questions/exercises (1 theory, 3 problem-solving). Materials & Devices No books, notes, overheads, or other aids are allowed. Mobile phones are forbidden. Grading Accuracy and adherence to format are critical for auto-corrected questions; incorrect answers will be penalized. The maximum grade is 36. Marks are rounded up. Scores larger than or equal to 32 are converted to "30 with honors."
In addition to the message sent by the online system, students with disabilities or Specific Learning Disorders (SLD) are invited to directly inform the professor in charge of the course about the special arrangements for the exam that have been agreed with the Special Needs Unit. The professor has to be informed at least one week before the beginning of the examination session in order to provide students with the most suitable arrangements for each specific type of exam.
Esporta Word