Student Misconceptions of Dynamic Programming: Shamama Zehra Aishwarya Ramanathan

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Paper Session: Algorithms SIGCSE’18, February 21-24, 2018, Baltimore, MD, USA

Student Misconceptions of Dynamic Programming


Shamama Zehra Aishwarya Ramanathan
University of Toronto Mississauga University of Toronto Mississauga

Larry Yueli Zhang Daniel Zingaro


University of Toronto Mississauga University of Toronto Mississauga

ABSTRACT levels have been given considerably less attention. For two reasons,
Dynamic Programming (DP) is considered to be one of the most it is important for research to focus on more advanced courses,
difficult topics for students to understand in theoretical CS. Prior even while the community continues to solve pressing issues at the
work suggests that misconceptions arise even when students have introductory level. First, for students who do continue to advanced
completed a course in which there is considerable focus on learning courses, we want to avail ourselves of teaching that is based on
how to solve DP problems. We conducted think-aloud interviews knowledge of student misconceptions. Second, misconceptions at
with students who have completed the DP portion of the Algorithms this level are likely to be largely disjoint from CS1 misconceptions,
course at a top North American research university. We report on so work at different levels of the CS curriculum can be conducted
three themes and their misconceptions discovered through this in parallel.
process. The first theme delves into students’ struggles defining In this paper, we offer a think-aloud study of students as they
the notion of a subproblem and identifying particular subproblems. solve Dynamic Programming (DP) problems. This topic was chosen
The second theme focuses on the understanding and usage of DP based on difficulties reported in recent research on student algo-
solution techniques compared to other algorithmic approaches. The rithmic misconceptions [4]. We interviewed juniors at a top North
third theme is composed of misconceptions related to defining and American research institution, and sought students at a wide range
using recurrences. Analysis of each misconception provides insight of algorithmic facility. We document considerable difficulties with
into student thinking and offers ideas for improving the education the DP problems, some of which replicate prior research, but others
of DP to university students. that, to our knowledge, are reported for the first time.

CCS CONCEPTS 2 LITERATURE REVIEW


• Social and professional topics → Computing education; • There is a recent research push to study student misconceptions of
Theory of computation → Dynamic programming; advanced CS material. For example, one study reports on student
misconceptions of binary search trees and hash tables [8]. Another
KEYWORDS reports on student experiences with the Build-Heap algorithm [13].
There is considerably less research on algorithm design techniques
Algorithms, Dynamic Programming, Misconceptions
such as Dynamic Programming and Divide-and-Conquer.
ACM Reference Format: Dynamic Programming (DP) is a powerful algorithmic problem-
Shamama Zehra, Aishwarya Ramanathan, Larry Yueli Zhang, and Daniel solving technique and a core part of the Algorithms and Complexity
Zingaro. 2018. Student Misconceptions of Dynamic Programming. In SIGCSE knowledge unit of Computing Curricula 2013 [1]. DP is typically
’18: The 49th ACM Technical Symposium on Computer Science Education,
taught in a second- or third-year Algorithms course, but see [9]
February 21–24, 2018, Baltimore , MD, USA. ACM, New York, NY, USA,
for a call to integrate DP across the curriculum. Recursion itself is
6 pages. https://doi.org/10.1145/3159450.3159528
challenging for students [10], and recursion is but one step in the
generation of a DP solution. In particular, it is thought that students
1 INTRODUCTION struggle to find recurrences based on the optimal substructure of
The CS education research community has studied in depth the dif- solutions [4].
ficulties and misconceptions of students in CS1 [12]. And for good Enström and Kann [4] report on multi-year action research of
reason: elevated failure rates in CS1 persist even with the latest their Algorithms, Data Structures and Complexity course. The re-
pedagogical research [14], and students demonstrate misconcep- search consisted of cycles of determining topics of difficulty, im-
tions of even the most rudimentary concepts [7]. Save for isolated proving teaching on those topics, and evaluating the results. A core
instances (e.g., Digital Logic [6]), courses beyond the introductory focus of the research was improving student understanding of DP.
The authors introduced concrete assignments, used visualizations,
Permission to make digital or hard copies of all or part of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed
and were careful to provide examples that demonstrate each aspect
for profit or commercial advantage and that copies bear this notice and the full citation of DP solutions that can vary (e.g., number of dimensions in the re-
on the first page. Copyrights for components of this work owned by others than ACM currence, array-filling order). Finally, the authors separately taught
must be honored. Abstracting with credit is permitted. To copy otherwise, or republish,
to post on servers or to redistribute to lists, requires prior specific permission and/or a different phases of the DP process to reduce cognitive load: recog-
fee. Request permissions from permissions@acm.org. nizing the problem structure and producing a recurrence relation
SIGCSE ’18, February 21–24, 2018, Baltimore , MD, USA were taught separately from finding a correct array-filling order. In
© 2018 Association for Computing Machinery.
ACM ISBN 978-1-4503-5103-4/18/02. . . $15.00 general, students responded positively to these changes, suggest-
https://doi.org/10.1145/3159450.3159528 ing that DP misconceptions are within the purview of educators

