I practice talking sometimes.

It's a little funny that way: I've worked over the air before, but I have such little confidence in my voice. I stutter. My lips or teeth or jaw have always felt awkward, and I'd even seen a speech therapist when I was young. The braces didn't help, and the full implications of "JAW SURGERY" hit me all at once about a month before it was supposed to happen. I'm also first-generation Canadian, and my parents have never been great with English. I don't know if that's why I took to music and drawing and literature and Math so eagerly.

I've always had a thing for expression, for communication. Anyone who knows me will also know I have a crush on Math for that very reason--among others.

I love that, in Math, any aspect of life or any thought can be modeled using these strange symbols and even stranger rules, both of which can be taught to anyone; ideas can be communicated, proven, or disproven, and even improved upon by any number of people also seeking to find the most perfect expressions.

It's a whole community devoted to perfect universal truths.

... Hehe!

Saturday, January 5, 2008

Nickels and Trig IDs

I'm bored and was trying to explain Trig IDs to a student. One analogy I came up with was trying to make 25 cents from pennies and nickels. If you know that a nickel is five cents, and a penny is one, you can make 25 cents.

And then I got bored so I made this:

Twenty-five cents
:
penny, nickel, dime, quarter.
= 25p
= 20p + 1n
= 15p + 2n
= 10p + 3n
= 5p + 4n
= 5n
= 3n + 1d
= 1n + 2d
= 1q


Recently, my brother had asked me what is the process for writing out all the combinations of elements in sets? For example...

Set A consists of these elements:
a1, a2, a3.

Set B:
b1, b2.

Set C:
c1, c2, c3, c4.
and I want to write out every combination possible; so:
a1, b1, c1;
a1, b1, c2;
a1, b1, c3;
a1, b1, c4;
a1, b2, c1;
a1, b2, c2;
a1, b2, c3;
a1, b2, c4;
a2, b1, c1;
a2, b1, c2;
a2, b1, c3;
a2, b1, c4;
a2, b2, c1;
a2, b2, c2;
a2, b2, c3;
a2, b2, c4;
a3, b1, c1;
a3, b1, c2;
a3, b1, c3;
a3, b1, c4;
a3, b2, c1;
a3, b2, c2;
a3, b2, c3;
a3, b2, c4.
What is the process my brain goes through?

My brother wanted to know the process, because he was writing a computer program, and wanted to make it shorter--fewer lines of code. I'm not a programmer, so I don't know/remember exactly what his code says, but it does something like this:
For every a1,
for every b1,
write out an element of Set C.

For every a1,
for every b2,
write out an element of Set C.

...
Something terrible like that. And he doesn't just have A, B and C; he has about fourteen of these, so his code gets pretty dang long!

I thought; and thought; and thought about this, but I couldn't simplify it.

And then, I realized, no matter how many (few) elements in each set, there will be more rows than columns (assuming it's organized this way). So, instead of filling out the "chart" one row at a time, maybe it would be shorter to fill it out one column at a time! You'd just have to tell your program how many times to write each element before moving to the next element in the set (eg: how many times to write "a1" before writing "a2", etc), and when to stop, I guess, if programs require that.


But what is the method to write all the combinations of coins needed to make some amount of money? Wooo, Canadian monies.


Man am I tired,
--Charissa

No comments: