<?xml version="1.0" encoding="ISO-8859-1"?>
<CAT xmlns:cat="http://www.w3.org/TR/html4/" version="2.0"> 
<cat:title>Analysis Categorizing Grid</cat:title>
<cat:author>Kate Deibel</cat:author>
<cat:date>November 11, 2003</cat:date>

<cat:technique>Categorizing Grid</cat:technique>

<cat:purpose>
<p>
This activity allows instructors to see if students are aware of the computational complexities of several common algorithms.
</p>
</cat:purpose>
<cat:activity>
<p>
This activity will give you the opportunity to recall the computational complexities of several algorithms. Place each item in the Algorithm box under the heading that <i>bests</i> describes it.
</p>

<br></br>

<center>

<table border="1">
<tr>
<td align="center" width="90">
O(1)
</td>
<td align="center" width="90">
O(log n)
</td>
<td align="center" width="90">
O(n)
</td>
<td align="center" width="90">
O(n log n)
</td>
<td align="center" width="90">
O(n<sup>2</sup>)
</td>
</tr>
<tr>
<td height="95">

<br></br>

</td>
<td height="95">

<br></br>

</td>
<td height="95">

<br></br>

</td>
<td height="95">

<br></br>

</td>
<td height="95">

<br></br>

</td>
</tr>
</table>

<br></br>

<table border="1">
<tr>
<td align="center">
Algorithms
</td>
</tr>
<tr>
<td>

<ol>
<li>Finding an element in an unordered array</li>
<li>Finding an element in an unordered linked list</li>
<li>Finding an element in an ordered array</li>
<li>Finding an element in an ordered linked list</li>
<li>Removing the i<sup>th</sup> item in an unordered array</li>
<li>Removing the i<sup>th</sup> item in an ordered array</li>
<li>Removing the i<sup>th</sup> item in a linked list</li>
<li>Sorting a linked list</li>
<li>Sorting an array</li>
<li>Insertion sort</li>
<li>Bubble sort</li>
<li>Merge sort</li>
<li>Quick sort</li>
<li>Finding the median of a series of numbers</li>
<li>Finding the mean of a series of numbers</li>
<li>Finding the mode of a series of numbers</li>
</ol>

</td>
</tr>
</table>

</center>
</cat:activity>
<cat:solution>
<ol>
<li><b>O(n):</b> Finding an element in an unordered array</li>
<li><b>O(n):</b> Finding an element in an unordered linked list</li>
<li><b>O(log n):</b> Finding an element in an ordered array</li>
<li><b>O(n):</b> Finding an element in an ordered linked list</li>
<li><b>O(1):</b> Removing the i<sup>th</sup> item in an unordered array</li>
<li><b>O(n):</b> Removing the i<sup>th</sup> item in an ordered array</li>
<li><b>O(n):</b> Removing the i<sup>th</sup> item in a linked list</li>
<li><b>O(n log n):</b> Sorting a linked list</li>
<li><b>O(n log n):</b> Sorting an array</li>
<li><b>O(n<sup>2</sup>):</b> Insertion sort</li>
<li><b>O(n<sup>2</sup>):</b> Bubble sort</li>
<li><b>O(n<sup>2</sup>):</b> Merge sort</li>
<li><b>O(n<sup>2</sup>):</b> Quick sort</li>
<li><b>O(n):</b> Finding the median of a series of numbers</li>
<li><b>O(n):</b> Finding the mean of a series of numbers</li>
<li><b>O(n log n):</b> Finding the mode of a series of numbers</li>
</ol>
</cat:solution>
<cat:analysis>
<p>
Run through the grids and mark incorrect or missing entries. Identify the most common errors as well as any patterns that could explain student confusion. Reflect upon these errors and report them back to the class as you see fit.
</p>
</cat:analysis>
<cat:variant_uses>
	<cat:variation>After deciding on the complexity class, have the students describe in their own words why they feel this is true.</cat:variation>
	<cat:variation>Have students work in groups to complete this activity. The instructor may want to circulate throughout the groups to ensure that each group is making progress. After the groups have completed their lists, the instructor can ask for votes on each item. It is important that the instructor explains why each data structure is appropriate for the task.</cat:variation>
	<cat:variation>Have students work individually on their lists and then form groups of 4-5 people to discuss their individual lists with other members of the group.</cat:variation>
</cat:variant_uses>
<cat:classification>
<cat:assessment_goals>
	<cat:goal>Develop analytic skills</cat:goal>
	<cat:goal>Develop ability to draw reasonable inferences from observations</cat:goal>
	<cat:goal>Improve memory skills</cat:goal>
	<cat:goal>Develop appropriate study skills, strategies, and habits</cat:goal>
	<cat:goal>Learn terms and facts of this subject</cat:goal>
	<cat:goal>Learn concepts and theories of this subject</cat:goal>
</cat:assessment_goals>
<cat:topics>
	<cat:topic>Algorithms</cat:topic>
	<cat:topic>Efficiency</cat:topic>
	<cat:topic>Complexity</cat:topic>
	<cat:topic>Analysis</cat:topic>
	<cat:topic>big-O</cat:topic>
</cat:topics>
<cat:participation_level>
</cat:participation_level>
<cat:time>
	<cat:preparation_time>LOW</cat:preparation_time>
	<cat:class_time>LOW</cat:class_time>
	<cat:in_class_analysis_time>LOW</cat:in_class_analysis_time>
	<cat:out_class_analysis_time>LOW</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>Homework</cat:response>
</cat:instructor_response>
<cat:device_enabled>Has Been Enabled</cat:device_enabled>
<cat:related_topics>
	<cat:topic>Sorting</cat:topic>
	<cat:topic>Searching</cat:topic>
	<cat:topic>Data Structures</cat:topic>
</cat:related_topics>
</cat:classification>
</CAT>