Understanding combinatorics challenges in an upper-division thermodynamics course

Upper division thermodynamics courses require students to develop proﬁciency with several combinatorial topics. While little research has been done to establish student comfort and proﬁciency with these topics within physics, anecdotally, instructors of these courses report that students experience unaddressed challenges when working with combinatorics. Through examining student solutions to questions on homework assignments and examinations, we identiﬁed some common student diﬃculties with combinatorics in the context of an upper-division thermodynamics and statistical mechanics course at a large research university. Some of these common challenges include identifying how to work with distinguishability and order, checking formulas against a speciﬁc case, and combining the multiplicities of multiple systems.


I. INTRODUCTION
An understanding of the mathematics of counting is essential for the upper-division thermodynamics student. Almost all probabilistic calculations in thermal physics require students to calculate various multiplicities, often relying on combinatorics principles including knowing and applying formulas for combinations and permutations. While many students have experience with statistics involving error analysis from lab courses, many have no formal experience with combinatorics, and therefore encounter these mathematics for the first time alongside challenging physics concepts.
Little research has been done to identify student difficulties with combinatorics in the context of thermodynamics courses. As a notable exception, Loverude investigated student reasoning around probability in an upper-division thermodynamics course. His research suggests that many students struggle to correctly identify the probability of events, often confusing the probabilities of microstates and macrostates. He proposed that students often have trouble identifying where to find information about distinguishability in problems that carry that information differently than on questions they have seen in the past [1].
Math education researchers have done more extensive work examining student reasoning around combinatorics. A 2011 study by Lockwood investigated the way that students recognize similarities and differences between combinatorics problems when choosing and applying an appropriate formula. Lockwood suggested that students often focus on aspects of scenarios that experts find unimportant, and that these differences can impact how students interpret and handle combinatorics problems. Student identification of differences between problems can also aid their reasoning about when formulas do and do not apply [2]. Lockwood, in 2013, went on to establish a model to describe students' combinatorial thinking which relies on students moving between the use of formulas, counting processes, and sets of outcomes [3]. In 2015, Lockwood also investigated two students' engagement with combinatorics questions through the lens of this model, ultimately suggesting that having students reinvent combinatorics formulas may be a useful teaching tool. Furthermore, these students were successful in their reinvention of these formulas in part because they were able to check the outcome for examples involving small numbers and used this to choose a formula [4].
Batanero et al. compiled a list of common student difficulties with combinatorics, many of which show similarities to challenges described by Lockwood. Particularly, these researchers note that students often struggle to correctly identify object type, whether repetition in selection is allowed, and whether order matters. These issues ultimately have implications in students' reasoning about probability [5], which is foundational in the context of statistical mechanics.
Here, we examine student responses to combinatorics questions in an upper-division thermodynamics course and compare observed student challenges with those discussed in the existing literature. Previous work on students' difficulties with mathematics in physics suggests that students often encounter new or different difficulties with mathematics when in the context of physics [6]. Thus, by comparing the difficulties physics students encounter with this topic in the context of physics, we contribute to a greater understanding of the challenges inherent in learning combinatorics. Additionally, because many upper-division physics students have no formal experience with combinatorics, and are using these new mathematical skills in order to learn new physics concepts, their challenges could differ meaningfully from those described in the literature. As a preliminary study, this work will help to inform future studies investigating how physics students reason around combinatorics.

II. METHODS
To identify common student difficulties with combinatorics problems, we examined written student responses to six combinatorics questions that appeared on either exams or homework sets. Students were participants in an upper-division thermodynamics course at a large research institution during Spring 2021. Due to the COVID-19 pandemic, all exams in this course were "takehome exams" in which students had access to their notes and materials that the instructor had posted on the course Canvas page. While collaboration was encouraged on homework assignments, many students indicated that they were not interacting with other students while solving the problem sets, and we expect that less collaboration was occurring than during a typical, in person semester. Overall, 53 students participated in the course, most of whom were senior physics majors. Of these, 48 gave consent for their data to be used for research; therefore, these 48 students' responses are considered here. Table I shows the six questions for which we have data on students' responses. Table I lists these questions in the order that they were presented to students. All of the questions asked on homework assignments are questions that the instructor (BRW) typically asks in this course, while both of the exam questions were designed to probe themes appearing in the coded student responses from the preflight and homework questions.
Students answered the Preflight question before any combinatorics related lectures in class, but after they had read the corresponding chapter of Schroeder [7]. Author KAO coded their written responses to this question for 1) whether the student identified the correct formula, and 2) whether they applied complete reasoning.
The Coin Flips and Objects in Boxes questions were asked on a single homework assignment early in the TABLE I. List of questions asked with language abbreviated for space. Questions are listed in this table in the order that they were presented to students and context (e.g., exam or homework) is designated in parentheses. The original version of the Lattice Sites question included a diagram showing a lattice of 8 Gallium atoms doped with one Germanium atom. The diagram shows the process of an electron "jumping" from one lattice site to another and leaving a vacancy behind.

