Skip to main content

Mixtures and Alligations

Core Concepts

  • Mixture or alloys contains two or more ingredients of certain quantity mixed together to get a desired quantity. The quantity can be expressed as a ratio or percentage. For Ex: 1 liter of a mixture contains 250ml water and 750 ml milk. That means, 1/4 of mixture is water and 3/4 of mixture is milk. In other words, 25% of mixture is water and 75% of mixture is milk.
  • Alligation is the rule that enables us to find the ratio in which two or more ingredients at the given price must be mixed to produce a mixture of desired price. The cost price of unit quantity of such a mixture is called its Mean Price. Remember the rule that cost price of costlier ingredient > cost price of mixture > cost price of cheaper ingredient.

Important formulas and shortcuts for mixtures and alligations

1) Rule Of Alligation

Given , Quantity of cheaper ingredient = qc,
Cost price of cheaper ingredient = pc,
Quantity of dearer or costlier ingredient = qd,
Cost price of costlier or dearer ingredient = pd.
Consider, mean price of mixture as pm and quantity of mixture as qm.
We know, qm = qc + qd
Then we get,
    (qc * pc + qd * pd) = qm * pm = (qc + qd) * pm
 qc ( pm – pc) = qd (pd – pc)
→ qc / qd =  (pd – pc) / ( pm – pc)
Thus we get the important relation for alligation as 
An easy way to remember this relation,


2) Quantity of ingredient to be added to increase the content of ingredient in the mixture to y%

If P liters of a mixture contains x% ingredient in it. Find the quantity of ingredient to be added to increase the content of ingredient in the mixture to y%.
Let the quantity of ingredient to be added = Q liters
Quantity of ingredient in the given mixture = x% of P = x/100 * P
Percentage of ingredient in the final mixture = Quantity of ingredient in final mixture / Total quantity of final mixture.
Quantity of ingredient in final mixture = [x/100 * P] + Q = [ P*x + 100 * Q] / 100
Total quantity of final mixture = P + Q
 y/100 = [[ P*x + 100 * Q] / 100]/[P + Q]
→ y[P + Q] = [P*x + 100 * Q]
The quantity of ingredient to be added 

3) If n different vessels of equal size are filled with the mixture of P and Q

If n different vessels of equal size are filled with the mixture of P and Q in the ratio p1 : q1, p2 : q2, ……, pn : qn and content of all these vessels are mixed in one large vessel, then
Let x liters be the volume of each vessel,
Quantity of P in vessel 1 = p1 * x / (p1 + q1)
Quantity of P in vessel 2 = p2 * x / (p2 + q2)
Quantity of P in vessel n = pn * x / (pn + qn)... and so on
Similarly,
Quantity of Q in vessel 1 = q1 * x / (p1 + q1)
Quantity of Q in vessel 2 = q2 * x / (p2 + q2)
Quantity of Q in vessel n = qn * x / (pn + qn)... and so on
Therefore, when content of all these vessels are mixed in one large vessel, then
Quantity of P / Quantity of Q = Sum of quantities of P in different vessels / Sum of quantities of Q in different vessels 

4) If n different vessels of sizes x1, x2, …, xn are filled with the mixture of P and Q

If n different vessels of sizes x1, x2, …, xn are filled with the mixture of P and Q in the ratio p1 : q1, p2 : q2, ……, pn : qn and content of all these vessels are mixed in one large vessel, then
Quantity of P in vessel 1 = p1 * x1/(p1 + q1)
Quantity of P in vessel 2 = p2 * x2/(p2 + q2)
Quantity of P in vessel n = pn * xn/(pn + qn)... and so on
Similarly,
Quantity of Q in vessel 1 = q1 * x1/(p1 + q1)
Quantity of Q in vessel 2 = q2 * x2/(p2 + q2)
Quantity of Q in vessel n = qn * xn/(p+ qn)
Therefore, when content of all these vessels are mixed in one large vessel
Quantity of P / Quantity of Q = Sum of quantities of P in different vessels / Sum of quantities of Q in different vessels

5) Quantity of ingredient to be added to change the ratio of ingredients in a mixture

In a mixture of x liters, the ratio of milk and water is a : b. If the this ratio is to be c : d, then the quantity of water to be further added is:
In original mixture
Quantity of milk = x * a/(a + b) liters
Quantity of water = x * b/(a + b) liters
Let quantity of water to be added further be w litres.
Therefor in new mixture:
Quantity of milk = x * a/(a + b) liters → Equation(1)
Quantity of water = [x * b/(a + b) ] + w liters → Equation (2)
→ c / d = Equation (1) / Equation (2)
Quantity of water to be added further, 

Comments

Popular posts from this blog

C Questions

C Questions
C Questions

Note : All the programs are tested under Turbo C/C++ compilers.
It is assumed that,
Programs run under DOS environment, The underlying machine is an x86 system, Program is compiled using Turbo C/C++ compiler.
The program output may depend on the information based on this assumptions (for example sizeof(int) == 2 may be assumed).
Predict the output or error(s) for the following:

void main()
{
int const * p=5; printf("%d",++(*p));
}
Answer:
Compiler error: Cannot modify a constant value.
Explanation:
p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".
main()
{
char s[ ]="man"; int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
Answer: mmmm
aaaa nnnn
Explanation

Zoho Interview | Set 1 (Advanced Programming Round)

Third Round: (Advanced Programming Round) Here they asked us to create a “Railway reservation system” and gave us 4 modules. The modules were:
    1. Booking
    2. Availability checking
    3. Cancellation
    4. Prepare chart
We were asked to create the modules for representing each data first and to continue with the implementation phase.

 My Solution :

#include<stdio.h>#include<conio.h>#include<stdlib.h>#include<string.h>#include<iostream.h>#include<time.h>#include<iomanip.h>#include<fstream.h>char f[10]="f";char s[10]="s";int addr,ad,flag,f1,d,m,i,amt;float tamt; class login {public:char id[100];char pass[100];char*password;void getid(){ cout<<"Enter your id:";gets(id); password=getpass("Enter the password:");strcpy(pass,password);}void displayid(){ cout<<"Id:";puts(id); cout<<"Password:";puts(pass);}}; class detail {public:in…

Hackerrank > SQL > Basic Select

Select
01-Select All
Given a City table, whose fields are described as +-------------+----------+ | Field       | Type     | +-------------+----------+ | ID          | int(11)  | | Name        | char(35) | | CountryCode | char(3)  | | District    | char(20) | | Population  | int(11)  | +-------------+----------+
write a query that will fetch all columns for every row in the table.

My Solution
SELECT*FROM city;
---------------------------------------------------------------------------------
02-Select by ID
Given a City table, whose fields are described as