9
Polar Bear Module Data Structures Lesson Plan An MSE Product: http://www.ithaca.edu/mse Module Synopsis: In taking full part in the Polar Bear module, you will be enhancing the associated Computer Science (CS) course while still covering standard material, without having to make any sig- nificant changes to the disciplinary content (please see the note below as to what “Computer Science course” means). Students engaged in this module will see that CS can contribute to the understanding of a significant current issue by addressing the questions “How is the size of the Arctic changing? and (optionally) “How is the ice concentration of the Arctic changing? Students will (i) process satellite imagery from Cryosphere Today 1 , (ii) write technical reports to demonstrate their ability to communicate programming results, (iii) syn- thesize material from other disciplines’ work on the module question, and (iv) comprehend the work done from all disciplines (along with emphasizing CS’s role) in the form of a reflective summary activity. Note : In this document, we use the phrase “Computer Science course” as a place holder for “Principles Of Computer Science II” or “Data Structures” or any intermediate course in which students can be assumed to have had at least one semester of basic programming, including array processing (data structure) and Lists (abstract data type). Module Timing: The basic programming skill-set needed for this module is array and list processing. De- pending on whether optional components are used, knowledge of standard APIs (such as java.util.*’ or the equivalent for the language used in the associated CS course) may be necessary; for these, we assume that no additional course time will have to be allocated. The introduction to 21st century problems (50 minutes of class time), the Arctic Size change exercise (50 minutes of class time), the description of the expectations of the writing activity (30 minutes of class time), and the 21st century recap (30 minutes of class time) will take close to three hour-long lectures. The bulk of the student work (programming) and technical report reading/writing should be allocated roughly two weeks each. If the recap step is done at the very end of the course, then the project should start no later than the 10th week of a 14 week semester. Module Question: What is the current and future impacts of global climate change on polar bears? Module Steps: 1. Introduction to the main question and 21st century problems. 1 Please see the page labeled “Compare side-by-side images of Northern Hemisphere sea ice extent for any two dates in the satellite record (1979-present)“ from http://arctic.atmos.uiuc.edu/cryosphere 1

Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

Embed Size (px)

Citation preview

Page 1: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

Polar Bear ModuleData Structures Lesson PlanAn MSE Product: http://www.ithaca.edu/mse

Module Synopsis:

In taking full part in the Polar Bear module, you will be enhancing the associated ComputerScience (CS) course while still covering standard material, without having to make any sig-nificant changes to the disciplinary content (please see the note below as to what “ComputerScience course” means). Students engaged in this module will see that CS can contributeto the understanding of a significant current issue by addressing the questions “How is thesize of the Arctic changing?” and (optionally) “How is the ice concentration of the Arcticchanging?” Students will (i) process satellite imagery from Cryosphere Today1, (ii) writetechnical reports to demonstrate their ability to communicate programming results, (iii) syn-thesize material from other disciplines’ work on the module question, and (iv) comprehend thework done from all disciplines (along with emphasizing CS’s role) in the form of a reflectivesummary activity.

Note: In this document, we use the phrase “Computer Science course” as a place holderfor “Principles Of Computer Science II” or “Data Structures” or any intermediate coursein which students can be assumed to have had at least one semester of basic programming,including array processing (data structure) and Lists (abstract data type).

Module Timing:

The basic programming skill-set needed for this module is array and list processing. De-pending on whether optional components are used, knowledge of standard APIs (such as‘java.util.*’ or the equivalent for the language used in the associated CS course) may benecessary; for these, we assume that no additional course time will have to be allocated.The introduction to 21st century problems (50 minutes of class time), the Arctic Size changeexercise (50 minutes of class time), the description of the expectations of the writing activity(30 minutes of class time), and the 21st century recap (30 minutes of class time) will takeclose to three hour-long lectures. The bulk of the student work (programming) and technicalreport reading/writing should be allocated roughly two weeks each. If the recap step is doneat the very end of the course, then the project should start no later than the 10th week of a14 week semester.

Module Question:

What is the current and future impacts of global climate change on polar bears?

Module Steps:

1. Introduction to the main question and 21st century problems.

1Please see the page labeled “Compare side-by-side images of Northern Hemisphere sea ice extent for any twodates in the satellite record (1979-present)“ from http://arctic.atmos.uiuc.edu/cryosphere

1

Page 2: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

• TIME INVESTMENT: 50 minutes of class time, one hour of student time for homework,15 minutes/student of grading time.

• WHEN: This needs to be done before steps 3 and 4 but it can be done either before orafter 2.

• HOW: Give students the handout on 21st century problems “What are 21st century prob-lems, student information” and go through the associated power points “21st centuryproblems slides” slides for an overview; module material “What are 21st Century Prob-lems, instructor information” is available as an additional resource for the instructor.Next, give students the 21st century identification activity “21st century identificationactivity” so that they can test their knowledge on the material. Present students withthe main question and, perhaps, tweak their interest with a discussion on the themesof “Can what we learn in our CS course make a positive contribution to the solutionto this problem?” and “How is this a 21st century problem?”. These questions will beanswered during the course.

