Practice 1: The Dark Side of the Force

The Hangar of the Revel Alliance Problem

Aitor Corchero & Jordi Planes

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

A short time ago in a near galaxy…

EPISODE I
The Dark Side of the Force

It is a period of civil war.

Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.

During the battle, Rebel spies have steal secret plans to destroy the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet.

Pursued by the Empire's army, a new battle has started.

The revel force is inmmersed in a hard battle.... Lot of revel soldiers has lost their lives...

In this war, you will in charge of managing the hangar spaceships places to get fuelling as fast as posible

Main Objective

Develop an algorithm capable of returning the first free space within the hangar.

For example, suposing we have 5 places in the hangar and the following spaceships enters:

  • A X-wing to the 2nd position
  • A Y-wing to the 5th position
  • A Z-wing to the 1st position

The first free position is the 3rd

Requirements

  1. A program that get the data from a text file and return the optim value.
  2. A report that contains:
    • Pseudo-code of the main designed recursive algorithms
    • Algorithm Cost Estimation
    • Experimental Cost of the program (algorithms)

The application has to follow the established syntaxis:

$ ./hangar [input_file]

If there is no defined optional parameters, we will consider the standard input to read elements and standard output to write the results.

Evaluation and Presentation

  • Report: 3 points

  • Algorithms Design: 3 points

  • Practice validation (Exam day): 4 points

The practice can be performed in paris. It represents the 25% of the final result. The practice (code and report) has to be upload in the "Campus Virtual" in a ZIP or TGZ format.

May the Force be with you