Assessment Tool
Lecture 15: Linear & Binary Search
Content Tested: Applications of Searching Techniques
Lecture Content:
-
Searching an array
-
Linear search
-
Binary search
-
Comparing algorithm performance
Goals:
-
Develop ability to apply principles and generalizations already learned
to new problems and situations
-
Learn concepts and theories
-
Develop capacity to think for oneself
Assessment Technique: Application Cards
Purpose:
Instructors can find out how well students understand the processes of
linear and binary search by brainstorming activities that apply these techniques.
Activity:
In today's lecture we saw the searching techniques called linear and
binary search. In your groups (or as an individual) describe some
answers to the following questions.
1. Describe situations where you have used or could use binary
search to locate something.
2. Describe situations where you have used or could use linear
search to locate something. Could you also use binary search for
the situation? Why or why not?
Possible Solutions:
The instructor might want to give some example situations so students understand
their task.
1. Possible Answers
Finding pizza company listings in the phone book (example used in lecture)
Finding a library book on a shelf (searching for the call number since
books are arranged in sorted order by call number)
2. Possible Answers
-
Finding a house number on a street. Even though these numbers are
in sorted order, binary search doesn't make sense since cars don't have
the capability of jumping to a particular house. Rather, one would
drive along the street until he/she found the house number for which they
are looking.
-
Looking for a person in a group. People in a group do not stand or
sit in sorted order which is a requirement for binary search.
-
Looking for a song title on a CD. Songs are not generally listed
in sorted order based on title on the song listing.
-
Looking for a cereal in the cereal aisle in a grocery store. Binary
search would not work since cereal is not generally located on the shelves
in a particular sorted order.
Possible Uses of Activity:
-
Have students write applications individually and submit these to the instructor
anonymously. The instructor reads the applications and the class
discusses the searching techniques in these applications.
-
Each student writes an application for each sorting strategy and explains
their applications to the rest of the class.
-
Break students into small groups (2-4 people) and have each group find
several applications. Have each group explain their applications
to the rest of the class.