Dynamic Programming
Dynamic Programming
From An
Excel Perspective
Dynamic Programming From An Excel Perspective
Dynamic Programming
From An Excel Perspective
Dynamic Programming
Excel
Solution
Do not need to teach the spreadsheet AT ALL
Include spreadsheet usage in a few of their projects
and/or homework
Spreadsheet usage includes
Graphing data collected via empirical analysis of two
algorithms.
Rapidly construct mathematical tables for applications
Simulating wave-front parallel algorithms
Evaluating dynamic programming tables (the point of this
talk)
Dynamic Programming From An Excel Perspective
LCS = BCBA
0 𝑖𝑓 𝑥 = 0 𝑜𝑟 𝑗 = 0
𝑐 𝑖, 𝑗 = ൞ 𝑐 𝑖 − 1, 𝑗 − 1 + 1 𝑖𝑓 𝑖, 𝑗 > 0 𝑎𝑛𝑑 𝑥𝑖 = 𝑦𝑗
max(𝑐 𝑖, 𝑗 − 1 , 𝑐 𝑖 − 1, 𝑗 𝑖𝑓 𝑖, 𝑗 > 0 𝑎𝑛𝑑 𝑥𝑖 ≠ 𝑦𝑗
Where c[ib ,j] is the length of the LCS of x1..xi and y1..yj
Dynamic Programming From An Excel Perspective
IF(D$2=$B4,C3+1,MAX(D3,C4))
Cell formula
Dynamic Programming From An Excel Perspective
Length of LCS
Dynamic Programming From An Excel Perspective
Summarizing
CS students can benefit from work with Excel
Excel can support many projects in the CS curriculum.
Table processing available in Excel supports some
algorithm visualization quite well.
This approach works particularly well with the simpler
DP problems.
THE END