Showing posts with label science. Show all posts
Showing posts with label science. Show all posts

Monday, February 18, 2013

Mangrove Tunicate

A mystery has been solved.  Last month, when I was kayaking amongst the mangroves in the Florida Keys, I saw some weird orange things growing on the mangrove roots in the water.  I lifted up the root and took a photo of these orange egg-like balls.  I could not figure out what they were, and it didn't help that I kept thinking they were eggs of some sort.

After failing to identify them on my own, I put the photo up on Facebook.  And, within 20 minutes, an old friend of mine commented and told me exactly what they were.  These are mangrove tunicates (Ecteinascidia turbinata), and they are used to produce some types of anti-cancer drugs.  Amazing, huh?

Mangrove Tunicate (Ecteinascidia turbinata)


Tuesday, May 03, 2011

A True Death Ride

I'm a proponent of euthanasia. However, I'm too lazy to write much about my view of it. I found this interesting... a bit macabre, but interesting nonetheless. What a crazy and deadly ride.

Euthanasia Coaster Wiki

Euthanasia Coaster: Inventor's Video

Sunday, April 24, 2011

Killer Farts

Here's something that I've thought about on and off for some time, but since I've never spent any time researching it, it may be completely inaccurate. So, we know that one of the best ways to prevent sickness is by keeping clean... washing our hands thoroughly after using the bathroom, not leaving random food around, etc. Ingesting poop is pretty much going to be a health hazard.

Now, when someone farts and you smell it, usually it smells bad... kinda like poop. Now, does that mean that poop particles actually made it into your nose? If it were the case that the poop particles did not actually leave someone's anus and find their way into your nose, then you wouldn't smell it, right?

Does that mean that farting in public (where others can smell it) can increase the spreading of disease? Or, does it not work that way? Same goes for people that take rather odoriferous dumps in a public bathroom stall... are they affecting the health of others?

Maybe it is not necessary for a particulate to enter your nose for you to smell something, but that just doesn't seem right. Anyone have any answers?

Friday, April 01, 2011

Special Relativity and the Law

Just had a brief conversation with a friend involving time dilation, and on a complete tangent, I came up with a couple questions that seemed interesting. If ever in the future we are able to travel at ridiculous fast speeds such that time dilation becomes a real factor, then these questions might become relevant.

For those that are unfamiliar with time dilation, it is basically an effect of traveling very fast (we're talking about speeds like one-quarter the speed of light). The effect is that those traveling at the very high speed will age slowly as compared to those that aren't.

Say I hop into a super fast space shuttle and fly away from the Earth maintaining my high velocity for a year and return back to Earth. I've aged a year, but everything/everyone on Earth would have aged much more depending how fast I was going... they might end up aging 30 years, for example.

Anyway, enough of the basic background information. Here are two legal cases that I thought would be interesting for you philosophical and lawyer types.

1) A man, 40, has worked for about 20 years, paying enough in Social Security making him eligible for Old Age Social Security benefits when he is 67. He now hops into his special spaceship that allows him to travel very fast. He ages 6 months, but the Earth has aged 27 years. He is now 67 years old based on his birthdate. Should he be allowed to collect the Social Security benefits?

2) A male high school student, 15, is pursued by his high school teacher. They wind up having a secret relationship. She is much older than him, and thus any sexual relationship between them is clearly unlawful and she would be charged with statutory rape if their secret relationship were known to authorities. They both hop in their special spaceship and they each age 3 weeks, but the world around them has aged 3 years. To the world, he is now 18 (but, clearly he's only a 15 year-old kid). Should their relationship now be considered a legal one?

Wednesday, March 09, 2011

Rock-Paper-Scissors

I like to think that I'm good at rock-paper-scissors. I bet on this game frequently with friends, and I'm well ahead lifetime. Mostly, my strategy involves talking to my opponent and more or less getting in their heads. Saying things like, "You know I'm going to throw rock. So, you probably want to throw paper." evokes some sort of response. And, over time, when playing against the same opponents, you sort of build a history of their actions and base your play on what you recall.

In the end, maybe I'm just one lucky SOB.

The NY Times put out a RPS game with a trained computer that over time exploits your weaknesses and tendencies. I played 35 rounds against it, and the nerd in me is celebrating my victory.

Human: 14
CPU: 10

Monday, November 29, 2010

When a cup isn't a cup...

Here's a piece of trivia that I found interesting, and frankly, a bit strange.

You likely have seen that many food packaging labels in the U.S. describe serving sizes in units of cups. You're also likely to have come across cup unit measurements in various cooking/baking recipes.

However, what you're not likely to know is that these sizes are not the same. A cup used for nutrition labeling is dictated by U.S. laws to be 240mL, or roughly 8.115 customary fluid ounces. This is a little more than 1.44% more volume than the standard cup used in all your favorite recipes.

And, I thought I'd throw this out at you all as well... a Japanese cup is defined to be only 200 mL. I'd be interested to know if Japanese cookbooks refer to this smaller volume cup, the traditional one, or some other definition altogether.

Isn't it about time that we just standardize the definition? Seems silly to me the way things are today (not that I've ever noticed the distinctions).

