Live data from Hacker News

My Mathematical Regression

blog.dahl.dev

61–70 of 159 posts

Re: My Mathematical Regression

#61

This is a pre-AI phenomena. I observe it quite a lot with stuff I did in high school but usually with complex problems. What's generally happening is that you were working with pen and paper through a hard problem. With adult brain, you'd expect just to know the answers, but in reality you're not much smarter than you were at 14, so you need to do the thing properly. Also if you help little kids with homework, you'll…

Yes, AI can write a solution, but cannot visualized a solution. When I was 9, I refused to learn my times tables, and addition, so I was relegated to work with blocks. I loved the blocks... I was able to complete all the problems, come up with my own, and return to class, with some extreme facility.

Two years later, comes a challenge in class... make a formula for summing the integers... well everyone started with 1+2+... I starred with blocks, 1+n, 2+n-1... I had the complete formula in minutes...

That was the very last class for which I was with my peers of that grade... I was put in a HP High Potential class, with a high school algebra book, and although was a bit lonely, was in my element.

The point is- the recognition of the problem, can save huge amounts of time, where as AI can only brute force it, or use a pretrained solution.

Re: My Mathematical Regression

#62

That Project Euler problem was my first encounter with memoization. At the time, it felt like a magical solution, so I ended up solving it using the central column of Pascal's triangle, which was easier for me to understand back then. I also tried a weird idea involving popcount, but it didn't scale. My approach was to represent each possible path with 0s (don't turn) and 1s (turn), testing the same number of 0s and…

The binomial coefficient is derived from Pascal’s triangle, which is a fact I remember but cannot explain, based on some hazy memories of 10th grade math class.

You can take the two variables to be outcomes of a binomial event:

- at zero events: we have one outcome, nothing

- at one event: we have two outcomes, 1X and 1Y

- at two events, each of those two outcomes have two outcomes, but one X and one Y outcome both become XY, so we have 1X^2 2XY 1Y^2.

You can continue combining this way, adding an X and Y to each term (for the two possible outcomes) — and then grouping like terms.

Re: My Mathematical Regression

#63
post #55

Earlier quoted context omitted.

A great many real world problems have, at their crux, a mathematical problem. A mathematician paired with a subject matter expert can be powerful indeed when each sees deeply into the others' blind spots. But, I've heard statements like yours a lot over the years: assuming mathematicians aren't fully aware of the limitations of what you think math is.

Its all a math problem, and if it isn't a math problem, its a database problem. I come across a lot of problems, and since I always try to reduce it to a math problem... I intuitively come up with both the solution to the problem, but solutions to other problems. But, if it's not a math problem, of course, its a database problem. I would safely assume that there are no limitations of what mathematicians can do, with…

Database problems are math problems too.

Re: My Mathematical Regression

#65
post #14

Earlier quoted context omitted.

What a lot of games do is run a strictly deterministic simulation in lockstep. Then you don't save the path of every unit, you save one move command for the whole group. Then the game replays inputs, and the pathing algorithm should give the same result if there are no desyncs.

Yes you are definitely onto something! Love to see more people talking about deterministic games. My game is strictly deterministic, so I get bot movement for free - but the player has agency so I need to capture their deviations That’s the tricky part! Right now I do capture input (actually just deviations) and can replay whole games, but I think I’m at the limits in terms of compression - talking bytes here not KB

How much did your clever approach save over a naive approach + file compression?

Re: My Mathematical Regression

#66
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…

It tells a lot about the state of software "engineering" if it's difficult to convince people of the value of the very best ones (the "lazy and smart officers" in the old story). No good engineer can ever be in love with complexity, that's like an automatic disqualification.

Re: My Mathematical Regression

#67
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…

This was one of my favorite Project Euler problems, but getting to the mathematical solution admittedly took me a couple of weeks.

Perhaps because I was pigeon-holing this as a programming optimization problem.

I wrote about it too! [0]

[0] https://nmn.gl/blog/vibe-coding-gambling

Re: My Mathematical Regression

#68

Earlier quoted context omitted.

If his monetary value to the company was as said why would any other metric like complexity even remotely matter or need convincing assuming the main goal of the company was to make money. Money would matter even more than the interpersonal stuff in most cases but on top of it even the managers treasured him so there should've been even less of an issue of communicating value. Getting bored is totally understandable…

> If his monetary value to the company was as said why would any other metric like complexity even remotely matter Here is why: I turned off a feature flag in our feature flagging service which saved company 10% infra cost, do you think I can be promoted to Staff+ and lead 50 engineers? Promotions and/or recognitions in corporate environments works differently. I don't agree with it, but this is how it works: If what…

Same with executives and upper management.

One cannot be a director/VP of 3 people. They need an empire…

Re: My Mathematical Regression

#70
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…

How is that sad? A disruptive competitor will come along and eat their lunch. Creative destruction is the natural order of things. Ideally the badly managed organization will eventually be liquidated, thus freeing up resources for more productive activities.
Post reply on HN