HandoutMay 2007Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.

Slides:



Advertisements
Similar presentations
TIME PAST O’CLOCK TO HALF TO HALF O’CLOCK PAST.
Advertisements

Chapter Nine Communications and Networks. Objective ONE Discuss the components required for successful communications.
What time is it? What’s the time?
Δημοτικό σχολείο Φλογητών-Ν.Πλαγίων
WHAT POLYGON AM I?.
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.
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.
Sudoku Puzzles.
What time is it? Coo-Coo one o'clock a quarter to seven
It’s nine o’clock
NUMBERS. 1 ONE Mariana T. Vilas Boas, Digital.
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?
May 2015Binary SearchSlide 1 Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
HandoutJune 2007Malfunction Diagnosis A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Binary number, Bits and Bytes and memory Sen Zhang.
HandoutMay 2007Byzantine Generals A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
HandoutMay 2007String Matching 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.
HandoutMay 2007Sorting Networks 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.
HandoutApr. 2007Satisfiability A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
This paper clip weighs 1 gram
Topic Map Topic 14 Lesson 1 = Capacity Units
IT 60101: Lecture #201 Foundation of Computing Systems Lecture 20 Classic Optimization Problems.
Proportions Round One 2) x + 3 = 15 Answers 2.) x + 3 = 15 X=12 21.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
HandoutMay 2007Task Scheduling A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Trees – Chapter 9 Slides courtesy of Dr. Michael P. Frank University of Florida Dept. of Computer & Information Science & Engineering.
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,
MA/CSSE 473 Day 20 Questions before exam More decrease and Conquer.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.6 Instructor: Lin Chen Sept 2013.
Combinatorial Optimization Lecturer Kononov Alexander Veniaminovich.
CLICK THE NUMBERS IN SEQUENCE
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.
What time is it ? in the morning / in the afternoon in the evening
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.
By Esra ARAS.
Binary Lesson 2 Bytes.
Puzzle A Puzzle B.
1. A train engine has a maximum speed of 120 km/h when no cars are attached. With cars attached, its maximum speed is diminished by a quantity proportional.
Binary Lesson 2 Bytes.
Easy, Hard, Impossible! A Lecture in CE Freshman Seminar Series:
NUMBERS one two three four five six seven eight
Binary Lesson 2 Bytes.
This paper clip weighs 1 gram
TO PAST TELLING THE TIME.
WHAT TIME IS IT? OK NO! It's o’clock A quarter past
Placement and Routing A Lecture in CE Freshman Seminar Series:
Sorting Networks A Lecture in CE Freshman Seminar Series:
CLICK THE NUMBERS IN SEQUENCE
Binary Search A Lecture in CE Freshman Seminar Series:
Sudoku Puzzles.
Year 2 Spring Term Week 5 Lesson 1
Binary Lesson 1 Nybbles.
Form Time Numeracy Week beginning
What time is it ? o’clock / half past 2B: Unit 5.
CLICK THE NUMBERS IN SEQUENCE
TIME PAST O’CLOCK TO HALF TO HALF O’CLOCK PAST.
The Pigeonhole Principle
How to find the heavier one by weighing 2 times only?
Binary Lesson 1 Nybbles.
What’s the time? CLICK ON THE CLOCK.
Presentation transcript:

HandoutMay 2007Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering

HandoutMay 2007Binary 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?

HandoutMay 2007Binary 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?

HandoutMay 2007Binary 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,