Prisma · coverage-maximizing combinatorial optimization.

A combinatorial-optimization engine built on a companion paper co-authored with Victor Hugo Nascimento (FGV): for a budget of N tickets, it computes the portfolio that maximizes coverage under a chosen prize structure. Applied here to Brazilian lotteries — Lotofácil, Mega-Sena, Quina, Lotomania, Dupla Sena, and Dia de Sorte — where independently drawn random tickets are a provably worse use of the same budget than a portfolio chosen to minimize overlap.

Coverage maximization, made into a tool.

The method comes from a companion paper, "Coverage Maximization and Overlap Minimization for Multi-Ticket Lottery Selection," co-authored with Victor Hugo Nascimento (FGV School of Applied Mathematics). For a lottery of the form "pick k numbers out of a universe of v; win by matching at least t of the d drawn," a random independent-ticket baseline gives a win probability of 1 − (1 − p)ⁿ for n tickets. Prisma's portfolio beats that baseline by construction: it selects tickets that are deliberately anti-correlated, so the same budget covers more of the number space.

The pipeline runs in three stages, entirely inside a Web Worker: a greedy max-coverage selection (with the classical 1 − 1/e approximation guarantee, Nemhauser et al. 1978) builds an initial ticket pool; simulated annealing refines it by minimizing total pairwise overlap Σ|Aᵢ∩Aⱼ|; a Monte Carlo simulation then estimates the resulting P(≥t) directly, rather than trusting a closed-form approximation.

No backend, no account, no data collection — the optimizer, the simulation, and the number crunching all happen client-side.

Type
Web app · client-side
100% in the browser — pool generation, annealing, and Monte Carlo all run in a Web Worker.
Method
Greedy + SA + Monte Carlo
Max-coverage selection, overlap-minimizing annealing, and simulated win-probability estimation.
Paper
Co-authored
With Victor Hugo Nascimento (FGV School of Applied Mathematics) — theory, algorithms, and empirical validation.
License
Open source
Source and the paper's replication package on GitHub.

What Prisma does

Stack

Frontend

React · TypeScript · Vite

Computation

Web Worker · greedy + simulated annealing · Monte Carlo

Identity & deploy

oklch color tokens · Newsreader + IBM Plex Sans · Vercel

View on GitHub ↗

Prisma is an independent tool, with no affiliation to Caixa. A lottery has negative expected value by construction: the optimizer distributes the risk of a fixed budget better across tickets — it does not predict draws or change the underlying odds. For adults only.