[Community Puzzle] Mrs. Knuth - Part I - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Timinator,validated by @Eulero314,@Rafarafa and @darkhorse64.
If you have any issues, feel free to ping them.

Hi,

Thank you @Timinator, great job and certainly multiple hours spent on that.
Really amazing when someone show so much willingness in sharing is experience !

This first puzzle is an introduction and is really nicely set to make the algorithm usable by a wide part of the coders, I’ll keep on track for the next puzzle of your playground!

1 Like

Just started on @Timinator\s playground, and I am extremely impressed. About a year ago I tried and failed to understand Algorithm X and exact cover problems, but now within two hours of playing on the playground I solved this one and it feels like I know what I am doing (with help of the solver of course). +2650 XP, here I come :partying_face:.

2 Likes

I think the text of the problem is not precise enough.
I understood that I have to compute minimum availability of the teacher per opened day, so if per example she is available on M 2 3 and in F 2 3 4 then one hour of Friday should NOT be filled to keep the requirement of “same number of lesson per day” but I was not able to imagine a requirement linked to an action that would cover that.

Finally I tried the straight forward approach “let’s fill all her opening and see what happens” and it was enough to clear all tests.

But anyway thanks for the playground, I’m playing with it with Dart at the moment, it is great.

Hmmm… So what you’re saying is I might need another constraint that says all of Mrs. Knuth’s available slots must be filled. Right?

Or, maybe it’s not a constraint. Maybe it’s just a clarifying statement in the goal.

The following constraint:

Mrs. Knuth will teach the same number of hours per day on each day she teaches.

has been replaced with:

teacherAvailability is guaranteed to contain the same number of hours on each teaching day.

Thank you for your feedback. When the current contest is over, I’d like to chat a bit more about your Dart solver.

Yeah I plan to make it available to everybody as it was done for Kotlin, but I’ll wait to be more advance in the playground and be sure of the implementation of the next features like Remember() and so on

In fact I would say:

teacherAvailability is guaranteed to contain the same number of hours on each teaching day, and each opened hour must be filled.

I think “each opened hour must be filled” need not be explicitly mentioned because it’s implied by another constraint:

numStudents = Mrs. Knuth’s available hours per week.

1 Like

ok yes !
this is the one I did not see :slight_smile:

Hi,
I really enjoyed solving this problem under your “playground” guidance. I’m impressed by the work you put here for us (and I’m only at the beginning), so thank you @Timinator :slight_smile: !

1 Like