CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Deploying Windows Server 2008 with System Center
  • Remote Desktop Protocol Performance Improvements in Windows Server 2008 R2 and Windows 7
  • The Microsoft Dynamics CRM Security Model
  • SQL Server Modeling Services with Microsoft Visual Studio 2010 Beta 2

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > General Discussion > Algorithms & Data Structures
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Algorithms & Data Structures Discuss algorithms & data structures. Topics are not specific to any programming language.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old September 22nd, 2009, 08:16 AM
    psychomike psychomike is offline
    Junior Member
     
    Join Date: Sep 2009
    Posts: 1
    psychomike is an unknown quantity at this point (<10)
    Interval overlap problem

    Hello,

    I am interested in an algorithmic problem, but don't really have a good intuition about its complexity.
    So, the problem is as follows:

    Given a range of real numbers and given a set of (potentially overlapping and non-connected) sub-regions (= multiple intervals) on this range, what is the minimum set for which its union covers at least a certain amount of the complete range?

    As an example, let's assume a number range from 0 to 1 (i.e. [0,1]), and a set of sub-regions with 100 elements could look like this:
    1) [0.1,0.2] [0.3,0.35] [0.7,0.9]
    2) [0.2,0.4]
    3) [0.0,0.05] [0.6,0.85]
    4) [0.65,0.8] [0.85,0.95]
    5) [0.7,1]
    .
    .
    100) [0.2,0.4]

    Each element covers a certain part of the number range, but this part need not be connected.
    Now I want to find the minimum subset of elements that cover at least 90% of the original range (assuming this is possible). Elements in this subset may overlap and the final result need not be connected.

    I am not sure which complexity class this kind of problem belongs to and if efficient solutions exist.
    Can someone help and give me some pointers?

    Thanks,

    Michael
    Reply With Quote
      #2    
    Old September 23rd, 2009, 02:54 AM
    Zachm's Avatar
    Zachm Zachm is offline
    Member +
     
    Join Date: Oct 2006
    Posts: 519
    Zachm  is a jewel in the rough (300+) Zachm  is a jewel in the rough (300+) Zachm  is a jewel in the rough (300+) Zachm  is a jewel in the rough (300+)
    Re: Interval overlap problem

    This problem is NP-Hard, as there exists a polynomial time reduction from the Set Cover Problem to this problem.

    I would try an approximation algorithms approach.

    Regards,
    Zachm
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > General Discussion > Algorithms & Data Structures


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 03:29 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.