FIGURE 12.5.1

FIGURE 12.5.1

The following sections set up the LOG_ARCHIVE_DEST_ n initialization parameter and other related parameters to enable and disable role-specific archiving:

12.1.1 Configuring a Primary Database and a P hysical Standby Database

Figure 12-1 shows the chicago primary database, the boston physical standby database, and the initialization parameters for each system.

Figure 12-1 Primary and Physical Standby Databases Before a Role Transition

Table 12-2 shows the initialization parameters for the configuration in Figure 12-1.

Table 12-2 Initialization Parameter Settings for Primary and Physical Standby Databases

Chicago Database (Primary Role) Boston Database (Physical Standby Database Role)

The following table describes the archival processing shown in Figure 12-1:

Chicago Database (Primary Role) Boston Database (Physical Standby Role)
LOG_ARCHIVE_DEST_1 Directs archiving of redo data to the local archived redo log files in /arch1/chicago/ . Directs archiving of redo data to the local archived redo log files in /arch1/boston/ .
LOG_ARCHIVE_DEST_2 Directs transmission of the redo data to the remote physical standby database boston . Is ignored valid only when boston is running in the primary role.
STANDBY_ARCHIVE_DEST Is ignored valid only when chicago is running in the standby role. Directs archival of redo data to the archived redo log files in the local directory /arch1/boston/ .

Figure 12-2 shows the same configuration after a switchover.

Figure 12-2 Primary and Physical Standby Databases After a Role Transition

The following table describes the archival processing shown in Figure 12-2:

Chicago Database (Physical Standby Role) Boston Database (Primary Role)
LOG_ARCHIVE_DEST_1 Directs archiving of redo data to the local /arch1/chicago/ directory. Directs archiving of redo data to the local archived redo log files in /arch1/boston/ .
LOG_ARCHIVE_DEST_2 Is ignored valid only when chicago is running in the primary role. Directs transmission of redo data to the remote physical standby destination chicago .
STANDBY_ARCHIVE_DEST Directs archiving of redo data to the archived redo log files in the local directory /arch1/chicago/ . Is ignored valid only when boston is running in the standby role.

12.1.2 Configuring a Primary Database and a Logical Standby Database

Figure 12-3 shows the chicago database running in the primary role, the denver database running in the logical standby role, and the initialization parameters for each system. Inactive components are grayed out.

Figure 12-3 Configuring Destinations for a Primary Database and a Logical Standby Database

Table 12-3 shows the initialization parameters for the configuration in Figure 12-3.

Table 12-3 Initialization Parameter Settings for Primary and Logical Standby Databases

Chicago Database (Primary Role) Denver Database (Logical Standby Database Role)

The following table describes the archival processing shown in Figure 12-3:

Chicago Database (Primary Role) Denver Database (Logical Standby Role)
LOG_ARCHIVE_DEST_1 Directs archiving of redo data generated by the primary database from the local online redo log files to the local archived redo log files in /arch1/chicago/ . Directs archiving of redo data generated by the logical standby database from the local online redo log files to the local archived redo log files in /arch1/denver/ .
LOG_ARCHIVE_DEST_2 Is ignored valid only when chicago is running in the standby role. (You must configure a standby redo log on this site to perform switchovers.) Directs archiving of redo data from the standby redo log files to the local archived redo log files in /arch2/denver/ .
LOG_ARCHIVE_DEST_3 Directs transmission of redo data to the remote logical standby destination denver . Is ignored valid only when denver is running in the primary role.
STANDBY_ARCHIVE_DEST Is ignored valid only when chicago is running in the standby role. Directs archiving of redo data received from the primary database directly to archived redo log files in /arch2/denver/ .

Unlike physical standby databases, logical standby databases are open databases that generate redo data and have multiple log files (online redo log files, archived redo log files, and standby redo log files). It is good practice to specify separate local destinations for:

Archived redo log files that store redo data generated by the logical standby database . In Figure 12-3, this is configured as the LOG_ARCHIVE_DEST_1=LOCATION=/arch1/denver destination.

Archived redo log files that store redo data received from the primary database . In Figure 12-3, this is configured as the LOG_ARCHIVE_DEST_2=LOCATION=/arch2/denver destination.

In Figure 12-3, the STANDBY_ARCHIVE_DEST parameter is configured to the same location for these purposes:

If the standby redo log files fill up, redo data received from the primary database is archived directly to the archived redo log files in this location (described in Section 5.7.1).

If there is an archive gap, archived redo log files retrieved from other databases are copied to this location (described in Section 5.8).

Because the example configurations shown in Figure 12-3 (and Figure 12-4) do not include a physical standby database, the configuration sets up the LOG_ARCHIVE_DEST_3 destination for switchover with the logical standby database. Figure 12-4 shows the same configuration after a switchover.

Figure 12-4 Primary and Logical Standby Databases After a Role Transition

The following table describes the archival processing shown in Figure 12-4:

C hicago Database (Logical Standby Role) Denver Database (Primary Role)
LOG_ARCHIVE_DEST_1 Directs archiving of redo data generated by the logical standby database from the local online redo log files to the local archived redo log files in /arch1/chicago/ . Directs archiving of redo data from the local online redo log files to the local archived redo log files in /arch1/denver/ .
LOG_ARCHIVE_DEST_2 Directs archiving of redo data from the standby redo log files to the archived redo log file in /arch2/chicago/ . Is ignored valid only when denver is running in the standby role.
LOG_ARCHIVE_DEST_3 Is ignored valid only when chicago is running in the primary role. Directs transmission of redo data to the remote logical standby destination chicago .
STANDBY_ARCHIVE_DEST Directs archiving of the redo data received from the primary database directly to the archived redo log files in /arch2/chicago/ . Is ignored valid only when denver is running in the standby role.

12.1.3 Configuring Both Physical and Logical Standby Databases

Figure 12-5 shows the chicago database running in the primary role, the boston database running in the physical standby role, and the denver database running in the logical standby database role. The initialization parameters are shown under each system. Components that are grayed out are inactive for the database's current role. This example assumes that a switchover would occur only between chicago and boston . In this configuration, the denver logical standby database is intended to be a reporting database only denver will never be the target of a switchover or run in the primary database role.

Figure 12-5 Configuring a Primary Database with Physical and Logical Standby Databases

Table 12-4 shows the initialization parameters for the databases in Figure 12-5.

Table 12-4 Initialization Parameters for Primary, Physical, and Logical Standby Databases

Boston Database (Standby Role) Chicago Database (Primary Role) Denver Database (Standby Role)

The following table describes the archival processing shown in Figure 12-5:

Chicago Database (Primary Role) Boston Database (Standby Role) Denver Database (Standby Role)
LOG_ARCHIVE_DEST_1 Directs archiving of redo data from the online redo log files to the local archived redo log files in /arch1/chicago/ . Directs archiving of redo data from the standby redo log files to the local archived redo log files in /arch1/boston/ . Directs archiving of redo data generated by the logical standby database from the local online redo log files to the local archived redo log files in /arch1/denver/ .
LOG_ARCHIVE_DEST_2 Directs transmission of redo data to the remote logical standby destination denver . Is ignored valid only when boston is running in the primary role. Directs archiving of redo data from the standby redo log files to the local archived redo log files in /arch2/denver/ .
LOG_ARCHIVE_DEST_3 Directs transmission of redo data to the remote physical standby destination boston . Is ignored valid only when boston is running in the primary role. Is not defined for this database.
STANDBY_ARCHIVE_DEST Is ignored valid only for standby role. Directs archiving of redo data received from the primary database directly to archived redo log files in /arch1/boston/ . Directs archiving of redo data received from the primary database directly to archived redo log files in /arch2/denver/ .

Figure 12-6 shows the same configuration after a switchover changes the chicago database to the standby role and the boston database to the primary role.

Figure 12-6 Primary, Physical, and Logical Standby Databases After a Role Transition

The following table describes the archival processing shown in Figure 12-6:

Chicago Database (Standby Role) Boston Database (Primary Role) Denver Database (Standby Role)
LOG_ARCHIVE_DEST_1 Directs archival of redo data from the standby redo log files to the local archived redo log files in /arch1/chicago/ . Directs archival of redo data from the online redo log files to the local archived redo log files in /arch1/boston/ . Directs archival of redo data generated by the logical standby database from the local online redo log files to the local archived redo log files in /arch1/denver/ .
LOG_ARCHIVE_DEST_2 Is ignored valid only when chicago is running in the primary role. Directs transmission of redo data to the remote logical standby destination denver . Directs archival of redo data from the standby redo log files to the local archived redo log files in /arch2/denver/ .
LOG_ARCHIVE_DEST_3 Is ignored valid only when chicago is running in the primary role. Directs transmission of redo data to the remote physical standby destination chicago . Is not defined for this database.
STANDBY_ARCHIVE_DEST Directs archival of redo data received from the primary database directly to the archived redo log files in /arch1/chicago/ . Is ignored valid only for standby role. Directs archival of redo data received from the primary database directly to archived redo log files in /arch2/denver/ .

12.1.4 Verifying the Current VALID_FOR Attribute Settings for Each Destination

To see whether or not the current VALID_FOR attribute settings are valid right now for each destination in the Data Guard configuration, query the V$ARCHIVE_DEST view, as shown in Example 12-1. Example 12-1 Finding VALID_FOR Information in the V$ARCHIVE_DEST View

In Example 12-1, each line represents one of the ten destinations in the Data Guard configuration. The first line indicates that the VALID_FOR attribute for LOG_ARCHIVE_DEST_1 is set to (ALL_LOGFILES,ALL_ROLES) , which is the only keyword pair that is valid at all times.

