PORTALE DELLA DIDATTICA

PORTALE DELLA DIDATTICA

PORTALE DELLA DIDATTICA

Elenco notifiche



Algorithms and Programming

05OGDLP

A.A. 2024/25

Course Language

Inglese

Degree programme(s)

1st degree and Bachelor-level of the Bologna process in Electronic And Communications Engineering (Ingegneria Elettronica E Delle Comunicazioni) - Torino

Course structure
Teaching Hours
Lezioni 51
Esercitazioni in aula 33
Esercitazioni in laboratorio 36
Tutoraggio 20
Lecturers
Teacher Status SSD h.Les h.Ex h.Lab h.Tut Years teaching
Savino Alessandro   Professore Associato IINF-05/A 48 0 0 0 5
Co-lectures
Espandi

Context
SSD CFU Activities Area context
ING-INF/05 12 B - Caratterizzanti Ingegneria informatica
2024/25
The course deepens the knowledge and skills in advanced programming, considered a problem-solving tool. The main goal is to guide the student to evolve from more analytic to more design-oriented skills gradually. The student will acquire adequate knowledge and skills in algorithms, data structures, and their implementation in C to solve complex problems. Algorithmic solutions to "classical" problems are introduced, together with their theoretical foundations and the implementations in the C language. C's advanced aspects are considered, like pointers, dynamic memory allocation, modularity, and Abstract Data Type (ADT) implementation. The student has the opportunity to analyze practical examples and describe solutions to complex problems and the related algorithmic paradigms. Most of the knowledge and programming skills are experienced through practical exercises and laboratories.
At the end of the course, the student will be able to: - Know the paradigms of structured programming using C language - Dynamically allocate memory using raw pointers and dynamic data structures in C language. - Evaluate the algorithm complexity and improve efficiency in execution time and memory allocation. - Write standard algorithms to solve fundamental problems such as sorting, searching, etc. - Manipulate complex data structures, such as linked lists, stacks, queues, trees, 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 the design of data structures and algorithms.
Due to the incremental nature of the course concerning 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). - Basic programming skills, using conditional and iterative constructs, scalar and aggregate data, standard input/output, and text files. - Basic programming resorting to Functions (with multiple parameters, return handling, etc.) - Skills in elementary (algorithmic) problem-solving.
- Introduction to C language (~24h) --- Fundamentals of the language --- Basic data types and the architecture --- Functions and parameters --- The I/O system --- Implementation in C of programs with multiple source and header files --- Basic use of development and debug tools, like make, gdb, CVS - Algorithm analysis (~2h) --- Asymptotic worst-case complexity analysis --- O, theta, omega notations --- Recurrence equations - Sorting algorithms (~6h) --- Iterative sorting (bubble sort, selection sort, insertion sort, shell sort, counting sort) --- Recursive sorting (mergesort, quicksort, heapsort) - Static and dynamic data structures and their implementation in C (~8h) --- Data representation in memory and runtime memory management --- Pointers (or references to objects) --- Static, on the stack, and dynamic memory allocation --- Linked structures --- Strategies for data structure selection - Modularity and modular implementation of algorithms and data structures (~4h) --- The implementation-interface-client model - Recursion and recursive programs (~6h) --- The notion of recursion --- Mathematical recursive functions --- Simple recursive procedures --- Backtrack and implementation of recursion - Abstract objects, collections of objects, and ADTs (~4h) --- Modular examples of composed structures, like arrays of lists and multi lists --- Linked lists, stacks, FIFO queues, generalized queues, priority queues - Algorithmic paradigms (~8h) --- Divide and conquer --- Greedy - Problem-solving (~6h) --- Analysis and definition of strategies for data structures and algorithms --- Search and optimization problems --- Techniques to explore the state space based on combinatorics - Data structures for symbol tables (~6h) --- Binary search trees and extensions - Graph theory (~10h) --- Graph representation --- Depth-first and breadth-first search and their applications --- Applications of visits --- Shortest paths --- Minimum spanning trees.
The class includes theory lectures, practice lessons, and laboratories. There is no formal distinction between theory and practice as almost all course topics involve both aspects developed during the classroom lessons by the teacher. Lectures (80 hours overall) include practice lessons. Lectures and practice are extended with 40 additional hours in the 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 apply all theory and practice aspects analyzed during the classroom lessons. Laboratories are mandatory.
Handouts and slides used during the classroom lessons are available on the teacher or course WEB site. 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 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, T. Crawford, "C in a Nutchell (The Definitive Reference)," O'Reilly.
Lecture slides; Exercise with solutions ; Lab exercises; Video lectures (previous years);
Exam: Optional oral exam; Computer-based written test in class using POLITO platform;
The examination is done through a written test lasting 120 minutes. The written test has two parts: 1. Exercises/questions on theoretical aspects to check the acquired knowledge on standard algorithms (sorting, lists, trees, graphs management, etc.) and data structure implementations. 2. Exercises to check the acquired programming skills. The student will be asked to program functions with increasing complexity, for which the question provides prototypes and task descriptions. The theory section: • Consists of up to 6 open questions or exercises on theory topics (depending on the time required by each exercise to complete). • Amounts up to 12 points on the final mark. • Has a minimum threshold of 6 points out of 12. The programming section: • Consists of up to 4 exercises on programming topics. • Amounts up to 20 points on the final mark. • Has a minimum threshold of 10 points out of 20. • Includes problem-solving exercises (functions) and design skills (data structures). Each exercise might also cover the ability to use advanced C features (pointers, dynamic allocation, recursion) and the knowledge of basic data structures and algorithms. No books or notes are allowed during the examination. Laptops (except those for taking the exam), tablets, cellular phones, etc., are strictly forbidden. All students breaking those rules will be reported to the disciplinary committee. The optional oral examination is accessible only to students who have scored all minimums required for the two parts of the written exam. Students who fail the written test, i.e., have a mark smaller than 18/30, must re-take the entire exam. The optionality of the oral examination means that students can ask for the oral examination to add a second level of examination. Still, 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 failing to 30 with honor. The oral examination checks the capacity of the student to explain their design choices, use correct technical terms, and describe algorithms. It consists in: • Questions on all the course topics, the goal being to rank the grade of theoretical knowledge. • Live programming questions to further evaluate skills related to implementing and manipulating data structures through advanced C programming constructs and implementing variants of standard algorithms. • Questions on laboratory exercises.
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