Travaux dirigés (TD) - Programmation
35 documents à télécharger gratuitement
Travaux dirigés (TD) de programmation partagés par des étudiants et des enseignants. Thèmes couverts : algorithmique, langage C, Java, Python, POO, structures de données.
This document discusses advanced algorithmic concepts focused on determining the majority element in an array. It presents both a naive algorithm and a more efficient divide-and-conquer approach. The document also analyzes the complexities of these algorithms.
This document presents an advanced algorithmic exercise focused on polynomial multiplication using the 'divide and conquer' technique. It includes tasks that involve demonstrating methods to multiply linear polynomials and algorithms for multiplying polynomials of degree up to n. Additionally, the document outlines recursive approaches for calculating trigonometric functions.
This document discusses advanced algorithmic techniques for multiplying polynomials using the 'divide and conquer' method. It includes the derivation of a polynomial multiplication algorithm requiring only three multiplications and explains how to achieve efficient polynomial products with a complexity of Θ(n log2 3). The content is thoroughly detailed with algorithm descriptions and recurrence relationships.
This document presents a series of exercises focused on advanced algorithmic techniques, specifically recursion. It covers the Fibonacci sequence, set operations including union, intersection, and difference, with an emphasis on both sorted and unsorted scenarios. Each exercise requires the implementation of recursive algorithms and analysis of their complexities.
This document discusses advanced algorithmic techniques, particularly focusing on recursion through the Fibonacci sequence. It analyzes the complexity of recursive algorithms and introduces operations on sets represented by arrays. The document includes algorithms for calculating Fibonacci numbers and searching for elements in both sorted and unsorted sets.
This document discusses an advanced algorithmic exercise focusing on the heuristic packing problem. It presents the problem of packing n objects of varying sizes into the minimum number of unit-sized boxes. The document details the Fischer-Price heuristic method for solving the problem and poses several theoretical questions regarding its performance.
This document addresses an advanced algorithmic exercise related to the bin packing problem, detailing the use of the Fischer-Price heuristic for optimal boxing of objects. It discusses the properties and limitations of this heuristic, including proofs of upper bounds on the number of boxes used. The document includes detailed mathematical reasoning and conclusions regarding the efficiency of the proposed heuristic.
This document provides solutions and algorithms for finding the maximum and second maximum elements from a set. It focuses on analyzing the complexity of these algorithms and presents the tournament method for finding the maximum efficiently.
This document outlines a practical session focused on advanced algorithmic techniques, specifically searching for the maximum and second-largest elements in a dataset. It includes various exercises to design algorithms, analyze their complexities, and improve their efficiency. Additionally, the document encourages the application and visualization of algorithms through sports tournament analogies.
The document includes several exercises related to algorithm complexity in C programming. It presents iterative and recursive algorithms for finding minima in arrays and calculating powers and sums, along with their complexities. It discusses the efficiency of each algorithm and provides corrections with complexity evaluations.
This document provides an in-depth tutorial on linked lists in C programming, contrasting them with arrays in terms of memory and flexibility. It includes essential topics such as declaring linked lists, adding and removing elements (head and tail), searching for an element, and counting occurrences or total elements in the list. Additionally, practical examples of recursive and iterative implementations are presented with C code snippets to help developers effectively manipulate linked lists.










