Live data from Hacker News

My Mathematical Regression

blog.dahl.dev

111–120 of 159 posts

Re: My Mathematical Regression

#111
post #93

I appreciate where the author is coming from, as we often have much more context because of training that have since atrophied a bit, but in defense of the dynamic programming solution, this generalizes very well. As stated, the choose(2n,n) solution of course works but as soon as you deviate from a square, things can get more complicated. What if it's a rectangle? An arbitrary shape? One with holes? The dynamic prog…

The rectangle case is just choose(w+h, h), with w, h being the width and height, respectively. (Or choose(w+h, w), which is the same.)

Depending on how well you know binomial coefficients, this can also lead you to the dynamic programming solution. After all, for the rectangle case this is nothing but construction of Pascal's triangle by summing two adjacent numbers in a row to get the number below them. If you recognize this, the solution for paths on grids with holes falls out almost immediately.

Re: My Mathematical Regression

#112
post #3

An intuitive motivation for the solution in the article (2n choose n). For an n*n grid you have to you will take 2n steps, n "over" and n "down". All that matters is the order of the steps. So if you think of there being 2n "slots", you have to pick n to be "over", and the rest are forced to be "down". So it's n choose 2n indeed. You can also think of it another way, without using the formula combinations, and only t…

or just rotate it by 45 degrees and pretend it's a pascal's triangle.

Re: My Mathematical Regression

#113
post #85
post #7

I think one of the saddest thing is that the kind of person who would recognize, "we can solve this seemingly complicated problem by just applying this formula", would often have trouble even getting recognized in many corporate environments. I managed a guy like that. He was capable of very complex thinking, but he wasn't in love with complexity, he was in love with simplicity. His solutions tended to be of the form…

>> He eventually got bored. He retired and joined a seminary. Wow, got bored and joined a seminary - Do you know how does he feel there? A genuine question - Did he expect to get excited and challenged in a seminary?

well, they are known for being places to discuss theology all day. Theology isnt that far from philosophy, it's certainly interesting enough to talk about

Re: My Mathematical Regression

#114
post #85
post #7

I think one of the saddest thing is that the kind of person who would recognize, "we can solve this seemingly complicated problem by just applying this formula", would often have trouble even getting recognized in many corporate environments. I managed a guy like that. He was capable of very complex thinking, but he wasn't in love with complexity, he was in love with simplicity. His solutions tended to be of the form…

>> He eventually got bored. He retired and joined a seminary. Wow, got bored and joined a seminary - Do you know how does he feel there? A genuine question - Did he expect to get excited and challenged in a seminary?

[dead]

Re: My Mathematical Regression

#116

Earlier quoted context omitted.

If you have performance based metrics about your AI usage then you are essentially being forced to use AI (or become unemployed) Plenty of people are experiencing this nowadays The idea that no one is being forced to use AI is nonsense

That was in the first calendar quarter this year. In the second calendar quarter CEOs started saying AI is too fucking expensive and let's stop doing it.

maybe your C suite. ours just joined the hype train. We got an email a few weeks ago saying all new code must be ai generated by 2027 and introducing internal metrics for ai usage by team

Re: My Mathematical Regression

#117
post #71

Earlier quoted context omitted.

If you have performance based metrics about your AI usage then you are essentially being forced to use AI (or become unemployed) Plenty of people are experiencing this nowadays The idea that no one is being forced to use AI is nonsense

I'm becoming convinced that mandatory AI use is a humiliation ritual, akin to neighboring tribes forcing Hebrews to eat pork.

[dead]

Re: My Mathematical Regression

#118
The way the problem was solved at first hand by just "recognizing the pattern of (2n) choose n" wouldn't satisfy me at all, where's the proof ? Why does it work ? This isn't maths, this is "pattern recognition".

Re: My Mathematical Regression

#119
post #33

I was sad in a different way. I immediately realized that this could be solved by dynamic programming by computing the recurrence F(x,y)=F(x-1,y)+F(x,y-1) with the base case F(0,0)=1 and F(x,y)=0 if x I feel sad because I had forgotten the simple and intuitive construction of choosing “go down” and “go right” directions. When a person learns more advanced mathematics, it is often the case that the person just applies…

There is nothing wrong in using generating functions. A very handy and powerful tool. I wish I was better at it than I am.

It is a common experience in mathematical problem solving that the first solution leads to more insight which illuminates a shorter slap-my-forehead solution -- bruised forehead.

Post reply on HN