Sunday, October 31, 2010

Combinatorial Fun with Hawaiian.

I've been wondering recently about how many distinct words Hawaiian could have, if you consider a fixed number of syllables. With fewer sounds than English, it's tempting to think that it must have a smaller vocabulary. I'm going to use combinatorics (basically easy ways of counting large numbers) to estimate the number of distinct words of progressively larger syllable count and see how it compares to English. It's rather simple to calculate, as long as you take care with your linguistics.

To start off with, Hawaiian has 18 official sounds (represented visually using the letters a, ā, e, ē, i, ī, o, ō, u, ū, h, k, l, m, n, p, w, ʻ), 10 of which are vowels and 8 of which are consonants. It also has 15 diphthongs (iu, ou, oi, eu, ei, au, ai, ao, ae, ōu, ēi, āu, āi, āo, āe). Now, a syllable in Hawaiian always only consists of either a single vowel, or a consonant + vowel or diphthong, represented schematically by (C)V where the 'C' represents a consonant, the 'V' a vowel or diphthong, and the parentheses show that the consonant is optional (one side affect of this is that Hawaiian words always end in a vowel). The first question to be asked is, "How many syllables are possible?". We can see that there are 10 possible one-letter syllables consisting of the 5 vowels plus 5 long vowels, plus an additional 15 syllables comprised of a single diphthong, plus an additional 80 syllables formed by taking one of the 8 consonants and adding one of the 10 vowels to it, plus an additional 120 syllables formed by taking one of the 8 consonants and adding one of the 15 diphthongs. Not all of these syllables actually exist in common usage; for instance, the syllable wū does not exist in Hawaiian, and the syllable wu occurs only in two loan-words from English. However, for the purposes of this post I am calculating only how many words could theoretically exist, not how many actually do (which would require exhaustive knowledge of the language that I do not possess). So for single syllables, we have a total of \(10+15+80+120=225\).

Now, since any word in Hawaiian will be made up of these syllables, we can quickly calculate how many distinct words of a given number of syllables would be able to exist. Since Hawaiian has nothing against duplication of sounds (and often rather encourages it), for a word of two syllables we may have any of the 225 for the first syllable, and any of the 225 for the second. Thus to find the total number of two-syllable words we just multiply those two numbers (or equivalently raise 225 to the nth power where n is the number of syllables in the word), for a total of \(225^2=50,625\) words of two syllables. That's not bad in terms of vocabulary. Pretty much all words necessary for daily life plus quite a few extra would fit pretty nicely into that amount.

But Hawaiian utilizes many longer polysyllabic words, so if we expand our list to words of three syllables, we get \(225^3 = 11,390,625\) distinct words. At this point we're already well over the vocabulary of even the most linguistically rich languages on Earth. Even using a rather lax definition of "word", the English language has around 1–1.5 million words at the most, the vast majority of which are scientific, legal, technical, medical, financial and other terms of generally non-everyday use.

 But we don't need to stop here! Going to four syllables gives \[225^4=2,562,890,625\] This is a mind-bogglingly big number when it comes to words. That's over two-and-a-half billion words, and that's not counting the one, two, and three-syllable words already formed. It's common to have words of four or five syllables in Hawaiian, which blows the realm of neologisms so far open that it would be nearly impossible to come up with concepts for all of them (for words of 5 syllables, the number is  1,078,203,909,375, over a trillion words!).

Conclusion: Although the sound range of Hawaiian may sound limited to the Anglophone ear with our 44-odd sounds, combinatorics shows that Hawaiian is capable of forming astronomically many times more words than even the most wordy languages on Earth. I'd do a similar calculation for English, but for the fact that it would be several orders of magnitude harder. This is not because of the greater number of sounds in English, but how they group together to form syllables. In Hawaiian, you can only have (C)V syllables. In English, syllables are of the form (CCC)V(CC). (This is of course a bit of an edge case – the only words like this I can think of off the top of my head start with “str”, such as “strings” and “strips”, each of which has 3 consonant sounds, 1 vowel sound, followed by an additional 2 consonant sounds.)