More interesting are the second and third lines in the view, which are both currently invalid, but for different reasons:

LOG_ARCHIVE_DEST_2 is set to (STANDBY_LOGFILES,STANDBY_ROLE) , but the WRONG VALID_TYPE is returned because this standby destination does not have a standby redo log implemented.

LOG_ARCHIVE_DEST_3 is set to (ONLINE_LOGFILES,STANDBY_ROLE) , but the WRONG VALID_ROLE is returned because this destination is currently running in the primary database role.

All of the other destinations are shown as UNKNOWN , which indicates the destinations are either undefined or the database is started and mounted but archiving is not currently taking place. See the V\$ARCHIVE_DEST view in the Oracle Database Reference for information about these and other columns.

FIGURE 12.5.1

The compression ratio of your engine has a direct relationship to how much boost you can run. If you have a high compression ratio, such 9.5:1 or 10:1, you will only be able to run a small amount of boost.

The compression ratio that is built into your engine is called "static compression." When you combine the boost you are running in conjunction with your compression ratio, the result is known as the "Effective Compression Ratio." Formulas have been developed that convert your static compression and supercharger boost to the effective compression ratio. Table 1 provides this information.

You can find your static compression ratio on the left side of the chart. Then read across to the right under the boost you want to run and the number in the box will be your "effective" compression ratio. Experience has shown that if you attempt to run more than about a 12:1 effective compression ratio on a street engine with 92 octane pump gas, you will have detonation problems. To some degree, this can be controlled with boost retard devices, but we do not recommend that you set up your engine and supercharger to provide more than a 12:1 effective compression ratio. Please note that all engines differ in their tolerance to detonation. You can build what appear to be two identical engines and one will detonate and the other one won't, so the numbers given in this chart are not absolute hard and fast figures. However, if you follow this chart, you will be close enough that if you do experience some detonation, you should have no trouble controlling it with one of the aftermarket boost retard ignition systems (such as the such as the Holley Ignition P/N 800-450).

Table 1 shows that you obviously can't try to run 10 pounds of boost on a 9.0:1 compression ratio engine. This gives you an effective compression ratio of 15.1:1, way beyond our 12:1 figure. If you are building your engine from scratch, it is a good idea to try to build it with a relatively low compression ratio, such as 7.5 or 8.0:1. It is fairly easy to change the boost to get the best combination of performance and power, but it is extremely difficult to change the compression ratio, especially if you want to lower it. Additionally, you will make more total power with a low compression, high boost engine than you will with a high compression, low boost engine.

ITunes is going places.

Visit the iTunes Store on iOS to buy and download your favorite songs, TV shows, movies, and podcasts. You can also download macOS Catalina for an all-new entertainment experience on desktop. Your library will transfer automatically to the new Apple Music app, Apple TV, and Apple Podcasts. And you’ll still have access to your favorite iTunes features, including your previous iTunes Store purchases, rentals, and imports and the ability to easily manage your library.

FIGURE 12.5.1

As we have seen, [H + ] and [OH − ] values can be markedly different from one aqueous solution to another. So chemists defined a new scale that succinctly indicates the concentrations of either of these two ions.

pH The negative logarithm of the hydrogen ion concentration. is a logarithmic function of [H + ]:

pH is usually (but not always) between 0 and 14. Knowing the dependence of pH on [H + ], we can summarize as follows:

• If pH < 7, then the solution is acidic.
• If pH = 7, then the solution is neutral.
• If pH > 7, then the solution is basic.

This is known as the pH scale The range of values from 0 to 14 that describes the acidity or basicity of a solution. . You can use pH to make a quick determination whether a given aqueous solution is acidic, basic, or neutral.

Example 12

Label each solution as acidic, basic, or neutral based only on the stated pH.

1. With a pH greater than 7, milk of magnesia is basic. (Milk of magnesia is largely Mg(OH)2.)
2. Pure water, with a pH of 7, is neutral.
3. With a pH of less than 7, wine is acidic.

Identify each substance as acidic, basic, or neutral based only on the stated pH.

Table 12.3 "Typical pH Values of Various Substances*" gives the typical pH values of some common substances. Note that several food items are on the list, and most of them are acidic.

Table 12.3 Typical pH Values of Various Substances*

Substance pH
stomach acid 1.7
lemon juice 2.2
vinegar 2.9
soda 3.0
wine 3.5
coffee, black 5.0
milk 6.9
pure water 7.0
blood 7.4
seawater 8.5
milk of magnesia 10.5
ammonia solution 12.5
1.0 M NaOH 14.0
*Actual values may vary depending on conditions.

pH is a logarithmic scale. A solution that has a pH of 1.0 has 10 times the [H + ] as a solution with a pH of 2.0, which in turn has 10 times the [H + ] as a solution with a pH of 3.0 and so forth.

Using the definition of pH, it is also possible to calculate [H + ] (and [OH − ]) from pH and vice versa. The general formula for determining [H + ] from pH is as follows:

