Sub topic 10
The alligation rule and its cross-diagram
This chapter assumes you can compute a weighted average, you know that a mixture's price or concentration is the weighted average of its parts, and you can simplify ratios. The previous chapter showed that a mixture is a weighted average. Alligation is that same calculation run backwards: you know the mean and want the weights.
The idea behind the rule
Suppose you mix a cheaper item priced c per unit with a dearer item priced d per unit. The mixture has mean price m, where c < m < d. Let the quantities be q₁ of the cheaper item and q₂ of the dearer item. The weighted average gives:
m = (q₁c + q₂d) / (q₁ + q₂)
Multiply out and collect terms:
q₁(m − c) = q₂(d − m)
Therefore:
q₁ : q₂ = (d − m) : (m − c)
In words, the cheaper-to-dearer quantity ratio equals the dearer's distance from the mean divided by the cheaper's distance from the mean. The rule is a balance. The mean is a pivot point, and the quantity on each side is inversely proportional to its distance from the pivot. The component that is closer to the mean is needed in the larger quantity.
The cross-diagram
The cross-diagram is a way to read the rule without remembering a formula. Write the cheaper value on the left, the dearer value on the right, and the mean in the middle below them. Subtract along the diagonals, always taking the larger minus the smaller.
The steps are mechanical:
- Write the two component values and the mean.
- Compute the dearer value minus the mean. This is the weight of the cheaper component.
- Compute the mean minus the cheaper value. This is the weight of the dearer component.
- Simplify the resulting ratio.
Here is the rule in code, with a check that the ratio reproduces the mean.
from fractions import Fraction
def alligation_ratio(cheaper, dearer, mean):
"""Return the ratio (quantity of cheaper) : (quantity of dearer)."""
if not cheaper < mean < dearer:
raise ValueError("mean must lie strictly between the two values")
return Fraction(dearer - mean, mean - cheaper)
r = alligation_ratio(40, 60, 52)
print(r) # 2/3, meaning cheaper : dearer = 2 : 3
# Check: weighted average of 2 parts at 40 and 3 parts at 60
print((2 * 40 + 3 * 60) / 5) # 52.0The function rejects a mean outside the two values. That check is not decoration. It encodes a feasibility condition: no mixture of two items can cost less than the cheaper one or more than the dearer one. If a problem gives you a mean outside that interval, you have misread the problem.
One rule, three quantities
Alligation works for any quantity that mixes by weighted average. The values c, m and d are the per-unit figures, and the ratio you get is the ratio of the units those figures are per.
| Situation | Values c, m, d | Ratio obtained is the ratio of |
|---|---|---|
| Mixing two grades of rice | Price per kg | Kilograms of each grade |
| Mixing two acid solutions | Percent acid by volume | Volumes of each solution |
| Averaging two groups | Group average marks | Number of students in each group |
| Two speeds over the same time | Speeds | Times travelled at each speed |
| Profit on two parts of stock | Profit percent per part | Cost price of each part |
The last two rows matter for CAT. In the speed row, the weights are times, because average speed is total distance over total time, and distance is speed times time. If the two speeds are used over the same distance instead, the average is a harmonic mean and the plain rule does not apply directly. Always ask what the weights are before you apply the rule.
A worked example with concentration
How should a 70% alcohol solution be mixed with a 20% alcohol solution to get a 50% solution?
- Cheaper (weaker) value: 20. Dearer (stronger) value: 70. Mean: 50.
- Weight of the 20% solution: 70 − 50 = 20.
- Weight of the 70% solution: 50 − 20 = 30.
- Ratio of 20% solution to 70% solution: 20 : 30 = 2 : 3.
Check: 2 litres at 20% gives 0.4 litres of alcohol, and 3 litres at 70% gives 2.1 litres. The total is 2.5 litres of alcohol in 5 litres, which is 50%.
Using a mixing ratio to find a quantity
Often the problem gives you one quantity and asks for another. Convert the ratio into parts and scale.
A shopkeeper mixes tea at 40 per kg with tea at 60 per kg. He sells the mixture at 52 per kg, with no profit or loss. If he uses 18 kg of the 60 per kg tea, how much of the 40 per kg tea does he use?
The ratio of cheaper to dearer is 2 : 3. Three parts equal 18 kg, so one part is 6 kg. The cheaper tea is 2 × 6 = 12 kg.
When the mean is not given directly
Many CAT problems hide the mean. You must build it before drawing the cross.
Mean from a selling price and a profit
A trader mixes two kinds of sugar costing 30 and 38 per kg, and sells the mixture at 40.80 per kg to earn a 20% profit. The mean cost price is the selling price divided by 1.20, which is 34. The cross gives (38 − 34) : (34 − 30) = 4 : 4 = 1 : 1.
Always convert to cost price before using the rule. Alligation applies to costs of the ingredients, not to the selling price, unless every price in the diagram is a selling price.
Mean from a combined figure
If 30 students average 60 marks and the rest of the class averages 75 marks, and the whole class averages 70, the cross gives:
- Group with 60: 75 − 70 = 5
- Group with 75: 70 − 60 = 10
The ratio is 5 : 10 = 1 : 2. So the 30 students are one part, and the other group has 60 students. The class has 90 students.
Dealing with three or more components
The cross-diagram handles two components. For three or more, you have more than one valid answer, because many mixes can reach the same mean. Typical CAT versions fix this in one of two ways:
- The question asks for one specific combination, such as equal amounts of two of the components.
- You pair the components, one below the mean and one above it, and combine the pairs.
Take prices 20, 30 and 50 with a target mean of 35. Pair 20 with 50: the cross gives (50 − 35) : (35 − 20) = 15 : 15 = 1 : 1. Pair 30 with 50: the cross gives (50 − 35) : (35 − 30) = 15 : 5 = 3 : 1. You can then pick an amount of each pair. A mix of 20, 30 and 50 in the ratio 1 : 3 : 2 is one valid answer, since (20 + 90 + 100) / 6 = 35. The pairing rule is that every component below the mean must be paired with one above it. A pair that sits on the same side of the mean gives no result.
Checking for feasibility and for mean positions
Before computing, place the mean on the number line and check three things.
- The mean lies strictly between the two component values.
- The mean is closer to the component you expect in the larger quantity.
- The resulting ratio matches that observation.
For the tea example, 52 is closer to 60 than to 40 in relative terms? The distances are 8 from 40... wait, 52 − 40 = 12 and 60 − 52 = 8. The mean is closer to 60, so the dearer tea should be the larger share. The ratio 2 : 3 agrees. This check takes five seconds and catches the crossing error from the earlier callout.
Common traps
- Crossing in the wrong direction. The check above catches it.
- Using selling prices with cost prices in the same diagram.
- Applying the rule to harmonic situations. Equal distances at two speeds do not weight by distance in the plain rule. Weight by time.
- Forgetting that the ratio refers to units of the denominator of the per-unit figure. A concentration by weight gives a ratio of weights, and a concentration by volume gives a ratio of volumes. If the two solutions have different densities, convert first.
- Reporting the ratio in the wrong order. State clearly which component comes first.
- Using percentages of different bases. A 20% profit on cost and a 20% profit on selling price are different values.
Alligation as a shortcut for percentage changes
The same pattern appears in problems about a group split into two parts that grow or shrink at different rates. If a town's population grew 10% among men and 30% among women, and the total grew 22%, then the cross on 10, 22 and 30 gives men : women = (30 − 22) : (22 − 10) = 8 : 12 = 2 : 3. The weights are the original populations, because each rate applies to its own original base.
Exercises
Exercise
A grocer mixes two varieties of pulses costing 84 per kg and 96 per kg so that the mixture costs 91 per kg. In what ratio, cheaper to dearer, are they mixed?
Show answer
Cheaper : dearer = (96 − 91) : (91 − 84) = 5 : 7.
Exercise
A 45-litre mixture must be made from milk that is 10% fat and milk that is 25% fat so that the result is 20% fat. How many litres of the 25% milk are needed?
Show answer
The cross gives 10%-milk : 25%-milk = (25 − 20) : (20 − 10) = 5 : 10 = 1 : 2. The 25% milk is 2/3 of 45 litres, which is 30 litres. Check: 15 litres at 10% gives 1.5, and 30 litres at 25% gives 7.5. The total is 9 litres of fat in 45 litres, which is 20%.
Exercise
A trader mixes rice costing 50 per kg with rice costing 80 per kg in the ratio 3 : 2. At what price per kg must he sell the mixture to earn a 25% profit?
Show answer
The mean cost is (3 × 50 + 2 × 80) / 5 = 310 / 5 = 62. Selling at a 25% profit gives 62 × 1.25 = 77.50 per kg.
Exercise
A car travels part of a trip at 40 km/h and the rest at 60 km/h. The average speed for the whole trip is 48 km/h. In what ratio is the time spent at 40 km/h to the time spent at 60 km/h?
Show answer
Average speed is total distance over total time, so the weights are times. The cross gives time at 40 : time at 60 = (60 − 48) : (48 − 40) = 12 : 8 = 3 : 2. Check: in 3 hours at 40 the car covers 120 km, and in 2 hours at 60 it covers 120 km. That is 240 km in 5 hours, which is 48 km/h.