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

  • Home
  • SEARCH
  • 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 59139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:57:30+00:00 2026-05-10T17:57:30+00:00

This is a problem I’ve had on my mind for a long time. Being

  • 0

This is a problem I’ve had on my mind for a long time. Being the son of a teacher and a programmer, it occurred to me early on… but I still haven’t found a solution for it.

So this is the problem. One needs to create a time schedule for a school, using some constraints. These are generally divided in two categories:

Sanity Checks

  • A teacher cannot teach two classes at the same time
  • A student cannot follow two lessons at the same time
  • Some teachers must have at least one day off during the week
  • All the days of the week should be covered by the time table
  • Subject X must have exactly so-and-so hours each week
  • …

Preferences

  • Each teacher’s schedule should be as compact as possible (i.e. the teacher should work all hours for the day in a row with no pauses if possible)
  • Teachers that have days off should be able to express a preference on which day
  • Teachers that work part-time should be able to express a preference whether to work in the beginning or the end of the school day.
  • …

Now, after a few years of not finding a solution (and learning a thing or two in the meanwhile…), I realized that this smells like a NP-hard problem.

Is it proven as NP-hard?

Does anyone have an idea on how to crack this thing?

Looking at this question made me think about this problem, and whether genetic algorithms would be usable in this case. However it would be pretty hard to mutate possibilities while maintaining the sanity check rules. Also it’s not clear to me how to distinguish incompatible requirements.


A small addendum to better specify the problem. This is applied to Italian school style classrooms where all students are associated in different classes (for example: year 1 section A) and the teachers move between classes. All students of the same class have the same schedule, and have no choice over which lessons to attend.

  • 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. 2026-05-10T17:57:31+00:00Added an answer on May 10, 2026 at 5:57 pm

    I am one of the developer that works on the scheduler part of a student information system. During our original approach of the scheduling problem, we researched genetic algorithms to solve constraint satisfaction problems, and even though we were successful initially, we realized that there was a less complicated solution to the problem (after attending a school scheduling workshop)

    Our current implementation works great, and uses brute force with smart heuristics to get a valid schedule in a short amount of time. The master schedule (assignment of the classes to the teachers) is first built, taking in consideration all the constraints that each teacher has while minimizing the possibility of conflicts for the students (based of their course requests). The students are then scheduled in the classes using the same method.

    Doing this allows you to have the machine build a master schedule first, and then have a human tweak it if needed.

    The scheduler current implementation is written in perl, but other options we visited early on were Prolog and CLIPS (expert system)

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

Sidebar

Ask A Question

Stats

  • Questions 91k
  • Answers 91k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Some basic things about the design; you should make sure… May 11, 2026 at 6:16 pm
  • Editorial Team
    Editorial Team added an answer Apple had a windows download for safari, but it's long-gone.… May 11, 2026 at 6:16 pm
  • Editorial Team
    Editorial Team added an answer Yes, an "AFTER UPDATE" trigger on that particular table and… May 11, 2026 at 6:16 pm

Related Questions

I am currently running into a problem where an element is coming back from
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
This is a problem I've had on my mind for a long time. Being
This is a problem I'm sure is easy to fix, but I've been banging
So, this is problem a stupid mistake, but I've been hacking away at it

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.