Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #116: the real ttys became pseudo ttys and vice-versa.


comp / comp.lang.lisp / Re: on distinguishing memoization and dynamic programming

SubjectAuthor
* on distinguishing memoization and dynamic programmingJulieta Shem
+* Re: on distinguishing memoization and dynamic programmingKaz Kylheku
|+- Re: on distinguishing memoization and dynamic programmingKaz Kylheku
|`* Re: on distinguishing memoization and dynamic programmingJulieta Shem
| `* Re: on distinguishing memoization and dynamic programmingKaz Kylheku
|  `- Re: on distinguishing memoization and dynamic programmingJulieta Shem
`* Re: on distinguishing memoization and dynamic programmingHenHanna
 `* Re: on distinguishing memoization and dynamic programmingJulieta Shem
  `- Re: on distinguishing memoization and dynamic programmingHenHanna

1
Subject: on distinguishing memoization and dynamic programming
From: Julieta Shem
Newsgroups: comp.lang.lisp, comp.programming
Followup: comp.programming
Organization: A noiseless patient Spider
Date: Wed, 3 Jan 2024 19:53 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jshem@yaxenu.org (Julieta Shem)
Newsgroups: comp.lang.lisp,comp.programming
Subject: on distinguishing memoization and dynamic programming
Followup-To: comp.programming
Date: Wed, 03 Jan 2024 16:53:40 -0300
Organization: A noiseless patient Spider
Lines: 3
Message-ID: <87frzembwb.fsf@yaxenu.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="75a951e1f41ca440471c166e12474bef";
logging-data="3484969"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/B2aJtEz8fWsMn+MfQwm+11fOELdTGWVE="
Cancel-Lock: sha1:5ukAx3O1HQ8OXoAS1YKiMfkAlbA=
sha1:lH37jdSJQjvZo6+8xUyH7ONjLRk=
View all headers

I was trying to distinguish memoization from dynamic programming --- in
a technical way --- and I failed. Can you write something like a
mathematical definition of each one?

Subject: Re: on distinguishing memoization and dynamic programming
From: Kaz Kylheku
Newsgroups: comp.lang.lisp, comp.programming
Organization: A noiseless patient Spider
Date: Wed, 3 Jan 2024 20:06 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-6894@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.lisp,comp.programming
Subject: Re: on distinguishing memoization and dynamic programming
Date: Wed, 3 Jan 2024 20:06:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <20240103120043.381@kylheku.com>
References: <87frzembwb.fsf@yaxenu.org>
Injection-Date: Wed, 3 Jan 2024 20:06:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="49317618d91c526c3ba41628504e44c8";
logging-data="3493421"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18oYgJ/EYXr8BNq3zEuMDKUnbJL8iFwtqU="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:CSjx2PKCl8YXTcnyqa9rBxiLfAo=
View all headers

On 2024-01-03, Julieta Shem <jshem@yaxenu.org> wrote:
> I was trying to distinguish memoization from dynamic programming --- in
> a technical way --- and I failed. Can you write something like a
> mathematical definition of each one?

Did you check Wikipedia?

https://en.wikipedia.org/wiki/Dynamic_programming

Dynamic programming is an "algorithmic paradigm" according to this page;
a nice term.

Memoization is a specific algorithmic trick, which is used in some
solutions that fall into the dynamic programming paradigm.
(It is used essentially, so that practically useful run-times
can be achieved: e.g. exponential time knocked down to polynomial.)

Dynamic programming breaks a larger problem into sub-problems which
can be solved separately and then integrated to solve the
larger problem.

Memoization helps when the recursion leads to overlapping subproblems
that lead to an exponential explosion if the duplication is not
identified and suppressed.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Subject: Re: on distinguishing memoization and dynamic programming
From: Kaz Kylheku
Newsgroups: comp.lang.lisp, comp.programming
Organization: A noiseless patient Spider
Date: Wed, 3 Jan 2024 20:16 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-6894@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.lisp,comp.programming
Subject: Re: on distinguishing memoization and dynamic programming
Date: Wed, 3 Jan 2024 20:16:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <20240103120937.909@kylheku.com>
References: <87frzembwb.fsf@yaxenu.org> <20240103120043.381@kylheku.com>
Injection-Date: Wed, 3 Jan 2024 20:16:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="49317618d91c526c3ba41628504e44c8";
logging-data="3497036"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GO7HmAnGRwZl8qaUK/KbDsXSgefFL9IQ="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:gPu0z21L5uLQCuAitouI2G0RT8M=
View all headers