Tuesday, August 10, 2010

Combinatorial Madness - The Final Post

This is a continuation from: Combinatorial Madness - Follow Up.

So, a colleague of mine was able to solve the original potions problem such that the solution was the double factorial and not the summation. Thus, he was able to kill two birds with one stone. His way of looking at the problem shows both that the solution of the problem is, in fact, the double factorial and that by doing so, produces a proof by combinatorial argument of the double factorial identity.

For those unfamiliar, a proof by combinatorial argument is basically where you show two different ways to count the same thing, each having its own expression. Thus, both expressions must be equal, since they both count the same thing.

I take no credit for the following... it was solely the work of my colleague. If I mangle his argument, I apologize. I'm sure that I could be clearer about some parts, but I do think that the reasoning is solid. Anyway, this is basically how it goes.

Say that we want to know the solution to the N potions problem. Suppose that the solution of the k potions problem is A(k). With (N-1) potions, the total number of final potion products is A(N-1). Now, in producing a single final product with (N-1) initial potions, we would have gone through (N-2) iterations where some potion was combined with another potion in each iteration.

So, we can view these (N-2) combination actions as C_1, C_2, C_3, ..., C_(N-2). Any one of these combinations can be expressed as X+Y, X and Y being available potions at that junction. In order to tackle the N potion problem, we would like to add a new potion (the Nth potion -- call it Z) to the total mix. The question now is how can we add it such that we don't end up with any overcounting, etc?

For any combination action, we can inject the newly introduced Nth potion (Z) into that particular iteration -- however, notice that there are two ways in which this injection can happen. We can replace the combination that we're focused on with one where we've injected Z as ((X + Z)+Y) or as (X + (Y+Z)). Since there are (N-2) combination actions where we can perform this injection, we have 2(N-2) possible injection points.

We're missing one more injection point. That is the case where we simply combine the newly introduced Nth potion at the very end after C_(N-2) has produced some final product. There is exactly one injection point at the very end of our chain of C_k's. That adds one, so that gives us (2(N-2) + 1) injection points, and it's clear that adding Z to each of these injection points creates a completely new final product given this particular chain of combination actions (C_k's).

Now, we also know that there are A(N-1) different chains of combination actions that produce unique final products. Thus, we have (2(N-2)+1) * A(N-1) total final products for the N potions case. This simplifies to (2N-3) * A(N-1), which is clearly equivalent to (2N-3)!!, especially given that we know A(2) = 1 (the trivial 2-potion problem) .

So, this is a direct explanation of why the N-potion problem solution is (2N-3)!!, and it gives us the combinatorial proof that (2N-3)!! is equal to our other expression (from the previous post):

I know the above wasn't explained previously. That was me being lazy. Anyway, the explanation of why the above summation counts the final products in the N-potion problem is as follows (this one I actually helped come up with).

We are essentially enumerating all possible 2-partitions of the N potions being combined. A(i) represents the total final product count of the first of two partitions where the Nth potion is not a member. The A(N-i) represents the total final product count of the second of the two partitions and it is where the Nth potion is a member. The product of the two final product counts (i.e. A(i) * A(N-i) will result in the total number of final products when all N potions (both partitions) are considered). We are allowed to do this since our construction ensures no overcounting.

To further clarify, our loop going from i=1 to (N-1) gives us all the possible cardinalities of our partitions. We must multiply by ((N-1) Choose i) in order to produce all the combinations possible that make up the partitions with those cardinalities. Again, since we cannot overcount due to our construction, we can now sum the final product counts for all the possible partitions, giving us A(N).

Hope that was clear enough. And, in a way it was nice that we did not initially come up with the solution that leads directly to the double factorial. Because of this, we now have a pretty nifty combinatorial identity relating the recursive summation described above to the double factorial.

Monday, August 09, 2010

Combinatorial Madness - Follow-Up

So, here's a follow-up to my previous post: Combinatorial Madness.
A follow-up to this follow-up post can be found here: Combinatorial Madness - Final Post.

