How long does it take to calculate all (the best) timetable?

Started by Volker Dirr, October 07, 2015, 02:10:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Volker Dirr

Lets say you have got a medium school with only 6 years. Each year has got 4 classes. The week has got 5 day and each day has got 6 hours.
So a week has got 5*6=30 time slots.
That school will have around school 6*4*30=720 activities.

So there are overall 30^720 = 3,36*10^1063 combinations for the activities.

How long does it take to calculate them?
Lets say your CPU has got 10 GHz. So it might max calculate 10^9 combinations per second. (I know 10 GHz is unrealistic today and calculating one table per step is also unrealistic. A realistic value today is around 10000 only.)
So in best case you need only 3,36*10^1054 seconds.

Lets say you CPU has got 10 cores. (I know, unrealistic today)
So you only need 3,36*10^1053 seconds.

Lets say you have got a super grid with 10000 computers. (Even TOP 500 computers haven't got that today)
So you need only 3,36*10^1049 seconds.

Lets say each computer has got also a video-card that support calculating with 10000 shaders. (Also unrealistic today)
So you need only 3,36*10^1045 seconds.

Lets say CPU and GPU can you a super hyper threading technique (unrealistic today) with improve speed another 10 times.
So you need only 3,36*10^1044 seconds.
That are around 10^1037 years.

Hmm... Just for comparison:
The earth is maybe around 4,6*10^9 years old.
The big bang was around 13,8*10^9 years ago.

So, if you started calculating with the Big Bang, then you already solved 0.000000000... % of all combinations. (I am to lazy to write all the other 0 digits.)

Benahmed Abdelkrim

#1
  Oh...! combinations that tend to infinity almost! Fortunately there are constraints that limit, and make them feasible by computer; unbreakable basic constraints for combinations impossible. and constraints preferred by the user...
B.A/krim

Volker Dirr

i fear you are a bit wrong here. FET place the activity even at "unbreakable basic constraints" or at "constraints (not) preffered times", but it see of course pretty quick that it is impossible and so it doesn't need to check the other constraints and can go on checking an other time slot; but it check at least one "constraint". that take time. so i cared about that in my calculation already. realistic average value is maybe around 10000 checks per second, but i calculated with 1000000000, even that is unrealistic today.
i fear it doesn't give speed improvements if we skip those times, since it mean we need to read those times from the RAM and randomly choose one of the allowed times. that need (nearly similar) the same time. And it also need much more RAM, so i fear as soon as the data doesn't fit anymore into the CPU cache size, the algorithm will slow down pretty much.
So even with such a more clever choose of time slots my calculation is "correct" / much to optimistic.