JSFiddle - React, Tailwind, and code Playground

HTML

<div id="junk">
</div>

CSS

#junk {white-space: pre;}

JavaScript

const elems = { riz: 2.3, patate: 1.2, lentille: 3, tomate: 2.4, coca: 1.5 }
// const A = Object.entries(elems).map(([k, v]) => ({ k, v })).sort((a, b) => a.v - b.v)
const A = '0'.repeat(50).split('').map((x, i) => ({ k: `k${i}`, v: 1 + Math.random() }))
const MAX = 5.4
const MIN = 4.6


// i: index of the last element added to the group
// s: group sum
const g0 = [{ i: -1, s:0 }]
const gs = [g0]
while (gs.at(-1).length && gs.at(-1).length < 3e6) {
  const gn = gs.at(-1)
  const gnp = []
  gn.forEach(group => {

    for (let i = group.i + 1; i < A.length; ++i) {
      const s = group.s + A[i].v;
      if (s < MAX) {
        gnp.push({ s, i, el: A[i], from: group })
      }
    }
  })
  gs.push(gnp)
}

const toString = (g, recSymbol) => {
  if (!g || !g.el) return ''
  if (recSymbol) return `${recSymbol} ${g.el.k} (${g.el.v}) ${toString(g.from, '+')}`
  return `${g.s} ${toString(g, '<=')}`
}
const solutions = gs.flatMap(g => g).filter(x => x.s > MIN).sort((a, b) => b.s - a.s)
const div = document.getElementById('junk')
div.innerHTML = solutions.map(g => toString(g)).join('\n')