CC1 results

CC1 results

by Wozniak Herve -
Number of replies: 0

Good evening,

The marks for CC1 out of 20 are given below.

Typology of errors

Exercise 1: median at 3.5 out of 7

- the floor function E() as defined in mathematics does not really exist in python. 

int() truncates a real number to make an integer. But the truncation of a negative number is not equal to its integer part. E(-0.375) = -1 whereas int(-0.375) = 0 ;

numpy.floor() returns the integer part, but as a real number, just like Euclidean division by 1 (x//1).

The only solutions are int(numpy.floor()), or define the array storing the integer parts with dtype=int, or create your own function that takes the sign of the argument into account. Only one of you has coded an mathematical floor function properly.

- Testing means applying your algorithm to a case that you can calculate BY HAND. Tests on irrational numbers or numbers taken at random make no sense, whereas taking a number in fraction form is particularly helpful. 

x=3/8 is a perfect example of a test. Anyone with a correct algorithm has found the sequence [0 2 1 1 1]. Only one of you who decided to make computation in float32 found [0 2 1 2]. Depending on whether you use single (float32) or double (float64) precision (the default in python), an intermediate remainder is e=4.9999997e-01 or e=5.00000001e-01. E(1/e) is therefore 1 or 2 depending on the precision. It is only by hand that we can determine which of the solutions is the good one : [0, 2, 1, 2].

- the reduced order n is not given a priori. It's an outcome of the calculation.


Exercise 2: median at 2 out of 13. 

A large fraction (4/5) of you did not understand the algorithm. 

Dc = 0.182475 when using averages correctly weighted by the true values of time intervals (this was on the graph). 

Dc=0.182110 when averages are used without regard to numerical precision. You have all assumed that if T=100 and nstep=10000 then delta_t=0.01. But delta_t=t[1]-t[0]=0.010001000100010001

I didn't take this detail into account.

More important: 

- do not confuse the number of steps (10000) with the duration of the signal (100);

- don't cut out the 10 intervals by hand. Loops, comprehensible lists, etc. are tools for performing this operation;

- the second average is calculated over all the possible intervals, i.e. 45 iterations (10*9/2). A double loop is needed, with the second loop indexed to the first;

- avoid unnecessary functions (e.g. abs() on time intervals that are strictly monotonic, simply put the operation in the right order);

- avoid redundant calculations by storing in arrays. In particular, store the L averages as they are useful for calculating the second average and also for the graph;

Now, the marks:


Nom de famille Prénom Notes CC1
Akbay Jiyan 10
Akil Zaynab 8
Benserhir Youssef 0
Bour Adele 14
Bouta Adnan 7
Camontes Mathilde 4
Cohergne Thibault 15
Coudene Leo 4
Degrave Romain 0
Desgardin Tristan 8
Diop Adama 0
El Attar Sofi Souhayla 14
Faget Maxime 4
Fina-Arson Killian 7
Fourtassi Omar 1
Gauvrit Luke 8
Guérin David 6
Hallouin Theotime 16
Hammouri Mostapha 2
Kamal Khadija  ABJ
Karouaz Sara 0
Kosluoglu Melissa 0
Laghrissi Rania 0
Laporte Loni 15
Lichaire Eliott 15,5
Mammeri Mohammed 4
Manes Gauthier 8
Meric Arthur 0
Mollette Mathis 2
Mora Paul 2
Morin Baptiste Baptiste 0
Moumene Yasmine 4
Niquet Emilie 6
Picot Julia 6,5
Rouge Rozenn  ABJ
Savey Delpeux Lucien 6
Sciuto Jean-Gabriel 11,5
Tardy Julien 4
Teissonniere Romain 11,5
Tourrel Jade 5
Ziriat Ramzi 1