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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:45:39+00:00 2026-06-10T14:45:39+00:00

Everyone is familiar with the schedule problem in Computer Science. I am not asking

  • 0

Everyone is familiar with the schedule problem in Computer Science.
I am not asking for an algorithm for this problem.

I just want to create my personal schedule for a semester at school

Here’s what you can assume:

  • Someone at my university already created classes, assigned teachers, rooms, etc. Thus, classes are already there, ready to be selected.
  • Only a relatively small portion of classes are availible to me. Say 25 classes.
  • I have to take 5 classes per semester (it could be more or less but let’s keep this simple)

    All I want is some hints/clues as to how to create valid schedules and more importantly, optimal schedules.
    Come to think of it, what would be an optimal schedule?
    In my personal case, these classes are from 2 different faculties but I have been able to create a csv file that contains information like this:

    M               
    16:35:00    17:25:00    PHIL    375 Existentialism.
    14:35:00    15:55:00    COMP    350 Numerical Computing.
    14:35:00    15:55:00    COMP    208 Computers in Engineering.
    14:35:00    15:25:00    PHIL    306 Philosophy of Mind.
    14:35:00    15:25:00    PHIL    200 Introduction to Philosophy 
    ..etc
    

    as you can see, everything is sorted by starting time (inverted) but there are conflicts. Same for all the other days of the week.
    How can I create valid/optimal schedules? What things should I consider?

    More information:

    This is what I thought initially for things I should consider:

  • One priority for me would be to have classes as late as possible. So I would pick the 3 latest possible classes for Monday, wednesday and friday and 2 classes for Tuesday, Thursday. [see the comments for how I think I could implement this]
  • Another solution would be to get the least amount of ‘breaks’ in-between classes (or the opposite)
  • Another would be the earliest classes possible
  • Another priority would be getting all classes for 1 faculty in the same day and yet another one alternating 1 class for faculty A then 1 for faculty B,etc.
    Missing something?

    • 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-10T14:45:40+00:00Added an answer on June 10, 2026 at 2:45 pm

      For this scale – I wouldn’t try too hard to avoid the simple to program brute-force solution.

      There are 25!/(20!*5!)=53130 different possibilities to chose 5 courses from a list of 25. By simply checking all of them, and getting the best – an optimal solution is guaranteed. The run time for this scale is also not a problem for any modern machine.

      A backtracking solution is simple enough – “guess” a course to add, invoke recursively until you have a list full, evaluate the solution. When you are back from the recursion – check a different possibility to chose a course.

      Pseudo code:

      best = 0
      bestSol = nil
      findCalendar(courses,candidate,i):
        if (take.size() == 5):
            t = evaluate(candidate)
            if (t > best):
                best = t
                bestSol = copy(candidate)
            return
        else if (i == courses.size()):
            //another stop clause, for non-feasible solutions (less then 5 were selected)
            return 
        for each j in range(i,courses.size()):
            candidate.add(courses[j]) //add this course to the candidate
            fidnCalendar(courses,candidate,j+1) //recurse to find the next courses for this candidate
            candidate.removeLast() //cklean up environment before next candidates
      

      invoke with findCalendar(myCourses,[],0), when the algorithm is done – bestSol will hold the best calendar, and its value will be best

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

    Sidebar

    Related Questions

    Everyone is familiar with this functionality. If you open up the the outlook address
    Hey everyone... I'm not too familiar with PHP... but I have PHP code that
    Afternoon everyone. I'm not that familiar with SQLite so I haven't messed with all
    everyone. This is a piece of code from using sqlite in android tutorial: return
    everyone. I'm just starting with django, so sorry for a possibly stupid question. Imagine,
    everyone! new to here and been pondering about this myself for some times with
    You may be familiar with Paul Graham's essay, Maker's Schedule, Manager's Schedule . The
    I assume everyone here is familiar with the adage that all text files should
    I want to read 4GB file & create a copy of it by making
    For those of you familiar with the Microsoft Sync Framework, this question is for

    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.