1. Trang chủ
  2. » Giáo Dục - Đào Tạo

ENVIRONMENTAL ENGINEER’S MATHEMATICS HANDBOOK - CHAPTER 4 pptx

6 238 1

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 6
Dung lượng 377,06 KB

Nội dung

87 C HAPTER 4 Algorithms and Environmental Engineering 4.1 INTRODUCTION In Chapter 3, we pointed out that environmental modeling has become an important tool within the well-equipped environmental engineer’s toolbox. Using an analogy, we can say that if a typical skilled handyperson’s toolbox contains a socket set ratchet and several differently sized wrench attachments, then the well-equipped environmental engineer’s toolbox includes a number of envi- ronmental models (socket set ratchets) with a varying set of algorithms (socket wrench attachments). Although a complete treatment or discussion of algorithms is beyond the scope of this book, we do provide basic underlying explanations of what algorithms are and examples of their applications in cyber space (to the real world?). For those interested in a more complete discussion of algorithms, many excellent texts are available on the general topic. We list several of these resources in the recommended reading section at the chapter’s end. 4.2 ALGORITHMS: WHAT ARE THEY? An algorithm is a specific mathematical calculation procedure. More specifically, according to Cormen et al. (2002), “an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output.” In other words, an algorithm is a recipe for an automated solution to a problem. A computer model may contain several algorithms. According to Knuth (1973) , the word “algorithm” is derived from the name “al-Khowarizmi,” a ninth-century Persian mathematician. Algorithms should not be confused with computations. An algorithm is a systematic method for solving problems, and computer science is the study of algorithms (although the algorithm was developed and used long before any device resembling a modern computer was available); the act of executing an algorithm — that is, manipulating data in a systematic manner — is called computation . For example, the following algorithm (attributed to Euclid, circa 300 B . C ., and thus known for millennia) for finding the greatest common divisor of two given whole numbers may be stated as follows: • Set a and b to the values A and B , respectively. • Repeat the following sequence of operations until b has value 0: • Let r take the value of a mod b. • Let a take the value of b. • Let b take the value of r . • The greatest common divisor of A and B is final value of a . Note : The operation a mod b gives the ‘remainder’ obtained on dividing a by b . L1681_book.fm Page 87 Tuesday, October 5, 2004 10:51 AM © 2005 by CRC Press LLC 88 ENVIRONMENTAL ENGINEER’S MATHEMATICS HANDBOOK The problem — that of finding the greatest common divisor of two numbers — is specified by stating what is to be computed; the problem statement does not require that any particular algorithm be used to compute the value. Such method-independent specifications can be used to define the meaning of algorithms: the meaning of an algorithm is the value that it computes. Several methods can be used to compute the required value; Euclid’s method is just one. The chosen method assumes a set of standard operations (such as basic operations on the whole number and a means to repeat an operation) and combines these operations to form an operation that computes the required value. Also, something not at all obvious to the vast majority of people is that the proposed algorithm does actually compute the required value. One reason why a study of algorithms is important is to develop methods that can be used to establish what a proposed algorithm achieves. 4.3 EXPRESSING ALGORITHMS Again, although an in-depth discussion is beyond the scope of this text, we point out that the analysis of algorithms often requires us to draw upon a body of mathematical operations. Some of these operations are as simple as high-school algebra, but others may be less familiar to the average environmental engineer. Along with learning how to manipulate asymptotic notations and solving recurrences, an environmental engineer must learn several other concepts and methods in order to analyze algorithms. For example, methods for evaluating bounding summations are important. Bounding summa- tions are algorithms that contain an iterative control construct such as a while or for loop; the algorithm running time can be expressed as the sum of the times spent on each execution of the body of the loop. These occur frequently in the analysis of algorithms. Many of the formulae commonly used in analyzing algorithms can be found in any calculus text. In addition, in order to analyze many algorithms, we must be familiar with the basic definitions and notations for sets, relations, functions, graphs, and trees. A basic understanding of elementary principles of counting (permutations, combinations, and the like) is important as well. Most algorithms used in environ- mental engineering require no probability for their analysis; however, a familiarity with these operations can be useful. Because mathematical and scientific analysis (and many environmental engineering functions) is so heavily based upon numbers, people tend to associate computation with numbers. However, this need not be the case: algorithms can be expressed using any formal manipulation system, i.e., any system that defines a set of entities and a set of unambiguous rules for manipulating those entities. For example, the system called the SKI calculus consists of three combinators (entities) called (coincidentally) S, K , and I. The computation rules for the calculus are: where f, g, x, and y are strings of the three entities. The SKI calculus is computationally complete; that is, any computation that can be performed using any formal system can be performed using the SKI calculus (equivalently, all algorithms can be expressed using the SKI calculus). Not all systems of computation are equally as powerful, however; some problems that can be solved using Sfgx fx (gx)= Kxy x= Ix x= L1681_book.fm Page 88 Tuesday, October 5, 2004 10:51 AM © 2005 by CRC Press LLC ALGORITHMS AND ENVIRONMENTAL ENGINEERING 89 one system cannot be solved using another. Furthermore, we know that some problems cannot be solved using any formal computation system. 4.4 GENERAL ALGORITHM APPLICATIONS Practical applications of algorithms are ubiquitous. All computer programs are expressions of algorithms, in which the instructions are expressed in the computer language used to develop the program. Computer programs are described as expressions of algorithms because an algorithm is a general technique for achieving some purpose that can be expressed in a number of different ways. Algorithms exist for many purposes and are expressed in many different ways. Examples of algorithms include recipes in cook books; servicing instructions in a computer’s hardware manual; knitting patterns; digital instructions to a welding robot as to where each weld should be made; or cyber-speak to any system working cyberspace. Algorithms can be used in sorting operations, for example, to reorder a list into some defined sequence. Expressing the same algorithms as instructions to a human with a similar requirement to reorder some list (for example, to sort a list of tax record reports into a sequence determined by the date of birth on the record) is possible. These instructions could employ the insertion sort algorithm, or the bubble sort algorithm or one of many other available algorithms. Thus, an algorithm as a general technique for expressing the process of completing a defined task is independent of the precise manner in which it is expressed. Sorting is by no means the only application for which algorithms have been developed. Exam- ples of practical applications of algorithms include: • Internet routing: single-source shortest paths • Search engines: string matching • Public-key cryptography and digital signatures: number-theoretic algorithms • Allocating scarce resources in the most beneficial way: linear programming Algorithms are at the core of most technologies used in contemporary computers: • Hardware design uses algorithms. • The design of any GUI relies on algorithms. • Routing in networks relies heavily on algorithms. • Compilers, interpreters, or assemblers make extensive use of algorithms. A frequently used example (because of its general usefulness and because the algorithm is easy to explain to almost anyone) of how an algorithm can be applied to real world situations is known as the traveling salesman problem. This problem is the most notorious NP-complete problem (no polynomial-time algorithm has yet been discovered for an NP-complete problem, nor has anyone yet been able to prove that no polynomial-time algorithm can exist for any one of them). The traveling salesman problem: imagine a traveling salesman who must visit each of a given set of cities by car. Using Figure 4.1A, find the cycle of minimum cost (Figure 4.1B), visiting all of the vertices exactly once. We have pointed out some of the functions that algorithms can perform. The question arises: “Can every problem be solved algorithmically?” The simple and complex answer is NO. For example, problems exist for which no generalized algorithmic solution can possibly exist (unsolv- able). Also, problems exist for which no efficient solution is known — e.g., NP-complete problems — that is, whether or not efficient algorithms exist for NP-complete problems is unknown; if an efficient algorithm exists for any one of them, then efficient algorithms exist for all of them (e.g., L1681_book.fm Page 89 Tuesday, October 5, 2004 10:51 AM © 2005 by CRC Press LLC 90 ENVIRONMENTAL ENGINEER’S MATHEMATICS HANDBOOK traveling salesman problem). Finally, some problems exist that we do not know how to solve algorithmically. From the preceding discussion, it should be apparent that computer science is not just about word processing and spreadsheets; it can include applications and not just software applications. 4.5 ENVIRONMENTAL ENGINEERING ALGORITHM APPLICATIONS Although algorithms can be used in transportation applications (traveling salesman problem), many of their most important applications are applied to engineering functions. For example, consider a robot arm assigned to weld all the metal parts on an automobile in an assembly line. The shortest tour that visits each weld point exactly once defines the most efficient path for the robot. A similar application arises in minimizing the amount of time taken by a design engineer or draftsperson to draw a given structure. Algorithms have found widespread application in all branches of engineering. In environmental engineering, for example, the USEPA uses computer models that employ various algorithms to monitor chemical-spill and ultimate-fate data. In the following section, we provide selected model summary descriptions of applications used in dispersion modeling. Specifically, we discuss how the USEPA (and others) employ preferred/recommended models (refined models recommended for Figure 4.1a Input. Figure 4.1b Output. L1681_book.fm Page 90 Tuesday, October 5, 2004 10:51 AM © 2005 by CRC Press LLC ALGORITHMS AND ENVIRONMENTAL ENGINEERING 91 a specific type of regulatory application) in monitoring air quality, ambient pollutant concentrations, and their temporal and spatial distribution. Further information on this important topic can be accessed at USEPA’s Technology Transfer Network Support Center for Regulatory Air Models at www.epa.gov/scram001/tt22.htm Web site. 4.6 DISPERSION MODELS The following algorithm-based models are currently listed in Appendix A of the Guidelines on Air Quality Models (published as Appendix W of 40 CFR Part 51): • BLP (buoyant line and point source model) — a Gaussian plume dispersion model designed to handle unique modeling problems associated with aluminum reduction plants and other industrial sources in which plume rise and downwash effects from stationary line sources are important. • CALINE3 — a steady-state Gaussian dispersion model designed to determine air pollution con- centrations at receptor locations downwind of “at-grade,” “fill,” “bridge,” and “cut section” high- ways located in relatively uncomplicated terrain. • CALPUFF — a multilayer, multispecies non-steady-state puff dispersion model that simulates the effects of time- and space-varying meteorological conditions on pollution transport, transformation and removal. CALPUFF can be applied on scales of tens to hundreds of kilometers. It includes algorithms for subgrid scale effects (such as terrain impingement), as well as longer range effects (including pollutant removal from wet scavenging and dry deposition, chemical transformation, and visibility effects of particulate matter concentrations). • CTDMPLUS (complex terrain dispersion model plus algorithms for unstable situations) — a refined point-source Gaussian air quality model for use in all stability conditions for complex terrain (terrain exceeding the height of the stack being modeled as contrasted with simple terrain — an area in which terrain features are lower in elevation than the top of the stack of the source). The model contains, in its entirety, the technology of CTDM for stable and neutral conditions. • ISC3 (industrial source complex model) — a steady-state Gaussian plume model that can be used to assess pollutant concentrations from a wide variety of sources associated with an industrial complex. This model can account for the following: settling and dry deposition of particles; downwash; point, area, line, and volume sources; plume rise as a function of downwind distance; separation of point sources; and limited terrain adjustment. ISC3 operates in long- and short-term modes. • OCD (offshore and coastal dispersion model) — a straight-line Gaussian model developed to determine the impact of offshore emissions from point, area, or line sources on the air quality of coastal regions. OCD incorporates overwater plume transport and dispersion as well as changes that occur as the plume crosses the shoreline. Hourly meteorological data are needed from offshore as well as onshore locations. 4.7 SCREENING TOOLS Screening tools are relatively simple analysis techniques used to determine if a given source is likely to pose a threat to air quality. Concentration estimates from screening techniques precede a refined modeling analysis and are conservative. • CAL3QHC/CAL3QHCR (CALINE3 with queuing and hot spot calculations) — a CALINE3- based CO model with a traffic model to calculate delays and queues that occur at signalized intersections; CAL3QHCR requires local meteorological data. • COMPLEX 1 — a multiple-point source screening technique with terrain adjustment that incor- porates the plume impaction algorithm of the VALLEY model. • CTSCREEN (complex terrain screening model) — a Gaussian plume dispersion model designed as a screening technique for regulatory application to plume impaction assessments in complex terrain. CTSCREEN is a screening version of the CTDMPLUS model. L1681_book.fm Page 91 Tuesday, October 5, 2004 10:51 AM © 2005 by CRC Press LLC 92 ENVIRONMENTAL ENGINEER’S MATHEMATICS HANDBOOK • LONGZ — a steady-state Gaussian plume formulation for urban and rural areas in flat or complex terrain to calculate long-term (seasonal and/or annual) ground-level ambient air concentrations attributable to emissions from up to 14,000 arbitrarily placed sources (stack, building, and area sources). • SCREEN3 — a single source Gaussian plume model that provides maximum ground-level con- centrations for point, area, flare, and volume sources, as well as concentrations in the cavity zone, and concentrations from inversion break-up and shoreline fumigation. SCREEN3 is a screening version of the ISC3 model. • SHORTZ — a steady-state bivariate Gaussian plume formulation for urban and rural areas in flat or complex terrain to calculate ground-level ambient air concentrations. It can calculate 1-, 2-, 3- h, etc. average concentrations from emissions from stacks, buildings, and area sources for up to 300 arbitrarily placed sources. •VALLEY — a steady-state, complex terrain, univariate Gaussian plume dispersion algorithm designed for estimating 24-h or annual concentrations resulting from emissions from up to 50 (total) point and area sources. • VISCREEN — calculates the potential impact of a plume of specified emissions for specific transport and dispersion conditions. REFERENCES Cormen, T.H., Leiserson, C. E., Rivest, R.L., and Stein, C. (2002). Introduction to Algorithms , 2nd ed. New Delhi: Prentice–Hall of India. Knuth, D.E. (1973). Fundamental Algorithms, Vol. 1 of The Art of Computer Programming . New York: Addison-Wesley. USEPA (2003). Technology Transfer Network Support Center for Regulatory Air Models. Accessed at www.epa.gov/scram001/tt22.htm. USEPA (1993). Guideline on Air Quality Models (revised Appendix W of 40 CFR part 51 [supplement b]). Accessed at http://www.osti.gov/energycitations/products.biblio.jsp?osti_id=5948584 on November 11, 2003. SUGGESTED READING Gusfield, D. (1997). Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology . New York: Cambridge University Press. Lafore, R. (2002). Data Structures and Algorithms in Java , 2nd ed. Indianapolis, IN: Sams. Mitchell, T.M. (1997). Machine Learning . New York: McGraw-Hill. Poynton, C. (2003). Digital Video and HDTV Algorithms and Interfaces . San Francisco: Morgan Kaufmann. L1681_book.fm Page 92 Tuesday, October 5, 2004 10:51 AM © 2005 by CRC Press LLC . 4 Algorithms and Environmental Engineering 4. 1 INTRODUCTION In Chapter 3, we pointed out that environmental modeling has become an important tool within the well-equipped environmental engineer’s. L1681_book.fm Page 91 Tuesday, October 5, 20 04 10:51 AM © 2005 by CRC Press LLC 92 ENVIRONMENTAL ENGINEER’S MATHEMATICS HANDBOOK • LONGZ — a steady-state Gaussian plume formulation for urban. them (e.g., L1681_book.fm Page 89 Tuesday, October 5, 20 04 10:51 AM © 2005 by CRC Press LLC 90 ENVIRONMENTAL ENGINEER’S MATHEMATICS HANDBOOK traveling salesman problem). Finally, some problems

Ngày đăng: 11/08/2014, 17:20

TỪ KHÓA LIÊN QUAN

w