# recombination algorithm

## Question:

Imagine the following scenario: a gas station is fined for tax evasion for issuing an invoice for tax coupons already issued – what happens is that each vehicle of the companies associated with the station supplied fuel and at the end of the month the station issued an invoice along with the respective invoice.

The operation, however, went wrong for almost 2 years. There was no evasion under any circumstances, however, the tax coupon numbers were not referenced to the invoices.

We are talking about an immense mass of data, where we basically need a match for the amount of liters per type of fuel x value – for example: an invoice of R\$ 32,127.12 and 19,047.61 liters of diesel oil has to be " regrouped" with N tax coupons.

However, we have the following problems: fuel prices vary, as the invoice can be a combination of N pumps x N fiscal printers, that is, we are talking about a stratospheric mass of data.

However, knowing that we can limit the recombination "search" radius by date (last 30 days) – (which in sum data volume to trillions of combinations in this period), could we use some tree algorithm? Or some variant algorithm of the traveling salesman?