Now, while in Hawaiian any syllable can follow any other syllable and be pretty easily pronounceable, making all possible combinations of sounds would lead to some very difficult or impossible to pronounce words in English. Certain consonant sounds double easily or sound good together, while other do not. This is partly why, for instance we have words like “kitten” but not “kiththen” or “kixthen” in Modern English: languages tend to change in the direction of being easier to say quickly. An analysis of potential English words would have to take all this into account, which would require looking at all the sounds of English individually with respect to both preceding and following syllables – not an impossible task, but certainly a daunting and difficult one. (If I had to take a stab at it, I'd guess that English probably has more possible syllables than Hawaiian does, but within the same order of magnitude. I'm not motivated enough to actually try it though.)

And with that, I will close off this post. A hui hou!

December 4, 2010: Edited to fix some completely inexcusable mathematical mistakes. Turns out the numbers I got were orders of magnitude too low. They should be correct now.

August 30, 2011: Edited to fix some really elementary mistakes in naming numbers. It should be correct now.

August 1, 2014: Edited to correct the really basic mistake of forgetting that syllables can be made up of single diphthongs as well as single vowels (indeed, the Hawaiian word for "I" is simply "au"). This increased the base number of syllables, which had a domino effect of inflating all the further numbers. How did I ever manage that minor in Mathematics...

Friday, October 29, 2010

Telescope fever.

Today I received word from Dr. Takamiya that we have an observing night on the Subaru telescope scheduled for November 8. To say that I was excited is an understatement. In fact, I discovered the phrase “bouncing with excitement” is not mere hyperbole as I had always assumed. We'll actually be up two nights -- the first to stay at Hale Pōhaku to get acclimated to the elevation, and the second for actual observing. The instrument we'll be using is not the one that provides the data I've been working with, which means I don't have to do anything with it -- I pretty much get to sit back, watch, and learn.

I'm really finding it a bit difficult to convey my excitement over this -- that I, a mere lad of a tender twenty-one years should be privy to the workings of one of contemporary astronomy's greatest tools! It's as if an undergraduate physics student were to be allowed to help with the Large Hadron Collider.

Anyway, that's my big news for the day. I've also decided to blog about something really scary for Halloween, so keep an eye out for that!

Tuesday, October 26, 2010

Ua hoʻi ka ua i Hilo!

Ua hoʻi ka ua i Hilo! A ua hauʻoli wau.
The rain has returned to Hilo! And I am happy.

It has been far too long in my mind since it last rained during the day. It's so nice to walk to school in the rain once again, without the merciless sun beating down upon me from overhead. When it rains in Hilo, it really rain -- the streets that run uphill run like miniature rivers. I walked through half an inch of water going up the hill to school today.

The changeableness of the weather of Hilo is one of the things I really love about it, and it has been sadly lacking for almost the last two months. November is historically when the rain really begins in earnest, so I hear, so perhaps the endearing randomness of the weather is finally beginning again.

A hui hou!

Wednesday, October 20, 2010

Donner und Blitz.

Tonight we're having quite a bit of thunder and lightning, which is rare for Hilo. I can only remember two or three other occasions where it thundered in the last year. It's still somewhat of a new experience for me, since thunderstorms are rare in Northern California and Taiwan. Rather exciting, in a "I think I'll stay away from windows and unplug my computer" sort of way!

The lightning was actually many miles away, it was often so long between lightning flashes and thunder peals that I stopped counting after 20 seconds.

Monday, October 18, 2010

Calculus and yogurt, with just a smidgen of algebra.

Mmm, Yogurtland. I went there again today, and once again it is delicious (‘ono in Hawaiian). As I write this, I'm savoring a mix of Pomegranate & Raspberry Tart, Arctic Vanilla, Blueberry Tart, and Double Cookie Crumble flavors, topped with kiwi slices, cookie dough minis, chocolate chips, strawberry chunks, sliced macadamia nuts, honey, white chocolate sauce, and Ghirardelli caramel, which pretty much filled up the container I was using. The, tastes, are myriad, varied, and impossible to describe. The part of my brain that handles taste is probably forging new neural connections right now in order to handle the tsunami of new combinations of sensations flooding it. I hadn't noticed the honey the first time I was there, and it really adds a certain je ne sais quoi, an undefinable essence that permeates every bite and reminds me of the pleasant days back when I had a hive or two of my own, and how relaxing it was to be out there, working with the bees, watching them go about their little lives oblivious to me, inhaling the rich, intoxicating odor that comes only from the inside of a busy and active hive, the smell of little insects so full of life…ahhh…good times, good times. Up until the Varroa mites and the Colony Collapse Disorder killed ‘em.