• WHAT: Module materials:

– “21st century problems slides”

– “What are 21st century problems, student information”

– “What are 21st Century Problems, instructor information”

– “21st century identification activity”

• WHY (multidisciplinary angle): Students will learn about the existence and nature of21st century problems. This helps set the context for the module and helps studentsstart to think like 21st century problem solvers.

• WHY (CS angle): Since the dot-com and telecommunications busts (i.e. circa 2001),CS education has already been exploring numerous ways to contextualize its subjectmatter. Therefore, what we do in this module may not seem to be that novel. However,our fundamental difference with the bulk of what has already been done is that we aremotivating students with a problem that requires the participation of CS and yet cannotbe solved by just CS. We are conveying to the students that the problems they will faceafter graduation will be of greater difficulty than those we faced in the past.

2. Array processing

• TIME INVESTMENT: Two to three classes or one to two labs, one to two hours of stu-dent time for homework/programming beyond class time (if needed), 15 minutes/studentof grading time.

• WHEN: Array processing (especially multi-dimensional ones) should be done early inthe course, assuming it has not been adequately covered in prior courses.

• HOW: Go through basic image processing exercises. For example, flipping an imageacross a horizontal axis, filtering out one of the three colors, converting an image toblack&white, etc, are all fun and engaging exercises (for a rich set of similar examples,please refer to “Introduction to Computing and Programming in Python, A MultimediaApproach” by Guzdial/Ericson and “Introduction to Programming in Java: An Interdis-ciplinary Approach” by Sedgewick/Wayne). If more technical applications are needed,use Markovian systems (which necessitates basic matrix operations) and/or modeling asimple version of Google’s Pagerank algorithm.

2

Page 3: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

• WHY: Array processing is the most significant skill needed to process and quantify thechanges in the size of the Arctic region.

• TIPS:

– If using C or C++, clarifying the differences between static vs dynamic allocation ofarrays is well worth the time, especially if the optional component outlined in step4 will be attempted.

– For dynamically allocated arrays, it is important to distinguish uniform arrays (suchas two dimensional ones of N rows by M columns) from ragged arrays (such as twodimensional ones of N rows where each row has a potentially different length).

3. Arctic size change

• TIME INVESTMENT: 50 minutes of class time, two weeks for project completion, 15minutes/student for grading.

• WHEN: Any time after the completion of step 2.

• HOW: Students will be given large sets of satellite imagery showing the daily changes inthe size of the Arctic region. They will be expected to create one plot line for each year,were each point is the number of pixels that belong to the Arctic in a particular imageof the corresponding year, as explained in “Instructions for the Arctic Images project forData Structures”. They will then superimpose these plot lines on the same set of axesand observe changes from year to year, as shown in figure 1.

• WHAT:

– “Instructions for the Arctic Images project for Data Structures”

– The Arctic image sets. These images are all from Cryosphere Today but our projectportal makes them available in more convenient forms, as detailed in the TIPS bulletbelow. When you visit http://www.ithaca.edu/mse, please click on “Lesson Plans”and locate the “Arctic Image Sets” link for our download page.

• WHY (multidisciplinary angle): The size of the Arctic region during the Summer andFall months have been diminishing. This creates a very significant challenge for polarbears whose biology is determined by tight windows of opportunity for feeding, mating,etc. If current trends continue, we may have an ice free Arctic region during the summermonths; this would have very significant consequences for polar bears. Students mayhave heard about this trend but (by our experience) they will comprehend reality muchmore thoroughly when they generate their own results.

• WHY (CS angle): It has been established, that image processing is an effective wayto teach array processing, ray tracing, depth/breadth first search, and recursion inCS1/CS2/Data-Structures, as discussed in [1, 2, 3, 4].

• TIPS:

– Cryosphere Today site is very effective in motivating students with the notion thatthe Arctic is indeed changing. However, their web interface does not allow multipleimages to be retrieved in one batch; furthermore, earlier years have repeated images.At our portal, we eliminated these repetitions, removed various pictures with flaws,and organized the remaining ones by archive files of months and archive files ofyears.

3

Page 4: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

– Our portal provides a set of images where ice concentration is represented in auni-color scale (as seen in figure 2(b)); these images make it easier for studentsto focus on the Arctic changes. Our site also provides the original satellite imageswhich represent ice concentration in a multi-color scale (as seen in figure 2(a)); theseimages make the activity more challenging for advanced students.

– The image sets provided from our portal are large, both in volume (over 20GB) andin number-of-files (tens of thousands). It might be convenient for one copy to bemade for the entire class, through a shared network storage location.