After a fair bit more work at this and thinking about it (with a good deal of help from a few colleagues), here's where we have arrived. We basically have a good explanation of how we can formulate a recursive solution to the problem. And, it now comes to the point where we have to verify the following conjecture. We believe it holds true, but haven't yet proven it nor tried to prove it.

Assuming it's true, it is a pretty cool double factorial identity.

Here it is.

Note that A(k) is the solution for the potion problem where N=k.

So, any takers? We haven't tried to prove the above, but basically, if you can prove that then that basically proves that the solution to the original potions problem follows the double factorial.

Friday, August 06, 2010

Combinatorial Madness

A Follow-Up Post can be found here: Combinatorial Madness Follow-Up.

I've gone mad. Here I am on a Friday night, absolutely consumed by a combinatorial problem that I came up with to challenge myself a while back. Only tonight have I begun thinking about it more seriously. And, either it's quite difficult or I'm just not getting it. If anyone wants to give it a go, please do, then teach me how you were able solve it if you figure it out. Because, I think I'm kind of stuck.

This is long, but if you like numbers, you may enjoy this.

Here's the problem.

There are N potions. Combining any two potions will form a completely new potion. Thus, (A+B)+C does not equal A+(B+C), as A+B forms something completely new, call it E, and B+C forms something completely new, call it F. So the former is E+C which is completely different than A+F.

In a single iteration, two potions are combined. After N-1 iterations, there is a single final potion. The question is, how many different final products can be created starting with the N potions?

This is much more difficult than the trivial question, which is how many possible paths are there from N potions down to a final product. The total number of possible paths is clearly (N choose 2)*(N-1 choose 2)*(N-2 choose 2)*...*(2 choose 2). The total possible paths will overcount the total number of possible final products, as some paths will lead to the exact same potion.

Here's what my friend Duke and I have come up with...

N=2, clearly it's 1 possible final product.
N=3, clearly there are 3 possible final products.

For N=4, it starts getting a bit more interesting. Here's a way I came up with that helps us count the number of final products possible. If you think about it some, you will realize that with N=4, there are only 2 possible forms in which a final product can be created.

Here they are:

Form 1 = ((A+B)+C)+D
Form 2 = (A+B)+(C+D)

It should be clear that (A+(B+C))+D is an isomorphism, and doesn't give us a new final product.

Now, there are 4! ways in which we can arrange A, B, C, and D. But, we also notice that the order of A and B does not matter. Thus, we overcount by a factor of two. So, there are actually 4!/2 = 12 final products of Form 1.

For Form 2, we notice that we overcount by a factor of 2 three times (once for A/B, once for C/D, and once for AB/CD). So, we have 4!/(2^3) = 3 final products of Form 2.

So, for N=4, we have a total of 12+3 = 15 possible final products.

Following the same counting strategy for N=5, here are the possible forms.

Form 1: (((A+B)+C)+D)+E
Form 2: ((A+B)+C)+(D+E)
Form 3: ((A+B)+(C+D))+E

For Form 1, again we have overcounting by a factor of 2, so we get 5!/2 = 60 for N=5.
For Form 2, we overcount by a factor of 2 twice (2^2). So, this gives us 5!/4 = 30. Note that the order of (A+B) and (D+E) does matter, which is why we only overcount for (A,B) and (D,E) and not for (AB,DE).
For Form 3, we notice that (A+B) and (C+D) order does not matter, so we have an additional factor of 2 overcounting compared with Form 2. This gives us 5!/8 = 15.

So, for N=5, there are a total of 105 possible final products.

Since, I'm a real glutton for punishment, here's my attempt at N=6. I came up with 6 possible forms, hopefully I'm not missing any.

Here are the six forms I came up with for N=6:

(((A+B)+(C+D))+(E+F)) – I think this overcounts by factor of 2^3 (A/B, C/D, AB/CD) [Note: This is incorrect -- see the Edit at bottom.]
(((((A+B)+C)+D)+E)+F) – overcounts by factor of 2 (A/B)
((((A+B)+C)+(D+E))+F) – overcounts by factor of 2^2 (A/B, D/E)
((((A+B)+C)+D)+(E+F)) – overcounts by factor of 2^2 (A/B, E/F)
((((A+B)+(C+D))+E)+F) – overcounts by factor of 2^3 (A/B, C/D, AB/CD)
(((A+B)+C)+((D+E)+F)) – overcounts by factor of 2^3 (A/B, D/E, ABC/DEF)

This gives us 6!/2 = 360, 6!/4 = 180 (twice), 6!/8 = 90 (three times), which is 990 total possible final products.

