Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:41:40+00:00 2026-06-17T21:41:40+00:00

My apologies if this is a duplicate. I lack the Computer Science knowledge to

  • 0

My apologies if this is a duplicate. I lack the Computer Science knowledge to know what to properly search for.

I need to find a matching algorithm. I’ve got a series of rooms, and a series of contents-for-rooms. The contents have a minimum size room in which they would fit – so some would happily fit in any room, some would only fit in one or two rooms. I’ll also be having a maximum size for some of the rooms, but I assume that this only effects when I determine if the room would be suitable.

Assuming (though – this won’t be guaranteed in my actual use) that there is a potential solution, how do I find the optimal allocation, such that each room is only used once and none of the contents are lacking a room?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:41:42+00:00Added an answer on June 17, 2026 at 9:41 pm

    You problem appears to be a maximum bipartite matching problem. You could think of your problem as an undirected graph G(V,E) where the vertices V are the rooms and contents and the edges E are possible connections between rooms and contents:

    1. The graph is bipartite. If we split the vertices into two sets, rooms and contents, there are no internal edges in each set.
    2. An edge exists in the graph between contents(i) and room(j) if the room is big enough to hold the contents.

    A maximum matching produces the maximum number of pairings between vertices in the two sets (i.e. rooms and contents), ensuring that each vertex is only used once. The matching is said to be “perfect” if all vertices are matched. There are a number of algorithms that can be used for such problems, potentially the fastest is the Hopcroft-Karp method.

    You could also consider a further optimisation of your problem, in which you try to minimse the total wasted space in the rooms. In this case a “weight” would be associated to the edges defined above based on the difference between the areas of the contents and the rooms.
    You would then seek a maximum weight maximum matching.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My apologies if this is a duplicate; I may not know the proper terms
Apologies if this is a repost, I could not find the search terms to
my apologies if this is a duplicate, i couldn't find it anywhere.. say i've
Apologies if this is a duplicate, but I've not managed to find this question
Apologies if this is a duplicate; I promise I did search. I'm working on
Firstly: apologies if this is a duplicate post. Things got a bit confusing as
Apologies if this is a duplicate but I couldn't find anything concrete as an
Frstly my apologies if this is a duplicate question. I have tried to find
Apologies if this is a duplicate, 20 minutes of searching didn't yield this exact
Apologies if this seems like a duplicate post... Thomas Warner kindly answeres an earlier

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.