It is useful to have some operations that turn one proportion table into another. In this posting, we deal with some operations that can be applied to many different kinds of table, not just proportion tables.
Let's start with the simple operation of swapping (or transposing) two rows, here the second and the third :
`\qquad\qquad [(2, 4, 5, 9),(4, 8, 10, 18),(6, 12, 15, 27)] \qquad->\qquad [(2, 4, 5, 9),(6, 12, 15, 27),(4, 8, 10, 18)] `,
or two columns, here the second and the fourth :
`\qquad\qquad[(2, 4, 5, 9),(4, 8, 10, 18),(6, 12, 15, 27)] \qquad->\qquad [(2, 9, 5, 4),(4, 18, 10, 8),(6, 27, 15, 12)]`.
Repeatedly transposing various pairs of rows can give every possible reordering (or permutation) of the rows :
`\qquad\qquad [(2, 4, 5, 9),(4, 8, 10, 18),(6, 12, 15, 27)] \qquad->\qquad [(6, 12, 15, 27),(2, 4, 5, 9),(4, 8, 10, 18)] `,
and similarly for arbitrary column permutations :
`\qquad\qquad [(2, 4, 5, 9),(4, 8, 10, 18),(6, 12, 15, 27)] \qquad->\qquad [(5, 9, 4, 2),(10, 18, 8, 4),(15, 27, 12, 6)] `.
We can combine arbitrary row permutations and arbitrary column permutations to get arbitrary table permutations. How the rows are reordered is independent of how the columns are reordered. Combining the most recent row and column reorderings, we get :
`\qquad\qquad [(2, 4, 5, 9),(4, 8, 10, 18),(6, 12, 15, 27)] \qquad->\qquad [(15, 27, 12, 6),(5, 9, 4, 2),(10, 18, 8, 4)] `.
All of the foregoing operations simply rearrange the proportion table to make a proportion table that contains exactly the same information. When one can make table from another using only rearrangement, the tables are said to be equivalent up to rearrangment. All of the tables in this posting are equivalent up to permutation---they are in a sense the same `3 xx 4` table, just displayed differently.
Does this account for reliable ways to convert a proportion table to a proportion table? In much later postings, when we deal with group tables and have more restrictions, the answer will be yes.
Here, however, the answer is no---there are other possibilities. One such possibility can be made by giving the table a quarter turn, e.g.
`\qquad\qquad [(2, 4, 5, 9),(4, 8, 10, 18),(6, 12, 15, 27)] \qquad->\qquad [(6, 4, 2),(12,8,4),(15,10,5),(27,18,9)] `.
It should be clear that in the rotated version, rows are proportional to rows and columns to columns, as before, i.e. that the rotated version of the original proportion table is also a proportion table. We could not have made the rotated version from permutations alone or the original, either, because permutations only ever turn a `3 xx 4` table into a `3 xx 4` table, never into a `4 xx 3` table, as this quarter turn has just done.
Of course, this quarter-turned table can now be permuted to give many `4 xx 3` tables, all of which are equivalent up to permutation. Indeed, there will be as many distinct `4 xx 3` tables are there are distinct `3 xx 4` tables.
Does this exhaust all the possibilities? What if one makes a quarter turn in the other direction? It turns out that the two different ways of quarter-turning the original table lead to two tables that differ by a half turn,
`\qquad\qquad\qquad [(6, 4, 2),(12,8,4),(15,10,5),(27,18,9)] `,
and
`\qquad\qquad\qquad [(9,18,27),(5,10,15),(4,8,12),(2, 4, 6)] `.
Unlike a quarter turn, a half turn can be made just from permutations: reverse the order of the rows, and reverse the order of the columns. In this way, we get
`\qquad\qquad\qquad [(6, 4, 2),(12,8,4),(15,10,5),(27,18,9)] \qquad->\qquad [(9,18,27),(5,10,15),(4,8,12),(2, 4, 6)] `,
and we also get
`\qquad\qquad [(2, 4, 5, 9),(4, 8, 10, 18),(6, 12, 15, 27)] \qquad->\qquad [(27,15,12,6),(18,10,8,4),(9,5,4,2)] `.
It should also be mentioned here that rotating by a quarter turn clockwise and reversing the order of the columns (or, alternatively, rotating a quarter of a turn anticlockwise and reversing the order of the rows) is often called transposing the table.
Transposing a table is like flipping a rectangular piece of paper while keeping the original top left corner at the top and left, going from portrait orientation to landscape orientation, or vice versa :
`\qquad\qquad [(2, 4, 5, 9),(4, 8, 10, 18),(6, 12, 15, 27)] \qquad->\qquad [(2, 4, 6),(4,8,12),(5,10,15),(9,18,27)] `.
Transposing in this sense is a little different from transposition as introduced above. Transposition swaps a pair of rows, or else a pair of columns. Transposing, on the other hand turns all the columns to rows and all the rows to columns, in particular way.
We shall actually have little use either for quarter turns or for transposing, while we are dealing with proportion tables. Transposing become important when dealing with matrices, which come much later.
Wednesday, February 24, 2010
Tuesday, February 23, 2010
More about proportion tables
Look again at the standard multiplication table :
By simply changing the '`xx`' to a `1` we have a proportion table. The stubs no longer deserve special coloring because they have no special role. This is generally true. Any multiplication table can be converted to a proportion table in this way.
Conversely, any '`1`' in a proportion table can be treated as if it is the '`xx`' symbol in a multiplication table. So, for instance, Hutton gives his multiplication table, which he also says is called Pythagoras's table, in the following form, although his is `12 xx 12`.
The '`1`' at the top left can serve as a multiplication sign. This remains true for any '`1`' entry found in an arbitrary proportion table.
It is readily apparent that the quantities directly below and directly to the right of the '`1`' serve as as stubs of a multiplication table, with the body of the table between these two arms, both below and to the right of the '`1`'. But the numbers directly above, and also directly to the left of the '`1`' can also serve as stubs. So, for instance, `8 xx 2 1/2 = 20`. On this view, here one has table bodies in all four quadrants.
It is better, however, to think of entire row containing the '`1`' as a row stub, and the entire column containing the '`1`' as a column stub. Any value in the table has a marker value on the same row in the column stub, and a marker value in the same column in the row stub. The '`1`', the arbitrary value in the table, and the two marker values lie at the corners of a rectangular box.
The four values
`\qquad\qquad\qquad{:(2 1/2\qquad, 1),(20\qquad, 8):}`
can be thought of as a `2 xx 2` subtable, with any value in this subtable equivalent to the product of its adjacent values divided by its diagonally opposite value :
`\qquad\qquad\qquad 20 = \frac{8 xx 2 1/2}{1}`.
In this form, we are using the proportion table version of the Rule of Three. Any `2 xx 2` subtable can serve in this way, and no '`1`' is required in the subtable, or indeed, anywhere in the proportion table :
so that, e.g.
`\qquad\qquad\qquad 4" mph" = \frac{28" miles " xx ""8}{56" hours"}.`
Here, we have used the top left entry of the subtable of the subtable as the target element, and we have continued to follow the convention of writing the same-row neighbor before the same column neighbor.
But we could use of these three same elements to find the fourth. e.g. if the top right element is our target element, we can write :
`\qquad\qquad\qquad 28" miles" = \frac{4" mph " xx" "56" hours"}{8}.`
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
| 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 2 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 |
| 3 | 3 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 |
| 4 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 |
| 5 | 5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 |
| 6 | 6 | 12 | 18 | 24 | 30 | 36 | 42 | 48 | 54 | 60 |
| 7 | 7 | 14 | 21 | 28 | 35 | 42 | 49 | 56 | 63 | 70 |
| 8 | 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 |
| 9 | 9 | 18 | 27 | 36 | 45 | 54 | 63 | 72 | 81 | 90 |
| 10 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 |
By simply changing the '`xx`' to a `1` we have a proportion table. The stubs no longer deserve special coloring because they have no special role. This is generally true. Any multiplication table can be converted to a proportion table in this way.
Conversely, any '`1`' in a proportion table can be treated as if it is the '`xx`' symbol in a multiplication table. So, for instance, Hutton gives his multiplication table, which he also says is called Pythagoras's table, in the following form, although his is `12 xx 12`.
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 |
| 3 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 |
| 4 | 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 |
| 5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 |
| 6 | 12 | 18 | 24 | 30 | 36 | 42 | 48 | 54 | 60 |
| 7 | 14 | 21 | 28 | 35 | 42 | 49 | 56 | 63 | 70 |
| 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 |
| 9 | 18 | 27 | 36 | 45 | 54 | 63 | 72 | 81 | 90 |
| 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 |
The '`1`' at the top left can serve as a multiplication sign. This remains true for any '`1`' entry found in an arbitrary proportion table.
| `5` | `8` | `2` | `1200` | `14" hours"` |
| `10" mph"` | `16" mph"` | `4" mph"` | `2400" mph"` | `28" miles"` |
| `2 1/2` | `4` | `1` | `600` | `7" hours"` |
| `22 1/2` | `36` | `9` | `5400` | `63" hours"` |
| `250` | `400` | `100` | `60000` | `700" hours"` |
| `20` | `32` | `8` | `4800` | `56" hours"` |
| `5/6` | `1 1/3` | `1/3` | `200` | `2 1/3" hours"` |
It is readily apparent that the quantities directly below and directly to the right of the '`1`' serve as as stubs of a multiplication table, with the body of the table between these two arms, both below and to the right of the '`1`'. But the numbers directly above, and also directly to the left of the '`1`' can also serve as stubs. So, for instance, `8 xx 2 1/2 = 20`. On this view, here one has table bodies in all four quadrants.
It is better, however, to think of entire row containing the '`1`' as a row stub, and the entire column containing the '`1`' as a column stub. Any value in the table has a marker value on the same row in the column stub, and a marker value in the same column in the row stub. The '`1`', the arbitrary value in the table, and the two marker values lie at the corners of a rectangular box.
The four values
`\qquad\qquad\qquad{:(2 1/2\qquad, 1),(20\qquad, 8):}`
can be thought of as a `2 xx 2` subtable, with any value in this subtable equivalent to the product of its adjacent values divided by its diagonally opposite value :
`\qquad\qquad\qquad 20 = \frac{8 xx 2 1/2}{1}`.
In this form, we are using the proportion table version of the Rule of Three. Any `2 xx 2` subtable can serve in this way, and no '`1`' is required in the subtable, or indeed, anywhere in the proportion table :
| `5` | `8` | `2` | `1200` | `14" hours"` |
| `10" mph"` | `16" mph"` | `4" mph"` | `2400" mph"` | `28" miles"` |
| `2 1/2` | `4` | `1` | `600` | `7" hours"` |
| `22 1/2` | `36` | `9` | `5400` | `63" hours"` |
| `250` | `400` | `100` | `60000` | `700" hours"` |
| `20` | `32` | `8` | `4800` | `56" hours"` |
| `5/6` | `1 1/3` | `1/3` | `200` | `2 1/3" hours"` |
so that, e.g.
`\qquad\qquad\qquad 4" mph" = \frac{28" miles " xx ""8}{56" hours"}.`
Here, we have used the top left entry of the subtable of the subtable as the target element, and we have continued to follow the convention of writing the same-row neighbor before the same column neighbor.
But we could use of these three same elements to find the fourth. e.g. if the top right element is our target element, we can write :
`\qquad\qquad\qquad 28" miles" = \frac{4" mph " xx" "56" hours"}{8}.`
Saturday, February 20, 2010
Multiplication tables and proportion tables
Here is a typical modern multiplication table. (Older tables usually go up to `12 xx 12`.)
At the left and along the top are the stubs---here, in this example, the stubs are colored. The rest is the body of the table. One looks up the numbers to be multiplied in the stubs, and then finds the product in the body, at the intersection of an appropriate row and column. So, for instance, `"4 "xx" 5 = 20"`:
The standard multiplication table and how to use it are presumably familiar. We can put arbitrary quantities in the stubs, and fill out the body of the corresponding multiplication table :
One can build a multiplication table with any number of rows and any number of columns.
In the body of a multiplication table :
Given a single nonzero row, one can reconstruct any other row from the value at a single position in the row to be reconstructed, and mutatis mutandis for columns.
Any table of numbers that can be the body multiplication table is called a proportion table. To be a proportion table, then, a table of numbers has only :
The following are equivalent:
Old proportion notation:
`\qquad\qquad 750" men : "22,500" rations of bread :: "1200" men : What?"`
Algebraic notation:
`\qquad\qquad\qquad\frac{750" men"}{"22,500 rations of bread"}=\frac{1200 " men"}{x}.`
Proportion table form:
To find a missing entry in a `2 \times 2` proportion table, one multiplies the neighboring entries, and divides by the opposite entry:
`\qquad\qquad\qquad x = \frac{"22,500 rations of bread" \times "1200 men"}{"750 men"},`
`\qquad\qquad\qquad = "36,000 rations of bread".`
This three argument operation---multiplying two numbers and dividing by a third---is remarkably useful. One computer language, FORTH, even defines a single operation, '*/' or starslash, for doing this.
We can always find a solution as long as we have three appropriately positioned values, and as long as we don't have to divide by zero. A zero in the top stub of the multiplication table leads to a column of zeroes in the body of the table; a zero in the side stub leads to a row of zeroes in the body. A zero only appears in the body of the table as part of a row stub or column stub. In short, a zero appears somewhere in the stubs exactly when a zero appears in the body of the table. A table with no zeroes is called zero free. We shall prefer to work with zero free proportion tables.
In writing this proportion table calculation, we have followed the convention of writing the row neighbor before the column neighbor in the numerator, with the opposite centered below them in the denominator. Long ahead, when we get to group tables, this convention will prove useful.
| `\times` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 2 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 |
| 3 | 3 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 |
| 4 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 |
| 5 | 5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 |
| 6 | 6 | 12 | 18 | 24 | 30 | 36 | 42 | 48 | 54 | 60 |
| 7 | 7 | 14 | 21 | 28 | 35 | 42 | 49 | 56 | 63 | 70 |
| 8 | 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 |
| 9 | 9 | 18 | 27 | 36 | 45 | 54 | 63 | 72 | 81 | 90 |
| 10 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 |
At the left and along the top are the stubs---here, in this example, the stubs are colored. The rest is the body of the table. One looks up the numbers to be multiplied in the stubs, and then finds the product in the body, at the intersection of an appropriate row and column. So, for instance, `"4 "xx" 5 = 20"`:
| `\times` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 2 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 |
| 3 | 3 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 |
| 4 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 |
| 5 | 5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 |
| 6 | 6 | 12 | 18 | 24 | 30 | 36 | 42 | 48 | 54 | 60 |
| 7 | 7 | 14 | 21 | 28 | 35 | 42 | 49 | 56 | 63 | 70 |
| 8 | 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 |
| 9 | 9 | 18 | 27 | 36 | 45 | 54 | 63 | 72 | 81 | 90 |
| 10 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 |
The standard multiplication table and how to use it are presumably familiar. We can put arbitrary quantities in the stubs, and fill out the body of the corresponding multiplication table :
| `\times` | `2 1/2` | `4` | `1` | `600` | `7" hours"` |
| `2` | `5` | `8` | `2` | `1200` | `14" hours"` |
| `4" mph"` | `10" mph"` | `16" mph"` | `4" mph"` | `2400" mph"` | `28" miles"` |
| `1` | `2 1/2` | `4` | `1` | `600` | `7" hours"` |
| `9` | `22 1/2` | `36` | `9` | `5400` | `63" hours"` |
| `100` | `250` | `400` | `100` | `60000` | `700" hours"` |
| `8` | `20` | `32` | `8` | `4800` | `56" hours"` |
| `1/3` | `5/6` | `1 1/3` | `1/3` | `200` | `2 1/3" hours"` |
One can build a multiplication table with any number of rows and any number of columns.
In the body of a multiplication table :
- every row is proportional to every other row, and
- every column is proportional to every other column.
Given a single nonzero row, one can reconstruct any other row from the value at a single position in the row to be reconstructed, and mutatis mutandis for columns.
Any table of numbers that can be the body multiplication table is called a proportion table. To be a proportion table, then, a table of numbers has only :
- satisfy the proportionality condition on its rows/columns.
The following are equivalent:
Old proportion notation:
`\qquad\qquad 750" men : "22,500" rations of bread :: "1200" men : What?"`
Algebraic notation:
`\qquad\qquad\qquad\frac{750" men"}{"22,500 rations of bread"}=\frac{1200 " men"}{x}.`
Proportion table form:
| `"750 men"` | `"1200 men"` |
| `"22,500 rations of bread "` | `"What?"` |
To find a missing entry in a `2 \times 2` proportion table, one multiplies the neighboring entries, and divides by the opposite entry:
`\qquad\qquad\qquad x = \frac{"22,500 rations of bread" \times "1200 men"}{"750 men"},`
`\qquad\qquad\qquad = "36,000 rations of bread".`
This three argument operation---multiplying two numbers and dividing by a third---is remarkably useful. One computer language, FORTH, even defines a single operation, '*/' or starslash, for doing this.
We can always find a solution as long as we have three appropriately positioned values, and as long as we don't have to divide by zero. A zero in the top stub of the multiplication table leads to a column of zeroes in the body of the table; a zero in the side stub leads to a row of zeroes in the body. A zero only appears in the body of the table as part of a row stub or column stub. In short, a zero appears somewhere in the stubs exactly when a zero appears in the body of the table. A table with no zeroes is called zero free. We shall prefer to work with zero free proportion tables.
In writing this proportion table calculation, we have followed the convention of writing the row neighbor before the column neighbor in the numerator, with the opposite centered below them in the denominator. Long ahead, when we get to group tables, this convention will prove useful.
Friday, February 19, 2010
Proportion problems and the Rule of Three
Here is a problem from an old textbook :
In more recent times, this problem might be set up
`\qquad\qquad\qquad\frac{750" men"}{"22,500 rations of bread"}=\frac{1200 " men"}{x}.`
where we have used quantities convention used in public by physicists, engineers, chemists and other technical people, rather than the numbers(-only) convention used mathematics and scribbled calculation.
One isolates `x` through a series of steps. One can multiply both sides by `x`, giving
`\qquad\qquad\qquad\frac{"(750 men) " x}{"22,500 rations of bread"}=1200 " men".`
Dividing both sides by `"750 men"` gives
`\qquad\qquad\qquad\frac{x}{"22,500 rations of bread"}=\frac{1200 " men"}{"750 men"}.`
Multiplying both sides by `"22,500 rations of bread"` then gives
`\qquad\qquad\qquad x = \frac{1200 " men " \times " 22,500 rations of bread"}{"750 men"},`
`\qquad\qquad\qquad = "36,000 rations of bread".`
If 750 men require 22,500 rations of bread for a month; how many rations will a garrison of 1200 men require? (Charles Hutton, A course of mathematics for the use of academies as well as private tuition, 4th American ed., vol. 1, p. 46, New York, 1825.)Such problems were set up as proportions, i.e.
750 : 22,500 :: 1200 : ?Each of the four quantities (three known and one to be calculated) is called a term. The expression can be read
'750 men is to 22,500 rations of bread as 1200 men is to how many rations of bread?'To calculate the last term, Hutton has one multiply the two middle terms and then divide the result by the first term:
`\qquad\qquad\qquad? = \frac{"22,500 " \times " 1,200"}{750} = 36,000.`This method of solving proportion problems was common in Hutton's day, when it was known as the Rule of Three. As Abraham Lincoln says of his own education,
To 'cipher' is do arithmetic, using the familiar Hindu-Arabic number system.Of course when I came of age I did not know much. Still somehow, I could read, write, and cipher to the Rule of Three; but that was all. I have not been to school since. The little advance I now have upon this store of education, I have picked up from time to time under the pressure of necessity. (Letter, accompanying his Autobiography, to Jesse Fell, Dec. 20, 1859.)
In more recent times, this problem might be set up
`\qquad\qquad\qquad\frac{750" men"}{"22,500 rations of bread"}=\frac{1200 " men"}{x}.`
where we have used quantities convention used in public by physicists, engineers, chemists and other technical people, rather than the numbers(-only) convention used mathematics and scribbled calculation.
One isolates `x` through a series of steps. One can multiply both sides by `x`, giving
`\qquad\qquad\qquad\frac{"(750 men) " x}{"22,500 rations of bread"}=1200 " men".`
Dividing both sides by `"750 men"` gives
`\qquad\qquad\qquad\frac{x}{"22,500 rations of bread"}=\frac{1200 " men"}{"750 men"}.`
Multiplying both sides by `"22,500 rations of bread"` then gives
`\qquad\qquad\qquad x = \frac{1200 " men " \times " 22,500 rations of bread"}{"750 men"},`
`\qquad\qquad\qquad = "36,000 rations of bread".`
So far, this is bookwork---useful, but perhaps a little boring. It is essential background, however, to dealing with proportion tables, our next object of concern.
Friday, February 5, 2010
Vital statistics
Some more statistics for littlest, bearing a story :
The first five values were given to me in pounds and ounces. The next five were given in kilograms. I've given the weights in both units in the table. Let's plot :
agraph
width=300; height=200;
xmin=(-0.1); xmax=15.1;
ymin=(-1); ymax=150; yscl=16;
axes();
marker = "dot";
stroke = "none";
a=[];
b=[];
a[0]=[0,124];
a[1]=[1,120];
a[2]=[5,128];
a[3]=[7,136];
a[4]=[10,135.5];
b[0]=[10,136.9];
b[1]=[11,140.4];
b[2]=[12,137.6];
b[3]=[13,144.6];
b[4]=[14,143.2];
markerfill= "green";
path(a);
markerfill= "lightgreen";
path(b)
endagraph
You may be wondering at this point why the unit was changed from pounds and ounces to kilograms. The answer is simple: littlest developed a runny nose five days ago. Babies don't learn to breathe through their mouths until the are about a year old. His breathing became difficult, and his nursing, and he started to get dehydrated. So he was admitted to hospital---my wife staying with him. The lighter dots are the weights from the hospital. He got oxygen and constant monitoring there. They suctioned out his nose two or three times a day. He has been steadily improving, being able to go longer and longer without oxygen. He and his mother came home today. He's doing better, but he's still on a bit of oxygen, and has an apn(o)ea monitor.
With work and attempting to look after the rest of the brood, there has been little time for blogging.
| Date | Days since birth | Weight (reported; calculated) | |
| / kg | / oz. | ||
| 2010.1.21 | 0 | 3.52 | 124 |
| 2010.1.22 | 1 | 3.40 | 120 |
| 2010.1.26 | 5 | 3.57 | 128 |
| 2010.1.28 | 7 | 3.86 | 136 |
| 2010.1.31 | 10 | 3.84 | 135.5 |
| 2010.1.31 | 10 | 3.88 | 136.9 |
| 2010.2.1 | 11 | 3.98 | 140.4 |
| 2010.2.2 | 12 | 3.90 | 137.6 |
| 2010.2.3 | 13 | 4.10 | 144.6 |
| 2010.2.4 | 14 | 4.06 | 143.2 |
The first five values were given to me in pounds and ounces. The next five were given in kilograms. I've given the weights in both units in the table. Let's plot :
agraph
width=300; height=200;
xmin=(-0.1); xmax=15.1;
ymin=(-1); ymax=150; yscl=16;
axes();
marker = "dot";
stroke = "none";
a=[];
b=[];
a[0]=[0,124];
a[1]=[1,120];
a[2]=[5,128];
a[3]=[7,136];
a[4]=[10,135.5];
b[0]=[10,136.9];
b[1]=[11,140.4];
b[2]=[12,137.6];
b[3]=[13,144.6];
b[4]=[14,143.2];
markerfill= "green";
path(a);
markerfill= "lightgreen";
path(b)
endagraph
You may be wondering at this point why the unit was changed from pounds and ounces to kilograms. The answer is simple: littlest developed a runny nose five days ago. Babies don't learn to breathe through their mouths until the are about a year old. His breathing became difficult, and his nursing, and he started to get dehydrated. So he was admitted to hospital---my wife staying with him. The lighter dots are the weights from the hospital. He got oxygen and constant monitoring there. They suctioned out his nose two or three times a day. He has been steadily improving, being able to go longer and longer without oxygen. He and his mother came home today. He's doing better, but he's still on a bit of oxygen, and has an apn(o)ea monitor.
With work and attempting to look after the rest of the brood, there has been little time for blogging.
Friday, January 29, 2010
Hex dumps and baby weights
The successive weights of my littlest are, in ounces, `7_{16}12, 7_{16}8, 8_{16}0, 8_{16}8.` These have been written in the wiggle version of base `16`, so that they can be read easily as pounds and ounces.
Computer hardware uses lots of binary---but binary is written out with long strings of ones and zeroes, and that can be a little painful to read.
In a previous post, we saw that taking two decimal digits at a time gives us base `100`, and taking three at a time is base 1000. Taking two binary digits (bits) at a time is base `4`, or quaternary. It is hardly used. Taking three bits at a time is base `8`, or octal. Octal used to be common enough, but is now only occasionally seen: the only current example I can think of is how file permissions are handled in Linux.
Taking four bits at a time is base `16`, called hexadecimal, or hex to its friends.
Those (relatively few) programmers who work "close to the metal" sometimes have cause to examine binary data. They almost never look at actual binary, however. What they read is the binary converted to hexadecimal. Such a listing is called a hex dump.
The usual notation for base `n` arithmetic differs is two ways from the wiggle notation we have been using.
First, there is only a common base, and it is written just once at the end of the string of digits. In the usual notation, bases are always written in decimal. (In wiggle, interbases and superdigits are always written in decimal.) So the usual way to write the bit sequence, or bitstring `10101001010`, explicitly indicating that it is in base 2, is `10101001010_{2}`. If the base is obvious in context, we don't always bother with the subscript. In wiggle, this would be the much longer
`\qquad\qquad\qquad 1_{2}0_{2}1_{2}0_{2}1_{2}0_{2}0_{2}1_{2}0_{2}1_{2}0.`
To convert binary to octal, one groups the binary digits three at a time from the right,
`\qquad\qquad\qquad 10,101,001,010,`
and then converts each three bit binary group to a corresponding octal digit,
`\qquad\qquad\qquad 2512_{8}.`
Second, since the usual notation puts digits next to each other, it has to employ a single character per digit. The usual digits work for bases up to ten. After that, once must have new symbols. Consider, now the hexadecimal number `7_{16}12`, as written in wiggle. We cannot simply write this as `712_{16}`, because we cannot tell whether that means `7_{16}12` or `7_{16}1_{16}2`. Instead, the usual thing to do is to let A mean 10, B mean 11, C mean 12, and so forth, up to one less than the base.
So, instead of `7_{16}12`, one writes `7"C"_{16}`.
To convert binary to hexadecimal, one groups the binary digits four at a time, from the right,
`\qquad\qquad\qquad 101,0100,1010,`
and then converts each four bit binary group into a hexadecimal digit,
`\qquad\qquad\qquad 54"C"_{16}.`
In hexadecimal, my littlest's birthweight was `7"C"` ounces, or, moving the unit point one place, `7."C"` pounds.
Computer hardware uses lots of binary---but binary is written out with long strings of ones and zeroes, and that can be a little painful to read.
In a previous post, we saw that taking two decimal digits at a time gives us base `100`, and taking three at a time is base 1000. Taking two binary digits (bits) at a time is base `4`, or quaternary. It is hardly used. Taking three bits at a time is base `8`, or octal. Octal used to be common enough, but is now only occasionally seen: the only current example I can think of is how file permissions are handled in Linux.
Taking four bits at a time is base `16`, called hexadecimal, or hex to its friends.
Those (relatively few) programmers who work "close to the metal" sometimes have cause to examine binary data. They almost never look at actual binary, however. What they read is the binary converted to hexadecimal. Such a listing is called a hex dump.
The usual notation for base `n` arithmetic differs is two ways from the wiggle notation we have been using.
First, there is only a common base, and it is written just once at the end of the string of digits. In the usual notation, bases are always written in decimal. (In wiggle, interbases and superdigits are always written in decimal.) So the usual way to write the bit sequence, or bitstring `10101001010`, explicitly indicating that it is in base 2, is `10101001010_{2}`. If the base is obvious in context, we don't always bother with the subscript. In wiggle, this would be the much longer
`\qquad\qquad\qquad 1_{2}0_{2}1_{2}0_{2}1_{2}0_{2}0_{2}1_{2}0_{2}1_{2}0.`
To convert binary to octal, one groups the binary digits three at a time from the right,
`\qquad\qquad\qquad 10,101,001,010,`
and then converts each three bit binary group to a corresponding octal digit,
`\qquad\qquad\qquad 2512_{8}.`
Second, since the usual notation puts digits next to each other, it has to employ a single character per digit. The usual digits work for bases up to ten. After that, once must have new symbols. Consider, now the hexadecimal number `7_{16}12`, as written in wiggle. We cannot simply write this as `712_{16}`, because we cannot tell whether that means `7_{16}12` or `7_{16}1_{16}2`. Instead, the usual thing to do is to let A mean 10, B mean 11, C mean 12, and so forth, up to one less than the base.
So, instead of `7_{16}12`, one writes `7"C"_{16}`.
To convert binary to hexadecimal, one groups the binary digits four at a time, from the right,
`\qquad\qquad\qquad 101,0100,1010,`
and then converts each four bit binary group into a hexadecimal digit,
`\qquad\qquad\qquad 54"C"_{16}.`
In hexadecimal, my littlest's birthweight was `7"C"` ounces, or, moving the unit point one place, `7."C"` pounds.
At one week
Littlest weighed in at 8 lb., 8 oz., during the midwife's followup visit yesterday evening---another weight that is a whole number of quarter pounds. So that makes two weighings by the midwife, and two at the doctor's office---probably with different shifts of nurses each time---and every one of those weights is a multiple of four ounces. (Again, I'm not faking these weights. If I were inventing, I would make them look less suspicious.)
In ounces, the weighings go `7_{16}12, 7_{16}8, 8_{16}0, 8_{16}8,` or `124, 120, 128, 136`.
agraph
width=300; height=200;
xmin=(-0.05); xmax=3.05;
ymin=(-2); ymax=150; yscl=16;
axes();
marker = "none";
//plot(118 + 2*x + 6*abs(x-1));
marker = "dot";
stroke = "green";
markerfill = "green";
a=[];
a[0]=[0,124];
a[1]=[1,120];
a[2]=[2,128];
a[3]=[3,136];
path(a);
endagraph
The preceding graph is a bit shonky, though, because the horizontal coordinate indicates which weighing, rather than time---and the times of the weighings are not so evenly spread---Thurs, Friday, Tuesday, Thursday. So let's revise it, to reflect the days of the respective weighings. The result is still imperfect, because birth early Thursday, the first doctor's office visit was late Friday afternoon, the second doctor's office visit was Tuesday morning, and the Thursday midwife's visit was in the evening. I've also dropped the pretty connecting lines, because they don't correspond to anything measured. Nonetheless, we get an improved sense of what has been measured and what we might reasonably guess from it :
agraph
width=300; height=200;
xmin=(-0.1); xmax=7.1;
ymin=(71); ymax=150; yscl=16;
axes();
marker = "none";
//plot(118 + 2*x + 6*abs(x-1));
marker = "dot";
stroke = "none";
a=[];
a[0]=[0,124];
a[1]=[1,120];
a[2]=[5,128];
a[3]=[7,136];
path(a);
endagraph
In ounces, the weighings go `7_{16}12, 7_{16}8, 8_{16}0, 8_{16}8,` or `124, 120, 128, 136`.
agraph
width=300; height=200;
xmin=(-0.05); xmax=3.05;
ymin=(-2); ymax=150; yscl=16;
axes();
marker = "none";
//plot(118 + 2*x + 6*abs(x-1));
marker = "dot";
stroke = "green";
markerfill = "green";
a=[];
a[0]=[0,124];
a[1]=[1,120];
a[2]=[2,128];
a[3]=[3,136];
path(a);
endagraph
The preceding graph is a bit shonky, though, because the horizontal coordinate indicates which weighing, rather than time---and the times of the weighings are not so evenly spread---Thurs, Friday, Tuesday, Thursday. So let's revise it, to reflect the days of the respective weighings. The result is still imperfect, because birth early Thursday, the first doctor's office visit was late Friday afternoon, the second doctor's office visit was Tuesday morning, and the Thursday midwife's visit was in the evening. I've also dropped the pretty connecting lines, because they don't correspond to anything measured. Nonetheless, we get an improved sense of what has been measured and what we might reasonably guess from it :
agraph
width=300; height=200;
xmin=(-0.1); xmax=7.1;
ymin=(71); ymax=150; yscl=16;
axes();
marker = "none";
//plot(118 + 2*x + 6*abs(x-1));
marker = "dot";
stroke = "none";
a=[];
a[0]=[0,124];
a[1]=[1,120];
a[2]=[5,128];
a[3]=[7,136];
path(a);
endagraph
Subscribe to:
Posts (Atom)