Archive

Posts Tagged ‘counting principle’

URL Shortener Math

December 21st, 2009 Mr. H No comments

So you might have gotten wind that I started tweeting. I’m trying to think of ways of using it productively or at least I’m trying to justify the amount of time I spend on it to myself.

So far I’ve met some very knowledgeable folks and had some interesting conversations (as much as 140 characters will allow). Meaningful conversations can be hard on Twitter. Maybe one day I’ll learn to be more effective with words and to communicate with more precision while using less words. For now, I am using Twitter more for link discovery than anything else. I’ve retweeted some interesting links and I’ve noticed that just about everyone uses an URL shortener.

I’ve never been particularly fond of an URL shortener. Jeff Atwood at Coding Horror has expressed some of my thoughts better on Url Shorteners: Destroying the Web Since 2002, but that’s a whole other post there.

So far I am aware of about 4 URL shortener services frequently used on Twitter. They are:

Bit.ly is the first one that I used. One nice benefit of the service is that you can see the number of times that people have clicked on your link. You can even see the number of clicks from your shortened link compared the the number of total clicks on other shortened links to that same URL. No other service on my list seems to provide this information. But I digress.

I used the 4 URL shortener services to shorten this post’s URL: http://mrho.net/blog/?p=868. There results are below.


Bit.ly produced http://bit.ly/7hFVX7. Seems like it uses 6 upper case, lower case, and number (alphanumeric character) combination to uniquely identify a link. Whether not they will increase to 7 alphanumeric characters when 6 runs out is unknown. Re-entering the same link into the service produces the same shortened link.


The next service is Ow.ly. One nice “feature” of this service is that it uses one less letter in it name than Bit.ly.

The service produced http://ow.ly/Otn1 for this post’s URL. It seems the service uses only 4 upper case, lower case, and number combination to uniquely identify a link. Re-entering the same link into the services produces a different shortened link in a predictable order. This is an interesting “feature” especially for a math class. Some additional testing and we can see the minimum number of alphanumeric characters it will take is 3.


The next service is Im.ly

The service produced http://im.ly/b1fc5/. It seems to use only 5 lower case, and number combination to uniquely identify a link. Re-entering the same link produces the same shortened URL.


Lastly is Is.gd

The service produced http://is.gd/5wSXx. Relatively speaking, it has the more spartan interface of the services in this list. The service uses 5 upper case, lower case, and number combination to uniquely identify a link. Entering the same link again produces the same shortened URL.


Summary of URL Shortener Services
Service ID Length Upper Case Lower Case Numbers
bit.ly 6 Y Y Y
ow.ly 4 (so far) Y Y Y
im.ly 5 N Y Y
is.gd 5 Y Y Y

Questions to students:

  • Which is the best service? (how do you define best?)
  • Which service would you use and why?
  • Which service can hold the most links?
  • Can we tell how many links are stored in the service as of now? If so how many? (hint: Ow.ly is the only one)
  • How many more links needs to be shortened before Ow.ly needs 5 alphanumeric characters?
  • Can any service shorten the links to all the pages in the entire web?
  • Can any service shorten all the links in the entire web in 5, 10, 20, 50, 100 years? How can you find out? (assuming same rate of growth)
  • Is it OK to recycle links like we do with license plates? What are some potential issues? What happens if a service is gone?
  • How many unique links do we need to have to accommodate everyone in the world? What if we recycle the links?
  • Are there ways to maximize the number of links?
  • Could we use a word shortener to “increase” the information density in a single tweet?
  • If the alphanumeric characters represent a positional numeral system, what would be its base? What is one hundred/thousand/million/billion/trillion in this base? How does allowing or disallowing upper case and lower case change these numbers?

What other questions would you ask? How would you support students to answer some of the questions above?

UPDATE: A reader points out a WCYDWT (What Can You Do With This) series by Dan Meyer on license plates.

Why are phone numbers 7-digits long?

October 13th, 2009 Mr. H No comments

So I asked Google “Why are phone numbers 7 digits long” and it gave me the following links.

  1. Telephone number – Wikipedia, the free encyclopedia
  2. North American Numbering Plan – Wikipedia, the free encyclopedia
  3. American Chronicle | Why Are Phone Numbers 7 Digits Long?
  4. LincMad: Why Not 8-digit Phone Numbers?
  5. the first three digits of a 7-digit telephone number
  6. Trivia – Why are phone number seven digits? – ArcaMax Publishing
  7. WikiAnswers – How many 7 digit phone numbers are available if a …
  8. telephone numbers
  9. Phone App Only Dials 7 digit phone numbers, Email function not …
  10. How many 7-digit telephone numbers can be created if each number …

The first link gives a decent history of phone numbers but doesn’t explain why phone numbers are 7 digits long. The one interesting bit of trivia is about the 555 phone numbers. If you look for them carefully, you can see them in movies and tv shows.

The second link offers information about the development of the phone numbers as used in the US. Back in the days when people used rotary phones, it made sense that the major population areas of the time had small numbers for area codes: New York (212), Los Angeles (213), and Chicago (312). Fewer “sparks” were better and faster!

The third link had a promising title but was ultimately disappointing. It would’ve been more appropriately titled “What are the parts of a 7 digit phone number and what do they do?”

There are many search results that are counting principle questions.

Only link number six comes close to answering the question.

The short-term memory capacity for most people is between five and nine items or digits. This is one reason that phone numbers were kept to seven digits (not including area code).

No evidence is provided that 7 digit long phone numbers were chosen precisely because of this 7 + 2 nature of short term memory. A little digging around and I find a post by Jeff Atwood about the so called “The Magical Number Seven Plus or Minus Two“.  Following the links and we get the original 1956 paper by George A. Miller of Harvard University as collected and organized by Christopher Green on Classics in the History of Psychology.

A study by Nelson Cowan of University of Missouri follows up on the chunking angle from the Miller paper and seems to suggest that splitting the 7 digits into two chunks — one of size 3 and one of size 4 — is no accident. He proposes that the magical number is instead 4 chunks.

My personal experience tells me that I remember a phone better when chunked into a 3-3-4 structure (the first being area code) than if i just tried to remember a sequence of 10 digits. Whether this is a result of using chunking structure by convention or whether the chunking actually helps, well I don’t know. The rationale for picking 7 digits for phone numbers seems reasonable to me.

Is this a case of Pythagorean coincidence? Was it blind luck that Bell (or whatever the company was) chose a phone number length just short enough that people can remember for business and long enough to serve customers in each area code? Maybe one day I’ll find evidence that the decision was made wisely after considering the results of research in cognitive psychology or maybe private companies don’t always know best and are successful despite themselves.

As far as lesson ideas:

  • Algebra 2/Pre-Calc: There are enough questions to be asked in terms of counting principle. How many phone numbers are possible? How many are possible if the first digit cannot be a 1 or 0? How many are possible if there are no repeats? How many are possible if we take out all the 555-xxxx numbers? Given that area codes also do not start with 1 or 0, if we want to minimize pulses on a rotary phone, what 3-digit number should we assign to the 200th area code (this might be long enough as a project)? This lesson should fit well with the Dan Meyer’s Door Lock.
  • Statistics: How to use samples and confidence intervals to make some guesses about the true average of the population. Should we set phone numbers to be 5 digits so we catch almost all of the population? Given a confidence interval, what is the percentage of population that would remember phone numbers if they were set to be 9 digits long? In this age of cell phone address books, does it matter if they are 20 digits long?

UPDATE: Included Screencaps
UPDATE 2: Troubleshooting issues with this post.