fun script

Mar 12, 2009 10:36

a friend who is working on learning shell script asked me to do this. Write a script which generates all the letters then reports back whether they are capital or lowercase. It took me a little bit of thinking to come up with one I must admit, but this is what I wrote ( Read more... )

Leave a comment

dwivian March 12 2009, 18:26:06 UTC
Exactly.

The base, in base N, means the index number for which exponentiation is done to achieve a value for counting marks in a given position in a position-based numerical system prior to summation of those marks to determine a value for the number as recorded, in number systems where logarithms are defined. The base, or radix, is used to determine the potential values of numbers in that position thusly: the index in that position is multiplied by the value of the exponentiation of the base taken as base raised to the power of the quantity of the number of positions left of the radix point minus one.

In base 10, the first position is 10^0=1. The next is 10^1=10, and the next is 10^2=100. A number in position 2 can take on the values of 0 through 90 by tens, as the allowed indexes, 0-9, are multipled by 10 (10^1) to determine their value.

1, taken to ANY positive integer power, is itself. This will generate a tally system, as you indicate. 0 still works, as it indicates that there is no count in that position, but we need another character to indicate a mark. Tradition says you can't put the radix value in a position, but in this case it is the only alternative we have. The question remains: does this system allow for logarithms?

The answer is no -- since a given tally mark no longer gives any real referent to the position it is in, the logarithm of the number is immaterial. It is possible to create the number 11011 and 110000011 to mean the same thing, that is, four marks. The potential exponents involved are undefined.

So, base 1 fails to be meaningful. It's still fun to think about.

Reply


Leave a comment

Up