But to keep this post from going somewhere very different from where it started, I've decided to do a little integral calculus, just for fun. A friend recently wondered aloud how much a certain large glass bottle filled with water weighed. Having had very few chances to use the calculus that I love so much all this semester (I've mostly only used algebra, which I despise), I decided to do a little volume integration and see if I couldn't figure it out. (hmmm…getting a little sleepy now after ingesting ~10 ounces of yogurt and toppings!)

I've never seen the bottle in question myself, so I only have some measurements and photos to go on. I've got that the outside diameter of the bottle is about 8 inches and its height is about 24 inches. This is corroborated by performing measurements on a (poor) picture of the bottle, which also shows its neck width to be about 2 inches. The glass is supposed to be about 3/8 of an inch thick, and it has a 5-inch deep V-shaped dent in the bottom for resisting internal pressure.

I played around with equations in Deadline (a nice little graphing program good for calculus) for a while until I found one that seems to fit pretty well. The structure of the bottle immediately reminded of a hyperbolic tangent function, and while it's probably impossible to get a perfect fit due to the perspective in the photos I used, the equation \((3/2)\tanh(x/4)+5/2\) seems to work quite well. You can see it graphed in the picture below (the red line is the graph Deadline put out, the green parts are my attempt to show what the bottle is approximately like):

Now, without delving too deeply into the theory of calculus, let me explain briefly what I will be doing. Imagine trying to find the volume of a cylinder. You know its volume is merely the area of its base (\(\pi r^2\)) times its height. Now instead of doing it in one step, suppose you divide the cylinder into a number of slices. It seems obvious that the volume of the cylinder is equal to the volume of all of those slices put together, and the volume of each slice can be found by using the volume equation for a cylinder using the new height of the slice. This is all well and good when considering a cylinder, but what if you have a cone? Any slices you make will not be cylinders, and thus cannot have the cylinder volume formula applied to them. After pondering this problem for a while, you may suddenly find yourself thinking “Aha! What if I make the slices infinitely thin? Then they will actually be little cylinders again, and I can find their volumes and sum them all up.”

On the face of it, this seems utterly preposterous, at least to me. Taking an infinite number of infinitely thin slices and adding them up to get a volume? Ridiculous! And yet the amazing thing is, it works. Isn't that incredible? Doesn't it just send shivers up and down your spine? To think that you, a mere mortal, can harness the concept of infinity for your own purposes! It's hard to convey the awe this fills me with whenever I ponder it. To me, doing these sorts of problems always gives me a feeling of flying, soaring high and away above the boring, mundane world of algebra and cutting right to the heart of a problem with eagle-like fleetness. Of course, to actually get an answer will usually require some algebra, which always feels like crash landing to me.

Anyway, the integral of integral calculus is simply a way to sum up an infinite number of slices of an object. Technically, what it adds up is the height of the function you are integrating at any given point. If we take the height of the function as the radius of a cylinder, we can square it and multiply by π to get the area of that particular slice. Adding all these areas up will give us the volume.