Question Name
Question Prompt Preflight How many ways are there to arrange n students in m chairs (where n<m)?

Coin Flips (Homework)
A coin is flipped 4 times.
• How many possible outcomes are there, and how many macrostates are there?
• What is the probability of getting the exact sequence HTHT?
• What is the probability of getting two heads and two tails in any order?
Objects in Boxes (Homework) For each of the scenarios: draw a diagram, find a formula for the multiplicity, the probability of both objects being in the leftmost box, and check the formula against your diagram.
• q=2 indistinguishable objects in N=3 boxes • q=2 distinguishable objects in N=3 boxes • q=2 distinguishable objects in N=3 boxes, only one item allowed per box.

Students with Notebooks in Chairs (Exam)
Consider a classroom which has M chairs. N distinguishable students enter the classroom and sit down (one student per chair). The teacher then hands out n indistinguishable notebooks to a subset of students (only one notebook per student and here n < N < M ). How many different configurations are possible for the combined system of the students, notebooks, and chairs?
Consider a paramagnet where each dipole has three states. Each dipole's magnetic moment points along the z-axis. Then the three possible states of a single dipole are µz = 1, 0, −1. We will call these the 1, 0, and -1 states respectively. The total number of dipoles in the 0-state is N0, the total in the 1-state is N1, and the total in the -1 state is N−1. The total magnetization is M = N1 − N−1. Finally, the total number of dipoles in the system is N = N1 + N0 + N−1.
• In total, how many microstates are available to this system? • Take N0 = 0. What is the number of microstates for a given magnetization, M?
• How many microstates are there in terms of N1, N0, N−1, and N?
• How many total microstates are there with M=0? Give your answer as a sum.
Lattice Sites (Exam) Conductivity of semiconductors can be enhanced through the process of doping in which an impurity (e.g. Gallium) is added to a crystal (e.g. Germanium). The addition of Gallium atoms to a Germanium crystal results in the formation of a vacancy (V) which can accommodate an electron from a neighboring atom. Thermal fluctuations can cause electrons in the crystal to "jump" and occupy the vacancy, resulting in the formation of a new vacancy in the electron's initial position. Determine the change in the entropy of the Germanium-Gallium structure by calculating the number of microstates available for this vacancy upon addition of i) one atom and ii) two atoms of Gallium. Is the process of doping entropically favorable? The student struggles when using the multiplication principle (including identifying when systems are independent and their mutliplicities can be multiplied) to combine multiplicities from individual systems.

Students with Notebooks in Chairs, Three-State Paramagnet, Lattice Sites
Single Case Checking* The student finds an equation and checks to make sure that it provides the correct answer for a specific case. The formula produces the correct answer for this specific situation but does not work in general.

Preflight, Objects in Boxes, Students with Notebooks in Chairs
Sum Over Macrostates* The student makes a mistake in summing over the multiplicities of individual macrostates to find overall multiplicity, or does not use a sum when necessary.

Three-State Paramagnet
Binomial Coefficient Symmetry* The student does not recognize the symmetry of the binomial coefficient Lattice Sites semester. The Students with Notebooks in Chairs question appeared on the first exam, the Three-State Paramagnet question was asked on a later homework assignment, and the Lattice Sites question was on the second exam. All questions were coded by KAO using a combination of a priori codes developed from the common student difficulties in the literature and emergent codes that captured new difficulties brought out by our questions. Because our codes required little qualitative interpretation, the authors discussed the codes in the context of student responses to reach consensus on the overall codebook, definitions, and identified exemplars rather than conducting full inter-rater reliability.

