INFO2050 - Advanced computer programming

Random CS quote

Thinking doesn't guarantee that we won't make mistakes. But not thinking guarantees that we will.

Leslie Lamport



Project (optional) 21 Sep. 2018

Statement for project 0

Ex. 28 Sep. 2018 Exercise session 1: Pseudo-code and complexity
Deadline 04 Oct. 2018 Don't forget to submit the optional assignment on the submission platform
Project Discussion Ex. 05 Oct. 2018

First assignmnet

Discussion regarding the optional assignment

Exercise session 1: Pseudo-code and complexity (second part)

Ex. 12 Oct. 2018 Exercise session 2: Recurrences
Q&A 19 Oct. 2018 Question and answer about the first project
Project Ex. 26 Oct. 2018

Second assignment

Exercise session 2: Recurrences (second part)

Exercise session 3: Linked list, Stack, Queue

/ 02 Nov. 2018 No exercise session
Deadline 03 Nov. 2018 Don't forget to submit the first assignement on the submission platform
Ex. 09 Nov. 2018 Exercise session 4: Heap, priority queue, tree
Ex. 16 Nov. 2018 Exercise session 5: Binary search trees
Project Ex. 23 Nov. 2018

Exercise session 6: Hash tables

Ex. 30 Nov. 2018 Exercise session 7: Problem solving (brute force and divide-and-conquer)
Deadline 01 Dec. 2018 Don't forget to submit the second assignment on the submission platform
Ex. 07 Dec. 2018 Exercise session 8: Problem solving (dynamic programming)
Ex. 14 Dec. 2018 Exercise session 8: Problem solving (greedy)
Mock exam 21 Dec. 2018

13:30 - Mock exam

Deadline 23 Dec. 2018

Don't forget to submit the third assignment on the submission platform
Check out the FAQ for the this assiement

FAQ for the third assignment

This is most probably due to the key file. The statement did not say that if must terminate the first line with a newline character (\n). It has been updated.
Note that leaving an empty newline at the end of an ASCII file is an implicit convention, as it allows for uniform scanning of the file and better printing on the console.
This refer to the fact that the greedy approach won't work, not to the counter example. Bottom line is, you can use custom probabilities in your counter example.
If you think about it, the maximum value is bounded. Since this bound is quite low, it is easy to test all posibilities.
If you'd rather be spoiled, hover over this.
Whatever the base, you will end up with the same solution. However, if you provide a different solution than ours, but with the same score, we will accept it. We use the natural logarithm (base e).

Supplementary material

Visual Algo is a site which illustrates many algorithms and data structures of the course. In addition, in the training section, you can to create online quizz on those topics to test your knowledge.


Testing machines

The projects must compile on the ms8xx (xx=01..25) machines !

Firstly, you need to create an account through the registration page.

Then you can connect to the machines thanks to SSH with the following command:

  • ssh
where you need to replace login by your actual login and xx by a machine number (xx=01..25). SSH will open a terminal on the remote machine. For windows user, the PuTTY utility will mimic SSH behaviour.

Several solutions are available to ship source code to and from the ms8xx machines.

  • FileZilla: a graphic, cross-platform FTP client
  • scp: a command line utility to transfert file from/to remote hosts (it works much like the cp command)
  • rsync: a command line utility to synchronize remote files
  • sshfs: a command line utility to "mount" a remote directory
Those utilities might need some configuration/getting-used-to. A few hints to help you out:
  • Read the man page (so you can say you have)
  • Try the help flags -h, --help (you might even get useful information)
  • Google your questions or get a succinct tutorial (others have stumbled on the same difficulties, let them help you)
  • Script the data transferts, compilation steps, testing suite (human memory is the most expensive)

Oh, and be sure to chmod your home folder to prevent others from messing with your files.


Last modified on December 21 2018 10:40