556
Paper Session: Algorithms SIGCSE’18, February 21-24, 2018, Baltimore, MD, USA

to address. Unfortunately, specific misconceptions and challenges the maximum-value solution using the first i coins, D[i] is
with DP were not provided. the maximum of c i + D[i − 2] (when c i is picked up) and
Another study [11] used lightweight methods (e.g., multiple- D[i − 1] (when c i is not picked up). This problem is concrete
choice or fill-in-the-blank questions) to detect student misconcep- in the sense that the row of coins is provided as input to the
tions of algorithm design and object-oriented concepts. In terms of algorithm and can be visualized.)
DP, students were asked two multiple-choice questions: one on the • Q2: Consecutive 1’s: Describe an algorithm to find the num-
coin-changing problem (given particular coin denominations, what ber of binary strings of length N that do not contain any two
is the minimum number of coins required to make n cents) and one consecutive 1’s. (This problem can be solved by DP; interest-
on the knapsack problem. In each problem, students were asked to ingly, it uses structurally the same subproblem recurrence
fill-in the copy (when the new item under consideration does not as that of the Coin Row problem. This problem is less con-
help) or update (when the new item does help) code required to crete than the Coin Row problem as there is no input array
extend a subsolution to a larger solution. The authors found that provided.)
the coin-changing problem is more challenging than the knapsack • Q3: Maximum Pixel Sum: Given a 2D image where each
problem; and that, within the same problem, copy correctness and pixel can be represented by a value between 0 and 1, find
update correctness were significantly associated. a connected path of pixels that results in the smallest sum
We know of only one DP study that includes specific student mis- of pixel values. The path must begin somewhere in the first
conceptions supported by data [3]. That study used multiple-choice row of the image and end somewhere in the last row of the
questions and student interviews as the data-collection instruments. image. (This problem can be solved with a 2D DP strategy;
Misconceptions included writing a naive recursive solution instead the problem is quite concrete as the input is a grid of pixels.)
of a DP solution, reasoning incorrectly about bottom-up solutions, For each of the three problems, we presented the following ques-
and conflating DP with Divide-and-Conquer algorithms. Only 2 of tions to the students:
23 students were able to fill-in missing code for a solution to the • What is the most appropriate algorithm design technique
coin-changing problem. Compared to that study, our study uses for solving this problem? Note that we did not ask students
what we consider to be conceptually-simpler problems, and we ask to use DP right away; this let us explore variation in how
students to conduct each step of the DP problem-solving approach students’ navigate the algorithm design space. We did direct
rather than fill-in missing pieces of skeleton code. them to a DP solution after several minutes had they not
settled on DP on their own by then.
3 METHOD • What are the sub-problems of this problem and what is the
We conducted in-person interviews that targeted students who were recurrence that relates the sub-problems?
taking the third-year Algorithm Design and Analysis course at a • Write the pseudocode of a bottom-up Dynamic Programming
research-intensive North American university. DP was taught from solution to this problem.
Week 3 to Week 5 of the 12-week course, and our interviews were These steps mirrored the “DP recipe” that was taught to these
conducted in Week 11. Student interviewees were recruited through students in their Algorithms course.
announcements made on our behalf by the course instructor. In We felt that our DP problems were considerably easier than those
particular, the announcements gave no hint that our focus was DP, used in prior research [3]. Still, given the degree of student struggle
instead generally noting that we sought interviewees to inform in that prior research, we worried about students not being able
our research on student conceptions of algorithms. Participation to make any progress at all. With that in mind, we produced two
was voluntary and was compensated with a gift card. Students additional problems that could be solved without using DP:
were selected for interview participation based on a pre-screening • Q4: Stock Market: Given a sequence of historical daily
survey, where we asked for their academic year and self-reported prices for a stock on consecutive days, find the days on
expected grade in the Algorithms course. Fourteen interviews were which someone should have bought the stock and then sold
conducted over four days, each of which lasted approximately one the stock so as to maximize earnings. (A Divide-and-Conquer
hour. solution can be used to solve this problem in O(n log n) time;
Algorithm design problems were prepared and used as the inter- a linear-time scan through the array is also possible.)
view questions. We sought questions that demonstrate the types • Q5: Peak-Finding: Given an array of numbers that we
of variation possible in DP problems [4]. Specifically, we sought know ascends up to some maximum value and then descends
1D- and 2D-array problems, as well as concrete and more abstract until the end of the array, find the maximum element of the
problems. We also chose problems that were unlikely to have been array. (This problem can be solved in O(log n) time using an
covered in the course or studied online by students. We used three approach based on binary search.)
DP problems in our interviews, the first two of which are the focus
These simpler problems served as “morale boosters” in case the DP
of this paper:
problems were not going well for a student. A small number of our
• Q1: Coin Row: There is a row of n coins whose values are students did become agitated or lost confidence when unable to
positive integers c 1 , c 2 , . . . , c n . The goal is to pick up the solve a DP problem. We were cautious of demoralizing students in
maximum-value coins such that no two coins adjacent in that way and then letting them leave the interview; the non-DP
the initial row can be picked up. (This problem can be solved problems were used to mitigate this possibility. Note that these
by DP using a 1D array. Letting subproblem D[i] represent problems were used only when we felt it extremely unlikely that a

YES, I solved Q1 on paper instantly.

557
Paper Session: Algorithms SIGCSE’18, February 21-24, 2018, Baltimore, MD, USA

T# M# Misconception # of Students
T1 M1 Student struggles to write iterative code to solve the problem. 7/14
T1 M2 Student struggles to compose subproblems or define what is meant by “subproblem”. 8/14
T2 M3 Student uses sets for the DP problem. 5/14
T2 M4 Student uses Divide-and-Conquer for the DP problem. 4/14
T2 M5 Student uses a Greedy approach for the DP problem. 8/14
T3 M6 Student struggles to write a recurrence. 4/14
T3 M7 Student fails to use previous experience with a recurrence to solve an analogous problem. 4/10
Table 1: Prevalent Student Themes (T) and Misconceptions (M)

student would progress on the DP problems (e.g., long stretches of


no progress, giving up). Finally, for such students, these non-DP 8
S14 S14
problems were also used as calibration for evaluating overall level
of knowledge in algorithm design. S13 S13 S12

Number of Students
A think-aloud protocol [5] was used in conducting the interviews. 6
This technique involves asking students to verbalize their thoughts S9 S9 S11
as they solve problems. Note that we did not ask students to explain
why they think in the ways that they do; asking why is known to S8 S8 S14 S9
4
change the problem-solving process [5]. Two researchers jointly S5 S5 S10 S10 S7 S12 S8
conducted each interview, with one researcher notetaking and
prompting the student to verbalize their thoughts when required, S4 S3 S6 S9 S5 S9 S7
and the other focusing exclusively on notetaking. We made students 2
aware that we would not be able to provide hints or answer their S3 S2 S3 S2 S2 S8 S6
questions while they worked on a problem, as doing so would S2 S1 S1 S1 S1 S6 S1
influence their thinking and impede our ability to study what they 0
can do on their own. That said, when it became clear that students T1:M1 T1:M2 T2:M3 T2:M4 T2:M5 T3:M6 T3:M7
were not making progress, we did provide hints to inform our Theme: Misconception
understanding of what students can do with help. Once hints were
given, however, further data was analyzed in the context of that
hint, with pre-hint and post-hint progress distinguished in our
Figure 1: Overview of Student Misconceptions.
analysis. This stacked bar graph represents the misconcep-
Each student was first given the Coin Row problem. The second tions that were observed across students (S1-S14).
problem was selected based on the student’s approach and progress
on the first problem. If the student made at least minimal progress
on Coin Row, or understood the general idea of DP and tried to apply
fully-correct solution; intermediate scores were assigned when war-
it, then Consecutive 1’s or Maximum Pixel Sum was selected as the
ranted. This progress-scoring was negotiated by the researchers
second problem. If the student failed to make any progress or gave
and each score was agreed-upon before proceeding with additional
up on Coin Row, then we chose one of the non-DP problems as the
scoring.
second problem and used Consecutive 1’s for the third problem. All
of the interviewees were presented at least two of the DP problems.
For each interview, a digital smart pen device was used to record
4 RESULTS
both the audio of the interview and the student’s written work on Our quantitative and qualitative data reveal many student miscon-
scrap paper. After the interview, all recordings, written work, and ceptions related to DP. In this section, we report on three broad
interviewer notes were analyzed independently by two researchers. themes that were evident from patterns in student misconceptions,
Each researcher segmented each interview and tagged the tran- as shown in Table 1 and Figure 1. Each student in Figure 1 is rep-
scripts with codes representing misconceptions. Misconceptions resented by a colour and label on the graph, and it is evident that
were then clustered into themes. Finally, the researchers met to certain misconceptions co-occur. As an example of interpreting
discuss the themes and codes that were generated as part of their this figure, consider the student labelled S14. We can see that this
individual analyses. Themes and misconceptions are included be- student did not understand how to use subproblems or what is
low only when both researchers agreed on the coding decisions. meant by “subproblems” (M2), used sets to state a solution on a DP
Researchers also jointly coded student progress on each question Problem (M3), and also chose to use a Greedy technique on a DP
on a scale of 0 to 1. A score of 0 indicated no understanding of problem (M5). Each DP question highlighted unique misconcep-
the question; a score of 1 indicated achieving at least a partially- tions. However, for the purposes of understanding student thinking
correct solution which, with minor refinement, could become a across contexts, the most valuable misconceptions are those seen
across questions and students.

558
Paper Session: Algorithms SIGCSE’18, February 21-24, 2018, Baltimore, MD, USA

4.1 Theme 1: Subproblem Identification 4.3 Theme 3: Defining a Recurrence


The first theme was that students were unable to identify or define The final theme that emerged from the misconceptions was that
subproblems (T1). That is, students were unable to state an optimal students were unable to clearly define a recursive solution to the
substructure property of the problem. As this is often the first step problem (T3). In contrast to Enström and Kann’s findings [4], some
in developing a DP solution [2], difficulties here are particularly students had difficulty observing recursive relationships in Q1, Q2,
problematic. and Q3.
One of the key misconceptions from this theme occurred when Discovering misconceptions in this theme was most straightfor-
students used the notations D[i] or OPT[i], but without stating ward when we interviewed students who could identify subprob-
the subproblem solutions represented by D or OPT. This disconnect lems but could not compose the subproblems to solve the original
between using notation and defining subproblems is further ev- problem. For 5 students who were not making progress, we offered
ident for the 6 students who were unable to justify their array’s a hint and asked them to think about how a solution to problem
dimensions. Follow-up discussion suggested that these students had size n − 1 could be used in a solution of size n; that is, we gave them
seen or remembered 2D DP examples from lecture, and so reasoned a hint about the optimal substructure and asked them to compile
that 2D arrays would similarly work on Q1. Of these 6 students, 2 that knowledge into a recurrence. After such hints, students were
proposed while solving the question that a 2D array might not be generally able to recite and recognize the steps of DP. However,
a promising approach. After struggling and being provided hints, most of these students were not able to correctly identify the step
another 2 students realized that their thinking was incorrect. Stu- that they were to solve next, or incorrectly explained one or more
dents with this 2D misconception, and who were asked Q3 after steps when asked to summarize their progress to this point. Many
Q1, generally made good progress on Q3, where a 2D solution was were aware of the necessity of having the recursive solution before
in fact viable. attempting to write a bottom-up solution, but failed to define a re-
In general, students identified in this theme were quite eager to currence and so could not proceed to the bottom-up code. It seems
“solve the problem”, and simply skipped the steps of thoroughly that the given hints did not help students who lacked the ability to
understanding the problem and identifying subproblems. define the recurrence on their own.
We end this subsection with a preliminary hypothesis on the
4.2 Theme 2: Solution Technique fragility of understanding recurrences. Q1 and Q2 can be solved
using recurrences that are structurally very similar. Only 1 student
The second key theme observed was that students used other algo-
explicitly identified similarities between the two problems when
rithmic problem-solving techniques to solve DP problems (T2).
attempting a solution to Q2. Moreover, many students that were
This theme emerged when the student had an unclear under-
able to solve both problems did not note or use any similarity
standing of the problem or of DP problem-solving techniques. There
between the two recurrences.
were 5 students who struggled to remember the steps to solve DP
problems, causing them to resort to other solution techniques. We
5 ADDITIONAL OBSERVATIONS
suspect that other students had the same trouble, but did not ex-
plicitly articulate it as these 5 did. 5.1 Concrete vs. Abstract Problems
Students relied on a small set of non-DP techniques, reflecting In our study, two of the problems that were presented (Q1 and Q2)
those that were learned in their Algorithms course or in their prior had very similar recursive decompositions. As the “cover stories” for
CS programming courses. One such solution approach, used by 4 these two questions were of different forms, we wondered to what
students, was that of Divide-and-Conquer (D&C), a fundamental extent student facility with identifying and composing subproblems
technique that one is typically taught prior to learning DP. This holds across contexts. We present such an analysis in Figure 2. 4
heavy reliance on D&C suggests that these students had learned out of the 10 students who were presented both problems were able
the rudiments on which DP is based: recursion, breaking a problem to progress through more of Q1 (the seemingly easier problem) as
into subproblems, and using subproblem solutions to solve larger compared to Q2. However, there were 4 students who progressed
problems. Yet, students were not able to advance past the ill-fated much further in Q2 than Q1; in fact, they were not able to form
D&C attempts, even when prompted to try DP solutions. any solution, despite repeated hints, for Q1. The other 2 students
Another incorrect approach on which students relied was char- performed equally well in both problems.
acterized by use of set terminology in expressing their solution. For the 4 students that performed well on Q1 but failed to find a
Interestingly, there were also 2 students who attempted to use finite solution to Q2, it is possible that they were able to make connections
state machines (deterministic finite automata) to solve the DP prob- in Q1 with concrete concepts. Q1 presents the problem in terms
lems. This was particularly evident when solving Q2, where these of objects with which students are familiar (coins), rather than an
students interpreted “not contain any two consecutive 1’s” as two abstract concept that they may have only learned relatively recently
separate states where a 1 is or is not allowed, respectively. Some (binary strings). We also note that the similarity in recurrence
students did understand that these techniques would not solve the between Q1 and Q2 is highly nonobvious: one problem has to do
problem, but still chose to attempt these incorrect strategies until with picking up coins, the other with enumerating binary strings of
asked to use DP. a given property. But inasmuch as the recurrence is “simple”, based
The most worrisome result here is that interviewers observed only on a single parameter, we hypothesize that the concreteness of
4 students who were unable to think of any approach to the DP Q1 facilitated its discovery compared to Q2 that did not. Based on
problems, even after struggling and being given several hints. previous research presented by Enström and Kann [4], we concur

559
Paper Session: Algorithms SIGCSE’18, February 21-24, 2018, Baltimore, MD, USA

Q1 Q2 themselves at the lowest grade level (D) was also an anomaly, as


they progressed beyond 7 others in the DP programming problems.
Second, we report a preliminary observation of student confi-
S1
dence levels throughout the problem-solving process. Interviewers
S2
periodically asked students their level of confidence in their solu-
S3
tion, especially when a hint had been given for the question. Some
S4
students indicated high confidence in incorrect solutions, which
S5
was often followed by a desire to stop solving the problem and
S6
continue on to the next one. Another set of students self-expressed
S7
discontentment with correct answers, and then further reflection led
S8
them astray to other, incorrect solutions. However, most students
S9
were able to self-identify when they achieved a correct solution.
S10
Since DP questions may have multiple correct recurrences, it is
S11
important that students be able to not only define but also identify
S12
S13 a correct recurrence.
S14
6 DISCUSSION
1 0.8 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 In our analysis of student misconceptions, we discovered findings
Percentage of Progress Percentage of Progress in line with previous research as well as novel results. In general,
we found that students have difficulty across every step in the DP
design process. Students specifically struggle with determining
Figure 2: Preliminary Analysis for M7. This graph whether and how DP applies and, when it does, designing both
indicates how students (S1-S14) progressed on Q1 top-down and bottom-up solutions.
versus Q2, on a scale of 0-1 for each question.
6.1 Theme 1: Subproblem Identification
Students were unable to identify the subproblems, or the connec-
tions between subproblems, to form the solution to the larger prob-
that one of “the most difficult tasks. . . [is] related to seeing the lem (M1 and M2). This demonstrated that students were not able
structure of subproblems and their solutions. . .”. It may therefore to grasp the core concept of DP: that the solution to subproblems
be very difficult for students to reach a point in Q2 where the can be stored and used to solve a bigger problem [2]. M1 and M2
analogous solutions for the two problems are evident. That is, while are related, as difficulty with iterative code suggests a struggle
students may be able to transfer knowledge from Q1 to Q2, the with “bottom-up” array solutions, and solutions to subproblems
challenging cover story of Q2 prevents students from identifying are precisely what the array stores. Interestingly, most students
the features of Q1 that are relevant for Q2. who were able to identify the subproblem space were able to write
An interesting pattern emerged for those who were able to solve iterative code. One can imagine a disconnect between defining sub-
Q2 but not Q1. There were 4 students who failed to make progress problems and writing the bottom-up code, but as seen in Figure 1,
on Q1 to whom we gave the Stock Market problem (Q4) after Q1 only 1 student (S4) who was able to define “subproblem” and com-
and prior to Q2. 3 of these 4 students performed much better on Q2 pose subproblems struggled with writing iterative code. This is an
than Q1; at present, it is not clear why these students were able to encouraging result, as it suggests that writing bottom-up code is
do so. Did the Stock Market question somehow “clear their minds” not itself inherently challenging for students who understand the
in preparation for a fresh attempt at Q2? Would these students have subproblem space.
made progress on Q2 had we presented it immediately after Q1? Still, these common misconceptions are problematic because
Our data does not admit answers to these questions. progress of any kind is unlikely without having identified the sub-
problems. Anecdotally, in books and lectures, we observe that sub-
5.2 Expectations and Confidence problems and optimal substructure are often simply stated, with
Though not a primary focus of our interviews, we report prelimi- little insight into the process that led to the identification of sub-
nary results on interactions between student performance on the problems and their relationships. It seems prudent to focus on this
one hand and expectations and confidence on the other. crucial design stage in order to help students past this initial hurdle.
First, our data showed that students who predicted themselves
to be in the highest (A) grade range progressed almost to comple- 6.2 Theme 2: Solution Technique
tion on most problems during the interview. Similarly, students Another finding is that students conflate D&C and Greedy Algo-
who predicted themselves to be in the lower (C) grade range had rithms with DP problems (M4 and M5). This finding is in line with
poor progress in solving the interview problems. Patterns among previous research showing student difficulty distinguishing D&C
students in the middle (B) grade range were inconclusive; students and DP solutions [3]. In addition, we observed some students try-
who determined themselves to be in this range had a variety of ing to apply automata and sets, two approaches not commonly-
performance levels in the interviews. The student who projected associated with problems of the type that we presented. If the

560
Paper Session: Algorithms SIGCSE’18, February 21-24, 2018, Baltimore, MD, USA

student was not comfortable solving problems using DP, perhaps 8 CONCLUSION
these were simply attempts to invoke well-understood, practiced We have presented three themes that emerge from 7 misconceptions
knowledge from prior courses. However, it is not clear why so many held by upper-level CS Students solving Dynamic Programming
of the students thought that these techniques were promising, even (DP) problems. The misconceptions explore specific areas of prob-
when these techniques did not lead to progress. lematic thinking across all steps of the DP problem-solving process.
When students used incorrect strategies and made no progress, We hope that this work may serve a similar purpose as the CS1
they were often quite confident in their answers. This suggests that misconceptions literature: fostering for instructors an appreciation
further time could be spent attuning students to the features of of the ways in which students can misapply core CS material.
problems that may suggest one algorithmic technique over another, We offer a tentative conclusion based on the students that we
or revisiting previously-learned techniques to compare and contrast interviewed: typical DP instruction is insufficient if our goal is for
them with more advanced techniques. students to be able to independently solve DP problems. Improv-
ing such instruction likely requires methods similar to those of
6.3 Theme 3: Defining a Recurrence Enström and Kann [4]. Based on our results, it seems prudent to
intervene at the beginning of the DP design process, improving
Many students proposed using a recurrence by beginning to name
instruction on how students can identify subproblems and how and
it with D[i] or OPT[i], but were not able to decide how a recursive
why composing those subproblems is important to a correct DP
relationship could be expressed, even when they had decided on
solution.
the subproblems. Furthermore, they were not able to recognize how
the recursive relationship between the elements in the array would REFERENCES
lead to a DP solution. This suggests that students have difficulty [1] ACM/IEEE-CS Joint Task Force on Computing Curricula. Computer science
with recurrences and building an array from the recurrence, or curricula 2013. Technical report, ACM Press and IEEE Computer Society Press,
deciding on how the array would be used. Hints given to students 2013.
[2] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms,
about how to form the array or connect subproblems generally did Third Edition. The MIT Press, 2009.
not help students progress. [3] H. Danielsiek, W. Paul, and J. Vahrenhold. Detecting and understanding students’
How is it that students can sometimes identify subproblems misconceptions related to algorithms and data structures. In Proceedings of the
43rd ACM Technical Symposium on Computer Science Education, pages 21–26,
but not be able to use them? We suspect that this has to do with 2012.
students reciting information learned in lecture or tutorial, without [4] E. Enström and V. Kann. Iteratively intervening with the “most difficult” topics
of an algorithms and complexity course. Transactions on Computing Education,
understanding the relationship between the various steps of DP. 17(1):4:1–4:38, 2017.
This suggests that core notions of DP itself are not understood by [5] K. A. Ericsson and H. A. Simon. Protocol Analysis: Verbal Reports as Data. MIT
the student. In accordance with results of Enström and Kann [4], Press, 1993.
[6] G. L. Herman, M. C. Loui, and C. Zilles. Creating the digital logic concept
students tend to find the idea of evaluating subproblems in the inventory. In Proceedings of the 41st ACM Technical Symposium on Computer
correct order to be a difficult concept to grasp. Science Education, pages 102–106, 2010.
[7] L. C. Kaczmarczyk, E. R. Petrick, J. P. East, and G. L. Herman. Identifying
student misconceptions of programming. In Proceedings of the 41st ACM Technical
Symposium on Computer Science Education, pages 107–111, 2010.
7 FUTURE WORK [8] K. Karpierz and S. A. Wolfman. Misconceptions and concept inventory questions
A single think-aloud study is insufficient for validating student for binary search trees and hash tables. In Proceedings of the 45th ACM Technical
Symposium on Computer Science Education, pages 109–114, 2014.
misconceptions. We offer three areas here for future work. [9] Y. Kortsarts and V. Kolchenko. Dynamic programming across the CS curriculum
First, recall that students who struggled on Q1 were next given (abstract only). In Proceedings of the 43rd ACM Technical Symposium on Computer
Science Education, pages 671–671, 2012.
Q4, and then often did well on Q2. Future work involves replacing [10] R. McCauley, S. Grissom, S. Fitzgerald, and L. Murphy. Teaching and learning
Q4 with another, simpler DP problem (perhaps generating the nth recursive programming: a review of the research literature. Computer Science
Fibonacci number). Are the Q1-Q2 patterns sustained in this case? Education, 25(1):37–66, 2015.
[11] W. Paul and J. Vahrenhold. Hunting high and low: Instruments to detect mis-
What would result from the interviewer intervening with explicit conceptions related to algorithms and data structures. In Proceedings of the 44th
instruction on students who struggle on Q1? And are students able ACM Technical Symposium on Computer Science Education, pages 29–34, 2013.
to apply this guidance to Q2? [12] A. Robins, J. Rountree, and N. Rountree. Learning and teaching programming: A
review and discussion. Computer Science Education, 13(2):137–172, 2003.
Second, our interview protocol was not designed to assess prior [13] O. Seppälä, L. Malmi, and A. Korhonen. Observations on student misconceptions—
knowledge that is likely to be prerequisite for solving DP problems. a case study of the Build-Heap Algorithm. Computer Science Education, 16(3):241–
255, 2006.
For example, we did not explicitly seek to identify student thinking [14] C. Watson and F. W. Li. Failure rates in introductory programming revisited. In
on D&C problems, Recursion, Greedy Algorithms, or Algorithm Proceedings of the 19th ACM Conference on Innovation and Technology in Computer
Design in general. In particular, we suspect that some of the diffi- Science Education, pages 39–44, 2014.
culty in T3 can be traced to student misconceptions of recursion
and recursive structure, rather than some “new” misconceptions
specific to DP.
Third, it is necessary to offer other DP questions to students, in
order to generalize or refute misconceptions presented in this paper.
What are the features of DP problems that lead to considerable
difficulty? Are students able to progress easily on more introductory
DP examples?

561

You might also like