Upcoming SlideShare
×

# Unconventional Calculus: Liquid Sort

958 views

Published on

Babes-Bolyai University of Cluj-Napoca, Romania

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
958
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
0
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Unconventional Calculus: Liquid Sort

1. 1. Unconventional Calculus: LIQUID SORT Paul V. Borza – paul@borza.ro April 13, 2009
2. 2. We would like to sort some numbers using liquids; i.e.: 1. Prepare for each given number a uniquely-colored solution having its density the speciﬁed value; 2. Work with a comparison-based sorting algorithm to mix the solu- tions in pairs in a transparent vesel to observe the ordering. 1
3. 3. Everybody knows that when you combine water and oil they don’t mix, and oil rises above the water, as opposed to sinking or staying in place. Why? 2
4. 4. Why won’t water and oil mix? As like dissolves like (old chemistry saying), only polar substances dissolve in polar solvents; likewise, non-polar solutes only dissolve in non-polar solvents. 3
5. 5. Water is known to be a polar molecule There is an unequal sharing of electrons between the hydrogen atoms and the electronegative oxygen atom. This results in a slightly positive charge on the hydrogen and a slightly negative charge on the oxygen. Therefore, water is a polar solvent. 4
6. 6. Oil is known to be a non-polar molecule The chains of carbon atoms bond to hydrogen atoms making them non-polar, or hydrophobic (water-fearing). 5
7. 7. Why will oil ﬂoat on top of water? The density of the substances doesn’t have anything to do with the miscibility properties of oil and water; it only explains why oil will layer atop of water. 6
8. 8. The density is deﬁned as: m ρ= (1) V Examples: 1. Pure water at 4◦ Celsius has a density of 0.99g/ml (grams per millilitre); 2. Olive oil at 20◦ Celsius has a density of 0.8 − 0.92g/ml. 7
9. 9. If we consider the volume to be constant and mix a couple of liquids of diﬀerent densities, their densities will be directly proportional to their masses. Thus, gravity will order them accordingly. 8
10. 10. There are two approaches to solve the comparison problem. When we mix two liquids of diﬀerent densities, we can use: (A) A polar liquid and another non-polar liquid such that these won’t mix, and the order in which these will be added in the transparent container will not matter; 9
11. 11. (B) Either two polar or two non-polar liquids of diﬀerent coloring; the order in which these will be added in the transparent container matters, such that: • If the colors mix, then the second liquid (that was added) has a higher density than the ﬁrst; • If the colors don’t mix, then the second liquid has a lower density than the ﬁrst one. 10
12. 12. Food coloring A food coloring is any substance that is added to food or drink to change its color. 11
13. 13. The experiment The density of water is dependent on the dissolved salt content, as well as the temperature of the water. 12
14. 14. Water changes its density in respect to its temperature, but not on a linear scale, and not even continuously in one direction. Temperature (◦C) Density (kg/m3) +100 958.4 +80 971.8 +60 983.2 +40 992.2 +30 995.6502 +25 997.0479 +22 997.7735 +20 998.2071 +15 999.1026 +10 999.7026 +4 999.9720 0 999.8395 13
15. 15. Density is weight divided by volume. The density of fresh water is 1 gram (mass) per cubic centimeter (volume). In other words, if you had a cube with the dimensions: 1cm x 1cm x 1cm; and ﬁlled it with pure water, that cube of water would weigh 1 gram. This density is expressed as 1g/cm3. If you dissolve salt into the water, the salt will increase the ﬂuid’s mass, while its volume will remain the same. Thus, the liquid’s density will increase. 14
16. 16. Determine the density of tap water 1. Measure the mass of the empty graduated cylinder; record its weight; 2. Fill the cylinder with water to the 100ml line; this is the volume; 3. Measure the mass of the cylinder with water; 4. Subtract the mass of the cylinder from the mass of the ﬁlled cylinder and divide the mass of the water by its volume; this will yield the density of the top water. 15
17. 17. Determine the density of tap water with salt 1. Use an eyedropper to remove 2g(2ml) of water from the cylinder; 2. While the cylinder is on a scale, add 2g of salt; 3. Read the new water level inside the cylinder; this is the new vol- ume; 4. Divide the mass of the water inside the cylinder by its new volume; this is the density of the salt water. 16
18. 18. Formulas mtap−water ρtap−water = (2) Vtap−water where V = 100ml. mtap−water + msalt ρliquid = (3) Vtap−water under the assumption that the volume is constant after the salt dis- solves, such that msalt = ρliquid ∗ Vtap−water − mtap−water . (4) 17
19. 19. Preparation 18
20. 20. The scale 19
21. 21. The containers (bottles) 20
22. 22. The 250ml cup 21
23. 23. Food coloring 22
24. 24. Measured each container with and without water inside 23
25. 25. Measured 21g and 42g of salt 24
26. 26. First experiment Mix two solutions of diﬀerent densities (i.e. ρ1 = 0.984g/ml and ρ2 = 1.048g/ml). 25
27. 27. Red container (ρ1 = 0.984g/ml) and Blue container (ρ2 = 1.048g/ml) 26
28. 28. Red container has 250ml of tap water and 3g of red coloring, while the Blue container has 250ml of tap water plus 21g of salt and 3g of blue coloring. 27
29. 29. Overview of the prepared solutions Container Weight Water Salt Food Coloring Density 188 − 189g 1 250ml 0g 3g of Red 0.984g/ml 20 − 21g 2 192g 250ml 3g of Blue 1.048g/ml 28
30. 30. Pour Blue liquid (heavier) ﬁrst and Red liquid second 29
31. 31. As expected, the liquids do not mix! The Blue liquid is heavier than the Red liquid, making the number 1.048(ρ1) > 0.984(ρ2) 30
32. 32. Reverse order: Pour Red liquid ﬁrst and Blue liquid second (heavier) 31
33. 33. Again as expected, the liquids mix because the Blue liquid is heavier than the Red liquid and goes to the bottom of the container. 32
34. 34. Second experiment Mix three solutions of diﬀerent densities (i.e. ρ1 = 0.984g/ml, ρ2 = 1.048g/ml, and ρ3 = 1.148g/ml). 33
35. 35. Red container (ρ1 = 0.984g/ml), Blue container (ρ2 = 1.048g/ml), and Orange container (ρ3 = 1.148g/ml) 34
36. 36. Red container has 250ml of tap water and 3g of red coloring, the Blue container has 250ml of tap water plus 21g of salt and 3g of blue coloring, while the Orange container has 250ml of tap water plus 42g of salt and 3g of yellow coloring. 35
37. 37. Overview of the prepared solutions Container Weight Water Salt Food Coloring Density 188 − 189g 1 250ml 0g 3g of Red 0.984g/ml 20 − 21g 2 192g 250ml 3g of Blue 1.048g/ml 3 193g 250ml 42g 3g of Orange 1.148g/ml 36
38. 38. 1. Orange, Blue, Red 2. Blue, Orange, Red 3. Blue, Red, Orange 4. Orange, Red, Blue 5. Red, Blue, Orange 6. Red, Orange, Blue 37
39. 39. 1. Poured in the following order: Orange, Blue, Red 38
40. 40. 2. Poured in the following order: Blue, Orange, Red 39
41. 41. 3. Poured in the following order: Blue, Red, Orange 40
42. 42. 4. Poured in the following order: Orange, Red, Blue 41
43. 43. 5. Poured in the following order: Red, Blue, Orange 42
44. 44. 6. Poured in the following order: Red, Orange, Blue 43
45. 45. As expected, the solutions do not mix only when poured in the Or- ange, Blue, and Red order since the numbers validate the 1.148 > 1.048 > 0.948 ordering. 44
46. 46. Limits • On the interval of the accepted values; • On the number of decimals; • On the distance (e.g. equality) between the numbers. 45
47. 47. The interval of the accepted values • Hydrogen has the lowest density of all elements, measured at 0.00008988g/ml; • Hassium has the highest density of all elements, estimated at 41g/ml. 46
48. 48. The interval of the accepted values (2) • Ether has the lowest density of all liquids, measured at 0.07272g/ml; • Iodine has the highest density of all liquids, measured at 4.92728g/ml. 47
49. 49. The interval of the accepted values (3) Even if we don’t have an exact match for our number (i.e. a liquid of that exact density), we can prepare such a liquid by dissolving a solute in the closest (i.e. lowest) density solvent. Thus, we can sort an interval – we can sort an inﬁnity of numbers. 48
50. 50. The precision of the values Ideally, we can compare numbers of any precision as long as we have an ideal scale to measure the weights and calculate the densities. Practically, we’ll probably be able to work only with numbers (i.e. densities) as precise as to the 5th decimal (it greatly depends on the scale). 49
51. 51. Conclusion By associating (manufacturing) a coloured liquid of a speciﬁed density to each number to be sorted, we can use this unconventional liquid sort method to order the given numbers. 50
52. 52. ? Questions Vali Borza – vali@borza.ro 51