On 2024-01-03, Kaz Kylheku <433-929-6894@kylheku.com> wrote:
> On 2024-01-03, Julieta Shem <jshem@yaxenu.org> wrote:
>> I was trying to distinguish memoization from dynamic programming --- in
>> a technical way --- and I failed. Can you write something like a
>> mathematical definition of each one?
>
> Did you check Wikipedia?
>
> https://en.wikipedia.org/wiki/Dynamic_programming
>
> Dynamic programming is an "algorithmic paradigm" according to this page;
> a nice term.

By the way, this "programming" does not refer to writing a computer
program, but to finding a solution that can be used to schedule
a program of events.

That there is a dynamic programming algorithming paradigm doesn't
have anything to do with that we write programs to make it happen.

This explains the "programming" term:
https://en.wikipedia.org/wiki/Mathematical_optimization#History

There is another kind of "programming" in mathematical optimization:
https://en.wikipedia.org/wiki/Linear_programming

That one does not have a related algorithmic paradigm; the computer
version is just number-crunching over the math.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Subject: Re: on distinguishing memoization and dynamic programming
From: Julieta Shem
Newsgroups: comp.lang.lisp, comp.programming
Followup: comp.programming
Organization: A noiseless patient Spider
Date: Wed, 3 Jan 2024 20:55 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jshem@yaxenu.org (Julieta Shem)
Newsgroups: comp.lang.lisp,comp.programming
Subject: Re: on distinguishing memoization and dynamic programming
Followup-To: comp.programming
Date: Wed, 03 Jan 2024 17:55:37 -0300
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <87zfxmkugm.fsf@yaxenu.org>
References: <87frzembwb.fsf@yaxenu.org> <20240103120043.381@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="75a951e1f41ca440471c166e12474bef";
logging-data="3510207"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19a8hzPV8xdUiv57iu9jDKT0rU/TxYW76A="
Cancel-Lock: sha1:6dxkR2R+0wxWiXKD9IdZktqDuQI=
sha1:/kbSULkf0ftX7XVIBZKA05uNoQY=
View all headers

Kaz Kylheku <433-929-6894@kylheku.com> writes:

> On 2024-01-03, Julieta Shem <jshem@yaxenu.org> wrote:
>> I was trying to distinguish memoization from dynamic programming --- in
>> a technical way --- and I failed. Can you write something like a
>> mathematical definition of each one?

[...]

> Dynamic programming breaks a larger problem into sub-problems which
> can be solved separately and then integrated to solve the
> larger problem.

I can't distinguish this definition from ``recursive''.

> Memoization helps when the recursion leads to overlapping subproblems
> that lead to an exponential explosion if the duplication is not
> identified and suppressed.

So it seems to be that memoization is a particular kind of strategy that
falls in the dynamic programming set of strategies. (Thanks for the
historical addendum in your other post.)

Why do they say ``overlapping subproblems'' when it seems that what is
meant is a duplicate problem? For instance, the interval [0, 10]
overlaps with the interval [5, 15], but they're not the same. AFAICT,
memoization is only useful when at least two of the subproblems are
exactly the same.

Subject: Re: on distinguishing memoization and dynamic programming
From: Kaz Kylheku
Newsgroups: comp.lang.lisp, comp.programming
Organization: A noiseless patient Spider
Date: Wed, 3 Jan 2024 22:58 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-6894@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.lisp,comp.programming
Subject: Re: on distinguishing memoization and dynamic programming
Date: Wed, 3 Jan 2024 22:58:19 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <20240103144433.679@kylheku.com>
References: <87frzembwb.fsf@yaxenu.org> <20240103120043.381@kylheku.com>
<87zfxmkugm.fsf@yaxenu.org>
Injection-Date: Wed, 3 Jan 2024 22:58:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="49317618d91c526c3ba41628504e44c8";
logging-data="3541646"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18eM+5XDMkiKPnAIEGP9MWkdnCVWh1Admg="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:AXFo8WLAjnU4uz6zprjEdd+u5Mo=
View all headers

