#combinatorics
2 APIs met deze tag
Lottery Odds API
Lottery combinatorics as an API, computed locally and deterministically and exactly — the real odds behind a ticket, the maths the jackpot poster never shows. The odds endpoint gives the jackpot odds of a pick-N game as the number of possible tickets, C(pool, picks), times the bonus-ball pool if there is one: a 6/49 game is 1 in 13,983,816, a 5/69-plus-1/26 Powerball-style game is 1 in 292,201,338, and every single line is equally unlikely. The match-odds endpoint gives the chance of matching exactly k of the main numbers — a prize tier — from the hypergeometric formula C(picks, k)·C(pool−picks, picks−k) ÷ C(pool, picks), so matching 3 of 6 in a 6/49 game is about 1 in 57. The expected-value endpoint turns a jackpot and ticket price into the expected value and the break-even jackpot (price × the odds), the threshold a jackpot must clear before a ticket is even theoretically worth it — before a shared jackpot, lump-sum and tax pull it back under. Everything is computed locally and deterministically, so it is instant and exact. Ideal for lottery and odds apps, gambling-education and responsible-play tools, probability teaching, and game back-ends. Pure local computation — no key, no third-party service, instant. Exact combinatorics. Live, nothing stored. 3 compute endpoints. Educational — not gambling advice; the odds are always against you.
api.oanor.com/lottery-api
Combinatorics API
Combinatorics wiskunde als een API, lokaal en deterministisch berekend met exacte willekeurig-precisie gehele getallen. Het faculteitseindpunt berekent n! = 1·2·3···n (met 0! = 1) en geeft het exact terug als een string samen met het aantal cijfers, zodat zelfs zeer grote faculteiten nauwkeurig blijven. Het permutatie-eindpunt telt geordende rangschikkingen: zonder herhaling nPr = n!/(n−r)! rangschikkingen van r items gekozen uit n, en met herhaling n^r, waarbij elk van de r posities elk van de n items kan zijn. Het combinatie-eindpunt telt ongeordende selecties: zonder herhaling de binomiaalcoëfficiënt nCr = n!/(r!·(n−r)!), en met herhaling (multiset) C(n+r−1, r), waarbij herhalingen zijn toegestaan. Alle resultaten worden berekend met BigInt, dus ze zijn exact ongeacht hoe groot, teruggegeven als een string met het aantal cijfers en een drijvende-komma benadering wanneer het past. n en r zijn niet-negatieve gehele getallen tot 100000. Alles wordt lokaal en deterministisch berekend, dus het is onmiddellijk en privé. Ideaal voor ontwikkelaars van apps voor kansrekening, statistiek, loterij, game-ontwerp, cryptografie en onderwijs, tel- en oddstools, en discrete-wiskunde onderwijs. Zuivere lokale berekening — geen sleutel, geen externe dienst, onmiddellijk. Live, niets opgeslagen. 3 eindpunten. Dit is telcombinatoriek; voor modulair rekenen gebruik een modulaire API en voor beschrijvende statistiek een statistiek-API.
api.oanor.com/combinatorics-api