I was really hoping that I would have come up with 945 total possible final products, but I just don't see where I've gone wrong above. Maybe I did, so if you spot a mistake, please let me know.

If it had been 945, then we have a double factorial pattern for odd values... 1*3*5*7*...*(2n-1). 1, 3, 15, 105, 945, 10395, etc.

But, since I can't convince myself that it's 945, I am officially stuck.

Anyone?


Edit:

(((A+B)+(C+D))+(E+F)) – I think this overcounts by factor of 2^3 (A/B, C/D, AB/CD) -- I neglected the E/F. This makes the overcounting factor 2^4, and that brings us to 945 possible final products for N=6. So, the solution is pretty much double factorial, but I do not have an actual proof. Will think about it, but maybe leave it to others, hehe.

Tuesday, April 20, 2010

So Much For Brain Games

Nature published a study on brain training via computerized tests, such as those found in Brain Age or Brain Challenge, this week. Unfortunately, their conclusion was not what I would have hoped for; these games do not increase cognitive function. It's a shame, because I actually find those types of games entertaining.

The study shows that any skills obtained from training on one particular task does not transfer to other tasks even when the tasks are cognitively closely related! That's surprising to me.

Anyway, read the actual paper here: Putting brain training to the test.

Tuesday, September 15, 2009

Careful with Floating Point Sums

Floating point computations are imperfect in the computing world. Often times we overlook this fact, so it's good to refresh our memories every now and then.

A simple summation loop such as this one can produce results with large errors.

int i;
float fSumFloat = 0.0f;
double fSumDouble = 0.0;
const float fIncrementFloat = 0.0001f;
const double fIncrementDouble = 0.0001;
const int nIterations = 25000000;

for( i = 0; i < nIterations; i++ )
{
   fSumFloat += fIncrementFloat;
   fSumDouble += fIncrementDouble;
}

You would expect that summing 25 million 0.0001's would result in 2500, but depending on your machine the results will vary. Here are results of running the above on my PC (with all optimizations turned off). You'll see that there is some error even when using double precision floating point.

Sum (float) = 2048.0000000000
Sum (double) = 2500.0000004718
Expected Sum = 2500.0000000000

Now that I have your attention, there are ways to combat the roundoff errors that ultimately kill us. One popular method is the Kahan Summation method. Another method is known as pairwise summation, where you continually sum pairs of terms until all you have left is the final sum. For example, start with 1 + 2 + 3 + 4. The first pass yields you (1+2) = 3 and (3+4) = 7. The second pass gives you your desired sum of (3+7) = 10.

Both of these summation methods are slower than naive summation, but they are available if needed.

One thing that I found a bit interesting is that the results of these two methods were different on my PC as compared to a Linux box. I'm pretty sure that it has nothing to do with the OS, instead it's probably due to CPU and compiler differences.

On my computer at home:
Sum (float) = 2048.0000000000
Sum (double) = 2500.0000004718
Actual Kahan Sum (float) = 2048.0000000000
Pairwise Sum (float) = 2499.9998779297
Expected Sum = 2500.0000000000

On a Linux box:
Actual Sum (float) = 2048.0000000000
Actual Sum (double) = 2500.0000004718
Actual Kahan Sum (float) = 2500.0000000000
Pairwise Sum (float) = 2500.0000000000

I also noticed that when I had compiler optimizations turned on, the results coming from my PC were definitely better.

Actual Sum (float) = 2499.9999368447 [Compiler Optimizations Turned On]

Anyway, the bottom line is if you're going to be dealing with floating point calculations (and, summations in particular), be careful and run lots of experiments. Even when the code you've written is highly portable, you will want to make sure that results will be as you expect on your target environments.

Thursday, January 17, 2008

Perplexed About Absolute Zero

Okay, this is well outside my bailiwick, but I've been thinking about it recently after catching part of an episode of Nova covering absolute zero. So, if I understand correctly absolute zero is the theoretical temperature where everything basically stops moving and there would truly be zero heat energy. And, that temperature is at 0 kelvin, which based on all the searching I could do is -273.15° Celsius.

Now, maybe I'm a bit confused about how the Celsius scale came about, but it seems to be based on the properties of water (0° freezing point and 100° boiling point). Here's why I'm really confused and maybe I am missing something obvious here. If we chose an arbitrary compound (water, in the case of Celsius) to define some temperature scale, how is it that we got so lucky that the theoretical temperature of absolute zero fits so neatly, only requiring 2 decimal places?

I would have guessed that the chances of this would be astronomically against us. Everything I've looked at for more information never shows an absolute zero value that expands past the hundredths place. And, if the real value isn't exactly -273.15° Celsius, then how is it that there have been all these scientific breakthroughs that help get us closer and closer to absolute zero (to the billionths of a kelvin!).

There are answers out there, and I am fairly sure that some of you reading this have them. So, what am I missing? Did we really just get ridiculously lucky in our choice of Celsius that Kelvin translates cleanly to it? What's the real deal?

*** Edit ***

Well, that was fast... J.T. figured it was based on the redefinition of Celsius, and upon further research he is correct. So, the Celsius of 1900 is not the same as the Celsius of 2008.

See the little bit in the orange box on: A Brief History of Temperature Measurement.

In 1967, the Thirteenth General Conference on Weights and Measures changed the name of the thermodynamic temperature unit degree Kelvin (symbol °K) to merely kelvin (symbol K). The conference redefined Celsius temperature as the thermodynamic temperature minus 273.15 kelvin.

Friday, October 12, 2007

Brain Test

Okay... here is a picture of a spinning dancer. Do you see the dancer spinning clockwise or counter-clockwise?

Photo Sharing and Video Hosting at Photobucket

More information can be found here: Right Brained vs Left Brained article.

I personally see the dancer going clockwise... very, very strong. It took me a long time to see the opposite spin direction. I had to concentrate on the feet and slowly move higher to get my brain to flip. That said, I'm surprised at the result of this test. I always assumed I was a more logical left-brained type.

Okay, this is odd. If I look at the picture directly, each time I immediately jump into clockwise mode. But, if I look at something outside of the image and allow my peripheral vision to try and focus on the dancer, I almost always jump into counter-clockwise mode. Anyway, I thought this was a neat image.

Friday, August 10, 2007

Global Warming Debate Continues

I have not followed all of the controversy on Global Warming really closely. But, from time to time I do read a bit about what others have been saying about it. Not long ago a top NASA official came out and gave his opinion on the subject... that global warming is probably not an issue, and that it'd be arrogant for those who claim the opposite to say that today's environment is optimal. About a year ago, I put up a quick post after reading an older speech given by Michael Crichton that I found thought-provoking.

Anyway, fast forward to today. The Science and Public Policy Institute came out with a press release providing some historical evidence to counter claims made in this recent Newsweek article about Global Warming.

Who knows which side is really right, but I do believe that for the most part, the opinions held by the general population are heavily influenced by how and by whom the data is presented. Most of us really have no idea about the actual science behind much of it. I'm certainly not so arrogant to claim that one side is right or wrong, but as usual, I'm eager to hear cases presented by both sides.

Let's just hope that the 'winning' side, if there ever is one, wins through real science and not for any other reason.

Wednesday, June 14, 2006

Michael Crichton and Science

Earlier I was chatting a bit with a couple of buddies about global warming... and I was reminded of a lecture given by Michael Crichton (yes, the author/scientist/medical doctor) some number of years ago. So, I dug up that lecture, and re-read it. I think it's very good and thought-provoking.

Aliens Cause Global Warming by Michael Crichton

Here are some bits and pieces that will hopefully pique your interest enough to read it.

I regard consensus science as an extremely pernicious development that ought to be stopped cold in its tracks. Historically, the claim of consensus has been the first refuge of scoundrels; it is a way to avoid debate by claiming that the matter is already settled. Whenever you hear the consensus of scientists agrees on something or other, reach for your wallet, because you're being had.

. . .

Meanwhile, ever-larger studies failed to confirm any association. A large, seven-country WHO study in 1998 found no association. Nor have well-controlled subsequent studies, to my knowledge. Yet we now read, for example, that second-hand smoke is a cause of breast cancer. At this point you can say pretty much anything you want about second-hand smoke.

. . .

Let's think back to people in 1900 in, say, New York. If they worried about people in 2000, what would they worry about? Probably: Where would people get enough horses? And what would they do about all the horseshit? Horse pollution was bad in 1900, think how much worse it would be a century later, with so many more people riding horses?

Saturday, March 25, 2006

How Fast Is Your Brain?

I read on Slashdot that some company called Posit Science had developed a brain speed test based on auditory processing ability. The company posits that the ability to process auditory signals is positively correlated with the ability to process information in general. That is, the better you do on this test, the more likely you are able to process information at a faster rate.

Try the test here: Brain Speed Test. The tutorial is really simple, but when the test picks up, it gets really tough. I missed quite a few once they started getting ridiculously fast. The nice thing is reflex time is not a part of the test. The time it takes for you to produce an answer is not a factor in this test.

Just a quick edit here... the girlfriend blew my response time out of the water with a score of 26 milliseconds.

Click on the image below to zoom in.

Quantcast