From: rett Date: 2007-04-15T20:49:35+09:00 Subject: Re: Computer Science Math - For the Uninitiated Don, Mr. Abbott is far too literal minded to answer your message in a useful manner. The algorithm that you were looking at would probably work in more than a few programming languages, but it is best described as what is known as meta-language. If you have ever had any form of logic, it's form is the basic syllogism. In the final analysis, it is basic, logical English and does pretty much what it says it does. I will admit that the syntax for arrays of one or more dimensions is not straight English, and the downto is just crude computer slang, and there is not what anyone would call proper punctuation, but other than those minor bits of fluffery, it pretty much does what it says it does. The logic is compressed, but if you understand the idea of assignment of values rather than simple equality when the "=" sign is used in the "for" or other functional statements, and that the same sign and all the other comparatives operate as logical comparatives in logical statements such as an "if", you pretty much have it. That's not to say that it is absolutely simple, but once you have the basics of how logic and function are separated and combined in the peculiar form of computer geek illiteracy that is a progamming language or a meta-language about programs, then you can pick up speed over time. Of course, you'll never be able to read this stuff at flank speed, because of the density of the expressions, and the lack of foresight by the geeks that arbitrarily created the stuff. In most cases, their attempts to simplify their programming process(read use the most shortcuts) have done the opposite of their intention for anyone other than themselves. When you have all that in mind, you will be prepared to suffer with the rest of us, each time we enter into a new programming language that uses commas, periods, braces, brackets, parentheses, colons, semi-colons, and etc. in subtly different and/or grossly conflicting manners. Now, when you get ready to try to understand regular expressions, take all of those problems and multiply them by ten, then sprinkle the whole thing with holy water and light a candle, or better yet, try a large firecracker or other destructive device. It won't help you in learning it, but it will make you feel a lot better until you can find something else to distract you. Despite all this drollery, the suggestion on the Knuth books is spot on. They are the best that the programming world offers. Just don't think that they constitute " Programming for Dummies". Nothing that Knuth says is either trivial or particularly friendly to the newby. On the other hand, if you ever understand everything that Knuth has written, you may skip the funeral and go straight to heaven or Nirvana or wherever good programmers go when they are released from the Stygian bowels of their computers. Everett L.(Rett) Williams Erwin Abbott wrote: > Sorting algorithms are typically covered in college computer science > classes with titles like "Data Structures & Algorithms". Sorting is a > CS topic and it doesn't appear to be studied in many math > departments... but some "Discrete Math/Number Theory" kinds of courses > might cover related topics. Donald Knuth has a set of books called > "The Art of Computer Programming" that are very good for learning all > kinds of algorithms and how to apply them. I think Volume 3 deals > specifically with sorts/sieves. > > On 4/13/07, Don Levan wrote: >> Hello all, >> >> A journey that has taken me from developing in Filemaker through the >> self study of Ruby, Rails, and regular expressions has led me to >> begin looking at algorithms and data structures. Though I don't have >> a traditional computer science background, I am trying to educate >> myself as best I can. >> >> I am begin stymied by what looks like math but is greek to me. For >> example, on the first page of the book I am reading (The Algorithm >> Design Manual, b Steven Skinea), there is this description of the >> insertion sort algorithm: >> >> for i = 1 to n - 1 do >> for j = i downto 2 do >> if (A[j] < A[j-1]) then swap(A[j],A[j-1]) >> >> I can struggle through it, but I am wondering 1) what branch of math >> is this? Is it algebra or something more complex? And 2) are there >> any good (and accessible) books that will give me a basic >> introduction to the language conventions? >> >> Thanks so much, >> >> Don Levan >> Brooklyn, New York >> >> > > >