Archive for the books Tag

Marble composition notebook time again it seems

Saturday, February 9th, 2008
Tom M. Apostol’s Calculus (2nd edition)

I’m not sure yet precisely how I should try working through Apostol. The last time that I did a mathematics book, it was a probability and stats text, and I ended up solving all of the exercises for which there were solutions in the back of the book, longhand, in a couple of marble composition notebooks. In each instance where I chose to use R or MS Excel to solve a problem (sometimes, I will sheepishly admit, instead of working it through by hand), I would print out the commands used and the results and tape them onto the relevant notebook page.

I used Gunnlaugur Þór Briem’s bash script to install Steve Mayer’s LatexRender plugin and can testify that it works, but am not sure how much practical it would be to use this blog as a notebook. Probably not very.

This post is part of the series Apostol's Calculus

  1. Sniffing around Apostol’s Calculus
  2. Marble composition notebook time again it seems

Sniffing around Apostol’s Calculus

Friday, February 8th, 2008
Tom M. Apostol’s Calculus (2nd edition)

I’m thinking of reading CaF and Apostol in parallel.

Both volumes of my set are from the 32nd printing. The books themselves are simple, but definitely exude that can’t-quite-put-your-finger-on-it 1960’s math and engineering textbook charm.

From the Excerpts from the Preface to the First Edition

It is possible to combine a strong theoretical development with sound training technique; this book represents an attempt to strike a sensible balance between the two. While treating the calculus as a deductive science, the book does not neglect applications to physical problems.

The approach of this book has been suggested by the historical and philosophical development of calculus and analytic geometry. For example, integration is treated before differentiation. Although to some this may seem unusual, it is historically correct and pedagogically sound.

When I read the above, Apostol’s approach didn’t strike me as odd. I was an engineering student at a large East-Coast American state university in the mid-1990’s and I could have sworn that they began with integrals as well. Shock: I popped open my copy of Thomas and Finney’s Calculus and Analytic Geometry (8th ed.) just now and, lo and behold, they start out with derivatives.

From the Preface to the Second Edition

Differences from the first edition:

  • Linear algebra added.
  • Mean-value theorems and applications of calculus show up earlier in the text.
  • Smaller chapters centered on a single main idea.

This post is part of the series Apostol's Calculus

  1. Sniffing around Apostol’s Calculus
  2. Marble composition notebook time again it seems

Hack: How many programming languages are there?

Friday, February 8th, 2008

Introduction

Last month, as I have many other times in the past, I ordered a trunk full of books from Amazon.com. This time, I bought Structure and Interpretation of Computer Programs (SICP) and several of the books that the Wikipedia article mentions as having been inspired by that book’s style. Naturally, I plan to eventually work my way through each and every one of those texts.

No guesses as to how far across the floor my grizzled white beard will stretch by that time, though.

I also picked up the rest of a set of books authored or coauthored Indiana University professor Daniel P. Friedman: The Seasoned Schemer (with Matthias Felleisen, the PLT Scheme founder) and The Reasoned Schemer (with William E. Byrd, and Oleg Kiselyov). I already had The Little Schemer (with Felleisen) and … The Little MLer (Felleisen and Friedman). I don’t speak Java and can’t drum up much interest in learning, so I’m going to pass on A Little Java, A Few Patterns, at least for the forseeable future.

Here are the titles that I’ve got (but haven’t read in their entirety yet), along with a blurb regarding the purpose of each book (gleaned from their prefaces):

The Little Schemer
How to think recursively. Revised version of Friedman’s 1974 The Little LISPer.
The Reasoned Schemer
Written with the goal of teaching the reader about the nature of computation. Sequel to The Little Schemer.
The Reasoned Schemer
The subject here is relational programming. The authors lead the reader through extending Scheme to give it relational tools.
The Little MLer
Thinking recursively about types and programs. Also, program construction.

These are largely written in a style that, at least for the parts that I’ve scanned in the books that I’ve peeked into, seems a lot like Socratic Questioning. As far as I know, Friedman and his coauthors are the only compsci people who’ve turned out finished texts architected in this way and their approach has earned a lot of fans. For some of the languages that Friedman et al. haven’t gotten to writing about just yet, third party efforts along similar lines can be found online. Even when no one has gotten around to trying to translate the book into a given language, there are references to a certain book as being “The Little Xer” for programming language X, people adopting that as a handle/username, and lots of instances where that turn of phrase is tossed around. Sometimes, depending on the ending of the language name, people go with an “ist” ending instead (e.g. “The Little Rubyist”).

The Little Schemer and its brethren sit in one of the to-read piles scattered around my home office and, for the last several days, have been at about eye level whenever I’ve walked into the room. Last night, just after stepping back in after a trip to the kitchen to make a mug of hot cocoa, I got an idea.

