Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8,...

29
Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004

Transcript of Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8,...

Page 1: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Back of the Envelope Reasoning

Praveen ParitoshKen Forbus

QR04 Practice TalkThursday, July 8, 2004

Page 2: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Back of the Envelope Reasoning

• Numeric answers• Specificity-Resources tradeoff• Only thing you can do in many domains

– Environmental science, Biophysics, etc.– New, unfamiliar domains.

• Useful – Engineers, Scientists, Policymakers, everyone who

reads a newspaper

• Problem solving + feel for numbers

Page 3: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

1. IncompletenessDomain theories incomplete in coverage.

2. ConcretenessKnowledge of concrete, specific situations (made use of by analogical reasoning) in addition to first-principles reasoning.

3. Highly experiential: Experience improves - ability to reason through similar scenarios. - intuitions for what is reasonable, high, low in a domain.

4. Focused reasoningTight reasoning, as opposed to maintaining ambiguity for completeness

5. Pervasively quantitativeReal-world actions require that estimates manifest as exact values.

Constraints guiding Common Sense QR

Page 4: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Some examples

• How many K-8 elementary school teachers are in the USA?• How much money is spent on newspapers in USA per

year?• How much time would be saved per year nationwide by

increasing the speed limit from 55 to 65 mph?• What is the annual cost of healthcare in USA?• How much tea (weight) is there in China?• Last summer, the US Army bought Microsoft

Windows/Office/Server software for 500,000 computers. The deal included the software and six years of support. How much did the army pay for this?

Page 5: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

How many K-8 elementary school teachers are in the USA?

Number of teachers = number of students / students per teacherNumber of students = population * fraction in the age range of K-8 students * fraction of kids who go to school

Number of students = 300 mil * 9/75 * 1Number of teachers = 40 mil / 25 = 1.6 mil

1.9 million, source: Statistical Abstracts.

Page 6: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

How much money is spent on newspapers in USA per year?

Total money spent = Money spent per buyer * number of buyersAnnual expense per buyer = Units bought per year * cost per unit

Annual expense per buyer = 365 * 0.75 = 250Number of buyers = 300 mil * ¼ = 75 mil Total money spent = 75 mil * 250 = 20 billion

26 billion, source: Statistical abstracts

Page 7: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

What is the total annual gasoline consumption by cars in US?Total consumption = Total miles driven/ miles per gallonTotal miles driven = Number of cars in the US * Miles driven per car per yearMiles driven per car per year = Miles driven per day * 365If we say that every household owns a car, since some don’t and some might have more than one, then Number of cars in the US = number of households = population / average size of American household.

Now we have a model, and using the following numbers,Population ~ 300 million, Average size of household ~ 3, Daily miles driven ~ 20, Miles per gallon for a car ~ 20. We get an estimate of 36.5 billion gallons.

Page 8: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Formalizing BoTE reasoningEstimate parameter directly

Create estimation model

Find modeling strategy

Find values forparameters

in model

Use known valueif available

Estimate basedon similar situation

1

2

3

Page 9: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Problem Solving

• Representation– Of problems, strategies and domain knowledge.

• Retrieval– Of relevant knowledge and strategies

• Reasoning– Workspace: keeping track of progress made.– Agenda: figuring out what to do next.

Page 10: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

BotE-Solver

• Representation– Domain knowledge: 1.2 million fact subset of Cycorp’s

CYC knowledge base. – Strategies: Suggestions.

• Retrieval– Pattern matching and backward chaining.

• Reasoning– Built on top of FIRE reasoning engine– AND/OR tree as workspace. – Difficulty ordered agenda.

Page 11: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

SOLVE

• Suggestions based problem solver

• Represent problem solving progress in an and/or tree structure

• Incremental solution generation, get-next-solution

• Ordered subgoals

Page 12: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

An example

(defSuggestion VolumeFormulaForSphere (volumeOfObject ?obj ?vol) :test (shapeOfObject ?obj SphereShape) :subgoals ((radius ?obj ?radius)) :result-step (evaluate ?vol (TimesFn 4.187 ;;4/3*Pi (ExponentFn ?radius 3))))

Page 13: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

(annualSales NewspaperCopy UnitedStatesOfAmerica (YearFn 2003) ?money)

(defSuggestion PerBuyerStrategy (annualSales ?obj ?place ?time ?money) :subgoals ((annualExpensePerBuyer ?obj ?place ?time ?money-per-buyer) (numberOfBuyers ?obj ?place ?time ?number)) :result-step (evaluate ?money (TimesFn ?money-per-buyer ?number))) (defSuggestion UnitaryStrategyForCost (annualExpensePerBuyer ?obj ?place ?time ?money-per-buyer) :subgoals ((annualUnitsBoughtPerBuyer ?obj ?place ?time ?units) (cost ?obj ?unit-cost)) :result-step (evaluate ?money-per-buyer (TimesFn ?units ?unit-cost)))

