Elimination of pairs of intersecting segments

Revision ru2, by 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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Serh.kry 2016-03-28 00:05:42 661 Initial revision for English translation
ru2 Russian Serh.kry 2016-03-27 00:02:52 42
ru1 Russian Serh.kry 2016-03-27 00:00:47 671 Первая редакция (опубликовано)