On 2024-01-03, Julieta Shem <jshem@yaxenu.org> wrote:
> Why do they say ``overlapping subproblems'' when it seems that what is
> meant is a duplicate problem? For instance, the interval [0, 10]
> overlaps with the interval [5, 15], but they're not the same. AFAICT,
> memoization is only useful when at least two of the subproblems are
> exactly the same.

The famous example is Fibonacci. If you calculate fib(7) recursively,
fib(3), and others, will show up more than once in the recursion:

fib(7)
/ \
fib(6) fib(5)
/ \ / \
fib(4) fib(5) fib(4) fib(3)
/ \ / \
fib(4) fib(3)
/ \ / \

Why is that called overlapping? Because the left subtree fib(6)
and fib(5) are not the same, but they contain some common content
(nodes that are exactly the same like another copy of fib(5), and
multiple fib(4) and so on).

It's just in contrast to divide-and-conquer, where the problem
space is being strictly partitioned; no part or sub-part of the
left tree occcurs in the right or vice versa.

[0, 10] and [5, 15] overlap, and they have [5, 10] in common.
If that can be solved as a sub-problem, such that we can solve
[0, 4], [5, 10] and [11, 15], and put them together,
that would be better than solving [5, 10] twice and doing
the same thing.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Subject: Re: on distinguishing memoization and dynamic programming
From: Julieta Shem
Newsgroups: comp.lang.lisp, comp.programming
Organization: A noiseless patient Spider
Date: Wed, 3 Jan 2024 23:19 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jshem@yaxenu.org (Julieta Shem)
Newsgroups: comp.lang.lisp,comp.programming
Subject: Re: on distinguishing memoization and dynamic programming
Date: Wed, 03 Jan 2024 20:19:07 -0300
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <87o7e2kntg.fsf@yaxenu.org>
References: <87frzembwb.fsf@yaxenu.org> <20240103120043.381@kylheku.com>
<87zfxmkugm.fsf@yaxenu.org> <20240103144433.679@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="51130c85bb34424d24cba7c06e8521ff";
logging-data="3546571"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185WfNtel+RchnE9njucI0ogfQ5BUZ3MyI="
Cancel-Lock: sha1:WrjRpZhiOWKQwfEB35L1vMl9z7E=
sha1:hvk+m6pd2zmKcqscFmln7kTPJ6E=
View all headers

Kaz Kylheku <433-929-6894@kylheku.com> writes:

> On 2024-01-03, Julieta Shem <jshem@yaxenu.org> wrote:
>> Why do they say ``overlapping subproblems'' when it seems that what is
>> meant is a duplicate problem? For instance, the interval [0, 10]
>> overlaps with the interval [5, 15], but they're not the same. AFAICT,
>> memoization is only useful when at least two of the subproblems are
>> exactly the same.
>
> The famous example is Fibonacci. If you calculate fib(7) recursively,
> fib(3), and others, will show up more than once in the recursion:
>
> fib(7)
> / \
> fib(6) fib(5)
> / \ / \
> fib(4) fib(5) fib(4) fib(3)
> / \ / \
> fib(4) fib(3)
> / \ / \
>
> Why is that called overlapping? Because the left subtree fib(6)
> and fib(5) are not the same, but they contain some common content
> (nodes that are exactly the same like another copy of fib(5), and
> multiple fib(4) and so on).
>
> It's just in contrast to divide-and-conquer, where the problem
> space is being strictly partitioned; no part or sub-part of the
> left tree occcurs in the right or vice versa.
>
> [0, 10] and [5, 15] overlap, and they have [5, 10] in common.
> If that can be solved as a sub-problem, such that we can solve
> [0, 4], [5, 10] and [11, 15], and put them together,
> that would be better than solving [5, 10] twice and doing
> the same thing.

That's very clear now. Wonderful. Thank you.

Subject: Re: on distinguishing memoization and dynamic programming
From: HenHanna
Newsgroups: comp.programming, comp.lang.lisp, sci.lang
Organization: A noiseless patient Spider
Date: Tue, 23 Jul 2024 19:15 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.programming,comp.lang.lisp,sci.lang
Subject: Re: on distinguishing memoization and dynamic programming
Date: Tue, 23 Jul 2024 12:15:50 -0700
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <v7ovh6$1b339$1@dont-email.me>
References: <87frzembwb.fsf@yaxenu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 23 Jul 2024 21:15:51 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="45120b53e64fc89465e7bcc84dd55152";
logging-data="1412201"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7xRnl+BAbZ0wWcWtFqWp5FJ5mnLYIEUo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Dd70xKDSCeuMSpd7zJxT//pa9+0=
Content-Language: en-US
In-Reply-To: <87frzembwb.fsf@yaxenu.org>
View all headers