III. RESULTS AND DISCUSSION
In this section, we present common challenges that students encountered in answering these questions. Because not all students submitted answers to all assignments, N for each question is given and varies across questions. We also present our analysis first by question and then provide a synthesis of the themes overall because of this difference in N on each question. Student responses to these six questions demonstrated several key challenges, which we will refer to as: 1) Distinguishability, 2) Independence and Combining Multiple Systems, 3) Single Case Checking 4) Summing Over Macrostates, and 5) Binomial Coefficient Symmetry. These five major challenges are described in detail in Table II, and matched to questions that we may have expected to bring up that specific challenge. In the following paragraphs, we provide more detail on the specific challenges commonly faced by students on each question. A summary of the codes by question is given in Table III. Student responses to the Preflight question were mixed. Just under half (N = 20 of 48) of the students correctly identified the permutation equation as the solution to this problem, while 13 students identified an incorrect formula and 2 students did not produce a formula. Of the students who did not find the correct formula, 9 of them gave the combination equation. This suggests that, before instruction, some students have difficulties identifying when each of these two equations are to be used, perhaps due to issues identifying distinguishable vs. indistinguishable objects including what where to find information about the objects' distinguishability. Notably, 21 students engaged with a valid thought process required to build the equation, although only 15 of those students ultimately produced the correct formula.
Generally, students were successful in answering the Coin Flips question. Only three students made mistakes on this question, with all three being relatively small issues (i.e. an arithmetic error). The success with this question may be attributable to its similarity to example problems provided during course lectures and in the text.
The Objects in Boxes question was more difficult. Be- cause this question asked students to recreate three formulas and check them against diagrams of different possible microstates, it was uniquely able to capture one of our themes -Single Case Checking. We suspect that so many students encountered the Case Checking theme on this question because many students attempted to build a formula directly from an example case (i.e. the diagram that they drew for the given specific case in Objects in Boxes) without considering why the formula would or would not work in general. While the Case Checking code only appears for this question, we include it as a general theme because we suspect that, had we asked students to check their work in other questions, this code would have appeared in other questions as well.
As expected, on the Students with Notebooks in Chairs question, students struggled with identifying whether objects were distinguishable vs. indistinguishable and then selecting the appropriate formula. As noted in the literature, students often struggle to identify what characteristics of objects make them distinguishable (for example, if order matters or if the objects themselves are different), and we noticed students facing this challenge on this question. Students were more successful at combining the two separate systems (arranging students in chairs and then passing out notebooks) using the multiplication principle than we expected. Only one student added the multiplicities for each individual system rather than multiplying, which was the most common mistake documented in the literature.
One common issue on the Three-State Paramagnet question occurred when students attempted to find the overall multiplicity. Many students only found the multiplicity of an individual macrostate, not recognizing that each individual dipole has three possible states, independent of the states of the other dipoles. Furthermore, when answering the second part of this question (see  III. Number of students encountering at least one challenge on each assignment. "Other" here refers to instances where a student exhibited a challenge not captured by one of the 5 challenges given in Table II Table III), many students correctly identified "N choose N 1 " as the first step of the solution, but did not make the connection that those N 1 dipoles must be subtracted from the total when assigning the multiplicity for the N −1 or the N 0 dipoles. This issue may be an indicator that students are not recognizing that in order to multiply the multiplicities of two systems to get the total multiplicity those two multiplicities must be independent. Finally, 13 students struggled with identifying that they needed to sum over all of the possible N 0 dipoles in order to find the total number of microstates with M = 0.
The most common challenge with the Lattice Sites question had to do with the part of the question where students were asked to determine if the process of doping is entropically favorable. Because the question asked them specifically to calculate the difference in entropy between doping with one atom and doping with two, (the entropy is higher when the substance has been doped with two atoms), many students simply claimed that doping was entropically favorable. We know due to students' exam correction submissions that many students interpreted this question to mean "is the process of adding a second atom entropically favorable". This answer, however, does not capture the whole story. Because the number of possible microstates, and therefore the entropy, is calculated using a binomial coefficient, the process is only entropically favorable until N is greater than N/2. While unsurprising that students did not highlight this nuance, this result does emphasize that our upper-division thermodynamics students may not be familiar with the symmetry of the binomial formula. Figure 1 shows the number of students encountering each of the major themes at least once over the course of the semester. None of these major themes seemed to pose a problem to most students consistently. However, for each question other than the Coin Flips question, 50% or more of student answers demonstrated at least one of these issues (Table III).
Notably, new themes appeared on each of the last two questions of the semester (The Sum Over Macrostates theme appeared on the Three-State Paramagnet question for the first time and the Binomial Coefficient Symmetry theme appeared on the Lattice Sites question for the first time). Both of these questions required students to build combinatorics formulas in new contexts, with the Three-State Paramagnet question requiring them to develop formulas that they had never seen before or com-bine known combinatorical formulas in new ways. In this process of creating or recreating expressions, students encounter new challenges (and therefore make new types of mistakes) with every unique question.

IV. CONCLUSIONS
Student responses to this set of questions suggest that upper-division thermodynamics students encounter a variety of challenges with combinatorics. In particular, students experienced challenges in many areas described by the literature including dealing with object and selection distinguishability and combining multiple independent systems using the multiplication principle. These students also faced new challenges not described by previous literature, suggesting that learning combinatorics in the context of physics may elicit new difficulties (Table II). Instructors should be aware of the fact that most of their students are likely to struggle with combinatorics related issues over the course of their education in thermodynamics. Because these issues are so prevalent and many students may not have worked through them in math courses, it is important that students receive instruction and support around these issues at this point in their physics career.
Limitations of this work include the fact that we relied on written work to determine student difficulties. Furthermore, because our data collection used student responses to homework questions where collaboration was encouraged. Additionally, these data were collected at a single, predominantly white research institution. For both of these reasons, our results likely do not capture the full scope of student difficulties with combinatorics in the broader physics population. Our future work will include using interviews with a broader population of students to gain a deeper understanding of students' challenges and reasoning around combinatorics, as well as the development of two in-class tutorials to address some of the challenges presented here.

ACKNOWLEDGMENTS
This work was funded by the Physics department at the University of Colorado Boulder. We would like to thank the members of PER@C for their feedback, as well as the students who participated in our study.