Skip to content

Mathematics

The Cali Garmo does Math

Archive

Archive for February, 2010

On Friday I asked you the following riddle. Assume there are 2 different types of lottery. Lotto A makes you choose 6 numbers out of a possible 75,and lotto B makes you choose 5 numbers out of a possible 60 and 1 ‘mega’ number out of a possible 40. Which lottery gives you the best odds? Original problem here.

I’m sure a lot of you said Lotto B. And this is how you probably came up with the answer:

  • Lotto A: 75 numbers, choose 6, so in order to choose the first number we have 75 options, for the second number, we have 74 options (since we just used up one number), etc. So we get:
    possibilities
  • Lotto B: Out of 60 numbers, choose 5, then out of 40 numbers, choose 1. So the same logic as in lotto A, we get:
    possibilities

Congratulations if you got this far! This is technically correct IF the lottery forced you to choose the numbers in a specific order. The lottery (luckily) doesn’t force you to get the order right though, you can choose the numbers in any order. So then what are the chances for each lotto? Let’s first look at an easier example.

Choose 2 numbers out of 1-10. The first number has 10 choices, the second number has 9 choices. So we get a total of 90 different options (). BUT again the order doesn’t matter. Pretend your numbers were 1 and 7. We’ll call this pair (1,7) for simplicity. Selecting number 1 and then selecting number 7 is the same thing as selecting number 7 and then selecting number 1! So for each pair […(1,7), (1,8), (1,9),(1,10), (2,2), (2,3)…] we have 2 different options. So we must divide 90 by 2 to get the real outcome of 45 different outcomes.

Now let’s take it one step further and pretend we picked a 3rd number. Let’s also pretend this number is the number 4. Earlier we saw that the outcome (1,7) could either show up as 1 then 7, or 7 then 1. Let’s suppose the first occurred (1 then 7), then by adding the number we get 3 different choices as to where to put it: 4 then 1 then 7, 1 then 4 then 7, 1 then 7 then 4. [Note that the same thing can be said if we had chosen 7 then 1]. So this time instead of having possibilities, we have possibilities. [We get 6 by multiplying 2 with 3. 2 since we can have 1 then 7 and 3 since we can put the number 4 first, middle, or last].

Now we can see that if we added a 4th number we would have .

The lottery follows this same principle. So applying this logic, lets reexamine our lottery:

  • Lotto A: Since 6 numbers were chosen we must take our original number and divide appropriately:
    possibilities
  • Lotto B: Since 5 numbers were chosen the first time, and only 1 the second time we must take our original number and divide appropriately:
    possibilities

So you have to buy over 17 million more tickets for Lotto B to give you a guaranteed winning ticket! So if you chose Lotto A, you just won the lotto!

New month, new riddle! Pretend you just found a $1 bill on the floor and your instincts are telling you to go and buy a lottery ticket. You head to the nearest liquor store and ask for a lotto. The store owner asks you which kind you would like. There is lotto A where you have to choose 6 numbers out of a possible 75, or there is lotto B where you have to choose 5 numbers out of a possible 60 and 1 ‘mega’ number out of a possible 40. You don’t want to waste your dollar, so the question is: which lottery gives you the best odds?

Come back soon to find out!

Last week we talked about what a prime number is, but we didn’t talk about a good way of finding what number is prime and what is not [other than checking if any number less than p divides that number]. This area of finding out what number is prime has been a big problem for many mathematicians and still has a lot of unanswered questions. The world of mathematics is still looking for an easy way to calculate whether a number is prime or not with a simple formula.

There are a few ways of finding primes, but the simplest (and one of the oldest) ways to finding a prime is by using a process called ‘the sieve of Eratosthenes’. Take out a piece of paper and make 10 rows and 10 columns and number them in order from 1 to 100. Row 1 should have the numbers 1-10 in order, row 2 should have 11-20 in order, etc. Then, starting from 2, cross out all the numbers that 2 divides without crossing out 2 (e.g. 4, 6, 8, 44, 96). Then go to the next number and cross out all the number that it divides without crossing that number out. (The next number is three so cross out 9, 15, 21, etc.) Then go to the next number not crossed out and cross out all the numbers that it divides without crossing that number out. (5 is the next number so we cross out 25, 35, 55, etc.) We keep going until we find all the primes less than 100. Write down all the numbers in order, and you’ll notice you have the same list that I listed last week! Cool! And that is basically the whole concept behind the sieve of Eratosthenes. You write down all the numbers and you go prime by prime removing all the ones that are not prime by going number by number. So if you wanted to find all the numbers less than 1,000 you would draw a 100 x 100 table of numbers and cross out each one as it came. This can be very time consuming! That’s why mathematicians, didn’t stop there.

A second way to see if a number is prime is to use what mathematicians like to call Wilson’s Theorem. This theorem states that if p is prime then [Remember modulo? We’re basically saying the remainder when you divide p from (p-1)! +1 is 0.] And the theorem goes vice versa, so that if a number that is not prime is placed into the equation the remainder/modulo will not be 0. Kinda handy for looking at medium size numbers!

Another way of finding primes is to find what are called Mersenne primes. These primes were talked about by a French monk Marin Mersenne from the 17th century. They are primes of the form where is the mth Mersenne number. It turns out that this is a good way to find other primes. If the mth Mersenne number is prime the m is also prime. The issue is that this is a little cumbersome and doesn’t work in reverse (If m is prime it does not mean is prime too.)

There are more complex ways of finding primes, but those are some of the most interesting and easy ones. Have a suggestion? Add a comment!