Tower Building Activity UNIT 2 DAYS 13-14 Standard 2: Problem Solving Objective 1: Students will become "computational thinkers" by applying a variety of problem-solving techniques as they create solutions to problems that are situated in a variety of contexts. e. Create algorithms that meet specified objectives. f. Compare the tradeoffs between different algorithms for solving the same problem. Standard 2: Problem Solving Objective 2: Students will be introduced to selected topics in discrete mathematics including Boolean logic, functions, graphs and the binary number system. b. Explore algorithms for fundamental practical problems, such as searching, sorting and finding paths in graphs. Vocabulary Iteration: The completion and repetition of a task Linear Search: In computer science, linear search or sequential search is a method for finding a particular value in a list that checks each element in sequence until the desired element is found or the list is exhausted. The list need not be ordered. Binary Search: A binary search algorithm (or binary chop) is a technique for finding a particular value in a linear array, by ruling out half of the data at each step. A binary search finds the median, makes a comparison to determine whether the desired value comes before or after it, and then searches the remaining half in the same manner. A binary search is an example of a divide and conquer algorithm (more specifically a decrease and conquer algorithm) and a dichotomic search (more at Search algorithm). Tower Building Activity Donald Trump wants to build a 100 meter high tower as quickly as possible. He has unlimited resources and an unlimited budget and is willing to spend any amount to get the job done. He has chosen to build the tower with blocks that are 100 meters long and 100 meters wide, but only 1 meter tall. The blocks interlock on top and bottom (like Legos). They cannot be stacked sideways. Using special lifters, putting one stack on top of another stack takes one week regardless of how high the stacks are. Journal: Tower Building Activity What is the shortest amount of time that it will take to build the tower? (Write down your thoughts, and draw an illustration, chart, or graph in your journal.) Planning - 10 meter tower Week # # of Stacks # of Blocks in Stack Remainder Example – 10 Meter Tower Week 1 Week 1 Week 2 Week 2 Week 2 Week 3 Week 3 Week 3 Week 3 Week 4 Week 4 Week 4 SAMPLE SOLUTIONS SAMPLE SOLUTIONS 1000 meter tower SAMPLE SOLUTIONS In general: The number of weeks is the smallest n such that the height of the tower is less than 2n. Linear Search Linear—start at the beginning, look at each item until you find it or there is no more data. Data DOES NOT have to be sorted first Dictionary – look at each page until you find the word “seize.” How many searches? Binary Search Binary—look at middle item, eliminate the half where the value is not located. Find the new middle element and continue the process until you find it, or there is no more data. Data DOES have to be sorted first (put in some order, like alphabetical order.) Binary Search Binary— Searching for the word “Word.” Open to the middle of the dictionary. Eliminate the half where the value is not located. Find the new middle element Continue the process until you find it, or there is no more data. (HOW MANY SEARCHES DID IT TAKE????) Key to Binary Search Data DOES have to be sorted first (put in some order, like alphabetical order.) CREDITS Exploring Computer Science, 2013 - www.exploringcs.org How Binary Search Works, by Matt – https://www.youtube.com/channel/UCMxz5sSOwG2ZWLNbspdZ4GA Created and compiled by Jeff Hinton 2014 Modified by Dawnene Young 2015
© Copyright 2026 Paperzz