– When the entire class hits the same image set over a network location, noticeablelatency may start to surface. Space permitting, students should therefore also havethe option of making local copies in order to speed up the execution of their pro-grams.

– If students are submitting their work through electronic means (such as Blackboardor SVN), they should make sure not to include the images in the project space,simply due to size issues.

– Based on what has been made available from Cryosphere Today, different yearshave different numbers of images. Consequently, students should be careful as theycompare one year to another, “aligning” images from different years by the datescoded into the image filenames. For example, if one year is missing a block of 20consecutive dates, then the plot should leave an appropriate gap, as opposed toplotting all numbers of that years one after the other.

– Extracting the Arctic region from the satellite pictures is not a trivial process. If theoriginal images are used, please keep in mind that the ice concentration is expressedin RGB space by the primary color profiles shown in figure 3. This profile was thebasis of the conversion of the multi-color images (as those seen in 2(a)) into theuni-color ones (as those seen in 2(b)).

4. (Optional) Arctic ice concentration change

• TIME INVESTMENT: 30 minutes of class time for problem discussion, two weeks ofstudent time for project completion, 15 minutes/student for grading.

• WHEN: Any time after the completion of step 3.

• HOW: Since the conversion of an entire image into a single point loses too much infor-mation, each image can also turned into a color intensity histogram. These histogramscan then layered (as 3d bar charts) to create a surface plot of the changes throughout ayear. Unfortunately, the satellite images for two consecutive days typically differ morethan one would expect2 and the resulting surface plots are almost always too “noisy”.Therefore, before one can look for trends, these surface plots need to be smoothed witha moving average based on the recurrence relation

H(n) = αH(n− 1) + (1− α)h(n)

which states that the nth average histogram H(n) is based on the previous averageH(n − 1) as well as the nth specific histogram h(n), with the 0 → 1 range α valuedetermining how aggressive the averaging should be (greater α values put more weight

2This probably has to do with the instrumentation/software used to capture/process the images at CryosphereToday.

4

Page 5: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

on the previous average and lead to smoother results). Furthermore, the more revealingpresentation of the concentration changes is by surface plotting the difference of twochosen years; the differences between 2001-and-2007 vs 2006-and-2007 are shown infigure 4. The consequence of choosing different α values are shown in figure 5.

• WHY (multidisciplinary angle): Ice concentration is important in two ways. First, solidvs non-solid ice makes a difference for the life cycle of polar bears; this is a factor thatmight be overlooked when we only consider the size of the Arctic region. Second, ice con-centration has implications on the reflectivity of the planet. Therefore, this informationwill have thermodynamic significance, leading non-linear climate changes.

• WHY (CS angle): Students will appreciate the difficulty of dealing with large amountsof data. Specifically, each surface plot will consist of 365*100 points; if multiple yearsare held in memory simultaneously, students will have to pay attention to efficient waysof storing the associated numbers.

• TIPS:

– This may be a good context to compare the virtues of dealing with raw data struc-tures (such as good old two dimensional arrays) vs those that are part of a standardAPI (such as the ArrayList class that comes with the Java API).

– For this exercise, the difference in the number of images available for each year iseven more significant. Either through class discussion or by additional instructionsin the project description, the issue should be addressed. If student stumble uponthe problem after investing much into a non-practical solution, they will waste muchtime and effort.

5. Students write a short (2-5 page) technical report summarizing their results for students inother disciplines.

• TIME INVESTMENT: 30 minutes of class time, four to eight hours of student time forreport creation, 15 minutes/student for grading.

• WHEN: This can be completed either after step 3 or 4.

• HOW: Give students the technical report activity as either an in-class project or home-work; this can be a group or individual exercise.

• WHAT:

– “Technical report instructions for students”

– “Technical report grading rubric for instructors”

• WHY: One of the goals of the module is to educate students about the need for workingin multidisciplinary teams. Because of the rich context of the project, writing this reportwill force students to effectively communicate computational and data processing resultsto non Computer Scientists.

• TIPS:

– Many science students will likely have little experience in technical writing. There-fore, the expectations of the report (how to communicate the important computa-tional results, how to incorporate and use gures/graphs appropriately, etc) must becarefully reviewed.

5

Page 6: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

– Students will likely have difficulty deciding on what results they should report andhow to report them. One can (i) choose to provide detailed instructions to studentsor (ii) allow them to make choices and discuss what was appropriate/inappropriatewhen returning the reports.

6. Students read technical reports from other classes and evaluate.

• TIME INVESTMENT: No class time, no grading time, 15 minutes of student readingtime (per report).

• WHEN: This should be done shortly after step 5. Note that at least three weeks of theclass time is needed after this is completed to finish the rest of the module.