(defSuggestion FractionOfTotalStrategy (numberOfBuyers ?obj ?place ?time ?number) :subgoals ((populationDuring ?place ?any-time ?total) (percentOfBuyers ?obj ?place ?percent)) :result-step (evaluate ?number (QuotientFn (TimesFn ?total ?percent) 100)))

Page 14: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

(cardinality K-8SchoolTeacher ?numteachers)

(defSuggestion StudentsPerTeacherStrategy (cardinality K-8SchoolTeacher ?numteachers) :subgoals ((cardinality K-8SchoolStudent ?numstudents) (studentsPerTeacher K-8School ?perteacher)) :result-step (evaluate ?numteachers (TimesFun ?numstudents ?perteacher))) (defSuggestion UniformAgeDistributionStrategy (cardinality K-8SchoolStudent ?numstudents) :subgoals ((populationDuring UnitedStatesOfAmerica (YearFn 1997) ?population) (minimumAge K-8SchoolStudent ?min) (maximumAge K-8SchoolStudent ?max) (lifeExpectancyForGroupInRegion UnitedStatesOfAmerica Person (YearsDuration ?life))) :result-step (evaluate ?numstudents (TimesFn (QuotientFn (DifferenceFn ?max ?min) ?life) ?population))))

Page 15: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

What next

• Represent 20-30 problems, with the goal of re-usable representations, in strategies and theoretical knowledge added.

• Feel for numbers– Build symbolic representations for numbers

• Large, expensive, upper class, etc.

– Analogical estimator: makes guesses for a numeric parameter based on analogy.

Page 16: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Numbers in symbolic knowledge representation

• Consider the Great black-bucked gull– Wingspan = Large– Wing-span = 0.272 sq. m.

• Numbers not handled right – Similarity: computing and making inferences– Retrieval– Generalization

Page 17: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Extra Stuff

Page 18: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Examples

Page 19: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

How much time would be saved by increasing the speed limit from 55 to 65 mph?

Total time spent driving = time spent driving per person * number of driversTime spent driving per person = Total distance driven per person /SpeedTotal distance driven per person = Distance per day * number of days driving

Number of drivers: assume one driver per household = 1/3 * population = 100 milTotal distance driven per person = 20 * 365 = 8000Time spent per person = 8000/55 = 150 hoursTime spent if it was 65 mph = 8000/65 = 120 hoursTime saved per person = 30 hrs

Total time saved = 3 billion hours = 300,000 years.

Page 20: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

The Microsoft Army – How much does software for 500,000 computers cost?

Total cost on the software = cost of desktop software + server software + upgrades

Windows XP/Office CDW prices = 650Cost of desktop software = 500,000 * 650 = 325 mil Cost of upgrades = 500,000 * 200 = 100 mil

Assume 1 in 100 servers = 5000 serversExchange server = 600Windows 2003 server = 650SQL Server = 1000Cost of server software = 2250 * 5000 = 11.25 milCost of upgrades = 400 * 5000 = 2 mil

Total cost = 440 millionSoftmart, inc, PA got paid = 470 million

Page 21: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

What is the annual cost of healthcare in USA?

Lets say everyone was insured.

Total cost of healthcare has to be less than insurance premiums, forthe insurance companies to stay in business.

Cost of healthcare = average insurance premium * population = 3,000 * 300 million ~ 1 trillion

[1.6 trillion last year. How does this work?]

Page 22: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

How much tea is there in China?

Total tea = amount of tea consumed per day * stockpile in time

Tea consumed per day = tea consumed per person per cup * number of cups * population

1 billion people5 cups a day5 grams a cupLets say they stock an years supply25 billion grams = 25 million kilos per dayIn an year 365*25 million ~ 10 billion kilos

Page 23: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

CARVE, feel for numbers

Page 24: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

CARVE: Symbolizing Quantity

• Don’t do it – Sorites– Context/Utterer sensitivity

• Dimensional partitions: Large and Small, based on distributional properties of the quantity.(isa Algeria

(HighValueContextualizedFn Area AfricanCountries))

• Structural partitions: Boiling point and Poverty line, denote changes of quality.

Page 25: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

CARVE

Dimensional partitioning for each quantity

(isa Algeria (HighValueContextualizedFn Area AfricanCountries)...

Add these facts to original cases

Structural clustering using SEQL

S1 S2 S3Cj

Ci

Ci*

Quantity 1

L2L1

Page 26: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Analogical Estimator

(GrossDomesticProduct Brazil ?x)

• The value is known.

• Find an analogous case for which value is known.

• Find anything in the KB which might help me make an estimate.

Page 27: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Thesis and Evaluation

• More powerful and flexible back of the envelope reasoning can be done using these symbolic representations of quantity.

• Evaluation: – Corpus of problems with/without

representations generated by CARVE.

Page 28: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Numbers in News

• The cost of Mars Pathfinder mission was 270 million.

• 50 billion tax cut.

• 62,000 square feet.

Page 29: Back of the Envelope Reasoning Praveen Paritosh Ken Forbus QR04 Practice Talk Thursday, July 8, 2004.

Old slides