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 6078393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:49:43+00:00 2026-05-23T10:49:43+00:00

I have a scheduling problem I’m trying to figure out a best fit algorithm

  • 0

I have a scheduling problem I’m trying to figure out a best fit algorithm to use.

A hotel owns a theme park and is a highlight for visitors staying at the hotel. However, the hotel has more rooms than day passes for visitors wanting to go to the theme park. So during the peak months, there is a possibility that some will not get to go to the theme park.

We want to have every visitor given at least 1 chance to visit the theme park.

If there is contention, we would want to favour giving the day pass to visitors who stay longer at the hotel.

Can anyone point me in the right direction on which algorithm will fit the problem best?

No this is not homework. 🙂

Thanks in advance.

  • 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-05-23T10:49:44+00:00Added an answer on May 23, 2026 at 10:49 am

    You can use Priority Queue (PQ). Every day you put customers in your (PQ) computing the priority as p = 1/r where r is the number of remaining days for that guest in your hotel. In this way, every day you give away your n passes to the n customers who have fewer days to stay at your hotel (if a customer has just 1 more day to stay, she/he must have the highest priority in getting the pass, because there just one possibility). If you have several customers with equal p then you choose among them by looking at the total number of days that they stay at your hotel, and you favour those customers staying longer.

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

Sidebar

Related Questions

Hey, I've got a bit of a problem right now trying to figure out
If you have round robin scheduling enabled in VxWorks, and you use taskLock() to
I have a program that solves the weighted interval scheduling problem using dynamic programming
I have a scheduling problem where new jobs (sets of tasks whose execution is
I have this problem of scheduling tasks. Each task has a suggested start time
We have a scheduling engine with large amounts of test data to test all
I have a resource scheduling issue in Java where things need to be sequenced,
Simple question, I think. I have org.springframework.scheduling.quartz.CronTriggerBean triggering one job once a day. Because
I have a question in scheduling jobs in web application. If we have to
I have a FogBugz question regarding EBS (Evidence Based Scheduling)... Developer A estimates Case

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.