• HOW: The students should be provided with a link to the other courses’ technicalreports. Each student should be assigned to read three reports from each of the otherdisciplines chosen by the instructor. Each student should also be given a grading rubricfor each technical report.

• WHAT:

– “Link to other technical reports”

– “Technical report grading rubric for students”

• WHY: Reading reports written by their peers provides students with an opportunity toreflect upon their own writing. Reading these reports will help students realize the valueand role of CS in addressing the main question.

• TIPS:

– For reasons of student workload, it might be tempting to assign only one technicalreport from each of the other disciplines. This is probably not a good idea, since oneof the virtues of reading these reports is to understand the importance of clarity inpresenting the givens, methods, results, and conclusion of an experiment/study. Asingle poorly constructed technical report can possibly be attributed by the studentsto the difficulty of the discipline from which the paper was received.

7. Students respond to a summary activity.

• TIME INVESTMENT: No class time, one to two hours of student time for homework,10 minutes of grading time for students.

• WHEN: This should be done shortly after step 6.

• HOW: Give students the summary activity as homework. Since this stage requiressynthesis of knowledge from different sources, a group activity is preferred over individualwork.

• WHAT:

– “Data structures summary activity”

• WHY: Understand the role and value of the CS course in addressing the problem andrecognize the need for the multidisciplinary team in today’s complex world.

8. 21st century recap

• TIME INVESTMENT: 30 minutes of class time, no homework time, no grading time.

6

Page 7: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

July Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun

130 000

140 000

150 000

160 000

Figure 1: 1996 and 2001 (flat) vs 2006 and 2007 (sagging). The y-value of each pointrepresents the number of Arctic pixels found in a particular satellite image.

• WHEN: This can be done anytime after 7 is completed.

• HOW: Provide students with the handout on the future of polar bears is a 21st centuryproblem. Review possible solutions to the summary activity in class.

• WHAT:

– “Future of polar bears is a 21st century problem”

• WHY: Students will reflect on the results and correct and misconceptions.

References

[1] J. W. Chastine and J. A. Preston. Teaching 2d arrays using real-time video filters. In SIGITE’05: Proceedings of the 6th conference on Information technology education, pages 133–137,New York, NY, USA, 2005. ACM. 3

[2] S. Matzko and T. Davis. Using graphics research to teach freshman computer science. InSIGGRAPH ’06: ACM SIGGRAPH 2006 Educators program, page 9, New York, NY, USA,2006. ACM. 3

[3] S. Matzko and T. A. Davis. A graphics-based approach to data structures. In ITiCSE ’08:Proceedings of the 13th annual conference on Innovation and technology in computer scienceeducation, pages 109–113, New York, NY, USA, 2008. ACM. 3

[4] A. Erkan and D. Gochev. An image background detection project for a visual exploration of dfsand bfs. In SIGCSE ’08: Proceedings of the 39th SIGCSE technical symposium on Computerscience education, pages 483–487, New York, NY, USA, 2008. ACM. 3

7

Page 8: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

(a) Multicolor ice concentrations (b) Unicolor ice concentrations

Figure 2: Original vs processed images from Cryosphere Today. These images, one foreach day for the 1980 to 2009 period, are available from our portal at http://www.ithaca.edu/mse.As shown in figure 2(a), the original images from Cryosphere Today use a multi-color scale, withthe color sequence blue → green → yellow → orange → red → magenta progressively indicatingincreased concentrations of ice. Although ideal for human perception, this scheme is inconvenientfor computer processing. The uni-color ice-concentration images we have created from the originals(shown in figure 2(b)) simplify the necessary programing if the module is used in a CS1/2 context.

0 50 100 150 200 250 300 3500

100

200

300

0 50 100 150 200 250 300 3500

100

200

300

0 50 100 150 200 250 300 3500

100

200

300

Figure 3: The RGB color distribution of ice concentration representation in theCryosphere pictures. The top, middle, and bottom plots represent the green, red, and bluebands, respectively, of the original images from Cryosphere Today. The x-axis is the pixel positionstarting from the bottom of the color legend in the top left corner of figure 2(a). The y-axis is avalue from 0 (total absence of a primary color) to 255 (total presence of a primary color, in 8 bitrepresentation.

8

Page 9: Polar Bear Module Data Structures Lesson Plan An MSE ...physics.ithaca.edu/~msep/.../MSEP-PolarBearModule-DataStructures... · Polar Bear Module Data Structures Lesson Plan An MSE

(a) Difference between 2001 and 2007 (b) Difference between 2006 and 2007

Figure 4: Ice concentration changes: The change from 2001 to 2007 is clearly much bigger thanthe change from 2006 to 2007. For both plots, α = 0.9.

(a) α value of 0.5 (b) α value of 0.9

Figure 5: The difference between two different α value for smoothing. The surface plotshown in figure 5(a) has α = 0.5 while the one in 5(b) has α = 0.9.

9