1 / 13

Representing problems

Representing problems. Abstraction from the messy real world to the ordered simplicity of the model. Abstraction. Representing the problem for processing What information is relevant? How should it be operationalized? Data Relations Processes What information is irrelevant?

Download Presentation

Representing problems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Representing problems Abstraction from the messy real world to the ordered simplicity of the model

  2. Abstraction • Representing the problem for processing • What information is relevant? • How should it be operationalized? • Data • Relations • Processes • What information is irrelevant? • The puzzles

  3. My real world problem How should I order my coffee at Tim Horton’s to get maximum jolt per dollar from caffeine and sugar?

  4. Variables • set of n controllable parameters V = {x1, x2, x3, …, xn } each variable xi has a set of possible values, domain Di e.g., V = { x1, x2, x3 } x1 D1 = {small, medium, large, extralarge} x2 D2 = {coffee, decaf} x3 D3 = {black, cream, sugar, doubledouble}

  5. Problem Space • set of all possible combinations of variable values • dimension of space n: number of variables • size of space: |D1|x|D2|x…x|Dn| e.g., dimension = 3 size = 4 x 2 x 4 = 32 V = { x1, x2, x3 } x1  D1 = {small, medium, large, extralarge} x2  D2 = {coffee, decaf} x3  D3 = {black, cream, sugar, doubledouble}

  6. small med large xlg coffee decaf black cream sugar dbldbl Problem Space (medium, coffee, dbldbl) V = { x1, x2, x3 } x1  D1 = {small, medium, large, extralarge} x2  D2 = {coffee, decaf} x3  D3 = {black, cream, sugar, doubledouble}

  7. Fitness • the objective function • problem outcome as a function of the variables: f(x1, x2, x3,…xn) • goal: optimize (maximize or minimize) f e.g., maximize stimulation per dollar from caffeine and sugar V = { x1, x2, x3 } x1  D1 = {small, medium, large, extralarge} x2  D2 = {coffee, decaf} x3  D3 = {black, cream, sugar, doubledouble}

  8. small med large xlg coffee decaf black cream sugar dbldbl Constraints • rules C(V) that eliminate some points in the problem space from consideration e.g., must play roll-up-the-rim

  9. Abstraction - “Operationalizing” • representation of fitness and constraints for evaluation and search e.g. x1 = (cost, ml), x2= bool, x3 = (%coffee,%sugar) D1 = {(1.00,275),(1.15,325),(1.25,400),(1.39,550)} D2 = {1,0} D3 = {(100,0),(90,0),(100,100),(80,200)} fitness f= C(x1.ml*x2*x3.%coffee)+S(x1.ml*x3.%sugar) x1.cost constraint:x1 (1.00,275) V = { x1, x2, x3 } x1  D1 = {small, medium, large, extralarge} x2  D2 = {coffee, decaf} x3  D3 = {black, cream, sugar, doubledouble}

  10. Exhaustive search bestFitness = - (assume maximize) bestV for all x1 D1, x2 D2, x3 D3,…xn Dn if (x1, x2,x3,…xn satisfy constraints C(V)) fitness = f(x1, x2,x3,…xn) if (fitness > bestFitness) bestFitness = fitness bestV = {x1, x2,x3,…xn} return bestFitness, bestV

  11. Exhaustive search, e.g. bestFitness = - //jolt per $$ bestV for x1 D1 if (x1 (1.00,275)) // constraint for x2 D2 for x3 D3 fitness = C(x1.ml*x2*x3.%coffee)+S(x1.ml*x3.%sugar) x1.cost if (fitness > bestFitness) bestFitness = fitness bestV = {x1, x2,x3} return bestFitness, bestV

  12. Summary • Parameters, dimension, solution space • Objective - fitness or evaluation function • Constraints - impossible points in solution space • Finding point in space with optimal fitness • No algorithm to calculate point • Space too large to search --> optimization methods with tradeoffs

  13. Puzzles are Us SEND +MORE MONEY Each letter represents a different digit No leading zero’s Sum is correct Find assignment of digits to letters

More Related