3,803 karma · joined Mar 21, 2015 (11y ago) · 1,705 submissions
comment 3y ago · link · parent
I think what's actually happening here is that they're doing the intersection on the DFAs and then producing a regex from the resulting DFA. The construction of a regex from a DFA is where things get ugly and weird.
comment 3y ago · link · parent
To have sub-constant time it would have to go to 0 as n increases, as otherwise we could bound the time below by a constant. This isn't possible, as a computer will take at least 1 time unit on every input. So the expected time will always be at least 1.
comment 3y ago · link · parent
it's not possible for it to behave differently as n increases because it doesn't have enough time to distinguish between different values of n once it's large enough.
comment 3y ago · link · parent
You can approximate the runtime with a function that decreases forever, but the actual runtime will be constant for large enough n.
comment 3y ago · link · parent
That's the sort of thing I would usually say to explain why we do things like use asymptomatic analysis and ignore polynomial factors. If you have a different solution, that's great, but you're no longer taking about the kind of runtime the article is about.
comment 3y ago · link · parent
Of course, showing a constant upper-bound doesn't tell us that it isn't even faster than constant as in the proposition I was responding to. That's why I focused on the constant lower-bound.
comment 3y ago · link · parent
All algorithms have a lower-bound on runtime of 1. If a sequence is decreasing and bounded below, it converges to a value [1]. If the sequence is discrete, that means it reaches exactly that limit and never deviates from it.
[1] https://en.wikipedia.org/wiki/Monotone_convergence_theorem
comment 3y ago · link · parent
It's actually impossible to construct an algorithm that has its runtime decrease as the input size grows. You can do this for finitely many examples, but we're talking about asymptotics here. With discrete run-times and a lower-bound of 1 operation, the run-time will have to stop decreasing at some point and just stay at the same constant value for all but finitely-many exceptions. This makes it a constant-time algorithm.
A constant run-time is a counter-example to that caption though, as the problem doesn't take longer as the input grows. An example would be checking if a number is divisible by 2. You only need to check 1 bit, so it doesn't take any longer as you add more bits that the algorithm doesn't touch.
comment 3y ago · link · parent
I ran the same simulation as you. After 100 iterations, the richest one had $71. After another 1,000 iterations, the richest one had $78 (of a total $133). After another 10,000 iterations, the richest one had 10^-165 dollars. They were still an extreme outlier with 95% of the total wealth, but he had almost nothing.
comment 4y ago · link · parent
Joe Rogan being on Spotify is entirely about limiting the availability of his podcast. They're paying him to not make his episodes available outside of Spotify.