<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE CAT [ <!ENTITY nbsp  "&#160;"> ]>
<CAT xmlns:cat="http://www.w3.org/TR/html4/" version="2.0"> 
<cat:title>Removing Old Date Application Cards</cat:title>
<cat:author>Kate</cat:author>
<cat:date>April 19, 2004</cat:date>

<cat:technique>Application Cards</cat:technique>

<cat:purpose>
<p>
Instructors can find out how well students understand how to choose among various data structures for a specific scenario.  In this scenario, students are asked to infrequently remove old data from the structure.  
</p>
</cat:purpose>
<cat:activity>
<p>
Read the following scenario and answer the question. Be certain to back up your decisions.
</p>

<p>
You need a data structure with the following functionality. Items are inserted, looked up, and removed on a fairly frequent basis. More importantly, every hour, in order to save space, you remove the least used data from the structure. For example, if data A was accessed only once in the past hour, you might want to remove it.  Assume it is up to you to decide what makes data "old." 
</p>

<p>
How would you implement a solution to this problem?
</p>
</cat:activity>
<cat:solution>
<p>
Student answers will vary greatly. One of the more obvious solutions is to use a splay tree.  Other students might note that the removal by age process takes place very infrequently and will instead focus on making the rest of the functionality more efficient.  
</p>
</cat:solution>
<cat:analysis>
<p>
Read through the applications and sort or mark them as "Good," "Acceptable," "Marginal," or "Wrong." Read through the piles again to make sure that you have not accidently misclassified a response. You might also want to sort the responses by the type of algorithms are used.
</p>

<p>
Choose three or four of the best examples from the "Good" pile. Emphasize understandability, but try to have a diversity of example domains. Also consider a few acceptable and marginal responses that highlight points you wish to discuss.
</p>

<p>
If you use an application in class as a bad or poor example, change the application just enough to disguise the example from the original authors.
</p>
</cat:analysis>
<cat:variant_uses>
	<cat:variation>Have students write applications individually and submit these to the instructor anonymously. The instructor reads the applications and the class discusses the merits of these applications. The instructor might want to describe what the code would look like for some of the applications.</cat:variation>
	<cat:variation>Each student writes an application and explains their application to the rest of the class.</cat:variation>
	<cat:variation>Break students into small groups (2-4 people) and have each group find two or more applications. Have each group explain their applications to the rest of the class.</cat:variation>
</cat:variant_uses>
<cat:classification>
<cat:assessment_goals>
	<cat:goal>Develop ability to apply principles and generalizations already learned</cat:goal>
	<cat:goal>Learn concepts and theories in the subject</cat:goal>
	<cat:goal>Develop capacity to think for oneself</cat:goal>
	<cat:goal>Develop ability to think creatively</cat:goal>
	<cat:goal>Develop ability to draw reasonable inferences from observations</cat:goal>
</cat:assessment_goals>
<cat:topics>
	<cat:topic>Sorting</cat:topic>
	<cat:topic>Real World Scenarios</cat:topic>
	<cat:topic>Splay trees</cat:topic>
	<cat:topic>Memory</cat:topic>
	<cat:topic>Efficiency</cat:topic>
	<cat:topic>Amortized analysis</cat:topic>
	<cat:topic>Data structures</cat:topic>
	<cat:topic>ADTs</cat:topic>
</cat:topics>
<cat:participation_level>
</cat:participation_level>
<cat:time>
	<cat:preparation_time>LOW</cat:preparation_time>
	<cat:class_time>MEDIUM</cat:class_time>
	<cat:in_class_analysis_time>MEDIUM</cat:in_class_analysis_time>
	<cat:out_class_analysis_time>MEDIUM</cat:out_class_analysis_time>
</cat:time>
<cat:instructor_response>
	<cat:response>Lecture</cat:response>
	<cat:response>Next Day Summary</cat:response>
	<cat:response>Class Discussion</cat:response>
	<cat:response>Small Group Discussions</cat:response>
	<cat:response>Homework</cat:response>
</cat:instructor_response>
<cat:device_enabled>Difficult to Enable</cat:device_enabled>
<cat:related_topics>
	<cat:topic>Algorithms</cat:topic>
	<cat:topic>Data structures</cat:topic>
	<cat:topic>Design</cat:topic>
	<cat:topic>ADTs</cat:topic>
</cat:related_topics>
</cat:classification>
</CAT>