You need to determine how to evaluate the above expression on your calculator. Ask your instructor if you have any questions. The other issue that concerns us here is significant figures. Because the number(s) before the decimal point in a logarithm relate to the power on 10, the number of digits after the decimal point is what determines the number of significant figures in the final answer:

Example 13

What are [H + ] and [OH − ] for an aqueous solution whose pH is 4.88?

We need to evaluate the expression

Depending on the calculator you use, the method for solving this problem will vary. In some cases, the “−4.88” is entered and a “10 x ” key is pressed for other calculators, the sequence of keystrokes is reversed. In any case, the correct numerical answer is as follows:

Because 4.88 has two digits after the decimal point, [H + ] is limited to two significant figures. From this, [OH − ] can be determined:

[OH − ] = 1 × 10 − 14 1.3 × 10 − 5 = 7.7 × 10 − 10 M

What are [H + ] and [OH − ] for an aqueous solution whose pH is 10.36?

[H + ] = 4.4 × 10 −11 M [OH − ] = 2.3 × 10 −4 M

There is an easier way to relate [H + ] and [OH − ]. We can also define pOH The negative logarithm of the hydroxide ion concentration. similar to pH:

(In fact, p“anything” is defined as the negative logarithm of that anything.) This also implies that

A simple and useful relationship is that for any aqueous solution,

This relationship makes it simple to determine pH from pOH or pOH from pH and then calculate the resulting ion concentration.

Example 14

The pH of a solution is 8.22. What are pOH, [H + ], and [OH − ]?

Because the sum of pH and pOH equals 14, we have

Subtracting 8.22 from 14, we get

Now we evaluate the following two expressions:

[H + ] = 6.0 × 10 −9 M [OH − ] = 1.7 × 10 −6 M

The pOH of a solution is 12.04. What are pH, [H + ], and [OH − ]?

pH = 1.96 [H + ] = 1.1 × 10 −2 M [OH − ] = 9.1 × 10 −13 M

Key Takeaways

• pH is a logarithmic function of [H + ].
• [H + ] can be calculated directly from pH.
• pOH is related to pH and can be easily calculated from pH.

Exercises

Define pH. How is it related to pOH?

Define pOH. How is it related to pH?

What is the pH range for an acidic solution?

What is the pH range for a basic solution?

What is [H + ] for a neutral solution?

What is [OH − ] for a neutral solution? Compare your answer to Exercise 6. Does this make sense?

12.5 Missing values

Changing the representation of a dataset brings up an important subtlety of missing values. Surprisingly, a value can be missing in one of two possible ways:

• Explicitly, i.e. flagged with NA .
• Implicitly, i.e. simply not present in the data.

Let’s illustrate this idea with a very simple data set:

There are two missing values in this dataset:

The return for the fourth quarter of 2015 is explicitly missing, because the cell where its value should be instead contains NA .

The return for the first quarter of 2016 is implicitly missing, because it simply does not appear in the dataset.

One way to think about the difference is with this Zen-like koan: An explicit missing value is the presence of an absence an implicit missing value is the absence of a presence.

The way that a dataset is represented can make implicit values explicit. For example, we can make the implicit missing value explicit by putting years in the columns:

Because these explicit missing values may not be important in other representations of the data, you can set values_drop_na = TRUE in pivot_longer() to turn explicit missing values implicit:

Another important tool for making missing values explicit in tidy data is complete() :

complete() takes a set of columns, and finds all unique combinations. It then ensures the original dataset contains all those values, filling in explicit NA s where necessary.

There’s one other important tool that you should know for working with missing values. Sometimes when a data source has primarily been used for data entry, missing values indicate that the previous value should be carried forward:

You can fill in these missing values with fill() . It takes a set of columns where you want missing values to be replaced by the most recent non-missing value (sometimes called last observation carried forward).

12.5.1 Exercises

Compare and contrast the fill arguments to pivot_wider() and complete() .

What does the direction argument to fill() do?

FIGURE 12.5.1

If you’re looking for product sales or support concerning one of the products below, click to expand that section and read the information associated with that product.

Moho® 13

As of December 2020, the Moho product line is being developed by Lost Marble LLC.

Product and purchase information for Moho 13 (Pro and Debut) can be found at:

As the developer and distributor for Moho, their team will be able to assist you with all questions about your Moho Product. This includes Activation and application usage as well as obtaining the latest updates and accessing installers. Support is available by going to the Moho Support Center.

Additionally, there is an active forum available here to ask the community any question you have:

Poser®

As of June 2019, the Poser product line is being developed and sold through Bondware and Renderosity.com. Their website for information and to purchase is:

As the developer and distributor for Poser, their team will be able to assist you with all questions about your Poser Product. This includes Activation and application usage as well as obtaining the latest updates and accessing installers. All questions and reports of issues should also be directed to their Support Team

Their Support Team will also be able to assist you in locating your License Key for purchases at the former Content Paradise store or the my.smithmicro.com store.

