mrdot on Nostr: #asknostr #programming #sets I have a set of tuples (A, B). I want to find the subset ...
#asknostr #programming #sets
I have a set of tuples (A, B).
I want to find the subset for which
- there is no other subset with a higher total sum of A and
- for which the average amount of B is above a threshold X.
What algorithm can I use here?
Published at
2024-04-25 17:37:34Event JSON
{
"id": "5eb044937f2ea5644e00d728351633e732062f8538583b84d16de48a9adedaf6",
"pubkey": "4b0fed68f7f8767a054dd8bf57fed1feb76b9e645a976f0668dc97cfdc81a9b2",
"created_at": 1714066654,
"kind": 1,
"tags": [],
"content": "#asknostr #programming #sets\nI have a set of tuples (A, B).\nI want to find the subset for which\n- there is no other subset with a higher total sum of A and\n- for which the average amount of B is above a threshold X.\n\nWhat algorithm can I use here?",
"sig": "d1374b9b2a60ae7cdc42357233a87004e4f4223b586f1ecfb2857a83859376bf413dab8b33edf16458a425388cc3e3fdbc492a8159802c36d2d5338c499f0500"
}