120 likes | 250 Views
Reversing operations. 2.7 in your book. Actions you can reverse. Do the directions backwards Close the window Take off your shoes, then your socks Set the clock forward 1 hour or behind by 11 hours. Walking to a location in the city (like yesterday’s problem) Opening a window
E N D
Reversing operations 2.7 in your book
Actions you can reverse • Do the directions backwards • Close the window • Take off your shoes, then your socks • Set the clock forward 1 hour or behind by 11 hours • Walking to a location in the city (like yesterday’s problem) • Opening a window • Putting on your socks and then your shoes • Set a 12-hour clock forward one hour
REVERSIBLE OPERATION • A “reversible operation” is an operation if there is a second operation that ALWAYS brings you back to the situation you had before the first operation • Not all operations are reversible. How do you reverse an earthquake? A baby being born? Multiplying by zero?
Either give the reverse operation or explain why there isn’t one • Adding 5 to a number • Multiplying a number by 3 • Multiplying a number by 0 • Adding 7 hours to the current time * (there are two answers) • Adding the digits of a number together
Disprove the statement that multiplying by zero is reversible! • To do so: find two numbers that, when you multiply them by zero, you get the same number. • This is proving by counterexample. In order to disprove a statement, you only need to find ONE example of it not working. • Try disproving: any number plus 1 equals 14.
Operations that are SOMETIMES reversible • “I picked a number. When you square it, you get 225. What’s the number?” • “15 – obvi.” • “Nope. Guess again.” • WHAT’S THE NUMBER?
Backtracking • Backtracking is used to solve equations. • You do it by reversing all the operations in the equation.
Use backtracking to solve an equation • Solve the equation: 3x – 14 = 37 • Write out the steps that show how to get from the input variable, x, to the output value, 37: • Make a list that reverses the order and undoes the operations:
Compare backtracking to guess-and-check • Some people solve equations like 3x-14=37 by guessing values for x, plugging them into the equation, and checking if it works, until they guess the correct number. • What advantages does backtracking have? • What disadvantages does backtracking have?