caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@etu.upmc.fr>
To: caml-list@inria.fr
Cc: damien.guichard@wanadoo.fr
Subject: Re: [Caml-list] Problème_de_l'achat_par_lots
Date: Sun, 31 Jul 2005 17:21:22 +0200 (DST)	[thread overview]
Message-ID: <Pine.A41.4.44.0507311702350.1478660-100000@ibm1> (raw)
In-Reply-To: <004101c595d6$1b49f9a0$d45efea9@compaqm700>

    Bonjour,

> Cepandant j'ai choisi la méthode du "backpack problem" (problème du
> sac-à-dos), bien plus facile à implémenter, et j'en ai fait un
> exercice visible sur http://www.ocaml-tutorial.org.

Traditionnellement, on dit plutôt knapsack (problème du sac à dos),
c'est la terminologie adoptée par les ouvrages de référence :
- Knapsack problems. Martello et Toth 1990
- Knapsack problems. Kellerer, Pferschy et Pisinger 2003

Les problèmes de packing et de covering sont symétriques : dans le
premier cas on maximise le coût sans dépasser la borne (sac à dos),
dans l'autre on minimise le coût sans passer en dessous de la borne
(set-cover).

Votre problème est proche des deux classes sans s'y mouler vraiment.

Cela dit, pour résoudre le problème de sac à dos il y a (encore et
toujours) 3 méthodes :
- programmation linéaire en nombres entiers
- énumération implicite
- programmation dynamique

Je n'avais pas cité la dernière dans mon courrier précèdent car je ne
sais pas si elle est appliquable à votre problème spécifique.

Notez également que subset-sum problem pour lequel j'ai fourni du code
Caml est un cas particulier de knapsack.

> voir ici l'énoncé de l'exercice et la solution à l'aide de la
> méthode du sac-à-dos:
>
> http://www.ocaml-tutorial.org/implement_an_inventory_facility
>

Je n'ai pas trouvé de code Caml.

La page que vous pointez dans l'exercice est très intéressante :
l'auteur dit qu'utiliser une méthode d'énumération implicite est trop
lourd pour le problème de sac à dos, il propose donc une méthode ...
d'énumération implicite.


        Diego Olivier


  reply	other threads:[~2005-07-31 15:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-31 11:46 Problème_de_l'achat_par_lots Diego Olivier Fernandez Pons
2005-07-31 13:45 ` [Caml-list] Problème_de_l'achat_par_lots Damien Guichard
2005-07-31 15:21   ` Diego Olivier Fernandez Pons [this message]
2005-07-31 17:26     ` alphablock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.A41.4.44.0507311702350.1478660-100000@ibm1 \
    --to=diego.fernandez_pons@etu.upmc.fr \
    --cc=caml-list@inria.fr \
    --cc=damien.guichard@wanadoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).