[Year 12 SofDev] An algorithm puzzler for your kids (and you?)

Robert Hind robert at yinnar.com
Sun Mar 11 16:31:41 EST 2007


Keep iterating Robert J Much better than chick flicks. Last night I was subjected to "The Piano" - recorded some years ago from tv and with ads - a Gothic style film. Not my style at all. I would have preferred to be iterating!

Sorry, my problem not your's.
.
Seriously though, we do need to check on the efficiency of the various algorithms available to us, and Robert's exercise has provided useful information.

Robert Hind (Semi-retired)
Ex Ashwood and Traralgon


----- Original Message ----- 
From: "Timmer-Arends" <timmer at melbpc.org.au>
To: "Year 12 Software Development Teachers' Mailing List" <sofdev at edulists.com.au>
Sent: Sunday, March 11, 2007 3:36 PM
Subject: Re: [Year 12 SofDev] An algorithm puzzler for your kids (and you?)


> Mark, you're probably right but two chick-flicks on the telly and out 
> numbered 2 to 1....
> 
> Regards
> Robert T-A
> 
> ----- Original Message ----- 
> From: "Mark Kelly" <kel at mckinnonsc.vic.edu.au>
> To: "Year 12 Software Development Teachers' Mailing List" 
> <sofdev at edulists.com.au>
> Sent: Saturday, March 10, 2007 8:28 PM
> Subject: Re: [Year 12 SofDev] An algorithm puzzler for your kids (and you?)
> 
> 
> > O, Robert!  You really ought to take Margaret out dancing.
> >
> > Sitting in the dark running 100 million algorithm iterations on a Saturday 
> > night can't be much fun!
> >
> > :-)
> >
> > Mark
> >
> > Timmer-Arends wrote:
> >> Hello Mark and Robert
> >>
> >>> Robert Hind wrote: =(ROUNDUP(n*4,0)/4)
> >>> Mark Kelly wrote: =(-INT(-n*4)/4)
> >>
> >> I switched Excel to manual recalc then created a small macro that in 
> >> effect
> >> presses F9 (recalc) one million times.
> >> The results for 5 runs each:
> >> RH: 32.31s, 34.37s, 30.10s, 34.48s, 33.86s
> >> MK (student?): 33.98s, 33.98s, 34.12s, 34.72s, 34.86s
> >>
> >> Given that Excel runs in a multitasking environment where goodness knows
> >> what other processes get a look in while the calcs are happening probably
> >> explains the slight variation in times, but I'd say there's not much 
> >> between
> >> the two.
> >>
> >> Just for interest I dragged out an old copy of TurboPascal. Because it 
> >> runs
> >> in DOS mode times were much more consistent:
> >> Also I could only try out the INT version since TP doesn't have a RoundUp
> >> function.
> >> The result: 100 million iterations (yes 100 million): 43.9s
> >>
> >> That makes Excel in the order of 100 times slower than compiled code! 
> >> (and
> >> that's old 8086 code what's more.) Just goes to show the overheads in 
> >> Excel
> >> and Windows generally.
> >>
> >> It would be interesting to get some times for a compiled VB program.
> >>
> >> Regards
> >> Robert T-A
> >> Brighton SC
> >>
> >>
> >> ----- Original Message ----- From: "Mark Kelly" 
> >> <kel at mckinnonsc.vic.edu.au>
> >> To: "Year 12 Software Development Teachers' Mailing List"
> >> <sofdev at edulists.com.au>
> >> Sent: Friday, March 09, 2007 5:40 PM
> >> Subject: Re: [Year 12 SofDev] An algorithm puzzler for your kids (and 
> >> you?)
> >>
> >>
> >>> 3 solutions for the price of one!
> >>>
> >>> Just goes to show the many ways an algorithm can take shape.
> >>>
> >>> Would be interesting to iterate each one a million times to compare
> >>> relative execution speeds...
> >>>
> >>
> >>
> >> _______________________________________________
> >> http://www.edulists.com.au
> >> IT Software Development Mailing List kindly supported by
> >> http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment 
> >> Authority and
> >> http://www.vitta.org.au  - VITTA Victorian Information Technology 
> >> Teachers Association Inc
> >>
> >>
> >
> > -- 
> > Mark Kelly
> > Manager - Information Systems
> > McKinnon Secondary College
> > McKinnon Rd McKinnon 3204, Victoria, Australia
> > Direct line / Voicemail: 8520 9085
> > School Phone +613 8520 9000 << new number!
> > School Fax   +613 9578 9253
> >
> > Webmaster - http://www.mckinnonsc.vic.edu.au
> > IT Lecture notes: http://vceit.com
> > Moderator: IPM Mailing List
> >
> > Doctor - We must all face reality sooner or later.
> > Dowd   - I wrestled with reality for 35 years, doctor, and I'm happy to 
> > say I won out over it.  ('Harvey', 1950)
> >
> >
> > _______________________________________________
> > http://www.edulists.com.au
> > IT Software Development Mailing List kindly supported by
> > http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority 
> > and
> > http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers 
> > Association Inc 
> 
> _______________________________________________
> http://www.edulists.com.au
> IT Software Development Mailing List kindly supported by
> http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority and
> http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers Association Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20070311/e5c0ad7b/attachment.html


More information about the sofdev mailing list