{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

2-Webster - Computational modeling of Websters problem Comp...

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Computational modeling of Webster’s problem Comp 140 Fall 2009
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
26 August 2009 (c) Devika Subramanian, 2009 The “word problem” The devil made a proposition to Daniel Webster. The devil proposed paying Daniel for services in the following way:"On the first day, I will pay you $1,000 early in the morning. At the end of the day, you must pay me a commission of $100. At the end of the day, we will both determine your next day's salary and my commission. I will double what you have earned at the end of the day, but you must double the amount that you pay me. Will you work for me for a month?" 2
Image of page 2
26 August 2009 (c) Devika Subramanian, 2009 Abstraction and automation 3 Answer Relevant input Algorithm Recipe Construction Recipe Execution (i.e., the cooking) First we, as humans, design a recipe. Then we get the machine to cook it.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
26 August 2009 (c) Devika Subramanian, 2009 Abstraction Identifying the right level at which to model/think about the problem What is to be computed? What are the givens? What is the recipe for computing what we need from the givens? How do we precisely state the recipe to a machine? Creative process, requires human ingenuity and thought 4 Answer Relevant input Algorithm (mathematical description of recipe) Word Problem ABSTRACTION
Image of page 4
26 August 2009 (c) Devika Subramanian, 2009 Automation Communicating a precise recipe to a machine. Computational mapping of recipe to data structures and control flow supported by a programming language. Translating the mathematical recipe into a program using the chosen computational mapping. 5 Algorithm/recipe (mathematical representation) Program AUTOMATION
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
26 August 2009 (c) Devika Subramanian, 2009 The purpose of the computation Should Webster take the devil’s deal or not? We compute to find the answer to this yes/no question. Questions of this form have a name in computer science, they are called decision problems . 6
Image of page 6
26 August 2009 (c) Devika Subramanian, 2009 Modeling: extracting the relevant pieces of information Not all details in the real-world word problem may be necessary for getting to an answer. What is the essence of the problem, i.e. what is the relevant information? How do we express the essence, the abstraction, in an unambiguous, well-defined manner? 7
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
26 August 2009 (c) Devika Subramanian, 2009 What are the “givens”? How the game starts Webster gets a salary of 1000 on day 0. The devil’s commission at the end of day 0 is 100. How the game works (from day 0 on) Webster gets a salary at the start of the day. At the end of the day, Webster’s take is his salary minus the commission he pays the devil. The following day, Webster’s salary is double his take from the previous day. The following day, the devil’s commission is twice what he got the previous day.
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern