math

There are 6 entries for the tag math

Voting is a Sham! Mathematically Speaking.

The recent elections remind me of interesting paradoxes when you study the mathematics of voting. I first learned of this class of paradoxes as an undergraduate at Occidental College in Los Angeles (well technically Eagle Rock, emphasis always on the Rock!). As a student, I spent a couple of summers as an instructor for OPTIMO, a science and math enrichment program for kids about to enter high school. You know, that age when young men and women’s minds are keenly focused on mathematics and science. What could go wrong?! For several weeks, these young kids would stay in dorm...

Is Pizza Brain Food?

My family and I recently moved into our new home after a two month stay in temporary housing. One of the perks of moving is when your stuff is delivered from storage, it feels like Christmas again. “Oooh! Look at all the boxes I get to unwrap. Hey! I have a Stereo just like this one!”. I have a tendency to get distracted by the things I’m unwrapping. For example, I found a few of my old college Math textbooks. I started thumbing through the Complex Analysis, Abstract Algebra, and Number theory books and they seemed like total gibberish to me....

What Exactly Are You Trying To Prove?

Frans Bouma wrote an interesting response to my last post, Writing Testable Code Is About Managing Complexity entitled Correctness Provability should be the goal, not Testability. He states in his post: When focusing on testability, one can fall into the trap of believing that the tests prove that your code is correct. God I hope not. Perhaps someone in theory could fall into that trap, but a person could also fall into the trap and buy a modestly priced bridge I have to sell to them in the bay area? This seems like...

Negative Base Numbering Systems

UPDATE: I updated the article a bit to better explain decimal expansion to negabinary Ok, here is where I go and really geek out a bit. Scott presents a simple javascript to display negative numbers as red. He takes a nice clean straightforward approach by using javascript to inject a CSS class on specific elements that have a negative number. As his script merrily iterates its way through the page’s elements, it checks the values of the element to see if the first character is a “-” (dash). And this works just fine for the majority of you people so thoroughly...

Patterns in Number Sequences

You know you’re a big geek when a sequence of numbers with an interesting property just pops in your head. No, I’m not talking about myself (this time). Jayson Knight is the big geek as he noticed a pattern in a sequence of numbers that popped in his head... This just popped into my head the other day for no other reason than to bug me: Square all odd numbers starting with 1...subtract 1 from the result...then divide by 8. Now look for the pattern in the results. He even provides a code sample to do...

The Monty Hall Problem and Monte Carlo simulations

Ian Griffiths blogs about the Monty Hall problem. The problem, named after the host of a game show on which it sometimes appeared, is as follows: There are three doors, behind one of which is a valuable prize, but you don’t know which door. Choose a door. You are not told straight away whether you’ve made the right choice. Instead, the host of the game will then open one of the doors you did not pick, showing you that there is no prize behind it. You are now offered the chance to change your mind. This effectively narrows down...