On 1/3/2024 11:53 AM, Julieta Shem wrote:
> I was trying to distinguish memoization from dynamic programming --- in
> a technical way --- and I failed. Can you write something like a
> mathematical definition of each one?

Memoization and dynamic programming are both techniques used to improve
the efficiency of algorithms, but there are some key differences between
them:

--------------Memoization:

Focus: Caching previously computed results
Approach: Top-down (usually implemented with recursion)
Applicability: Any function with repeated computations for the same inputs

Example: Imagine a function that calculates the nth Fibonacci number.
Recursive calls to calculate smaller Fibonacci numbers happen
repeatedly. Memoization remembers these calculations and avoids
redundant computations.

--------Dynamic Programming:

Focus: Solving problems with overlapping subproblems iteratively

Approach: Bottom-up (often uses tables or arrays)

Applicability: Problems where solutions to subproblems contribute to the
solution of larger problems

Example: Counting the number of ways to climb stairs.
You can find the number of ways to climb 1 or 2 stairs, and then
use those to find the number of ways to climb 3 stairs, and so on.

The Relationship:

Memoization can be considered a tool used within dynamic programming.

Dynamic programming doesn't necessarily require memoization, it can
solve problems bottom-up directly.

Here's an analogy:

Think of memoization as a to-do list app. You write down tasks you've
already completed to avoid doing them again.

Dynamic programming is like a recipe. You break down a complex
dish into smaller steps, ensuring you only perform each step once.

Subject: Re: on distinguishing memoization and dynamic programming
From: Julieta Shem
Newsgroups: comp.programming, comp.lang.lisp, sci.lang
Followup: comp.programming
Organization: A noiseless patient Spider
Date: Wed, 24 Jul 2024 00:06 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jshem@yaxenu.org (Julieta Shem)
Newsgroups: comp.programming,comp.lang.lisp,sci.lang
Subject: Re: on distinguishing memoization and dynamic programming
Followup-To: comp.programming
Date: Tue, 23 Jul 2024 21:06:15 -0300
Organization: A noiseless patient Spider
Lines: 104
Message-ID: <87plr3ejrc.fsf@tudado.org>
References: <87frzembwb.fsf@yaxenu.org> <v7ovh6$1b339$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 24 Jul 2024 02:06:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="693a02952c46e6280c6a8549f9de3501";
logging-data="1495996"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XCRa0KZ/y/1TqdW0iM3LPfKtSndJFr08="
Cancel-Lock: sha1:NfmdWYaKkqxh3+OA2VXPVTX+ChY=
sha1:EJFl+j8JRRNMQ2P5Yqpw9px1JkU=
View all headers

Follow-up to comp.programming only.

HenHanna <HenHanna@devnull.tb> writes:

> On 1/3/2024 11:53 AM, Julieta Shem wrote:
>> I was trying to distinguish memoization from dynamic programming --- in
>> a technical way --- and I failed. Can you write something like a
>> mathematical definition of each one?
>
>
>
> Memoization and dynamic programming are both techniques used to
> improve the efficiency of algorithms, but there are some key
> differences between them:
>
> --------------Memoization:
>
> Focus: Caching previously computed results
> Approach: Top-down (usually implemented with recursion)
> Applicability: Any function with repeated computations for the same inputs
>
>
>
> Example: Imagine a function that calculates the nth Fibonacci
> number. Recursive calls to calculate smaller Fibonacci numbers happen
> repeatedly. Memoization remembers these calculations and avoids
> redundant computations.
>
>
>
>
>
> --------Dynamic Programming:
>
> Focus: Solving problems with overlapping subproblems iteratively
>
> Approach: Bottom-up (often uses tables or arrays)
>
> Applicability: Problems where solutions to subproblems contribute to
> the solution of larger problems
>
>
> Example: Counting the number of ways to climb stairs.
> You can find the number of ways to climb 1 or 2 stairs, and
> then use those to find the number of ways to climb 3 stairs,
> and so on.
>
>
> The Relationship:
>
> Memoization can be considered a tool used within dynamic programming.
>
>
> Dynamic programming doesn't necessarily require memoization, it can
> solve problems bottom-up directly.
>
>
>
> Here's an analogy:
>
> Think of memoization as a to-do list app. You write down tasks you've
> already completed to avoid doing them again.
>
> Dynamic programming is like a recipe. You break down a
> complex dish into smaller steps, ensuring you only perform each step
> once.

