<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<br style="text-indent: 0in !important; ">&gt; &gt;<br style="text-indent: 0in !important; ">&gt; &gt; Well it engaged my students and got them interested in seeing how&nbsp;<br style="text-indent: 0in !important; ">&gt; &gt; it's implemented.<br style="text-indent: 0in !important; ">&gt; &gt;<br style="text-indent: 0in !important; ">&gt; &gt; It also provides me with a vehicle for introducing do and arrays&nbsp;<br style="text-indent: 0in !important; ">&gt; &gt; both of which they need to learn.<br style="text-indent: 0in !important; ">&gt;&nbsp;<br style="text-indent: 0in !important; ">&gt; Seems to me it would make more sense to motivate arrays with the&nbsp;<br style="text-indent: 0in !important; ">&gt; purpose they really serve, O(1) access to a large collection of data,&nbsp;<br style="text-indent: 0in !important; ">&gt; as with graphs or union-find, or more mundanely perhaps, game boards&nbsp;<br style="text-indent: 0in !important; ">&gt; and other stuff where Schemers would tend to prefer lists.<br style="text-indent: 0in !important; ">&gt;&nbsp;<div style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">My students aren't probably haven't and will likely never take a discrete math course and don't know what a graph is. Discrete Math is not a prerequisite for their curriculum. The examples are more esoteric than necessary.</div><div style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">I have already explained O(1) access that arrays provide and when you need it. I motivated it using Brian Harvey's example of a lap counter in Simply Scheme. That simultaneously introduced the need for state and then O(1) access to update the lap counter for each car in the race and used an example that a primary school kid could understand. I did not see a reason to conflate the manipulation of arrays with the motivation.&nbsp;If you were to ask them now they could probably give a pretty good explanation as to why an array should not be the data structure of choice for summing a list of numbers.&nbsp;To be fair I did say I was doing that with bubble sort but I really meant motivating an example of array manipulation and I wanted to do that with an example where an array was genuinely appropriate.</div><div style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">&gt;</div><div style="text-indent: 0in !important; ">&gt; I say this just because using bubblesort to motivate do &amp; arrays seems&nbsp;<br style="text-indent: 0in !important; ">&gt; kind of like the hardcore Schemers (not of the PLT school of thought)&nbsp;<br style="text-indent: 0in !important; ">&gt; using factorial &amp; exp-time fibonacci to motivate recursion...i.e.,&nbsp;<br style="text-indent: 0in !important; ">&gt; losing some students, understandably, at "why would I care about&nbsp;<br style="text-indent: 0in !important; ">&gt; that?" and others at "wait--so people use this stuff for algorithms&nbsp;<br style="text-indent: 0in !important; ">&gt; that are so bad nobody uses them?"<br style="text-indent: 0in !important; ">&gt;&nbsp;<br style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">Count me in their number.</div><div style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">Past exam questions have been to write a recursive then iterative version of fibonacci and to write factorial and use it to implement a program that takes n and k and calculates n choose k.&nbsp;</div><div style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">I'd rather they answer those than the ones that require them to manipulate files or arrays.</div><div><br></div>                                               <br /><hr />Not got a Hotmail account? <a href='http://clk.atdmt.com/UKM/go/197222280/direct/01/' target='_new'>Sign-up now - Free</a></body>
</html>