Additionally, there is an active forum available on Renderosity to ask the community any question you may have.

MotionArtist®

MotionArtist has reached its End of Life and is no longer sold or supported.

NOTE: All MotionArtist users should download and install this final available version which removes the Activation Requirement for MotionArtist here (valid license required):

No new updates for the current or past versions will be forthcoming and no new versions will be released. The software should continue to function on the supported Operating Systems and Hardware as indicated by the System Requirements found in the application documentation.

StuffIt®

StuffIt Expander is available on the iOS and Mac App Store. Links to StuffIt Expander and updates to earlier versions of StuffIt are available at https://stuffit.com/

No new updates for the current or past versions of Stuffit will be forthcoming and no new versions will be released. The software should continue to function on the supported Operating Systems and Hardware as indicated by the System Requirements.

Support for all versions of Stuffit is limited to installing the software on a supported system. Any issues or problems encountered using the software will not be addressed as the software is officially discontinued.

StuffIt Deluxe has been discontinued as of November 2019 as it has reached its End of Life. For several versions Apple has included the Archive Utility which can create and open ZIP Files on Macs and those files can be opened on Windows systems.

StuffIt Destinations has also been discontinued as it has reached its End of Life.

Moho® 12 / Anime Studio®

All versions of Anime Studio as well as version 12 of Moho have been discontinued and are no longer supported. The latest version of Moho is available through Lost Marble LLC by going to:

NOTE: All Moho 12 and Anime Studio users should download and install the final available version listed below (active license required):

Moho 12 - Pro and Debut

Anime Studio 11

Anime Studio 10

Rebelle and Flame Painter

Rebelle and Flame Painter are developed and sold through Escape Motions.

Product information and sales are available at the Escape Motions website. As the developer and distributor for these products, their team can assist you with all your questions. Access product information as well as support on their respective product pages:

PhotoDonut

PhotoDonut is currently unavailable for purchase and is not currently supported. The official PhotoDonut website can be found at:

If you have already purchased PhotoDonut and need to download the installer again, click below:

Clip Studio Paint / Manga Studio

As of April 2018, Smith Micro Software no longer sold or provided support for Clip Studio Paint or Manga Studio.

CELSYS provides technical support for copies of CLIP STUDIO PAINT / Manga Studio purchased from Smith Micro. Although CELSYS is a Japanese corporation, their capable English support staff will be more than happy to provide user support.

Technical Support is provided at CELSYS's support desk.
http://www.clipstudio.net/en/support

Additionally, users can use the official CLIP STUDIO PAINT user Q&A community
https://ask.clip-studio.com/en-us/

Smith Micro Software has no access or control for Activation Issues with the Clip Studio Paint or Manga Studio applications. CLIP STUDIO PAINT 's online license activation system is operated by CELSYS. If you have issues activating, you will want to contact CELSYS Support.

Please Note: Manga Studio 5 was rebranded to Clip Studio Paint by the creator, Celsys. The two application titles had always shared the same features, function, and performance. Only the Title and Activation Process is different. The two Titles have now been merged into the single title of Clip Studio Paint.

Diesel engine, like other internal combustion engines, converts chemical energy contained in the fuel into mechanical power. Diesel fuel is a mixture of hydrocarbons which—during an ideal combustion process—would produce only carbon dioxide (CO2) and water vapor (H2O). Indeed, diesel exhaust gases are primarily composed of CO2, H2O and the unused portion of engine charge air. The volumetric concentrations of these gases in diesel exhaust are typically in the following ranges:

The concentrations depend on the engine load, with the content of CO2 and H2O increasing and that of O2 decreasing with increasing engine load. None of these principal diesel emissions (with the exception of CO2 for its greenhouse gas properties) have adverse health or environmental effects.

Diesel emissions include also pollutants that can have adverse health and/or environmental effects. Most of these pollutants originate from various non-ideal processes during combustion, such as incomplete combustion of fuel, reactions between mixture components under high temperature and pressure, combustion of engine lubricating oil and oil additives as well as combustion of non-hydrocarbon components of diesel fuel, such as sulfur compounds and fuel additives. Common pollutants include unburned hydrocarbons (HC), carbon monoxide (CO), nitrogen oxides (NOx) or particulate matter (PM). Total concentration of pollutants in diesel exhaust gases typically amounts to some tenths of one percent—this is schematically illustrated in Figure 1. Much lower, “near-zero” levels of pollutants are emitted from modern diesel engines equipped with emission aftertreatment devices such as NOx reduction catalysts and particulate filters.

Figure 1. Relative concentration of pollutant emissions in diesel exhaust gas

Representative for diesel engines before the introduction of advanced aftertreatment

