top | item 43285989

(no title)

slazaro | 1 year ago

Given that you just care about 4 digit codes (so you don't actually care about a generic algorithm that's not super slow in asymptotic time), can't you just solve it with an easy to code bruteforce algorithm? Or is the combinatorial explosion so big that it's actually intractable that way?

discuss

order

dumbfounder|1 year ago

Think about this. You need to calculate the number of permutation for 4 digit codes. Then you need to arrange them in every order possible to brute force. So that’s 4!!. That’s a lot: roughly 620000000000000000000000 combos.

somenameforme|1 year ago

If you're not making some joke that I'm missing it's just 10^4 = 10000, which is a just a fancier way of saying 0000-9999.

genewitch|1 year ago

Or it's 10000?