The Little [X]er/ist (original plan)

How neat would it be to check, for “all” of the programming languages ever invented, whether anyone had ever, at least within the sources visible to the Eye of Sauron Google, used the phrase “The Little [X]er”? Of course it wouldn’t be precise and there’d be no way of knowing, without scanning through SERPs manually, the context in which the reference was made (a port of the book, praise for another existing book, someone using it as a nickname, etc.), but it still struck me as a fun little exercise.

There are lots of ways to approach the problem. With Chickenfoot close at hand and banking that Wikipedia must include some page with a list of all known programming languages (given how many obsessives have found their way into software engineering and compsci, this seemed like a sure bet), I thought of attacking it this way (all done from within Chickenfoot):

  1. Process the Wikipedia list of all programming languages page using XPath and JavaScript to get the names of the individual languages.
  2. Produce “The Little [X]er” and/or “The Little [X]ist” strings for each language name. Associate them with the original language name.
  3. Run one Google search for each string, then use XPath to obtain the number of results and the URL of the top link from the Google SERP.
  4. Output a tidy table showing, for each search string, the number of results and giving a link to the top result. Maybe I would sort the table by the number of results or generate a bar graph using the CANVAS element.

Second thoughts

I only fiddled with the idea for a few minutes last night because it dawned on me that what I was thinking of doing would be a violation of Google’s TOS and could possibly be viewed as some sort of microscopic DOS attack by either Google or my ISP. I could address the second concern by adding a (variable-length) delay between queries … but the enjoyability was beginning to evaporate.

How many programming languages (and caveats)

I did come up with a figure for the total number of programming languages ever invented: 548.

The number is not to be taken as an authoritative count. The Wikipedia page (Alphabetical list of programming languages) begins with the following statement:

The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in alphabetical order.

So, in addition to some languages just having died out and been forgotten, there’s the notabiity criterion. What about dialects/variants of languages. I can see several dialects of LISP listed, but only one entry for Fortran, for example. There’s also a note that the list of dialects of BASIC has been removed to its own page (List of BASIC dialects).

How I got the figure

I started by looking at the page source in Firebug - it’s nicer than View > Page Source because I don’t need to open a new window and Firebug folds the HTML for me so that I can expand and collapse sections as needed while digging down to find the bits that I want. After a moment’s look, I could see that the language names were inside of LI nodes, which were, in turn, inside ULs. The lists were inside of cells of tables with the class attribute “multicol”.

Next, I opened XPather (v 1.3, released on Oct 27 2006) and built up an XPath expression that returned the set of LI nodes:

//table[@class="multicol"]/tbody/tr/td/ul/li

Here’s a screenshot (click the thumbnail for a larger version):

Thumbnail of a screenshot of the preceding XPath expression being applied to the aAlphabetical list of programming languages on Wikipedia using XPather.  The DOM Inspector window is also vsible.

XPather gives you a matching nodes count (they’re also individually numbered in the display presented in the XPather window), but you could get the figure itself using XPath’s count() function:

