Sorting Socks is Algorithm Complexity

0 Review(s)
664 Download(s)
Rate & Review

Lesson synopsis

socksHow do you know how fast a computer can calculate an answer, or whether an answer can be calculated at all? The field of Computational Complexity is the study of whether problems can be solved, and how fast. This lesson introduces some simple ideas about algorithms and their complexity through a series of exercises involving a collection of socks. Of course, other objects can be used as well. This is an active learning lesson that does not require access to a computer. Linear, polynomial, and logarithmic algorithms are explored building an intuitive understanding of order of magnitude.

Age Levels

11 - 13 years

Objectives

Introduce students to classic algorithms:
for finding something in a sequence.
for finding something in an ordered list.
for simple sorting.
and provide informal methods for determining algorithm complexity.

Anticipated learner outcomes

Students will be able to:
describe why finding an item in a collection may require looking at each item.
discuss that ordering objects significantly reduces the time needed to find a specified one.
discuss that there are many ways to sort objects.

Optional Writing Activity

Pick your favorite algorithm among the ones you’ve studied. Describe how the algorithm would work on a collection of objects. What attribute would you use for the searching or sorting. Why is it your favorite?

Rate this lesson plan

Add new review

Cursor
James Dammann

If you have used a word processor today, moved your mouse on your laptop, dragged an object around on your smartphone, or highlighted a section of text on your tablet, you can thank Jim Dammann. In 1961 during his second year at IBM and just one year after completing his PhD, Jim created the concept of what today we all take for granted -- the cursor. This idea he documented in utilizing the cursor within word processing operations.

After retiring from IBM, Jim went on to inspire future generations of software engineers at Florida Atlantic University. His work there too demonstrated his creativity for he spent considerable effort enhancing their software engineering program by integrating ideas and feedback from local industries into the University curricular. Today, Jim lives in the Westlake Hills west of Austin Texas and spends most of his time in his art studio. He wrote and published The Opaque Decanter, a collection of poems about art, which provided a new view at part of art history.

Punch card from a COBOL program
Jean Sammet

Jean E. Sammet was one of the first developers and researchers in programming languages. During the 1950’s - 1960’s she supervised the first scientific programming group for Sperry Gyroscope Co. and served as a key member of the original COBOL (COmmon Business-Oriented Language) committee at Sylvania Electric Products. She also taught one of the first graduate programming courses in the country at Adelphi College. After joining IBM in 1961, she developed and directed the first FORMAC (FORmula MAnipulation Compiler). This was the first widely used general language and system for manipulating nonnumeric algebraic expressions. In 1979 she began handling Ada activities for IBM’s Federal Systems Division. Ada is a structured, object-oriented high-level computer programming language, designed for large, long-lived applications, where reliability and efficiency are paramount. Jean has a B.A. from Mount Holyoke College and an M.A. from the University of Illinois, both in Mathematics. She received an honorary D.Sc. from Mount Holyoke (1978).

Router
Sandra Lerner

It is difficult to imagine a time when computers were not capable of sharing information and resources with great ease. Sandra Lerner pushed the boundaries of network computing as one of the co-founders of Cisco Systems, which introduced one of the first commercially viable routers. The router was born while Sandra was working at Stanford University in the 1980’s after earning her Master’s degree there in Computer Science. To avoid the tedious task of transferring information between computers using floppy disks, she and co-founder of Cisco, Leonard Bosack, created a local area network, or LAN, between their campus offices using a multiprotocol router that Bosack developed. Shortly thereafter the pair started Cisco Systems, and began selling the router which was a success, because it could work with so many different types of computers. After Leaving Cisco in 1990, Lerner started the trendy cosmetics company Urban Decay and became a philanthropist and avid activist for animal rights.

@ symbol
Ray Tomlinson
Ray Tomlinson

Have you ever considered that someone, at some point, was in a position to choose what symbol would be used separate the user from their location in an email address? That person, it turns out, was Ray Tomlinson, and in 1971 he chose "@". Tomlinson is credited with demonstrating the first email sent between computers on a network, and when asked what inspired him to make this selection he said, “Mostly because it seemed like a neat idea.”

After completing his Master’s degree at MIT in 1965, Ray joined the Information Sciences Division of Bolt Beranek and Newman Inc. of Cambridge, Massachusetts. Since then he has made many notable contributions to the world of network computing. He was a co-developer of the TENEX computer system that was popular in the earliest days of the Internet; he developed the packet radio protocols used in the earliest internetworking experiments; he created the first implementation of TCP; and he was the principle designer of the first workstation attached to the Internet.

MATLAB graph
Cleve Moler

Cleve Moler improved the quality and accessibility of mathematical software and created a highly respected software system called MATLAB. He was a professor of mathematics and computer science for almost 20 years at the University of Michigan, Stanford University, and the University of New Mexico. In the late 1970’s to early 1980’s he developed several mathematical software packages to support computational science and engineering. These packages eventually formed the basis of MATLAB, a programming environment for algorithm development, data analysis, visualization, and numerical computation. MATLAB can be used to solve technical computing problems faster than with traditional programming languages, such as C, C++, and Fortran. Today, Professor Moler spends his time writing books, articles, and MATLAB programs.

Listen to what Professor Moler has to say about his life’s work: http://www.youtube.com/watch?v=IT5umwNSAxE

Image credits