Тема: Снова задачи с NEERC 2009

Снова прошу о помощи про задачи с NEERC
: http://neerc.ifmo.ru/regional/problems.pdf
задача А: как найти центр масс, во многих местах читал, что надо разбивать на тетраедры, но что это даст? Разве так находится не объем???
задача Е: здесь вроде как надо ориент. граф так чтобы не было циклов, только вот как это делается???

заранее спасибо.

2

Re: Снова задачи с NEERC 2009

A: после того, как разобьём на тетраэдры, оказывается, центр масс всего многограника найдётся как среднее арифметическое центров масс тетраэдров.

E: не помню (((

Re: Снова задачи с NEERC 2009

А: центральная точка для разбиения на тетраедры берется произвольным образом?

4

Re: Снова задачи с NEERC 2009

LebedevNicolay видимо, да

5 Отредактировано Cruiser (2010-02-03 17:28:10)

Re: Снова задачи с NEERC 2009

> задача Е: здесь вроде как надо ориент. граф так чтобы не было циклов, только вот как это делается???
> заранее спасибо.

More exactly: we should receive such an oriented graph in which the maximal chain is minimized.
How to do it? We are given non-oriented graph consists of at most N=15 vertices (resources) and 100 edges (processes).
Consider the following dynamic programming. The state is fixed set of vertices (also called "mask").
The main idea is to choose some subset S of vertices form the mask M and call it "upper layer", then work with mask M \ S.
Of course, subgraph S must be "correct" in sence that it does not contain edges at all, and the value
d[M] = d[M\S] + 1
should be minimized.
After that all edges from the "upper" layers will be directed to the "lower" layers. Thus we will obtain the requested graph.
The check of "correctness" for all subsets should be preprocessed (it is easy to do in O(2^N * <edges>)).
The main solution has O(3^N) complexity... of course, if you know some special technique wink