Modeling of "problems"

Source: Internet
Author: User
Modeling of the question is taken from: the Algorithm Design Manual by Steve S. skiena
Translated by Liu Jianwen (http://blog.csdn.net/keminlau)

Modeling the problem

Modeling is the art of formulating your application in terms of precisely described, well-understood problems. proper modeling is the key to applying algorithmic design techniques to any real-world problem. indeed, proper modeling can eliminate the need to design or even implement algorithms
Relating your application to what has been done before. Proper modeling is the key to define tively using the problem catalog in Part II of this book.

Creating models for problems or tasks is an art. A model for problems is a form of precise and understandable description. Proper model construction is the key to solving any practical problems by applying algorithm design technology, because you can reuse previous modeling experience (Kemin: is it a problem to talk about experience without locating "problem modeling ?). Proper modeling is the key to effectively using the problem catalog in the second part of this book.

Real-world applications involve real-world objects. you might be working on a system to route traffic in a network, to find the best way to schedule classrooms in a university, or to search for patterns in a previous ate database. most algorithms, however, are designed to work on rigorously defined abstract structures such as permutations, graphs, and sets. after all, if you can't define what you want to do, you can't hope to compute it. you must first describe your problem implements actly, in terms of fundamental structures and properties.

Real-world processing is a real object. You may deal with such problems: designing a network communication routing system, finding the best curriculum for the university, or looking for a record of company data. However, most algorithms are designed to process strictly defined abstract structures, such as lists, graphs, and sets. When the problem arises, you cannot define what you want to do, so you cannot know how to handle (compute) it. Therefore, you must first abstract your problem to some basic structures and attributes.

Whatever your application is, odds are very good that others before you have stumbled upon the same algorithmic problem, perhaps in substantially different contexts. therefore, to find out what is known about your special ''widget optimization problem,'' You can't hope to look in a book under widget. you have to formulate widget Optimization in terms of computing properties of abstract structures such:

L permutations, which are arrangements, or orderings, of items. for example, {,} and {,} are two distinct permutations of the same set of four integers. permutations are likely the object in question whenever your problem seeks an ''arrangement, ''' tour, ''' ordering, '', or ''sequence.''

Arrangement is the arrangement or sorting of elements. Find out the problem ............ Sort all used

L subsets, which represent selections from a set of items. for example, {1, 3, 4} and {2} are two distinct subsets of the first four integers. order does not matter in subsets the way it does with permutations, so the subsets {1, 3, 4} and {3, 4, 1} wocould be considered identical. subsets are likely the object in question whenever your problem seeks a ''cluster, ''' collection, ''' Committee, ''' group, ''' packaging, ''or ''selection.''

A subset (combination) selects some elements from a predetermined set. The order of elements in a subset (combination) is irrelevant.

Trees, which represent hierarchical relationships between items. figure (a) extends strates a portion of the family tree of the skiena clan. trees are likely the object in question whenever your problem seeks a ''hierarchy, ''' dominance relationship, ''' ancestor/decendant relationship, ''' or ''' taxonomy.''

Tree
L graphs, which represent relationships between arbitrary pairs of objects. figure (B) models a network of roads as a graph, where the vertices are cities and the edges are roads connecting pairs of cities. graphs are likely the object in question whenever you seek a ''network, ''' circuit, ''' web, ''' or ''' relationship.''

Figure
L points, which represent locations in some geometric space. for example, the locations of McDonald's databases ants can be described by points on a map/plane. points are likely the object in question whenever your problems work on ''ites, ''' positions, ''' data records, ''or ''locations.''

Point
L polygons, which represent regions in some geometric space. for example, the borders of a country can be described by a polygon on a map/plane. polygons and polyhedra are likely the object in question whenever you are working on ''shapes, '''regions', '''regionations, ''or'' boundaries.''

Polygon
L strings, which represent sequences of characters or patterns. for example, the names of students in a class can be represented by strings. strings are likely the object in question whenever you are dealing with ''text, ''' characters, ''' patterns, ''' or ''labels.''

String
These fundamental structures all have associated problems and properties, which are presented in the catalog of Part II. familiarity with all of these problems is important, because they provide the language we use to model applications. to become fluent; fluent in this vocabulary, browse through the catalog and study the input and output pictures for each problem. understanding all or most of these problems, even at a cartoon/definition level, will enable you to know where to look later when the problem arises in your application.

All of these basic structures have their own problem types and attributes, which have a list (problem Catalog) in the second part of this book ). It is important to be familiar with all of these problem types because they provide you with the language for problem modeling. To be familiar with modeling vocabulary, you can browse the problem list and study the input and output diagrams of each problem one by one. Understanding all or most of these types of problems (even a preliminary understanding) can leave you confused when you encounter actual problems.

Examples of successful application modeling will be presented in the war stories spaced throughout this book. however, some words of caution are in order. the act of modeling reduces your application to one of a small number of existing problems and structures. such a process is inherently constraining, and certain details might not fit easily into the given model. also, certain problems can be modeled in several different ways, some much better than others.

This book describes a successful problem modeling example-the story of war. Some things should be noted during modeling ...... Fixme ...... This process is inherent, and some details are not very good at the specified model. In addition, there are multiple modeling methods for a specific problem, including advantages and disadvantages.

Modeling is only the first step in designing an algorithm for a problem. be alert for how the details of your applications differ from a candidate model. but don't be too quick to say that your problem is unique and special. temporarily ignoring details that don't fit can free the mind to ask whether they were fundamental in the first place.

Modeling is only the first step in designing algorithms for problems. Pay attention to the differences between candidate models by comparing the details of your problem. You don't have to worry about your special problems. For the moment, you can ignore the mindset that cannot cover the details of the model and think about whether they are the same in essence.

Reference

Design and Analysis of Algorithms
Data structures and algorithms
Alfred v. Aho, Bell Laboratories, Murray Hill, New Jersey
John E. hopcroft, Cornell University, Ithaca, New York
Jeffrey D. Ullman, Stanford University, Stanford, California

There are running steps involved in writing a computer program to solve a given problem. the steps go from problem formulation and specification, to design of the solution, to implementation, testing and documentation, and finally to evaluation of the solution. this chapter outlines our approach to these steps. subsequent chapters discuss the algorithms and data structures that are the building blocks of most computer programs.
Writing a computer program to solve a problem is a complicated process. This process includes problem analysis and modeling, design solutions, code implementation, testing and writing documents, and finally evaluate the solution.
From problems to programs 1.1
Half the battle is knowing what problem to solve. when initially approached, most problems have no simple, precise specification. in fact, certain problems, such as creating a "Gourmet" Recipe or preserving world peace, may be impossible to formulate in terms that admit of a computer solution. even if we suspect our problem can be solved on a computer, there is usually considerable latitude in several problem parameters. often it is only by experimentation that reasonable values for these parameters can be found.
Clearly understand that the problem to be solved is half of the success. Most problems do not have a simple and precise description (specification) at the beginning ). In addition, there are actually some problems, such as the creation of a food recipe and other practical problems, beyond the scope of computer processing. Even problems that we think computers should be able to handle, we often need to limit some parameters of the problem. This also often requires experience to know ...... Fixme

If certain aspects of a problem can be expressed in terms of a formal model, it is usually beneficial to do so, for once a problem is formalized, we can look for solutions in terms of a precise model and determine whether a program already exists to solve that problem. even if there is no existing program, at least we can discover what is known about this model and use the properties of the model to help construct a good solution.
Constructing a formal model for a problem is very helpful for solving the problem. First, you can apply existing problem solutions. Second, even if there are no existing examples, the formal model also makes the problem traceable and helps you find a better solution to the problem.
Almost any branch of mathematics or science can be called into service to help model some problem domain. problems essential tially numerical in nature can be modeled by such common mathematical concepts as simultaneous linear equations (e.g ., finding currents in electrical circuits, or finding stresses in frames made of connected beams) or differential equations (e.g ., predicting population growth or the rate at which chemicals will react ). symbol and text processing problems can be modeled by character strings and formal grammars. problems of this nature include compilation (the translation of programs written in a programming language into machine language) and information retrieval tasks such as recognizing particle words in lists of titles owned by a library.
Almost any branch of mathematics or science can be considered as building models for a certain problem area. Numerical problems can be modeled into some mathematical concepts, such as simultaneous linear equations (simultaneous linear equations) or differential equations (differential equations, however, the differential equation predicts population growth.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.