Wikipedia:Reference desk/Archives/Mathematics/2015 December 25

Mathematics desk
< December 24 << Nov | December | Jan >> Current desk >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


December 25

edit

Good introductory book on algorithms for a middle-school kid?

edit

My son is in middle school, and I'm trying to teach him how to code. Here's the problem: I can't quite figure out how to teach him to think algorithmically, or to visualize the algorithmic path to solving the problem. To me, visualizing an algorithm or a pseudocode before I write the actual code is completely natural, so I don't really make a conscious effort of doing so. But how do I teach someone to do this??? Telling him what the right algorithm is is doesn't really teach him anything. So how do I teach him to figure the algorithm out for himself? Are there any good books - books of Martin Gardner or Raymond Smullyan style and level - that could teach a smart middle schooler to "think in pseudocode"? Any recomnedations are most welcome. Happy Holidays! All the best, --Dr Dima (talk) 20:15, 25 December 2015 (UTC)[reply]

Perhaps Programming Pearls by Jon Bentley, but that probably doesn't get down to the introductory level you need. Bubba73 You talkin' to me? 01:31, 26 December 2015 (UTC)[reply]
I might start with a simple example, such as searching for an item on a list, which may or may not be on the list. Start with a simple search through the whole list. Then show how you can stop the search if the item is found. Then consider a linear search on sorted list - show that you can stop the search if the item is found or if you get to a certain point in the list and it hasn't been found. Then binary search. Bubba73 You talkin' to me? 19:17, 27 December 2015 (UTC)[reply]