Knapsack Problem Section 7.6. A 8 lbs $7 0.86 B 6 lbs $6 1.00 C 4 lbs $5 1.25 D 2 lbs $3 1.50 E 1 lb $2 2.00 10 lbs capacity A 8 lbs $7 0.86 B 6 lbs $6.

Slides:



Advertisements
Similar presentations
LCS Non-Dynamic Version int function lcs (x, y, i, j) begin if (i = 0) or (j = 0) return 0; else if (x[i] = y[j]) return lcs(x, y, i-1, j-1)+1; else return.
Advertisements

1 A BC DeltaWye a2a2 a1a1 b1b1 b2b2 c2c2 c1c1 a a2a2 a1a1 c1c1 c2c2 b1b1 b2b2 c b A BC B2B2 B1B1 C1C1 C2C2 A2A2 A1A1 Dy 1 Step 1 Step 2.
Measurement Equivalents
What is Intractable? Some problems seem too hard to solve efficiently. Question 1: Does an efficient algorithm exist?  An O(a ) algorithm, where a > 1,
Math Skills – Week 7. Class project due next week Sample final exams available on website Reducing fractions, rates, and ratios $500 huh? 17/30 hmmmmmmm.
Renaming Customary Units of Measure SWBAT rename customary units of length, capacity, and weight; to compute with units of measure.
5.8 Changing Units in Customary System Page 218. Customary Units of Measure Length 12 inches= 1 foot 3 feet = 1 yard 5,280 feet = 1 mile.
2 pt 3 pt 4 pt 5pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2pt 3 pt 4pt 5 pt 1pt 2pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4pt 5 pt 1pt customary length customary capacity.
Warm up True or False = 1 Explain Can you think of other ways to make 1 using a fraction bar?
Physics: Engineering Mechanics I Chapters 1, 2, 3 1.
Chapter 7 Dynamic Programming 7.
§ 8 Dynamic Programming Fibonacci sequence
Ch 1 Sec 3,4,5 Definition of Stress – Sec 3 Average Normal Stress – Sec 4 Average Shear Stress – Sec 5.
18 = = = = = = = =
A 1 A 2 A 3 A 4 B B B
Chapter 8 Dynamic Programming Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
50: $125,000 $64,000 $32,000 $16,000 $8,000 $4,000 $2,000 $1,000 $500 $300 $200 $100 Escribe a pregunta D. B. C. A.
Find the hypotenuse in a right triangle with legs a = 3 and b = Exercise.
Presentation Timer Select a time to count down from the clock above 60 min 45 min 30 min 20 min 15 min 10 min 5 min or less.
Presentation Timer Select a time to count down from the clock above 60 min 45 min 30 min 20 min 15 min 10 min 5 min or less.
SOLUTION EXAMPLE 2 Find the greatest common monomial factor Factor out the greatest common monomial factor. a. 12x + 42y a.a. The GCF of 12 and 42 is 6.
Dynamic Programming – Part 2 Introduction to Algorithms Dynamic Programming – Part 2 CSE 680 Prof. Roger Crawfis.
Direct and Inverse Variations Direct Variation Which of these tables models direct variation? If so, write an equation. NO.
The METRIC SYSTEM & CONVERSIONS Factor Label/Dimensional Analysis Review.
The Central Limit Theorem. 1. The random variable x has a distribution (which may or may not be normal) with mean and standard deviation. 2. Simple random.
Pythagorean Theorem Indicator: G3a: Use Pythagorean Theorem to solve right triangle problems.
iSpeak Break Timer 60 min 45 min 30 min 20 min 15 min 10 min 5 min or less.
4/17/2013 Review of Unit Rate.
7 -1 Chapter 7 Dynamic Programming Fibonacci sequence Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, … F i = i if i  1 F i = F i-1 + F i-2 if.
Dynamic Programming Dynamic Programming Dynamic Programming is a general algorithm design technique for solving problems defined by or formulated.
Do Static Weights Really Matter? Bowl Expo Monday, June 27, 2011.
Dynamic Programming.
7 -1 Chapter 7 Dynamic Programming Fibonacci sequence Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, … F i = i if i  1 F i = F i-1 + F i-2 if.
Where are the deals? Take me to your deals!
A Mongolian gerbil’s tail is about the same length as its body. A gerbil has a body length of centimeters and a tail length of centimeters. Which is longer,
MEASUREMENT. Measurement I can measure length, capacity, and weight in customary units.
ENT 153 TUTORIAL 1.
10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Length.
Dynamic Programming continued David Kauchak cs302 Spring 2012.
A ratio that compares two quantities measured in different units. Suppose you read 233 words in two minutes. Your reading rate is.
9-3B Volume of Similar Solids What is the relationship between the similarity ratio of two similar solids and the volumes of those solids?
Section 2-4 Absolute Values in open Sentences DO NOW: Take out your homework from last night, your notes, a calculator, and pencil. Objective: To solve.
Center of Gravity The balance point of an object.
9.1 – Multiplying & Dividing Rational Expressions.
Mid-Term Review. has a slope of 5/2. If A = (2, 7) and B = (12, k), what is the value of k? 32.
What is the best price? I did my project on dog food. I did my by project on which dog food Is the best per pound. I did my project Ol'Roy dog food. The.
Math for Liberal Studies.  The knapsack problem is a variation of the bin packing problems we have been discussing  This time, there is just one bin.
Adding and Subtracting Decimals Section 1-2 (pages 11-16)
SOLUTION EXAMPLE 2 Find the greatest common monomial factor Factor out the greatest common monomial factor. a. 12x + 42y a.a. The GCF of 12 and 42 is 6.
EXAMPLE 3 Writing Numbers in Standard Form Scientific notationProduct formStandard form a.a , ,000 Exponent is 5. Move decimal point.
Understanding Pythagorean Theorem. Do You Remember? Find the value of each square root
ESTIMATING STEEL FOR CONCRETE POURS. REBAR -Estimated by the pound or ton -Must know the size of steel bar needed -Must know linear feet needed -Bars.
Unit 8: Section 13.5 State and apply the midpoint formula
2.9 – Weighted Averages.
Similarity Postulates
High capacity filling system
Linear Measurement and Capacity
Historical T&D charge volatility
California Skier MasterCraft of california Website:
مفهوم السياحة المحلية في الأردن
Temperature and Conversions Between the U.S. and Metric Systems
د. عبدالسلام محمد الدراجي ﭽايتس – سيدني / استراليا
מיחזור במערכת החינוך.
Lesson 0 – 2 Changing Units of Measure Between Systems
1 (x+1)(x+3) (x-3)(x+2) (x-1)(x+3) x2+2x-3 (x+6)(x-2) (x+1)(x-3)
Dynamic Programming Reporter : 林明慧.
Lecture 5 Dynamic Programming
A STAAR REVIEW CIRCUIT A # 1-16 M. N. O. P..
BETONLINEBETONLINE A·+A·+
Removal of brackets Example Work out each of the following
Presentation transcript:

Knapsack Problem Section 7.6

A 8 lbs $ B 6 lbs $ C 4 lbs $ D 2 lbs $ E 1 lb $ lbs capacity A 8 lbs $ B 6 lbs $ C 4 lbs $ D 2 lbs $ E 1 lb $ A 8 lbs $ B 6 lbs $ C 4 lbs $ D 2 lbs $ E 1 lb $ By Price By Value or Min Weight =$10

A 8 lbs $ B 6 lbs $ C 4 lbs $ D 2 lbs $ E 1 lb $ lbs capacity E D E D E C E B E D E C E D E D E C E B E D E A E D E D E C E *  (2 N )

A 8 lbs $ B 6 lbs $ C 4 lbs $ D 2 lbs $ E 1 lb $ lbs capacity E D E D E C E B E D E C E D E D E C E B E D E A E D E D E C E * O(2 N )

A 8 lbs $ B 6 lbs $ C 4 lbs $ D 2 lbs $ E 1 lb $ lbs capacity BC D E D E C E B E D E A E D E D E C E * O(N K ) on average

LCS Problem Longest Common Subsequence Section 8.4

E L A I N E S U Z I E A C B A C A B C B A C A B C A A A LCS = ACABC (LENGTH 5) LCS = BACABC (LENGTH 6)

a1a1 a2a2 a3a3 b1b1 b2b2 b3b3 a1a1 a2a a3a

a1a1 a2a2 a3a3 b1b1 b2b2 b3b3 a1a1 a2a a3a

a1a1 a2a2 a3a3 b1b1 b2b2 b3b3 a1a1 a2a a3a

a1a1 a2a2 a3a3 b1b1 b2b2 b3b3 a1a1 a2a a3a

a1a1 a2a2 a3a3 b1b1 b2b2 b3b3 a1a1 a2a a3a