When you add the age of the ship and the age of its boiler, it totals 42 years. So S + B = 42. Now pay attention! The ship is twice as old as the boiler.

Slides:



Advertisements
Similar presentations
Start with your equation Move the # term to the other side, and leave a space Determine what HALF of the coefficient of X is Factor the left side Write.
Advertisements

Lecture # 38 Algorithms & Problem Solving: How Hard Can it Get?
October 1, 2012Introduction to Artificial Intelligence Lecture 8: Search in State Spaces II 1 A General Backtracking Algorithm Let us say that we can formulate.
Playing Fair at Sudoku Joshua Cooper USC Department of Mathematics.
Announcements Assignment #4 is due tonight. Last lab program is going to be assigned this Wednesday. ◦ A backtracking problem.
SIGCSE Nifty assignments: Brute force and backtracking Steve Weiss Department of Computer Science University of North Carolina at Chapel Hill
Science1 Welcome to: Chapel Hill UNC Computer Science.
Solving Equations with the Variable on Both Sides Objectives: to solve equations with the variable on both sides.
The number of edge-disjoint transitive triples in a tournament.
Backtracking COP Backtracking  Backtracking is a technique used to solve problems with a large search space, by systematically trying and eliminating.
CS 206 Introduction to Computer Science II 09 / 10 / 2008 Instructor: Michael Eckmann.
Problem Solving Strategies
Minimum Spanning Network: Brute Force Solution
Notes, part 5. L’Hospital Another useful technique for computing limits is L'Hospital's rule: Basic version: If, then provided the latter exists. This.
Notes, part 4 Arclength, sequences, and improper integrals.
Taking a Square Root to Solve an Equation. Solve: In order to solve for x, you have to UNDO the squared first (i.e. square root) What are the number(s)
Math Olympiad Strategies
3-2: Solving Linear Systems
Solving Quadratic Equations by Completing the Square
Solving Equations Containing To solve an equation with a radical expression, you need to isolate the variable on one side of the equation. Factored out.
Warm up: Solve using a method of your choice.
GEOMETRIC SEQUENCES. 10, 20, 40, 80, …….. ÷2 This is called a common ratio. (Term 2 is divided by term 1. Term 3 is divided by term 2 and so on.) This.
1 Permutations and Combinations. 2 In this section, techniques will be introduced for counting the unordered selections of distinct objects and the ordered.
Section 3.6 Writing Equations for Story Problems.
The student will be able to: solve equations with variables on both sides. Equations with Variables on Both Sides Objectives Designed by Skip Tyler, Varina.
Glen Martin - School for the Talented and Gifted - DISD Recursion Recursion Recursion Recursion Recursion Recursion.
1 Section 5.5 Solving Recurrences Any recursively defined function ƒ with domain N that computes numbers is called a recurrence or recurrence relation.
Week 11 Similar figures, Solutions, Solve, Square root, Sum, Term.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Design of Algorithms using Brute Force Approach. Primality Testing (given number is n binary digits)
Brought to you by Max (ICQ: TEL: ) March 12, 2005 Recursion and Exhaustion.
Permutations and Combinations
Unit 7 Permutation and Combination IT Disicipline ITD1111 Discrete Mathematics & Statistics STDTLP 1 Unit 7 Permutation and Combination.
CSNB143 – Discrete Structure Topic 6 – Counting Techniques.
Nature of Science. Cube Inquiry Rules 1.You are NOT ALLOWED to touch or move the cube in any way. 2.You may only ask each of your partners one question,
HW: Do Now Aim : How do we write the terms of a Sequence? Write the first 5 terms of the sequence, then find the thirty-first term:
Solving Inequalities by adding or subtracting, checking the inequality & graphing it!! This is so easy you won’t even need one of these!!!
Hunter Gear Optimization Team Alt + F4 Michael Barbour; Joshua Law son; Michael Lee.
Limits to Computation How do you analyze a new algorithm? –Put it in the form of existing algorithms that you know the analysis. –For example, given 2.
CS 206 Introduction to Computer Science II 09 / 18 / 2009 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 01 / 30 / 2009 Instructor: Michael Eckmann.
1. solve equations with variables on both sides. 2. solve equations containing grouping symbols. Objectives The student will be able to:
Counting Principles Multiplication rule Permutations Combinations.
Computer Science Background for Biologists CSC 487/687 Computing for Bioinformatics Fall 2005.
1. solve equations with variables on both sides. 2. solve equations with either infinite solutions or no solution Objectives The student will be able to:
Permutations and Combinations. 2 In this section, techniques will be introduced for counting the unordered selections of distinct objects and the ordered.
Which list of numbers is ordered from least to greatest? 10 –3, , 1, 10, , 1, 10, 10 2, 10 – , 10 –3, 1, 10, , 10 –3,
Algebra: Consecutive Integer Problems Consecutive integer problems are word problems that involve CONSECUTIVE INTEGERS.
February 18, 2016Introduction to Artificial Intelligence Lecture 8: Search in State Spaces III 1 A General Backtracking Algorithm Sanity check function.
Unit 4: Probability Day 1: Counting Principles. Standards and Benchmarks Select and apply counting procedures, such as the multiplication and.
3-2: Solving Linear Systems. Solving Linear Systems There are two methods of solving a system of equations algebraically: Elimination Substitution.
12 x 12 = x 11 = x 10 = x 9 = 108.
SEQUENCES. Learning Objectives Generate terms of a simple sequence, given a rule, finding a term from the previous term Generate terms of a simple sequence,
Problem Solving: Brute Force Approaches
Multiplication Strategies
Solve a quadratic equation
Artificial Intelligence Problem solving by searching CSC 361
Problem Solving: Brute Force Approaches
Example Fill in the grid so that every row, column and box contains each of the numbers 1 to 9:
Start Finish Find the solution 42 out of out of 2200
Bellwork 1/27 Solve the following by:
Section 14.3 Complexity Classes
adapted from Recursive Backtracking by Mike Scott, UT Austin
Train A and Train B travel towards each other from Town a and Town b respectively, at a constant speed. The two towns are 1320km apart. After the two trains.
Solving One and Two Step Equations
SPLITTING OF COMBINED SHAPES
Puzzle A Puzzle B.
6-7: Solving Radical Equations
Announcements Assignment #4 is due tonight. Last lab program is going to be assigned this Wednesday. ◦ A backtracking problem.
WARM UP 3 WRITING EQUATIONS Write in slope-intercept form the equation of the line that passes through the given point and has the given slope. (Lesson.
Presentation transcript:

When you add the age of the ship and the age of its boiler, it totals 42 years. So S + B = 42. Now pay attention! The ship is twice as old as the boiler was when the ship was as old as the boiler is now. How old is the ship and how old is the boiler?

There are a finite number of choices: 0…42. And since the ship is “twice as old…”, then the ship’s age must be an even number. So try them all 0, 2, 4, 6, …, 42 and see what works Answer: The ship is 24; the boiler is 18.

Mother’s age is the son’s age with digits reversed (like 63 and 36). They notice that this is the sixth time in their life that this has happened. And if there are lucky, it will happen two more times. How old are they?

Start with mother being 16 years older than son. So we get (16,0), (17,01), (18,02), … Then try 17 years, 18, years, etc. For 18 years different, we get (20,02), (31,13), (42,24), (53,35), (64,46), (75,57), (86,68), (97,79)

What’s the point? If the space of possible solutions is small enough, we can solve a problem by simply checking all possibilities.

Brute force!

What characterizes problems that can be solved this way? Oh yeah! Finite superset.

Examples of problems All permutations of Combination lock 8 Queens Word jumble 9-Square puzzle Maze running Instant Insanity “?????” + “?????” = stuff …and many more

Two important attributes “Oh yeah” –Hard to solve, but given an alleged solution, it’s easy to see if it is right. Finite superset –Can test exhaustively

Restriction We will look at problems whose solution is a sequence a 1, a 2, a 3 …, a n Where n is known in advance (or at least bounded), and each a i is drawn from a finite pool. Hence finite superset.

So to solve by brute force… Systematically generate all elements of the superset. Run each through a filter. Superset generator Filter Solution Not