There are other sources that can contribute to pollutant emissions from internal combustion engines—usually in small concentrations, but in some cases containing material of high toxicity. These additional emissions can include metals and other compounds from engine wear or compounds emitted from emission control catalysts (via catalyst attrition or volatilization of solid compounds at high exhaust temperatures). Formation of new species—normally not present in engine exhaust—can also be facilitated by catalysts. This seems to be especially the case when catalysts are introduced into the combustion chamber. For example, some fuel additives—so-called “fuel-borne catalysts”—used to support the regeneration of diesel particulate filters have been linked to emissions of highly toxic dioxins and furans [2532] . A possibility of new emissions must be considered whenever additives (catalytic or not) are introduced into the fuel or lube oil and when fluids are introduced into the exhaust gas. A well known example is urea used as a NOx reductant in SCR catalyst systems—emissions from SCR engines can include ammonia, as well as a number of products from incomplete decomposition of urea. Low quality fuels can be still another source of emissions—for instance, residual fuels used in large marine engines contain heavy metals and other compounds known for their adverse health and environmental effects.

Contents

The use of factorials is documented since the Talmudic period (200 to 500 CE), one of the earliest examples being the Hebrew Book of Creation Sefer Yetzirah which lists factorials as a means of counting permutations. [2] Indian scholars have been using factorial formulas since at least the 12th century. [3] Siddhānta Shiromani by Bhāskara II (c. 1114–1185) mentioned factorials for permutations in Volume I, the Līlāvatī. Fabian Stedman later described factorials as applied to change ringing, a musical art involving the ringing of several tuned bells. [4] After describing a recursive approach, Stedman gives a statement of a factorial (using the language of the original):

Now the nature of these methods is such, that the changes on one number comprehends [includes] the changes on all lesser numbers . insomuch that a compleat Peal of changes on one number seemeth to be formed by uniting of the compleat Peals on all lesser numbers into one entire body. [5]

Factorial of n is denoted by n! or n . [6] The notation n! was introduced by the French mathematician Christian Kramp in 1808. [7]

The factorial function is defined by the product

Factorial of zero Edit

The factorial of 0 is 1 , or in symbols, 0! = 1 .

There are several motivations for this definition:

• For n = 0 , the definition of n! as a product involves the product of no numbers at all, and so is an example of the broader convention that the product of no factors is equal to the multiplicative identity (see Empty product).
• There is exactly one permutation of zero objects (with nothing to permute, the only rearrangement is to do nothing).
• It makes many identities in combinatorics valid for all applicable sizes. The number of ways to choose 0 elements from the empty set is given by the binomial coefficient:

Although the factorial function has its roots in combinatorics, formulas involving factorials occur in many areas of mathematics.

• There are n! different ways of arranging n distinct objects into a sequence, the permutations of those objects. [8][9]
• Often factorials appear in the denominator of a formula to account for the fact that ordering is to be ignored. A classical example is counting k -combinations (subsets of k elements) from a set with n elements. One can obtain such a combination by choosing a k -permutation: successively selecting and removing one element of the set, k times, for a total of

As n grows, the factorial n! increases faster than all polynomials and exponential functions (but slower than n n > and double exponential functions) in n .

Most approximations for n! are based on approximating its natural logarithm

The graph of the function f(n) = ln n! is shown in the figure on the right. It looks approximately linear for all reasonable values of n , but this intuition is false. We get one of the simplest approximations for ln n! by bounding the sum with an integral from above and below as follows:

Hence ln n! ∼ n ln n (see Big O notation). This result plays a key role in the analysis of the computational complexity of sorting algorithms (see comparison sort). From the bounds on ln n! deduced above we get that

For large n we get a better estimate for the number n! using Stirling's approximation:

This in fact comes from an asymptotic series for the logarithm, and n factorial lies between this and the next approximation:

Another approximation for ln n! is given by Srinivasa Ramanujan (Ramanujan 1988)

If efficiency is not a concern, computing factorials is trivial from an algorithmic point of view: successively multiplying a variable initialized to 1 by the integers up to n (if any) will compute n! , provided the result fits in the variable. In functional languages, the recursive definition is often implemented directly to illustrate recursive functions.

The main practical difficulty in computing factorials is the size of the result. To assure that the exact result will fit for all legal values of even the smallest commonly used integral type (8-bit signed integers) would require more than 700 bits, so no reasonable specification of a factorial function using fixed-size types can avoid questions of overflow. The values 12! and 20! are the largest factorials that can be stored in, respectively, the 32-bit and 64-bit integers commonly used in personal computers, however many languages support variable length integer types capable of calculating very large values. [15] Floating-point representation of an approximated result allows going a bit further, but this also remains quite limited by possible overflow. Most calculators use scientific notation with 2-digit decimal exponents, and the largest factorial that fits is then 69!, because 69! < 10 100 < 70! . Other implementations (such as computer software such as spreadsheet programs) can often handle larger values.

Most software applications will compute small factorials by direct multiplication or table lookup. Larger factorial values can be approximated using Stirling's formula. Wolfram Alpha can calculate exact results for the ceiling function and floor function applied to the binary, natural and common logarithm of n! for values of n up to 249 999 , and up to 20 000 000 ! for the integers.

