Matrix reduction using the Hungarian method for the generation of school timetables