From: North Year <ny-ml@outlook.com>
To: Emanuel Berg <incal@dataswamp.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: problems of everyday life
Date: Wed, 16 Nov 2022 15:54:01 -0500 [thread overview]
Message-ID: <MW4PR14MB5327CDDBF73BAD5754BD0B8DE7079@MW4PR14MB5327.namprd14.prod.outlook.com> (raw)
In-Reply-To: <87r0y4w8hy.fsf@dataswamp.org>
Emanuel Berg <incal@dataswamp.org> writes:
> If you are to boil one egg for 5 minutes, the other for
> 7 minutes, and the third one for 10 minutes, how long time
> does it take to boil all three eggs?
>
> In Lisp, there are several ways to solve this, it can be
> put as
>
> (+ 5 7 10)
>
> or maybe
>
> (apply #’+ ’(5 7 10))
>
> or … well, what do you prefer?
This leads to a dynamic programming problem I guess.
x eggs to be boiled each of which need x_i times to be boiled.
y pots can be used to boil egges each of which has capacity to cook y_i eggs at one time.
Never tried to writing algorithm codes in elisp. This would be interesting.
next prev parent reply other threads:[~2022-11-16 20:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 15:19 problems of everyday life Emanuel Berg
2022-11-15 16:45 ` Heime
2022-11-15 16:46 ` Dmitry Gutov
2022-11-15 17:17 ` Heime
2022-11-16 12:02 ` Akib Azmain Turja
2022-11-15 18:38 ` tomas
2022-11-16 7:51 ` Juri Linkov
2022-11-16 12:10 ` Akib Azmain Turja
2022-11-16 20:39 ` Emanuel Berg
2022-11-17 3:04 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-11-17 4:56 ` Emanuel Berg
2022-11-17 5:48 ` tomas
2022-11-17 6:13 ` Yuri Khan
2022-11-17 6:25 ` Stefan Monnier
2022-11-16 14:31 ` Emanuel Berg
2022-11-16 14:54 ` Emanuel Berg
2022-11-16 16:14 ` Rudolf Adamkovič
2022-11-16 17:17 ` Emanuel Berg
2022-11-16 20:54 ` North Year [this message]
2022-11-16 21:06 ` Emanuel Berg
2022-11-16 21:30 ` Emanuel Berg
2022-11-16 21:38 ` Emanuel Berg
2022-11-17 6:33 ` Jean Louis
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=MW4PR14MB5327CDDBF73BAD5754BD0B8DE7079@MW4PR14MB5327.namprd14.prod.outlook.com \
--to=ny-ml@outlook.com \
--cc=help-gnu-emacs@gnu.org \
--cc=incal@dataswamp.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.