If the exact values of large factorials are needed, they can be computed using arbitrary-precision arithmetic. Instead of doing the sequential multiplications ((1 × 2) × 3) × 4. , a program can partition the sequence into two parts, whose products are roughly the same size, and multiply them using a divide-and-conquer method. This is often more efficient. [16]

The asymptotically best efficiency is obtained by computing n! from its prime factorization. As documented by Peter Borwein, prime factorization allows n! to be computed in time O(n(log n log log n) 2 ) , provided that a fast multiplication algorithm is used (for example, the Schönhage–Strassen algorithm). [17] Peter Luschny presents source code and benchmarks for several efficient factorial algorithms, with or without the use of a prime sieve. [18]

Factorials have many applications in number theory. In particular, n! is necessarily divisible by all prime numbers up to and including n . As a consequence, n > 5 is a composite number if and only if

A stronger result is Wilson's theorem, which states that

Legendre's formula gives the multiplicity of the prime p occurring in the prime factorization of n! as

Adding 1 to a factorial n! yields a number that is only divisible by primes that are larger than n . This fact can be used to prove Euclid's theorem that the number of primes is infinite. [21] Primes of the form n! ± 1 are called factorial primes.

Introduction to Mechanisms

Have you ever wondered what kind of mechanism causes the wind shield wiper on the front widow of car to oscillate ( Figure 5-1a)? The mechanism, shown in Figure 5-1b, transforms the rotary motion of the motor into an oscillating motion of the windshield wiper.

Figure 5-1 Windshield wiper

Let's make a simple mechanism with similar behavior. Take some cardboard and make four strips as shown in Figure 5-2a.

Take 4 pins and assemble them as shown in Figure 5-2b.

Now, hold the 6in. strip so it can't move and turn the 3in. strip. You will see that the 4in. strip oscillates.

Figure 5-2 Do-it-yourself four bar linkage mechanism

The four bar linkage is the simplest and often times, the most useful mechanism. As we mentioned before, a mechanism composed of rigid bodies and lower pairs is called a linkage (Hunt 78). In planar mechanisms, there are only two kinds of lower pairs --- revolute pairs and prismatic pairs.

The simplest closed-loop linkage is the four bar linkage which has four members, three moving links, one fixed link and four pin joints. A linkage that has at least one fixed link is a mechanism. The following example of a four bar linkage was created in SimDesign in simdesign/fourbar.sim

Figure 5-3 Four bar linkage in SimDesign

This mechanism has three moving links. Two of the links are pinned to the frame which is not shown in this picture. In SimDesign, links can be nailed to the background thereby making them into the frame.

How many DOF does this mechanism have? If we want it to have just one, we can impose one constraint on the linkage and it will have a definite motion. The four bar linkage is the simplest and the most useful mechanism.

Reminder: A mechanism is composed of rigid bodies and lower pairs called linkages (Hunt 78). In planar mechanisms there are only two kinds of lower pairs: turning pairs and prismatic pairs.

1. Continuous rotation into continuous rotation, with a constant or variable angular velocity ratio.
2. Continuous rotation into oscillation or reciprocation (or the reverse), with a constant or variable velocity ratio.
3. Oscillation into oscillation, or reciprocation into reciprocation, with a constant or variable velocity ratio.
• Function generation : the relative motion between the links connected to the frame,
• Path generation : the path of a tracer point, or
• Motion generation : the motion of the coupler link.

In a parallelogram four-bar linkage, the orientation of the coupler does not change during the motion. The figure illustrates a loader. Obvioulsy the behavior of maintaining parallelism is important in a loader. The bucket should not rotate as it is raised and lowered. The corresponding SimDesign file is simdesign/loader.sim .

Figure 5-4 Front loader mechanism

The four-bar mechanism has some special configurations created by making one or more links infinite in length. The slider-crank (or crank and slider) mechanism shown below is a four-bar linkage with the slider replacing an infinitely long output link. The corresponding SimDesign file is simdesign/slider.crank.sim .

Figure 5-5 Crank and Slider Mechanism

This configuration translates a rotational motion into a translational one. Most mechanisms are driven by motors, and slider-cranks are often used to transform rotary motion into linear motion.

You can also use the slider as the input link and the crank as the output link. In this case, the mechanism transfers translational motion into rotary motion. The pistons and crank in an internal combustion engine are an example of this type of mechanism. The corresponding SimDesign file is simdesign/combustion.sim .

Figure 5-6 Crank and Piston

You might wonder why there is another slider and a link on the left. This mechanism has two dead points. The slider and link on the left help the mechanism to overcome these dead points.

One interesting application of slider-crank is the block feeder. The SimDesign file can be found in simdesign/block-feeder.sim

Figure 5-7 Block Feeder

