Elimination of pairs of intersecting segments

Правка ru2, от Serh.kry, 2016-03-27 00:02:52

Here is the problem I'm trying to solve. Help me please to find a solution.

There are some segments that have start and end point on coordinate line. Each time we can eliminate one pair of intersecting segments.

The problem: how to maximize the count of eliminated segments?

Each time we removing one pair we might break another one. If one segment is intersecting several another segments, how to select the right one to eliminate as pair with former?

Example of elimination process:
8 segments was removed

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Serh.kry 2016-03-28 00:05:42 661 Initial revision for English translation
ru2 Русский Serh.kry 2016-03-27 00:02:52 42
ru1 Русский Serh.kry 2016-03-27 00:00:47 671 Первая редакция (опубликовано)