HandoutLecture 6Binary Search Weighing with a Balance A large container is known to hold 24 oz of nails. The hardware store has a balance, but no weights.

Slides:



Advertisements
Similar presentations
Weighing Created by Inna Shapiro ©2007 Problem 1 Judy has 3 old coins. She knows that one coin is fake and is heavier than the other two. How can she.
Advertisements

WHAT POLYGON AM I?.
The Pigeonhole Principle Alan Kaylor Cline. The Pigeonhole Principle Statement Children’s Version: “If k > n, you can’t stuff k pigeons in n holes without.
Fake coin detection. Fake coins Suppose we have a number of coins, at most one is fake (i.e. either one is fake or none is fake). You have a pair of scales.
Today’s topics Decision Trees Reading: Sections 9.1 CompSci 102.
What is divide and conquer? Divide and conquer is a problem solving technique. It does not imply any specific computing problems. The idea is to divide.
Sudoku Puzzles.
Using Scientific Equipment Triple Beam Balance, Calculating Volume of a Regular Object.
What time is it? Coo-Coo one o'clock a quarter to seven
« The emeralds of the Maharaja ». The 12 emeralds The Maharaja of Saharanpur has 11 daughters. On the 12th birthday of its government, he decides to offer.
Place a decimal point in each sum without calculating. Show your thinking =
Accounting I Understanding the accounting equation, debits, and credits.
Discrete Structure Li Tak Sing( 李德成 ) Lectures
Mar. 2005Measurement PuzzlesSlide 1 Measurement Puzzles A Lesson in the “Math + Fun!” Series.
How to find the heavier one by weighing 2 times only?
Let’s solve the equation: We shall use a scale to represent our equation. The variable x will be replaced with and the numbers will be represented with.
May 2015Binary SearchSlide 1 Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
HandoutMay 2007Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
May 2007Binary SearchSlide 1 Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Trees.
This paper clip weighs 1 gram
Topic Map Topic 14 Lesson 1 = Capacity Units
Oil Heat Properties of Fuel Oil.
Getting Started with a Problem “Eighty percent of success is showing up.” –Woody Allen “Success is 1% inspiration and 99% perspiration.” – Thomas Edison.
IT 60101: Lecture #201 Foundation of Computing Systems Lecture 20 Classic Optimization Problems.
APS various problems. Not all bit-strings are compressible. If we have a bit string length n, sometimes we can compress it to a shorter bit string! Here.
THE MOLE CONCEPT. Objects are measured by counting or by weight (mass) It’s easier to measure large objects by counting –Elephants, cars, eggs It’s easier.
MA/CSSE 473 Day 14 Permutations wrap-up Subset generation (Horner’s method)
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Trees – Chapter 9 Slides courtesy of Dr. Michael P. Frank University of Florida Dept. of Computer & Information Science & Engineering.
17.1 CompSci 102 Today’s topics Instant InsanityInstant Insanity TreesTrees –Properties –Applications Reading: Sections Reading: Sections
Why does Zinc vary in weight when mixed with other elements? By: Erika Dunkle.
How to Solve Balance Puzzles. Balance Puzzles Here are the basic rules: All weights have a positive, whole number value. Each shape has a consistent,
Can Electrical Current Flow Through Fruit?
MA/CSSE 473 Day 20 Questions before exam More decrease and Conquer.
Heavy or light? Which is heavier? Feather Pencil.
The Mole: A Shortcut for Chemists S-C-8-1_The Mole Presentation Source:
Graph of a Binomial Distribution Binomial distribution for n = 4, p = 0.4:
Template provided by: “posters4research.com” What is density? *Density is defined in a way as the measure of an objects heaviness to a constant size. *Our.
Puzzle of Week 1 You have 2 identical straight pieces of rope. Each takes 1 hour to burn if you light it from 1 side (it doesn’t matter which one). Show.
Combinatorial Optimization Lecturer Kononov Alexander Veniaminovich.
BALANCE IT OUT MEASURING MASS. MASS Definition: Definition: Mass is a measure of how much Mass is a measure of how much matter something contains matter.
The Pigeonhole Principle Alan Kaylor Cline. The Pigeonhole Principle Statement Children’s Version: “If k > n, you can’t stuff k pigeons in n holes without.
GSCE Mathematics Problem Solving Handling Data Higher Tier.
Numeracy Tutor Times 1)Brain Gym 2)Logic Riddles – choice of 3 arranged in increasing difficulty.
Red blocks weigh 10 grams Green blocks weigh 13 grams Mary has x red blocks. In terms of x how much do Mary’s red blocks weigh? Click on the scales.
Logic Development Problems. Puzzle #1 You have a measurement scale where on both sides you can put some balls for weighing. You have a set of eight balls,
2B: Unit 5 What time is it What time is it ? o’clock / half past.
Measurement and Geometry 36 1 g 1 kg kilogram hectogram decagram gram ÷ 10 ÷ 10 ÷ 10 x 10 x 10 x 10.
1 Section 5.1 Analyzing Algorithms Let P be a problem and A an algorithm to solve P. The running time of A can be analyzed by counting the number of certain.
Weighing Scales and Their Types
20 Questions and 12 Coins How to select 'good questions'?
Using Scientific Equipment
Check it out! Creating and Graphing Exponential Equations
Mass Mass refers to the amount of matter in an object.
Puzzle A Puzzle B.
Binary Lesson 2 Bytes.
Binary Lesson 2 Bytes.
This paper clip weighs 1 gram
WHAT TIME IS IT? OK NO! It's o’clock A quarter past
Representation of real numbers
X y y = x2 - 3x Solutions of y = x2 - 3x y x –1 5 –2 –3 6 y = x2-3x.
Binary Search A Lecture in CE Freshman Seminar Series:
Sudoku Puzzles.
Year 2 Spring Term Week 5 Lesson 1
Form Time Numeracy Week beginning
What time is it ? o’clock / half past 2B: Unit 5.
Section 2-1: Using T Accounts
The Pigeonhole Principle
How to find the heavier one by weighing 2 times only?
Presentation transcript:

HandoutLecture 6Binary Search Weighing with a Balance A large container is known to hold 24 oz of nails. The hardware store has a balance, but no weights. Can you measure out 9 oz of nails for a customer? A chemist has a balance and fixed weights of 1, 2, 4, and 8 grams. Show that she can weigh any amount of material from 1 to 15 grams by placing the weights on one side and the material on the other. What is the best set of four fixed weights in the sense of maximizing the range of measurable weights in increments of 1 gram?

HandoutLecture 6Binary Search Find the Lighter Counterfeit Coin We have three coins. Two are normal coins; one is a counterfeit coin that weighs less. Identify the counterfeit coin with one weighing on a balance. We have nine coins; eight normal coins and a counterfeit coin that weighs less. Identify the counterfeit with 2 weighings. Generalize: How many weighing with a balance are needed to find a light counterfeit coin among n coins? How should we change the procedures above if the counterfeit coin is known to be heavier than normal ones?

HandoutLecture 6Binary Search 12 Coins with 1 Counterfeit: Lighter or Heavier We have 12 coins. Eleven are normal coins; one is a counterfeit coin that weighs less or more than a normal coin. Identify the counterfeit coin and its relative weight with a minimum number of weighings on a balance. Hint: First do it for 3 coins, one of which is a counterfeit, using only two weighing,

HandoutLecture 6Binary Search Another Solution to the 12-Coin Puzzle We have 12 coins. Eleven are normal coins; one is a counterfeit coin against against against Each weighing has three possible outcomes: L -- Left heavier R -- Right heavier B -- Balance Example: L L B -- Counterfeit coin is among 1, 2, 7, 10  7 is lighter L L Lnp L L B7– L L R L B L L B B L B R L R L L R B L R R B L L B L B B L R B B L B B Bnp B B R B R L B R B B R R R L L R L B R L R R B L R B B R B R R R L R R B7+ R R Rnp