In the range of planar mechanisms, the simplest group of lower pair mechanisms are four bar linkages. A four bar linkage comprises four bar-shaped links and four turning pairs as shown in Figure 5-8.

Figure 5-8 Four bar linkage

The link opposite the frame is called the coupler link , and the links whick are hinged to the frame are called side links . A link which is free to rotate through 360 degree with respect to a second link will be said to revolve relative to the second link (not necessarily a frame). If it is possible for all four bars to become simultaneously aligned, such a state is called a change point .

1. Crank : A side link which revolves relative to the frame is called a crank .
2. Rocker : Any link which does not revolve is called a rocker .
3. Crank-rocker mechanism : In a four bar linkage, if the shorter side link revolves and the other one rocks ( i.e. , oscillates), it is called a crank-rocker mechanism .
4. Double-crank mechanism : In a four bar linkage, if both of the side links revolve, it is called a double-crank mechanism .
5. Double-rocker mechanism : In a four bar linkage, if both of the side links rock, it is called a double-rocker mechanism .

Before classifying four-bar linkages, we need to introduce some basic nomenclature.

• s = length of shortest bar
• l = length of longest bar
• p, q = lengths of intermediate bar

Grashof's theorem states that a four-bar mechanism has at least one revolving link if s + l

and all three mobile links will rock if s + l > p + q

The inequality 5-1 is Grashof's criterion .

All four-bar mechanisms fall into one of the four categories listed in Table 5-1:

Table 5-1 Classification of Four-Bar Mechanisms

In Figure 5-11, if AB is the input link, the force applied to the output link, CD , is transmitted through the coupler link BC . (That is, pushing on the link CD imposes a force on the link AB , which is transmitted through the link BC .) For sufficiently slow motions (negligible inertia forces), the force in the coupler link is pure tension or compression (negligible bending action) and is directed along BC . For a given force in the coupler link, the torque transmitted to the output bar (about point D ) is maximum when the angle between coupler bar BC and output bar CD is /2. Therefore, angle BCD is called transmission angle .

Figure 5-11 Transmission angle

When the transmission angle deviates significantly from /2, the torque on the output bar decreases and may not be sufficient to overcome the friction in the system. For this reason, the deviation angle =| /2- | should not be too great. In practice, there is no definite upper limit for , because the existence of the inertia forces may eliminate the undesirable force relationships that is present under static conditions. Nevertheless, the following criterion can be followed.

When a side link such as AB in Figure 5-10, becomes aligned with the coupler link BC , it can only be compressed or extended by the coupler. In this configuration, a torque applied to the link on the other side, CD , cannot induce rotation in link AB . This link is therefore said to be at a dead point (sometimes called a toggle point ).

Figure 5-10 Dead point

In Figure 5-11, if AB is a crank, it can become aligned with BC in full extension along the line AB 1 C 1 or in flexion with AB 2 folded over B 2 C 2 . We denote the angle ADC by and the angle DAB by . We use the subscript 1 to denote the extended state and 2 to denote the flexed state of links AB and BC . In the extended state, link CD cannot rotate clockwise without stretching or compressing the theoretically rigid line AC 1 . Therefore, link CD cannot move into the forbidden zone below C 1 D , and must be at one of its two extreme positions in other words, link CD is at an extremum. A second extremum of link CD occurs with = 1 .

Note that the extreme positions of a side link occur simultaneously with the dead points of the opposite link.

In some cases, the dead point can be useful for tasks such as work fixturing (Figure 5-11).

Figure 5-11 Work fixturing

In other cases, dead point should be and can be overcome with the moment of inertia of links or with the asymmetrical deployment of the mechanism (Figure 5-12).

Figure 5-12 Overcoming the dead point by asymmetrical deployment (V engine)

The slider-crank mechanism, which has a well-known application in engines, is a special case of the crank-rocker mechanism. Notice that if rocker 3 in Figure 5-13a is very long, it can be replaced by a block sliding in a curved slot or guide as shown. If the length of the rocker is infinite, the guide and block are no longer curved. Rather, they are apparently straight, as shown in Figure 5-13b, and the linkage takes the form of the ordinary slider-crank mechanism .

Figure 5-13 Slider-Crank mechanism

Inversion is a term used in kinematics for a reversal or interchange of form or function as applied to kinematic chains and mechanisms. For example, taking a different link as the fixed link, the slider-crank mechanism shown in Figure 5-14a can be inverted into the mechanisms shown in Figure 5-14b, c, and d. Different examples can be found in the application of these mechanisms. For example, the mechanism of the pump device in Figure 5-15 is the same as that in Figure 5-14b.

Figure 5-15 A pump device

Keep in mind that the inversion of a mechanism does not change the motions of its links relative to each other but does change their absolute motions.

Watch the video: МАТЧАСТЬ! Что такое КоАП РФ? Как ездить на КОРЧЕ из Жиги по городу?! (September 2021).

Case l + s vers. p + q Shortest Bar Type
1