count(//table[@class="multicol"]/tbody/tr/td/ul/li)

In XPather, this yields:

Thumbnail of a screenshot of the preceding XPath expression being applied to the aAlphabetical list of programming languages on Wikipedia using XPather.  The DOM Inspector window is also vsible.

I still want to do something interesting with Chickenfoot. Next time.

CaF Introduction

Tuesday, February 5th, 2008
cover of 'Chaos and Fractals: New Frontiers of Science'

I’m going to divide the introduction into sections. The titles are mine, rather than the authors’, unless stated otherwise.

Warmup

  • Comparison of predictable tides to unpredictable weather (forecasts good for much shorter intervals).
  • Chaos is deterministic (future completely determined by past) - but small uncertainties can snowball.
  • Mention of methodologies which have been designed for a precise scientific evaluation of the presence of chaotic behavior in mathematical models as well as in real phenomena and says that they can be used to estimate the “predictability horizon” of a system - mathematical/physical/time limit within which predictability is ideally possible.
  • Predictability horizon for weather is not more than 2-3 weeks.

History of chaos theory

  • Calculus developed by Newton and Leibniz.
  • Laplace’s demon
  • Uncertainty principle
  • Lewis Fry Richardson’s book Weather Prediction by Numerical Process
  • John von Neumann began building ENIAC (1st electronic computer) to try to put Richardson’s ideas about weather prediction into practice.
  • It was found (by whom?) that Richardson hadn’t succeeded because the space and time increments used in his work had not met a computational stability criterion (Courant-Friedrichs-Lewy Criterion).
  • Edward Norton Lorenz and the butterfly effect (aka “sensitive dependence on initial conditions”) mentioned.
  • Near the end: determinism and predictability are not equivalent.

Also:

In other words, one of the lessons coming out of chaos theory is that the validity of the causality principle is narrowed by the uncertainty principle from one end as well as by the intrinsic instability properties of the underlying natural laws from the other end.

Notes

A Google search for “Courant-Friedrichs-Lewy Criterion” turned up only for-pay journal articles, all focused narrowly on particular applications/instances of its use. A Google Book search turned up a book that I’ve added to my Amazon wishlist, The Emergence of Numerical Weather Prediction: Richardson’s Dream (ISBN-13 978-0521857291), Richardson’s book, and the second volume of the authors other work, Fractals in the Classroom, which seems to have the same introduction, word for word, as CaF.

The edition of Richardson’s book cited in a footnote in the introduction is the 1965 Dover edition.

This post is part of the series Chaos and Fractals

  1. Starting on “Chaos and Fractals: New Frontiers of Science” (CaF)
  2. CaF Foreword
  3. CaF Introduction

CaF Foreword

Tuesday, February 5th, 2008
cover of 'Chaos and Fractals: New Frontiers of Science'

The Foreword to Chaos and Fractals: New Frontiers of Science was written by none other than Mitchell J. Feigenbaum.

Feigenbaum warms up with a discussion of fluid turbulence and then goes on to divide physical phenomena into three categories: linear (for which the rule that determines what a piece of a system is going to do next is not influenced by what it is doing now.), nonlinear (some of which can be predicted by using distorted models of linear phenomena), and strongly nonlinear (which includes “chaos”).

Finished. Feigenbaum ended up used the foreward to push the Feigenbaum constants (Wolfram MathWorld: Feigenbaum Constant).

Starting on “Chaos and Fractals: New Frontiers of Science” (CaF)

Friday, February 1st, 2008
cover of 'Chaos and Fractals: New Frontiers of Science'

Chaos and Fractals: New Frontiers of Science was first published by Springer in 1992. I’ve got the 2nd edition (first printing, it seems), published in 2004.

The authors, in order of appearance on the cover and in the signature of the preface: Heinz-Otto Peitgen, Hartmut Jürgens, and Deitmar Saupe.

According to the above-linked Wikipedia page for Saupe, the book won the American Publishers’ Association award for Best Mathematics Book of the Year in 1992. I can’t find an award site to confirm this fact and it isn’t noted in either of the prefaces.

Preface to the 2nd edition

The first preface (to the 2nd ed.) notes the differences between the first and second editions:

  • Two appendices have been removed - one by Yuval Fisher on the subject of fractal image compression because Fisher’s since published a book on the subject. They don’t detail the subject of the other appendix and I can’t find a table of contents for the 1st edition.
  • There was a BASIC program at the end of each chapter of the first book and those have been replaced with a set of 10 Java applets posted online at http://www.cevis.uni-bremen.de/fractals/. CEVIS is the Center for Complex Systems and Visualization at the University of Bremen, which has been home, at one time or another, to all of the authors.

I noticed at least two typos in the preface. Apostrophes were missing when the authors talked about Yuval Fisher’s appendix or Yuval’s book (i.e. Yuval Fishers and Yuvals, respectively).

Preface to the 1st edition

The preface begins with a quote from James Gleick’s Chaos: Making a New Science. I’ve read and didn’t care for Gleick’s book.

Points of interest from this preface:

  • This book is written for everyone, even without much knowledge of technical mathematics, wants to know the details of chaos theory and fractal geometry. They go on to say that it’s not a textbook, but not written in popsci style either.
  • Fractals and chaos have, for students, brought math out of the realm of ancient history into the twenty-first century.
  • Elements of Euclidian geometry are basc visible forms like lines, circles, and spheres, the elements of fractal geometry are algorithms.
  • Fractals and modern chaos theory are linked by the fact that many of the contemporary pace-setting discoveries in their fields were only possible using computers.
  • This book is a close relative of the two-volume set Fractals for the Classroom, which was published by Springer-Verlag and the National Council of Teachers of Mathematics in 1991 and 1992. [Fractals for the Classroom was written by the same three mathematicians who wrote Chaos and Fractals].
  • The other appendix removed from the 2nd edition is revealed to have been a treatment of multifractal measures by Carl J.G. Evertsz and Benoit B. Mandelbrot.
  • The entire book has been produced using the TEX and LaTex typesetting systems where all figures (except for the half-tone and color images) were integrated in the computer files. Even though it took countless hours of sometimes painful experimentation setting up the necessary maxcros, it must be acknowledged that this approach immensely helped to streamline the writing, editing, and printing.

This post is part of the series Chaos and Fractals

  1. Starting on “Chaos and Fractals: New Frontiers of Science” (CaF)
  2. CaF Foreword
  3. CaF Introduction