It does match my understanding of dynamic programming that it's usually
the term used when the speedups are computed inside the procedure being
optimized, while memoization and caching can be done with complete
disregard for how the procedure internal details.

So, the top-down-bottom-up comparison is pretty interesting, but it also
seem to imply a certain distinction based on perspective. Science is
usually trying to find things that are there no matter from where you
look.

(*) What's the point of this discussion?

Understanding. If there is a very clear distinction and I can't see,
then my understanding can be greater. Some things are just vague and
that's not really a problem. For example, what is an operating system?
Very difficult to define with arbitrary precision, but the very people
who study them don't have any problems with that lack of precision. Is
a high-precision distinction between memoization and dynamic programming
very difficult to get to? It's not clear to me. But it's clear that
there are contexts in which we clearly use one word and not the other.

``Cache'' is another word. Every time we memoize a function, we're
using a cache for it. So why call it memoization? Fruits sometimes go
by various names, but that's likely because various peoples named it
independently, which is why ``chocolate'' is typically the same word in
every culture I've seen it---perhaps because each culture imported it
from the same source.

Perhaps that's the case with cache and memoization. It is true that
``dynamic programming'' was coined by a researcher trying to get money
for his project. The project had to use buzz words that would attract
the money. In other words, maybe ``cache'' would replace it just fine.

If these paragraphs are missing out something deeply important about
dynamic programming, then I would like to know.

Thanks for the analogy.

Subject: Re: on distinguishing memoization and dynamic programming
From: HenHanna
Newsgroups: comp.programming, sci.lang, comp.lang.lisp
Organization: A noiseless patient Spider
Date: Wed, 24 Jul 2024 08:04 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.programming,sci.lang,comp.lang.lisp
Subject: Re: on distinguishing memoization and dynamic programming
Date: Wed, 24 Jul 2024 01:04:01 -0700
Organization: A noiseless patient Spider
Lines: 61
Message-ID: <v7qchh$1lh15$3@dont-email.me>
References: <87frzembwb.fsf@yaxenu.org> <v7ovh6$1b339$1@dont-email.me>
<87plr3ejrc.fsf@tudado.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 24 Jul 2024 10:04:02 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c0e5681dd981ceb1823d8b1c1f284278";
logging-data="1754149"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19MnQ/OyiFXdVVXQ6f2X0+WIZSVU4L5+t8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:z0EYY6Tl0qSxetZCcN/fihNsYig=
In-Reply-To: <87plr3ejrc.fsf@tudado.org>
Content-Language: en-US
View all headers

>>
>> Here's an analogy:
>>
>> Think of memoization as a to-do list app. You write down tasks you've
>> already completed to avoid doing them again.
>>
>> Dynamic programming is like a recipe. You break down a
>> complex dish into smaller steps, ensuring you only perform each step
>> once.

----------- Not a great Analogy....

DP is just a broader term... one of the methods used is Memoization.

>
> Thanks for the analogy.

DP= “recursion + memorization” is better.

i have just watched most of it (20 min)... Very good!

https://www.youtube.com/watch?v=Hdr64lKQ3e4

19:40

Mastering Dynamic Programming - How to solve any interview problem (Part 1)

Tech With Nikola -- 45.2K subscribers

636,861 views ( Aug 19, 2023 )

🎬 Mastering Dynamic Programming: An Introduction 🎬

Are you ready to unravel the secrets of dynamic programming?
🤔 Dive into the world of efficient problem-solving with this
comprehensive introduction to dynamic programming. Whether you're a
budding programmer or an algorithm aficionado, this video is your
gateway to understanding the magic behind DP.

🔑 Key Takeaways:

📌 Demystifying the concept of dynamic programming.
📌 Understanding the core principles behind dynamic programming.
📌 Unleashing the power of recursion and memoization.
📌 Step-by-step breakdown of dynamic programming problem-solving.

Dynamic programming is like a puzzle-solving technique, and this video
is your ultimate guide to fitting the pieces together. Get ready to
elevate your coding skills and witness the art of optimization in action.

1

rocksolid light 0.9.8
clearnet tor