Mixtures are formed when two or more quantities of different values are mixed together. Alligation is a practical method of solving arithmetic problems related to mixtures of ingredients.
There are two kinds of problems:

To find the quantity of a mixture given the quantities of its ingredients. (Alligation Medial)

To find the amount of each ingredient needed to make a mixture of a given quantity. (Alligation Alternate)
Chain Rule

When a fraction has its numerator greater than the denominator, its value is greater than one. Let us call it greater fraction. Whenever a number (say x) is multiplied by a greater fraction, it gives a value greater than itself.

When a fraction has its numerator less than the denominator, its value is less than one. Let us call it less fraction. Whenever a number (say x) is multiplied by a less fraction, it gives a value less than itself.
Important Facts and Formula
Allegation: It is the rule that enables us to find the ratio in which two of more ingredients at the given price must be mixed to produce a mixture of a desired price.
Mean Price: The cost price of a unit quantity of the mixture is called the mean price.
Rule of Allegation: If two ingredients are mixed then Quantity of Cheaper / Quantity of Dearer = (C.P. of Dearer  Mean Price) / (Mean Price  C.P. of Cheaper)
Cheaper quantity : Dearer quantity = (d  m) : (m  c)
Example 1: A sum of Rs 39 was divided among 45 boys and girls. Each girl gets 50 paise, whereas a boy gets one rupee. Find the number of boys and girls.
Average amount of money received by each = 39/45 = 13/15
Amount received by each girl = 50 paise = Rs 1/2
Amount received by each boy = Re 1
By alligation rule:
Number of boys / Number of girls
= (13/15  1/2) / (1  13/15)
= 11/4
∴ Number of boys = 11/(11+4) × 45 = 33
Number of girls = 45 – 33 = 12
Important Tip
Always identify the ingredients as cheaper and dearer to apply the alligation rule. In the alligation rule, the variables c, d & m may be expressed in terms of percentages (e.g. A 20% mixture of salt in water), fractions (e.g. twofifth of the solution contains salt) or proportions (e.g. A solution of milk and water is such that milk : Water = 2 : 3). The important point is to remember is that c & d may represent pure ingredients or mixtures.
Mixing a Pure Component to a Solution
Example 2: A jar contains a mixture of two liquids A and B in the ratio 4 : 1. When 10 litres of the liquid B is poured into the jar, the ratio becomes 2: 3. How many litres of liquid A were contained in the jar?
Method 1: weighted average or equation method
Let the quantities of A & B in the original mixture be 4x and x litres. According to the question
4x / (x + 10) = 2 / 3
12x = 2x + 20
x = 2
The quantity of A in the original mixture = 4x = 4 × 2 = 8 litres.
Method 2: Alligation with composition of B
The average composition of B in the first mixture is 1/5.
The average composition of B in the second mixture = 1
The average composition of B in the resultant mixture = 3/5
Hence, applying the rule of Alligation
[1 – (3/5)]/[(3/5) – (1/5)] = (2/5)/(2/5) = 1
So, initial quantity of mixture in the jar = 10 litres.
And, quantity of A in the jar = (10 × 4)/5 = 8 litres.
Method 3: Alligation with percentage of B
The percentage of B in 1st mixture = 20%
The percentage of B in 2nd mixture = 100%
The percentage of B in Final Mixture = 60%
By rule of allegation
Volume 1st : Volume 2nd = (100%  60%) : (60%  20%)
V_{1} : V_{2} = 1 : 1
Volume of mixture 1st = 10 litres
Volume of A in mixture 1st = 80% of 10 litres = 8 litres
Removal and Replacement
Suppose a container contains x units of liquid from which y units are taken out and replaced by water. After n operations the quantity of pure liquid = x(1  y/x)^{n} units.
Example 3: Nine litres of solution are drawn from a cask containing water. It is replaced with a similar quantity of pure milk. This operation is done twice. The ratio of water to milk in the cask now is 16 : 9. How much does the cask hold?
Let there be x litres in the cask. After n operations
Water left in vessel / Original quantity of water = (1 – 9/x)^{n}
(1 – 9/x)^{2} = 16/25
∴ x = 45 litres