Talk:Algorithms/Introduction

Todo

 * 1) It would be nice in the end of this section, wherein each of the techniques are described, to show pictures for each technique. For example, the backtracking discussion can show a tree, while the DP discussion can show a tree with colored branches where the same color represents redundantly solved subproblems. Similarly, DnC can be show in its own division tree. I think it's helpful to descirbe semantics with pictures, and it would just be another way to drive these points home.

What You Will Learn

 * [NOTE: This is a final section of Chapter 1, to be placed in after the book has evolved enough to make the claim true.]

The primary aim of this book is to help you separate the wheat from the chaff from the large field of algorithms. The book is short enough so that it could be read over the course of one semester, primarily to encourage you to be aware of all of the topics we cover, and how they relate to each other. The comprehensive texts that we recommend in the preamble are useful when you encounter specific problems in software development or research, but often the key points can be lost in such a large treatment. Through the guidance of our own teachers we have beter learned what's important and what's not. This book is dedicated to those teachers.


 * On note to massage into this: "The books by (Knuth) and (CLRS) also separate the wheat from the chaff, but in another sense. These authors will literally review all of the technical literature available to find the best and most useful results and present them all in the same notational framework. Thus, part of the purpose they serve is to filter out unimportant results. While we whole-heartedly recommend these books as references it is a rare person who can read so fast or have enough spare time to read them cover-to-cover." MShonle 15:32, 18 Dec 2004 (UTC) (I'd like the end of chapter one to have the dedication, and not the qualification of "Knuth is good... but", but it's an important point, I believe.)

A routine for converting a single character to lower case is required This is not really true, and in fact most real-world ASCII tolower routines are written without a separate routine. Here, the author is abstracting the character routine ahead of time, so that he can reuse the routine in a future function; a beginning programmer may think that they are expected to anticipate such abstractions before writing their code. It may be more instructive to either explain the abstraction ahead of time (and not implying that it is obvious), or to leave the character routine within the string tolower function and refactor it out only after observing that the character comparision function shares the same functionality. There should also probably be a note that these routines only apply to lower 128-bit ASCII encodings.

Joe Lee 21:03, 5 Jun 2005 (UTC)


 * There's no reason at all that these apply to only 7-bit ASCII (for starters, it applies to many other encodings). The text itself allows for unicode (the comment "These techniques depend upon the character encoding" covers this quite well). Also, I think the quotes around "obvious" make it clear that it's not expected for someone to think of it immediately. But this is an advanced text and we should limit hand holding. If a programmer cannot reflect that an entire string needs to be read by a string handling routine, this book is probably too advanced for them. If anything, there is already too much hand holding, covering such a basic concept suitable to introductory programming students.


 * I have cleaned up the text to address your concerns. Thanks! MShonle 21:56, 5 Jun 2005 (UTC)

Precomputing string lengths
The book currently states "Note that for a pair of strings, it is also possible to have the length precomputed to avoid the second pass, but that can have its own drawbacks at times."; however as far as I can tell, C and C++ are essentially the only programming languages that usually don't carry around string length data with the string, so I think that statement is misleading at best. -- intgr 13:20, 3 April 2007 (UTC)