The Student Room Group

Application of dynamic programming

Hey!! :smile:

I have to write an O(n3)O(n^3) algorithm to determine whether a given string w=a1a2anw=a_1 a_2 \dots a_n is in L(G)L(G), where G=(N,Σ,P,S)G=(N,\Sigma ,P, S) is a context-free grammar in Chomsky normal form.

Could you explain me how we could use the dynamic programming in this case??
Reply 1
Original post by mathmari
Hey!! :smile:

I have to write an O(n3)O(n^3) algorithm to determine whether a given string w=a1a2anw=a_1 a_2 \dots a_n is in L(G)L(G), where G=(N,Σ,P,S)G=(N,\Sigma ,P, S) is a context-free grammar in Chomsky normal form.

Could you explain me how we could use the dynamic programming in this case??


Scroll down to his web development tutorials, he's really good at explaining things.
https://m.youtube.com/channel/UCc1Pn7FxieMohCZFPYEbs7w
This talk has two goals:
a) A review of the fundamentals of dynamic programming, and an introduction to nonserial dynamic programming.


b) An application of the techniques to some of the issues involved in the problem of determining globally optimum storage patterns.


1

Quick Reply

Latest

Trending

Trending