Partner Units

<<TableOfContents: execution failed [list index out of range] (see also the log)>>

Problem description

Partner unit problem describes a people counting system.

The problem includes three types of components, namely a door sensor, a zone and a communication unit. The problem requirements are:

  1. Each zone as well as each door sensor must be connected to exactly one unit;
  2. Each unit can control at most two door sensors and at most two zones;
  3. If a unit controls a door sensor that contributes to a zone controlled by another unit, then the two units must be connected directly, i.e. one unit becomes a partner unit of the other and vice versa;
  4. Each unit can have at most maxPU partner units which is constant for each problem instance.

The solution of the partner unit problem is defined as follows:

Input format

Output format