My flailing around has yielded a proper solution t...
# advent-of-code
t
My flailing around has yielded a proper solution to the example on step 2, but not for the actual, and I just think maybe I don't get it.
r
Maybe you've forgotten to add 60 to length of each job.
and check workers: 5 instead of 2
t
It's not a numbers thing. I just flat out don't understand the problem.
Like, why does C only have one person working on it? Arent' there five workers? Why are there two columns to represent five workers?
This sucks because my example works, but I don't feel I understand it. And the real one doesn't and its so complicated I just don't know what I'm doing wrong at all.
I'm going to take a shower.
That always helps.
a
I am thinking of Part2 as if you have a Pool of Workers (i.e 5) with a queue of items that are waiting to be processed. The item only becomes available to be processed when all parent items have been processed. Took a while for me to get a solution though.
r
In example they have 2 workers only and as a result 2 columns. And there is only one worker per job.
a
It's a shame that the Example they gave didn't have a delay on the items, it could have been much clearer.
t
I think my issue is that the whole grid didn't make any sense until I walked away from it. There's a column for me, that's hidden, who is always working on something, it's just not clear what.
C, presumably, and then F I guess.
That means I was thinking about time wrong, it's not time, its units of work. I think.
r
Yes. Each letter is separate unit of work which is done by 1 worker only.
t
I don't get that. Why are they showing two and talking about five then?
I feel so dumb. Everybody else gets this and I just can't figure out how the words relate to the picture. At all.
r
In example they have 2 workers. In "real life" you have 5.
t
Oh.
Reading comprehension issue.
So even if I have two workers, I can only put them on one thing each and magically the time goes down somehow? I don't understand why there was a big setup for how to calculate the time.
a
Don't know if it helps to think of Part 2 as a Gantt Chart. Each letter is a task which may not start until previous tasks are complete. Duration of task is determined by the letter
t
Oh, I get the dependencies, I just don't get how work is assigned.
I think I get it, let me try with 2 workers.
a
My solution works for my dataset but not 100% sure it would always give correct answer.
t
I feel like I'm close on the example (some off by one error somewhere), but the actual one shows an even lower answer than the already "too low" answer.
Yeah, I just don't get this.
I'm going to have to punt on today, I have to get work done and fly home. That sucks. Super disappointed about this.
I just do not understand how these things line up.
a
Sleep on it & approach it again when you've got time. Was your talk in Austin recorded?
t
Yeah, it should be up next week. It's a super basic intro, you won't learn anything you don't already know! 🙂
I feel like I'm close. I get the idea now, and my example input looks exactly right. However, the real input is being done too quickly with 5 workers.
OH!
Magic step logic is for the demo only. Sonofa...
a
Part 2's example sucks today.
t
Wow, finally got it.
I need to learn how to read.
And get some sleep. I haven't been sleeping, that doesn't help. Good thing I only work with other people's money all day.
😄 2
a
👍
l
Yeah, I am usually also struggling with the description of the puzzle itself 🙂. One really needs to follow the instructions exactly as they present it ... because mostly their algorithms are so (intentionally) twisted, that for a common sense it's almost impossible to figure out.
s
Well done @todd.ginsberg, AoC example-parsing is sometimes the hardest part!
w
i got messed up a bit in part 1, b/c i was marking all eligible tasks as complete (in alpha order) and then finding more eligible tasks, but you have to mark just the first, and then recalculate eligible tasks, and resort
haven't done part 2 yet though