dpvis: A Visual and Interactive Learning Tool for Dynamic Programming

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Lee, David H., Prasad, Aditya, Vuong, Ramiro Deo-Campo, Wang, Tianyu, Han, Eric, Kempe, David
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866929588994572288
author Lee, David H.
Prasad, Aditya
Vuong, Ramiro Deo-Campo
Wang, Tianyu
Han, Eric
Kempe, David
author_facet Lee, David H.
Prasad, Aditya
Vuong, Ramiro Deo-Campo
Wang, Tianyu
Han, Eric
Kempe, David
contents Dynamic programming (DP) is a fundamental and powerful algorithmic paradigm taught in most undergraduate (and many graduate) algorithms classes. DP problems are challenging for many computer science students because they require identifying unique problem structures and a refined understanding of recursion. In this paper, we present dpvis, a Python library that helps students understand DP through a frame-by-frame animation of dynamic programs. dpvis can easily generate animations of dynamic programs with as little as two lines of modifications compared to a standard Python implementation. For each frame, dpvis highlight the cells that have been read from and written to during an iteration. Moreover, dpvis allows users to test their understanding by prompting them with questions about the next operation performed by the algorithm. We deployed dpvis as a learning tool in an undergraduate algorithms class, and report on the results of a survey. The survey results suggest that dpvis is especially helpful for visualizing the recursive structure of DP. Although some students struggled with the installation of the tool (which has been simplified since the reported deployment), essentially all other students found the tool to be useful for understanding dynamic programs. dpvis is available at https://github.com/itsdawei/dpvis.
format Preprint
id arxiv_https___arxiv_org_abs_2411_07705
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle dpvis: A Visual and Interactive Learning Tool for Dynamic Programming
Lee, David H.
Prasad, Aditya
Vuong, Ramiro Deo-Campo
Wang, Tianyu
Han, Eric
Kempe, David
Computers and Society
K.3.1; K.3.2
Dynamic programming (DP) is a fundamental and powerful algorithmic paradigm taught in most undergraduate (and many graduate) algorithms classes. DP problems are challenging for many computer science students because they require identifying unique problem structures and a refined understanding of recursion. In this paper, we present dpvis, a Python library that helps students understand DP through a frame-by-frame animation of dynamic programs. dpvis can easily generate animations of dynamic programs with as little as two lines of modifications compared to a standard Python implementation. For each frame, dpvis highlight the cells that have been read from and written to during an iteration. Moreover, dpvis allows users to test their understanding by prompting them with questions about the next operation performed by the algorithm. We deployed dpvis as a learning tool in an undergraduate algorithms class, and report on the results of a survey. The survey results suggest that dpvis is especially helpful for visualizing the recursive structure of DP. Although some students struggled with the installation of the tool (which has been simplified since the reported deployment), essentially all other students found the tool to be useful for understanding dynamic programs. dpvis is available at https://github.com/itsdawei/dpvis.
title dpvis: A Visual and Interactive Learning Tool for Dynamic Programming
topic Computers and Society
K.3.1; K.3.2
url https://arxiv.org/abs/2411.07705