4 ms·
> All you had to know was that if you are trying to find some large number that is divisible by other prime numbers, the deltas between the candidates will be t
by gknoy 5y ago
> All you had to know was that if you are trying to find some large number that is divisible by other prime numbers, the deltas between the candidates will be the product of the numbers.
"All you have to know is .. {this magic}" -- that really reminds me of my freshman year math classes where the TAs would just say, "well if you do it THIS WAY..." (when my main question was how the heck you stumble upon looking at the problem that way, vs all the failed ways)
- solveit 5y ago> when my main question was how the heck you stumble upon looking at the problem that way, vs all the failed ways Well you stumble through half a dozen failed ways first, is the usual method. Eventually you gain "intuition" that lets you jump straight to the way that works and you can't explain exactly how you thought up the correct method, but it just feels so natural and anyway, you can explain in great detail why nothing else would work. I'm teaching calculus this year so I sympathise with both sides. The problem is that the answer to "how did you know to do it that way?" is experience, as in all fields. But students rarely have the time to accumulate experience and intuition before finals, so there's frustration all around. What I'm saying is I'm not looking forward to grading six hundred finals where many students will inevitably spend too much time on approaches that were obviously (to me) doomed from the start because they haven't stumbled enough to know it yet.
- justinsaccount 5y agoIt's not really magic though. Here's a simpler variation of the problem: Two buses make different circular routes from the same depot. One bus takes 3 hours to do a loop, the other takes 5. At what times from the start of the day will both buses be at the depot at the same time? you could write a loop like this: for t in range(0, 10000): if t % 3 == 0 and t % 5 == 0: print("same at", t) which if you run, you'd see: same at 0 same at 15 same at 30 same at 45 same at 60 same at 75 same at 90 and even if you knew nothing about math, you could see that and think, oh, so they just meet every 15, which happens to be 3 times 5... You don't need to count up one at a time and check remainders, you can just increment by 15 and get the exact same result.. for t in range(0, 10000, 15): print("same at", t) That's more or less what I did when I solved it.. saw how the problem simplified to finding the common multiples of numbers, which when they are prime is just the product. apply this process iteratively and you have the solution.
- maximus-decimus 5y agoit's funny to me how your problem is literally an applied fizz buzz. But then again people have a much harder time applying concept they know to given situations than if they're told directly to do something.