4 ms·
It sounds like the actual unique number is only 6 digits long and chosen by the manufacturer, so it could either be a mistake or identical randomly generated nu
by ortusdux 4y ago
It sounds like the actual unique number is only 6 digits long and chosen by the manufacturer, so it could either be a mistake or identical randomly generated numbers. My math is a bit rusty - how you you solve the birthday problem for 1mil instead of 365?
https://containertech.com/articles/shipping-container-numbers-and-markings-explained https://containertech.com/articles/shipping-container-number...
https://en.wikipedia.org/wiki/Birthday_problem https://en.wikipedia.org/wiki/Birthday_problem
- mlyle 4y agoCheap approximation is square root.
- woodruffw 4y agoYep, and it's pretty close in this case: for a 50% chance, a sample of 1178 containers with 6-digit numbers (assuming a uniform distribution) would suffice.
- gruez 4y agoUsing the formula on wikipedia and checking random numbers it looks like the number required for 50% chance of collision is around 1200. https://www.wolframalpha.com/input?i=1-%28999999%2F1000000%29%5E%28Binomial%5B50%2C2%5D%29 https://www.wolframalpha.com/input?i=1-%28999999%2F1000000%2... https://en.wikipedia.org/wiki/Birthday_problem#A_simple_exponentiation https://en.wikipedia.org/wiki/Birthday_problem#A_simple_expo...
- vecter 4y agoI think you meant to link to 1-(999999/1e6)^(1178 choose 2) [0] [0] https://www.wolframalpha.com/input?i=1-%28999999%2F1000000%29%5E%28Binomial%5B1178%2C2%5D%29 https://www.wolframalpha.com/input?i=1-%28999999%2F1000000%2...
- deleted 4y ago[deleted]
- kgermino 4y agoIt’s worth noting the full number isn’t just the six digits (plus checksum) but the full number including the letters that indicate owner and type, so a single owner wouldn’t give two of their containers the same number. That said, how many containers is one company likely to own? 1,000,000 is a big number but it seems like some of the big logistics companies could flirt with that. Doors anyone know if they have multiple “owner codes” or an I just way overriding the scale here?
- throw0101a 4y ago> Doors anyone know if they have multiple “owner codes” or an I just way overriding the scale here? Like IEEE OUIs, one company can have multiple owner prefixes. Maersk has 41: * https://www.bic-code.org/bic-company-search/?searchterm=MAERSK https://www.bic-code.org/bic-company-search/?searchterm=MAER... * https://en.wikipedia.org/wiki/ISO_6346 https://en.wikipedia.org/wiki/ISO_6346
- wolpoli 4y agoRight. So what happens when we face container number exhaustion and we found out that some C developers have been using char id[12]?
- SV_BubbleTime 4y agoI suspect they’ll move to Container.v6 and that everyone will dislike because the values are harder to read to say… then the industry will take an additional decade or two to actually start to use it.
- jhugo 4y agoIt's a mistake. They keep track of numbers they've already used, but in this case failed to do so properly.
- jfim 4y ago1178. This is actually part of the base stats package in R: > qbirthday(prob = 0.5, classes = 1000000, coincident = 2) 1178 See https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/birthday https://www.rdocumentation.org/packages/stats/versions/3.6.2...
- emmelaich 4y agoHere's the derivation of a formula by Matt Might https://matt.might.net/articles/counting-hash-collisions/ https://matt.might.net/articles/counting-hash-collisions/
- amenghra 4y agoYou can approximate the birthday paradox by taking the square root. So 1mil gives you ~1000. 365 is ~19 (the actual value is 23).