So! To is the equation we need to integrate:
\[V=\pi\int_{-10}^{18}\left(\frac{3}{2}\tanh\Big(\frac{x}{4}\Big)+\frac{5}{2}\right)^2dx\] (note how pretty \(\LaTeX\) makes everything!) Notice we have \(\pi\) multiplied by the sum of all the little slices from -10 to 18, which makes a total of 28 inches (the limits here are slightly strange, even for calculus, but it's for convenience with Deadline). The little dx at the end is an important part of calculus, but we don't need to bother with it now. Now, since this equation, while not difficult, would take quite a lot of algebra to solve, I'm just going to cheat and have Deadline do the integration for us. This gives us the result \(\pi\times81.96\approx257.5\) cubic inches. The bottle, however, is hollow. It has a thickness estimated at 3/8 of an inch. To a good approximation, the volume inside the bottle is simply the same function with 3/8 subtracted from it, like this:
&=\pi\int_{-10}^{18}\left(\frac{3}{2}\tanh\Big(\frac{x}{4}\Big)+\frac{17}{8}\right)^2dx\end{align} Although no more difficult in principle than the first integration, this is still a lot of writing to evaluate by hand, so again we call upon Deadline to get an answer of \(\pi\times71.46\approx224.5\) cubic inches. This is a reassuring answer, as subtracting it from the previous answer gives 33 cubic inches, which means that a little over 92% of the bottle's volume is actually available volume, not glass (i.e, the glass the bottle is made of occupies 33 cubic inches). However, we have not taken into account the V-shaped indentation in the bottom. Assuming that it spreads to the outside diameter minus \(2\times(3/8)=3/4\) inches, a little contemplation gives the equation: \[V=\pi\int_0^5(0.62x)^2dx\](the 0.62 comes from taking the inverse tangent of (29/8)/5 and converting to radians) At this point, things start getting somewhat complicated, so we're going to simply assume that there is a cone with this volume taken out of the bottom of the bottle. Obviously, this is not perfectly correct, and may lead to the final weight being slightly on the low side, but we weren't perfectly careful with the ends of the bottle either which ought to bring it back up slightly. The volume given by Deadline is \(\pi\times7.75\approx24.3\) cubic inches. Subtracting this from the volume found previously gives ≈ 200 cubic inches available for holding water.

So, let's recap: on some ever-so-slightly shaky assumptions we've found that the bottle has 33 cubic inches of glass and 200 cubic inches of holding space for water, assuming it's full right to the top. This translates to a carrying capacity of about 3.3 liters. Converting both values into cubic centimeters, we get  ≈ 540 cc's of glass and ≈ 3274 cc's of water. The density of water at 25 °C (room temperature, roughly) is 0.997 g/cm\(^3\). The density of glass, unfortunately, varies widely depending on the type, from less dense than aluminum to more dense than iron. According to Encyclopedia Britannica, 1971 edition, “common” glass has densities ranging from \(2.4-2.8\) g/cm\(^3\). Since this is tinted glass we're dealing with, and I have no idea how common it is, and usually less “common” glasses tend to be denser, I'm going to go with the heavier side and use 2.8. Multiplying the volumes times the densities gives the masses, which turn out to be ≈ 3264 g of water and 1512 g of glass (interestingly, this implies the glass makes up just a bit less than 1/3 of the total mass of the full bottle). Multiplying the masses (in kg) of the water and glass times the acceleration due to gravity (9.8 m/s\(^2\)) at the Earth's surface gives the weight, in Newtons: ≈ 32 N for the water, and ≈ 15 N for the glass. Together this gives a weight of 47 Newtons, which is about 10 and a half pounds. This works out to about 68% of the weight being water and 32% being glass, in agreement with our earlier estimate.

Error analysis: possible error: quite large. I've never held or even seen one of these bottle in person, so I'm relying on estimated measurements by other people. Function fitting was rudimentary and qualitative: if I wanted to be really through, I could have done a least-squares-fit regression analysis to determine the ‘best’ fit to the bottle (I don't actually know how to do that, but it never seemed that difficult in theory). Of course, a more thorough analysis of the complicated bottom of the bottle could be done; this reminds me of the “just assume everything is a frictionless, homogeneous sphere in vacuum” joke in physics. Personally, I think 3/8 of an inch is a bit thick for the glass; I hazard a guess that 1/4 would be closer to the mark, which would raise the weight a bit by having more volume for water, but again I've never handled the glass to see about this, and it probably varies throughout the bottle, a factor I didn't take into account. The glass may be denser than the value I assumed; it looks like old glass, which could be of (significantly) higher density than the value I used.

I suppose, in the end, the slightly depressing thing is that for all my mathematical tricks the quickest and easiest way remains simply to weigh the thing. If such a thing is ever done, I would appreciate being informed of just how off I was. Oh, and if you spot any errors in my math, please let me know!

Thursday, October 14, 2010

Hawaiian and Plants (but not Hawaiian plants).

A couple days ago I remarked on the small web-based quiz my fellow astrophysics major and Hawaiian classmate Ian had set up using a word list I'd written up for the purpose of cementing new vocabulary in my brain a little better. Well, it's gone through some revisions, and is now a fairly helpful little self-testing application. In fact, our teacher told us today that the other Hawaiian 101 classes had been using it too, and that they had liked it a lot and found it useful (so much so that he gave us extra credit! Yay!). If you want to see it, it can be found (for now) here. We'd like to add a feature to display all the words from a given chapter so people can review them all at a glance, but it's not up yet.

In other news, I heard that my sister managed to place first in the nation in the Honors division at the annual National Junior Horticultural Association meeting in Pennsylvania last weekend in the plant identification contest. She's so good, they won't let her compete any more! Having only ever managed to place 4th myself (and that's not even in the Honors division), I can tell you that it is certainly no small accomplishment to have done that.

Tuesday, October 12, 2010

Vis Volunteering Vision.

Last Saturday evening I went up to the Vis to volunteer, and also managed to catch the first hour of the annual volunteer banquet, where everyone who volunteers is recognized for the many labors of love they perform over the preceding year. After all, staying up late at night in the dark and cold for fun is not the sort of thing normal people do! I received a cool hat with my name on it for volunteering more than 100 hours over the last year (it was actually somewhere around 170, though I never really bothered to count accurately). I hope to break that amount this coming year, as I now have the time to go up almost every week, which will certainly help.

I've also decided to make a collection of images of all the globular clusters of stars belonging to the Milky Way that are visible from this latitude. With a bit of planning and foresight, I ought to be able to easily get them all using the imager at the Vis in the coming year. My ultimate goal is to make a collage of them, showing the differences and similarities between them. Globular clusters make really pretty pictures in my opinion, and I hope to be able to share some pictures of them sometime (relatively) soon. (For those who don't know, globular clusters are basically huge spherical collections of hundreds of thousands to up to a million stars, very densely packed together.)

Friday, October 8, 2010

Hawaiian Online.

Two weeks ago I started a file to include all the words we've learned in Hawaiian class, mainly so I could memorize them easier by writing them down. After hearing about it, one of my astrophysicist friends who happens to be in the same Hawaiian class decided to see about writing a little self-quizzing system (essentially electronic flashcards) using it. Today I got to see the results, and it's pretty cool. It still needs a lot of work (unsurprisingly), but I feel it's already a useful tool for self-quizzing, and is even fun to use. I don't think it's quite ready for prime-time yet, but when it's had a bit of tinkering I'll post the web address so can see it.

Sunday, October 3, 2010

Work hard. Play harder.

I'm surprisingly un-tired after staying up all last night, sleeping for a mere 6 hours, and playing soccer for a few hours in the intermittent rain. Which was wonderful, by the way! Instead of overheating as usual, the rain was cool enough to make the exercise feel good. I learned that while it's dramatic to stop kicks with the top of my head, it's not very pleasant.

I was also introduced after soccer to a wonderful place called Yogurt Land, where they sell many different flavors of self-serve frozen-yogurt with more toppings than even I can fit on one dish. I had a bowl of strawberry, pomegranate raspberry, and cheesecake flavored frozen yogurt topped with mini cookie dough chunks, fresh raspberries, kiwi slices, M&M's, and caramel sauce, and that was perhaps one-tenth of the number of kinds of toppings they had available. I was so full from it, I almost didn't feel like eating supper, but I did have some Span `n' onions on principle.

All in all a great Saturday, and I'm now ready to catch up on homework and go to the Vis tomorrow.

A hui hou!

Diary of a Sleep-Deprived College Student on an Observing Run

Tonight I'm on an observing run with Dr. Takamiya, so I thought I'd do something a little different and give you a glimpse into a day night in the life of a sleep-deprived college student on an observing run.

~1730: Got to IFA, met Dr. Takamiya, got set up down in telescope control room. Brought food (hopefully sufficient for the 12 hours I'll be here this time!).

1841: Spent about an hour deleting and zipping extraneous files to make room on the computer where the data I work with is stored. Learned in conversation we actually have several vacuum deposition chambers for aluminizing mirrors lying around on campus. Good news for the University Astrophysics Club's plan to refit some of the non-functional telescopes we have lying about on campus!

1854: Have broken out the Mountain Dew. Not feeling tired yet, thankfully, but doesn't hurt to be proactive.

1909: Now listening to "Chorale Fantasia" by Beethoven on Dr. Takamiya's computer after I mentioned it to her. One of my favorite pieces!

1925: Finale. I love this song!

2030: Ha ha. Turns out all those files I deleted held some position information that isn't available in the more reduced versions. They're all backed up on another machine of course, so just spent the last 45 minutes making a list of them so Dr. Takamiya can find them and send them back to me. Is that ironic or what?

2121: Another 45 minutes of scripting allowed me to turn our breakthrough from Tuesday into a workable script. Now each time the script examines a spectrum, it generates a graph of the region around the Hα line for fast visual error catching. The only catch is that you can't control the location or name of the newly-born graph, so the script has to search for it after each iteration and whisk it away to a safe location while renaming it something meaningful before the next one is created.

2132: Ugh. Heaviness of eye setting in. Just realized I need to add redshift information to new data files from Sunday night

2222: Redshift information all added. Eyes definitely getting heavier.

2230: Back to troubleshooting my new and improved graph-generatin' script. Trying to pin down source of elusive "truncated pixel file" error.

2251: Alright! Turns out it just needed the memory cache flushed periodically. Script is now happily populating folders with hundreds of graphs, and storing logs of its results as well. Not much for me to do with it until it finishes. Maybe it's time for that soup I brought...?

2303: Hoo, boy, eyes feeling gritty. At least I have cup of noodle soup. Yum. Yum.

2322: Not much happening. Noodle soup and Mountain Dew conspiring to keep me awake. Script still happily running, is perhaps 25% done? I don't know exactly how many data files there are to work with now that the new ones have been added.

0032: Mountain Dew and soup both gone. Am now in deeply into part of the night where I'm most tired (strangely enough, it's about a twelve hour offset from the time of day when I'm most tired). Script continues to chug along, has currently analyzed 115 cube files so far. Maybe 50% done?

0220: Ok, script is finally done. However, it output one more set of graphs than it did log files. What on earth? Now I have to track down the extraneous one and figure out why it didn't get a log file.

0235: Aha! One of the cube folders is empty, for some reason. Didn't expect that, which is why it took so long to track down. A simple extract operation got it spiffied up, however, followed by analysis and graph-making, bringing the total number of data files we have to work with to 224. Each of which has been split into 225 component spectra, all of which were individually analyzed and graphed over the last two hours. That's 50,400 spectra!

0256: Wells, it turns out those files I deleted did not, after all, contain the position information we need, so it's no problem. Also, I just got all the raw data files from the observing on Wednesday night. Time for more cube converting!

0300: Finally, starting to wake up a bit.

0234: Redshift information added to all the newly-minted cube files from Wednesday night, beginning the extraction process! (whereby each cube file is split into its 225 component spectra)

0328: Extraction process complete, beginning graph-making and analysis!

0404: Analysis complete, total number of individual spectra is now close to 58,950 (the actual number is slightly lower because some of the pixels in the spectrometer are bad, and occasionally don't produce a usable spectrum). This is also the number of graphs created in the last few hours, and equals 262 individual data files.

0502: Almost done for the night, as twilight begins to creep upon the earth. This is good, as my ability to concentrate and focus has decreased to the point where I'm not getting any more useful work done.

0539: Well, that's a wrap! We're done here for the night. As the rosy-fingered dawn climbs into the eastern sky (to borrow a Homeric turn of phrase), I make my way home, to catch what rest I can before the light breaks fully upon the landscape and destroys any chance I have of sleeping. Hope you enjoyed this look at a day's night's activity for me! A hui hou!

Friday, October 1, 2010

Do 10 millipedes = 1 centipede?

For some reason, apparently my room has started drawing millipedes, as I have now found one in there on two days out of the last three. Thankfully, millipedes are about a thousand times less worrisome than centipedes, for several reasons:
  • they aren't venomous.
  • they don't bite.
  • they're much smaller.
  • they're much slower. 
  • when disturbed, they don't go crazy and run around menacingly at top speed, but instead collapse and curl up into a little non-threatening ball that can then be safely picked up and disposed of.

Plus, I have yet to find one in my bed.