Assignments

Help, Solution, and Grading Sessions and Guide for the Perplexed.

The course has 2 mandatory assignments, to be done in teams of two. The assignments are worth 2 higher-education credits (ECTS credits) in total.

Help Sessions,

Each assignment has 3 timetabled help sessions. Help sessions are the only time that you can help from the assistants. We will not give support at other times.

Initial Grading

For each problem of an assignment, your initial score, in the integer interval $0 \ldots 5$, will normally be determined by the late afternoon on the day before the grading session for that assignment. Toward this, the assistants run your code on a grading test suite and examines the corresponding part of your report. An initial score is the final score if it is greater than or equal to $3$.

Grading Session

The objective of a grading session is to determine your final score for each problem with an initial of 1 or 2: your team will normally be given an appointment with an assistant during the grading session, in a room of her/his choice, toward correcting minor mistakes during that meeting and possibly increasing your score by one

Appointment times are strict: the initial score is final in case of a missed appointment. Exceptions must be negotiated in due time during working hours with the head teacher, upon reporting a convincing case of force majeure.

Solution Sessions

The objective of a solution session is only for the assistants to discuss acceptable solutions to the assignment of the previous deadline. No code will be handed out. The first solution session is merged with the initial help session to the second assignment.

Comments on your submitted report can be found at Studium; more detailed comments can be obtained orally from the assistants upon appointment.

Submission and Deadlines

All assignment reports must be submitted via Studium. Submission deadlines are hard. The submission deadline and time in Studium is always correct (if it differs from information on this webpage). Exceptions must be negotiated in due time during working hours with the head teacher, upon reporting a convincing case of force majeure. Grading will only start after a deadline, so you can submit multiple times until then.

Ethics

The legislation on plagiarism and cheating (summary) of Uppsala University will be rigorously applied, without exceptions. This disallows using a public repository (such as GitHub, where you should use a free private student repository) for code management within your team. We reserve the right to use plagiarism detection tools and point out that they are extremely powerful.

Your report should be your own work, and not the product of a large language model. You should do the assignments without the use of an AI coding assistant.

When submitting you implicitly certify that your report and all its uploaded attachments were produced solely by your team, except where explicitly stated otherwise and clearly referenced, that each teammate can individually explain any part starting from the moment of submitting your report, and that your report and attachments are not freely accessible on a public repository.

We reserve the right to give different assignment scores to the teammates of a team, depending on the performance at the grading session.

Please report any problems within a team to the head teacher, who will handle the case in confidence, in the best interest of both teammates, keeping the ethics dimension in mind.

Expected Effort

One higher-education credit (ECTS credit) translates under Swedish university law into an expected 26.67 hours of work for the average student. Hence 133.33 hours are expected on this 5-credit course.

The assignments are worth 2 credits in total. Not counting the 21 hours spent on attending the lectures, the 2 assignments are calibrated to take an average of 30 hours each, for the average student, for each teammate, including the corresponding help, grading, and solution sessions.

Do not expect the 2 assignments to be equally labour-intensive, and do not expect the 2 problems of each assignment to be equally labour-intensive.

Jan 15, 2026

Subsections of Assignments

Assignment 1

Source files for the assignment

The assignment instructions, and zip file providing all the necessary files.

Software Resources

Problem 1 (Assignment 1):

Effortless and free access to MIP solvers is provided by the NEOS Server for Optimisation (search for “mixed integer linear programming”). We then recommend you use the world-class commercial MIP solver Gurobi Optimizer (or, but only in case of a temporary licensing issue with Gurobi at NEOS, the open-source MIP solver HiGHS), via the AMPL modelling language: when using the NEOS server, you do not need to install the AMPL integrated development environment (IDE) or AMPL command-line interface (CLI) or a MIP solver. Use a commands file with option gurobi_options 'outlev=1'; solve; # Write display commands here: display ___; in order to turn on verbose printing, which includes the optimality gap.

The effort of installing the following free alternative is outside the course time budget (and we have no resources to help you with installation issues), since NEOS provides access to installed versions:

If you have and prefer to use your own hardware, then you can install AMPL bundled with Gurobi Optimizer by following by using the courses classroom licence. When this is available there will be instructions in the file installing-AMPL.txt in the Files section at the AD3 page of Studium: a course license was provided free-of-charge by AMPL.com. Use AMPL command option solver gurobi; option gurobi_options 'outlev=1'; before you run solve in order to turn on verbose printing, which includes the optimality gap.

If the class licence is not available, then you can download a free time limited version from AMPL.com. Using your academic email address it is possible to get an academic licence.

The AMPL book can be downloaded free of charge, but you normally do not need to read it, as the sample models on the lecture slides suffice.

Jan 18, 2026

Assignment 2

Source files for the assignment

Coming Soon.

Software Resources

Problem 3 (Assignment 2)

We recommend you use the SAT solver MiniSat. Use the DIMACS CNF format for SAT solvers, by DIMACS, the Center for Discrete Mathematics and Theoretical Computer Science.

Problem 4 (Assignment 2)

We recommend you use the SMT solver Z3 (possibly via its playground web interface) or the web interface to the SMT solver Princess. Use the https://smt-lib.org/language.shtml language for SMT solvers (tutorial; newer versions of SMT-LIB do not affect Assignment 2).