Search The Web

Today's Headlines

Wednesday, December 30, 2009

Vedic Mathematics Lesson 33: Multiple Mergers

In the previous lesson, we learned how to identify the most general form of an equation that can be solved using a merger operation. In general, such equations have two terms on the left hand side and one term on the right hand side. In this lesson, we will extend the methodology to some equations that have more than two terms on the left hand side.

You can find all the previous posts about Vedic Mathematics below:

Introduction to Vedic Mathematics
A Spectacular Illustration of Vedic Mathematics
10's Complements
Multiplication Part 1
Multiplication Part 2
Multiplication Part 3
Multiplication Part 4
Multiplication Part 5
Multiplication Special Case 1
Multiplication Special Case 2

Multiplication Special Case 3
Vertically And Crosswise I
Vertically And Crosswise II
Squaring, Cubing, Etc.
Division By The Nikhilam Method I
Division By The Nikhilam Method II
Division By The Nikhilam Method III
Division By The Paravartya Method
Digital Roots
Straight Division I
Straight Division II
Divisibility Rules
Simple Osculation
Multiplex Osculation
Solving Equations 1
Solving Equations 2
Solving Equations 3
Solving Equations 4
Mergers 1
Mergers 2
Mergers 3

To set the stage, consider an equation of the type below:

3/(x + 2) + 2/(x + 1) + 4/(x + 7) = 9/(x + 4)

We see that there are not two, but three terms on the left hand side of the equation, but there is only one term on the right hand side of the equation. Moreover, the sum of numerators on the left hand side (3 + 2 + 4) is equal to the numerator on the right hand side (9). Also, the coefficients of the unknown in all the terms is unity.

Now, look at the series of manipulations below:

3/(x + 2) + 2/(x + 1) + 4/(x + 7) = 9/(x + 4) becomes
3/(x + 2) - 3/(x + 4) + 2/(x + 1) - 2/(x + 4) + 4/(x + 7) - 4/(x + 4) = 0 becomes
3*(x + 4 - x - 2)/[(x + 2)*(x + 4) + 2*(x + 4 - x - 1)/[(x + 1)*(x + 4) + 4*(x + 4 - x - 7)/[(x + 7)*(x + 4)] = 0 becomes
[1/(x + 4)] * [3*2/(x + 2) + 2*3/(x +1) -4*3/(x + 7)] = 0 becomes
6/(x + 2) + 6/(x + 1) - 12/(x + 7) = 0 becomes
6/(x + 2) + 6/(x + 1) = 12/(x + 7)

We now see that the right hand side term has been merged with the left hand side, and we are left with an equation that is once again capable of undergoing another merger to get the solution (the numerators on the left hand side, 6 and 6, add up to the numerator on the right hand side, 12, and the coefficients of the unknown in all three terms are unity again).

Performing the merger operation on the resulting equation gives us a final equation of:

30/(x + 2) + 36/(x + 1) = 0

This then gives us a solution of x = -17/11. One can verify that this indeed is the correct solution to both the original given equation as well as the intermediate equations derived after the first and second mergers.

Since the solution procedure for the given equation involved performing two mergers one after the other, this procedure is referred to as a multiple merger. In fact, under the right conditions, it is possible to string together any number of mergers to solve an equation. The question then becomes: what are the right conditions?

To answer that question, let us consider a general equation as below:

p/(x + a) + q/(x + b) + r/(x + c) = s/(x + d)

Let us now assume that p + q + r = s. Thus we can perform a merger operation to begin with, and eliminate s and d, giving us:

p*(d - a)/(x + a) + q*(d - b)/(x + b) + r*(d - c)/(x + c) = 0

To be able to perform a second merger and solve the equation, the condition that has to be satisfied is as below:

Either p*(a - d) = q*(d - b) + r*(d - c) or
q*(b - d) = p*(d - a) + r*(d - c) or
r*(c - d) = p*(d - a) + q*(d - b)

If any of the above conditions are satisfied, then a second merger can be performed and the equation can be solved using merger. Assuming the third condition is satisfied, we can rewrite the equation after the first merger as below:

p*(d - a)/(x + a) + q*(d - b)/(x + b) = r*(c - d)/(x + c)

Because the third condition is true, we know that the sum of the numerators on the left hand side of the above equation is equal to the numerator on the right hand side of the equation. Therefore, we can perform another merger operation to eliminate r*(c - d) and c. This will give us:

p*(d - a)*(c - a)/(x + a) + q*(d - b)*(c - b)/(x + b) = 0

This can then be solved using the formula we derived in the first lesson on mergers here.

The extension of this methodology to more than 2 mergers must now be obvious to the reader. At each step, after the performance of a merger, the remaining terms must satisfy the conditions for another merger to be performed. The conditions imply that the sum of all but one of the terms must be equal to the negative of one of the terms. Depending on which term is thus isolated, a merger would once again be performed on the equation until the equation is reduced to two terms, at which point it can be solved using the formula we derived earlier.

Checking for these conditions to be satisfied when the number of terms increases becomes more and more difficult, and it may not be possible to do this mentally without a whole lot of practice. This lesson is therefore more of an exploration of the possibilities rather than a concrete series of mental steps to solve equations using this method.

However, it may be worth going through the first few steps of a merger operation just to see if the equation can be solved with much less effort than the process of cross-multiplying, expanding out all the terms, etc. If the merger works out, even if it is not fully successful all the way down to getting the equation down to two terms, any terms that are eliminated are terms you don't have to consider when solving the equation manually using the process of cross-multiplication, expansion and collection of terms, etc. And a few eliminated terms also reduces the degree of the resulting equation when you expand the equation out fully, and that also reduces the effort involved in solving it.

If you are even more adventurous, note that this method works when the coefficients of the unknown are all the same, but not unity in each of the terms of the given equation. The final equation we get would then be solved using the formula we derived in this earlier lesson.

Moreover, the equation may also require some preliminary transformation, as we have seen in the previous lesson, before a merger can be attempted. Unfortunately, these will almost surely make the equation too complicated to attempt to solve mentally, so I am not going to delve into these in detail. The mechanics of these operations have been explained in detail in previous lessons, so it is possible to extend and apply the tests and transformations we derived earlier on paper to simplify the equation before solving it mentally as a final step. Good luck, and happy computing!

And I wish you all a very happy and prosperous new year too!!

Friday, December 25, 2009

Distraction Causes Destruction - A Few Examples

A Very Merry Christmas to everyone! Hope all your wishes for this Christmas and the new year come true!!
Christmas Wishes

Sometimes, you take your eyes off something for just an instant, and wouldn't you know it, something bad has to happen in that instant! Here are some examples of what happens when action precedes thought or your thoughts are too far ahead of your actions! Enjoy!!

Truck towing boat drives off road
Falling tree crushes truck
Overturned tank
Plane tries to land on closed runway
Car with horse through windshield
Forklift falls off loading dock
Heavy machinery crushes truck
Boat hits marker
And the problem does not afflict just humans, either!

Ducklings fall into storm drain through grate

Wednesday, December 23, 2009

Vedic Mathematics Lesson 32: Mergers 3

In the previous lesson, we learned about the generalized form of merger operation on linear equations. We also learned in that lesson the formula for solution of the general form of the equation on which a merger operation can be performed so that we can solve the equation quickly without going through the process of solving the equation from first principles. In this lesson we will look at some equations that do not seem to fit the form of equation that can be handled by a merger, but which actually do after some simple transformations.

You can find all the previous posts about Vedic Mathematics below:

Introduction to Vedic Mathematics
A Spectacular Illustration of Vedic Mathematics
10's Complements
Multiplication Part 1
Multiplication Part 2
Multiplication Part 3
Multiplication Part 4
Multiplication Part 5
Multiplication Special Case 1
Multiplication Special Case 2

Multiplication Special Case 3
Vertically And Crosswise I
Vertically And Crosswise II
Squaring, Cubing, Etc.
Division By The Nikhilam Method I
Division By The Nikhilam Method II
Division By The Nikhilam Method III
Division By The Paravartya Method
Digital Roots
Straight Division I
Straight Division II
Divisibility Rules
Simple Osculation
Multiplex Osculation
Solving Equations 1
Solving Equations 2
Solving Equations 3
Solving Equations 4
Mergers 1
Mergers 2

Consider an equation like the one below:

(2x - 4)/(x - 3) + (3x + 13)/(x + 2) = (5x + 34)/(x + 5)

We find that this equation does not have the standard form of an equation that can be solved using a merger operation. The numerators are not constants, and the sum of numerators on the left hand side of the equation is not the same as the sum of numerators on the right hand side of the equation.

However, consider the set of transformations below:

(2x - 4)/(x - 3) + (3x + 13)/(x + 2) = (5x + 34)/(x + 5) becomes
(2x - 6 + 2)/(x - 3) + (3x + 6 + 7)/(x + 2) = (5x + 25 + 9)/(x + 5) becomes
(2x - 6)/(x - 3) + 2/(x - 3) + (3x + 6)/(x + 2) + 7/(x + 2) = (5x + 25)/(x + 5) + 9/(x + 5) becomes
2 + 2/(x - 3) + 3 + 7/(x + 2) = 5 + 9/(x + 5) becomes
2/(x - 3) + 7/(x + 2) = 9/(x + 5)

Now we see that the equation does indeed have the structure required for it to be solved by the merger method since the sum of the numerators on the left hand side is equal to the numerator on the right hand side. We can then readily apply the formula and say that x = [2*2*(-3 - 5) - 3*7*(2 - 5)]/[2*(5 + 3) + 7*(5 - 2)] = 31/37. One can verify easily (OK, not that easily, to be perfectly honest) that this is indeed the correct solution to the given equation.

However, suppose we are given an equation of the general form (ax + b)/(cx + d) + (ex + f)/(cx + g) = (hx + j)/(cx + k). How are we to know that this equation can actually be transformed into a form that can be solved using the merger operation? There are two tests we can conduct to tell us whether the transformation will be successful.

The first test is very simple: we simply have to verify that a/c + e/c = h/c. In other words, after taking out the common factor c, we have to check if a + e = h. If this first test is passed, we then move on to the next test. For this test, we calculate the following three quantities:

Let us call p = (b - ad/c)
Let us call q = (f - eg/c)
Let us call r = (j - hk/c)

If p + q = r, then the second test is passed and the equation can be solved using merger. In other words, our next test is to see if (b - ad/c) + (f - eg/c) = (j - hk/c). Simplifying this, we can rewrite the condition as follows: If bc - ad + fc - eg = jc - hk, then the equation can be solved using merger.

You will notice that each of the terms in the equation above is simply a cross-multiplication between the coefficient of the unknown and constant term in the numerator and denominator of each term of the given equation. This makes the test quite easy to remember.

To solve the equation, we simply transform the equation as below, and then apply the standard formula for solving the equation using merger from the previous lesson:

(b - ad/c)/(cx + d) + (f - eg/c)/(cx + g) = (j - hk/c)/(cx + k)

Why do these tests and the subsequent transformation work? We can answer that question by taking the first term of the given general equation and doing a transformation on it as below:

(ax + b)/(cx + d) becomes
[(a/c)*(cx + d) + b - ad]/(cx + d) becomes
(a/c)*(cx + d)/(cx + d) + (b - ad)/(cx + d) becomes
a/c + (b - ad/c)/(cx + d)

This general procedure can then be applied to all the terms. This transformation applied to the second term will give us e/c + (f - eg/c)/(cx + g). The third term, similarly, can be transformed to h/c + (j - hk/c)/(cx + k). Thus the entire equation can be rewritten as below:

a/c + (b - ad/c)/(cx + d) + e/c + (f - eg/c)/(cx + g) = h/c + (j - hk/c)/(cx + k)

From the first test, we know that a + e = h (which implies that a/c + e/c = h/c). This means that the constant terms on both sides of the equation cancel out. This then leaves an equation with constant numerators as below:

(b - ad/c)/(cx + d) + (f - eg/c)/(cx + g) = (j - hk/c)/(cx + k)

The second test then tells us that the sum of the constant numerators on the left hand side is equal to the constant numerator on the right hand side. Thus, if the two tests are passed, we can perform a merger on the resulting equation and solve it using the formula we derived in the previous lesson for the merger method.

Let us apply the steps above to an example to make sure we are clear about the application of the tests and transformations involved. Take the equation below:

(6x + 10)/(3x + 4) + (3x + 3)/(3x - 1) = 9x/(3x - 2)

Now, we see that a = 6, e = 3, and h = 9. Since a + e = h, the equation passes the first test. For the second test we calculate the following quantities:

bc - ad = 10*3 - 6*4 = 6
fc - eg = 3*3 - 3*(-1) = 12
jc - hk = 0*3 - 9*(-2) = 18

Since 6 + 12 = 18, we can say that the second test is passed. Therefore, we now apply the transformation and get a new equation as below:

2/(3x + 4) + 4/(3x - 1) = 6/(3x - 2)

This then can be solved by application of the formula derived in the previous lesson by setting p = 2, q = 4, a = 3, b = 4, c = -1 and d = -2. The solution is x = -1/12. One can verify this by substituting it either in the given equation or in the intermediate, transformed equation.

Now, consider a different equation as below:

1/(2x + 1) + 2/(3x + 1) = 7/(6x + 7)

In this case we see that the coefficients of the unknown terms are not the same in each of the three terms. Moreover, the sum of numerators on the left hand side does not match the numerator on the right hand side. Thus, this equation does not seem to fall under the merger type of equation. However, notice that the equation above can be rewritten as below:

3/(6x + 3) + 4/(6x + 2) = 7/(6x + 7)

Now, we notice that the sum of the numerators on the left hand side is equal to the numerator on the right hand side (3 + 4 = 7), and also, the coefficient of the unknown quantity in all terms of the equation is the same (6). So, the equation actually is capable of being solved using merger.

How do we then look at any equation of the general form a/(bx + c) + d/(ex + f) = g/(hx + j), and decide whether a merger is possible. In this case, there is just one simple test that will tell us all we need to know.

For this test, calculate a/b, d/e and g/h. If a/b + d/e = g/h, then the test is satisfied.

To solve the equation, transform the equation as below:

(La/b)/(Lx + Lc/b)] + (Ld/e)/(Lx + Lf/e) = (Lg/h)/(Lx + Lj/h), where L is the LCM of b, e, and h.

Because a/b + d/e = g/h, we know that La/b + Ld/e = Lg/h. Thus, the equation is now in the standard form that is required for solution by merger. Just apply the formula derived in the previous lesson on this transformed equation, and we are done.

Let us apply the steps above to an example to make sure we are clear about the application of the test and transformation involved. Take the equation below:

4/(4x + 1) + 3/(2x - 3) = 15/(6x + 5)

We verify that 4/4 + 3/2 = 15/6. Therefore, the equation can be solved using merger. We then calculate the LCM of 4, 2 and 6 as 12. We can then write the transformed equation as below:

12/(12x + 3) + 18/(12x - 18) = 30/(12x + 10)

We can then apply the merger formula after setting p = 12, q = 18, a = 12, b = 3, c = -18 and d = 10. We get the solution as x = 0. This is trivial to verify as the correct solution in either the original given equation or the transformed, intermediate equation.

The third type of equation we may encounter, as you may have guessed by now involves a combination of both transformations we have dealt with so far. Take an equation like the one below:

(2x - 1)/(x - 1) + (3x + 7)/(3x + 4) = (6x + 7)/(2x + 1)

This can be transformed as follows:

(2x - 2 + 1)/(x - 1) + (3x + 4 + 3)/(3x + 4) = (6x + 3 + 4)/(2x + 1) which then becomes
(2x - 2)/(x - 1) + 1/(x - 1) + (3x + 4)/(3x + 4) + 3/(3x + 4) = (6x + 3)/(2x + 1) + 4/(2x + 1) becomes
2 + 1/(x - 1) + 1 + 3/(3x + 4) = 3 + 4/(2x + 1) becomes
1/(x - 1) + 3/(3x + 4) = 4/(2x + 1) becomes
6/(6x - 6) + 6/(6x + 8) = 12/(6x + 6)

We now recognize that the equation is suitable for solution using merger. We get the solution as x = -17/4. But how are we to recognize that the equation is even suitable for solution using merger?

Once again, let us take the generalized form of the equation as below:

(ax + b)/(cx + d) + (ex + f)/(gx + h) = (jx + k)/(mx + n)

The tests we need to apply are going to be a combination of the tests we devised earlier. The first test is to check whether a/c + e/g = j/m. If this test is satisfied, we then proceed to the second test. The second test is also very straightforward. Calculate the following quantities:

p = (bc - ad)/c^2
q = (fg - eh)/g^2
r = (km - jn)/m^2

If p + q = r, then the second test is also satisfied. To solve the equation, simply transform it as below, and then apply the formula derived in the previous lesson for solving an equation using merger:

[L*(bc - ad)/c^2]/(Lx + dL/c) + [L*(fg - eh)/g^2]/(Lx + hL/g) = [L*(km - jn)/m^2]/(Lx + nL/m)

In the above equation, L is the LCM of c, g and m.

Why does the above transformation work?

Let us take the term (ax + b)/(cx + d). This can be transformed as below:

(ax + b)/(cx + d) becomes
[(a/c)*(cx + d) + b - ad/c]/(cx + d) becomes
a/c + (b - ad/c)/(cx + d) becomes
a/c + [(L/c)*(bc - ad)/c]/(Lx + dL/c) becomes
a/c + [L*(bc - ad)/c^2]/(Lx + dL/c)

Applying a similar transformation to the other two terms gives us:

e/g + [L*(fg - eh)/g^2]/(Lx + hL/g) for the second term, and
k/m + [L*(km - jn)/m^2]/(Lx + nL/m) for the third term.

Now, we know from the first test that a/c + e/g = k/m. Therefore, the constant terms that are added to each of these transformed terms cancel out on both sides of the equation. We are left with:

[L*(bc - ad)/c^2]/(Lx + dL/c) + [L*(fg - eh)/g^2]/(Lx + hL/g) = [L*(km - jn)/m^2]/(Lx + nL/m)

We know from the second test that (bc - ad)/c^2 + (fg - eh)/g^2 = (km - jn)/m^2. In the equation above, these are numerators of the three terms (they are all multiplied by L, which does not make a difference to the equality). Also, the coefficient of the unknown in all three denominators is L. This then tells us that the equation is now in a form on which the merger formula can be applied directly to find the answer.

We will now conclude this lesson by applying this last set of tests and transformations to an example equation. Let us take the following equation:

2x/(2x - 1) + (8x + 13)/(4x + 5) = (12x + 8)/(4x + 1)

We apply the first test and confirm that 2/2 + 8/4 = 12/4.

We then calculate p = (bc - ad)/c^2 = 2/4 = 1/2, q = (fg - eh)/g^2 = 12/16 = 3/4, and r = (km - jn)/m^2 = 20/16 = 5/4. We can tell that p + q = r since 1/2 + 3/4 = 5/4. Therefore, we can tell that the equation satisfies both the tests that are required for solution using merger. We now calculate the LCM of 2, 4 and 4 as 4. Using this as L, we can write the transformed equation as below:

2/(4x - 2) + 3/(4x + 5) = 5/(4x + 1)

We now set p = 2, q = 3, a = 4, b = -2, c = 5 and d = 1, and apply the formula we derived in the previous lesson for solving an equation using merger. We then get the solution x = 9/4. It is easy to verify that this is indeed the correct solution of the given equation as well as the transformed, intermediate equation above.

This lesson has involved a lot of algebraic manipulation and transformation of equations. This can be confusing at first, but the principles are quite basic, and practice will enable one to perform the tests and transformations on the fly without hesitation. Good luck, and happy computing! And a very Merry Christmas to all too!!

Monday, December 21, 2009

Microsoft Access Tips & Tricks: Histograms

In this lesson, we will deal with the creation of histograms from a large quantity of data. If you are interested, you can find my earlier lessons on finding the median, the mode, the geometric and harmonic means, ranking every row in a query, selecting random rows out of a table, calculating running sums and averages, and calculating running differences.

The final result of a query that produces a histogram would be a set of ranges of values and the number of observations of a given field that fall in each range. If your data consists entirely of whole numbers, and you don't need histogram buckets of different sizes, Microsoft Access actually provides a built in function that can be very useful to create histograms very easily.

That function is the partition() function. You can read about partition() in the Access online help files. As you can see, you just pass it a number and tell the partition function where your buckets start, where they end and how large each bucket is to be. Access takes care of the rest, and slots your number in the appropriate bucket.

To use the function in a query that produces the required histogram, you can write SQL like the below:

select partition(myField, Start, Stop, Interval) as Bucket
count(myField) as Frequency from myTable
group by partition(myField, Start, Stop, Interval)
order by 1
Here, we are counting the number of elements that fall into each bucket by using the group by clause on the buckets, and the aggregate function count(), on the field we want to bucket. We also print out the bucket boundaries for reference, and order the entire query by the bucket boundaries so that we have an output that looks like a normal histogram (though this will be one where the buckets are arranged up and down rather than across).

Some things to keep in mind here:
  • You have to provide appropriate Start, Stop and Interval values for use with the partition function
  • If your data falls below the Start Value, as mentioned in the help files, partition will create a bucket called " : Start - 1" and put the count of such data in that bucket
  • Similarly, if your data falls above the Stop Value, partition will create a bucket called "Stop + 1: " and put the count of such data in that bucket
  • Make sure the arguments to the two partition() functions are exactly the same. Otherwise, the results will obviously be wrong.
Some other things that will become apparent after you start using the SQL above:
  • The result will only include only buckets into which at least one value of myField falls. Thus, the list of buckets will include gaps unless the data is well-distributed across all the buckets
  • The bucket values will always start from the Start value provided and end at the Stop value provided (apart from the two catch-all buckets that catch data values above and below the range provided), and this may result in the last bucket being smaller than the other buckets
  • If your data contains any non-integer values, they will be truncated, and the resulting integer value will be bucketed
  • Each bucket will include all data values that are greater than or equal to the lower boundary value of the bucket, and that are less than or equal to the upper boundary value of the bucket.
These are some of the reasons why the partition() function may not be appropriate for your data. Your data may consist of non-integer data that you do not want truncated to fit in buckets. You may want buckets that are not equal in size across the entire range of values. If you have needs that can not be satisfied by use of the partition() function, it is time to devise your own solution. You may also need something other than the partition() function if you use a version of Access like Access 97, which does not have a partition() function built-in!

To create histograms under such circumstances, you have two choices. One is quick and easy to implement, but gets cumbersome after a while. The other solution involves creating an extra table in your database, but over the long run it is a lot more flexible and maintainable. We will explore both these solutions below.

The first solution is implemented using SQL as below:
select sum(iif(myField < B1max, 1,0)) as B1,
sum(iif(myField < B2max and myField >= B1max, 1,0)) as B2,
sum(iif(myField < B3max and myField >= B2max, 1,0)) as B3
from myTable
Here, we are using iif() to generate a 1 or 0 for each value of myField depending on whether it falls into a particular bucket or not. You can read about the iif() function and how to use it in the Access online help files here. Iif() evaluates its first argument and converts it into a boolean value. If the boolean value is TRUE, it returns the second argument, otherwise, it returns the third argument.

In this case, we return a 1 whenever a value in myField falls within a bucket. We return a zero for that value of myField from all other buckets. These 1's and 0's are then summed up using the aggregate function sum() to give us the bucket populations.

The bucket boundaries are defined by B1max, B2max, etc. and each value of myField falls into exactly one bucket if the bucket boundaries are set up correctly (and the SQL is coded correctly, obviously). You have to make sure that there are no gaps between the buckets and that bucket boundaries increase monotonically.

The simple rule being used in the SQL above is that if the value of myField is less than the upper limit of a bucket, and is greater than or equal to the upper limit of the bucket below, then it falls into this bucket. As you can see, it is very easy to change the conditions (make sure you change them in such a way that each value of myField can fall unambiguously into one and only one bucket) and also alter the bucket boundaries (and with the boundaries, the sizes change too). You can also add any number of buckets by expanding the SQL above and adding more lines to it (even though only 3 buckets are being created in the example above). Thus, the SQL above is quite flexible.

The following points have to be noted about the results of the SQL above:
  • The query produces one row of results that just contains the population of each bucket. That way, it is similar to a traditional histogram that goes from left to right. However, the query results do not reflect the bucket boundaries (unless you name the calculated fields appropriately instead of just as B1, B2, etc.), so make sure you remember them and document them somewhere
  • All the buckets are represented in the output, even if the population of a bucket is zero
  • If there are gaps in the bucket definitions and data falls into those gaps, the population of such data is not reflected in the query results
  • If there are overlaps between the bucket definitions and data falls into these overlapping ranges, they will be counted in all buckets that include that overlapping range
  • All data values in myField that are below the upper limit of the first bucket are counted in that bucket. As such, the range of the first bucket is negative infinity to B1max. You can set up a lower limit for the first bucket also by changing the SQL above, but you have to note that all data that falls below such a lower limit will not be counted in any bucket
  • All data values in myField that are above the upper limit of the last bucket are not counted in any bucket. You can create a catch-all final bucket with a very large upper limit to catch such very high values
  • You can leave the bucket boundaries as parameters instead of filling values while creating the query. This will create a parameter query which will accept user input of the bucket boundaries at run-time to create histograms that can be changed from run to run. However, if you have named the calculated fields after the bucket boundaries (instead of B1, B2, etc.), they will not change as the boundaries change, so be careful!
  • However, the number of buckets can not be changed without editing the actual SQL query. The user can provide bucket boundaries at run-time without knowing anything about SQL, but they can not reduce or increase the number of buckets without changing the query itself
The second way of creating histograms using SQL is to create a table of bucket boundaries, and then use a join between that table and your actual data table to create the histogram. The SQL for such an implementation is given below:

Select Bucket, Minimum, Maximum, count(*) as NumberCount from
(Select Buckets.Bucket, Buckets.Minimum, Buckets.Maximum, myTable.myField from
myTable inner join Buckets on
(myTable.myField >= Buckets.Minimum and myTable.myField < Buckets.Maximum))
group by Bucket, Minimum, Maximum
In this case, bucket boundaries are stored in a table named "Buckets". It consists of a field named Bucket (you can use this to store a bucket number or a description of the bucket depending on whether you create it as a numerical or text field), and two numerical fields named Minimum and Maximum to store the bucket boundaries.

The SQL above joins each value of myField from myTable with the appropriate bucket in Buckets by checking whether the value of myField is greater than or equal to the Minimum specified for that bucket and less than the Maximum specified for that bucket. It then groups all the results by Bucket, Minimum and Maximum so that each bucket in Buckets gets its own row. The aggregate function count(*) is used to produce the population of each bucket.

Note the following details about the SQL as implemented above:
  • This produces one row of results for each bucket that includes the bucket number or name (the Bucket field in Buckets), the minimum and maximum for that bucket, and the population of that bucket. So, this is a histogram that goes up and down rather than left to right
  • A value falls into a bucket only if it is greater than or equal to the minimum and is strictly less than the maximum. If you need a different rule to slot your values, you can modify the SQL above as appropriate
  • If the buckets have gaps between them, and data values fall into those gaps, they will not be counted in any of the buckets
  • Conversely, if buckets have overlapping ranges and data values fall into these overlapping ranges, they will be counted in all the buckets that have the overlap
  • Any value that falls below the lowest value of Minimum or highest value of Maximum will not be counted in any of the buckets. To avoid this you can create catch-all buckets at the top and bottom of the Buckets table
  • Only buckets that have any values in them will be reported in the query results. This is because of the inner join being used in the query. If you want the other buckets to be part of the output even though they have a population of zero, change the join type to a right join
I consider this last implementation the most flexible because the actual query does not have to be edited as the number of buckets or their boundaries change. If the user is provided a form through which they can edit the Buckets table, then this query can be used to produce customized histograms with any number of buckets the user desires. And the buckets can have any boundaries the user desires.

Hope this post has been helpful in solving any problems you might have had with constructing histograms out of your data in Access. If you have any problems or concerns with the queries in this lesson, please feel free to let me know by posting a comment. If you have other questions on Access that you would like me to address in future lessons, please feel free to let me know through your comments too. Good luck!

Sunday, December 20, 2009

A Slow Week

As the holidays approach, things are winding down at work, and all around me. Several of my colleagues have left on vacation. Projects have been put in suspension, to be revived in the new year. So, things slowed down considerably for me at work.

We had a bit of a thrill early in the week when one of our programs started spewing out nonsensical results for no discernible reason. I was the secondary person in charge of this program. One of my colleagues was the primary support person for this program. It was an old program, written about 6 years back. My colleague wrote parts of the program himself, so he dived right in and started debugging the program.

But the program was not in a mood to give up its secrets that easily. We went round and round in circles without being able to put our hands on the problem. After two days, we finally figured out that one of the inputs to the program, that comes from a mainframe system in fixed width format (the format in which there are no spaces between different items of data, you are just told that columns x through y represent some piece of data and y+1 through z represent some other piece of data, and so on), had changed format in a very subtle way. So, the program was reading garbage data based on the original format and producing garbage output. It turns out that our IT department had changed the format of the file the previous month and "forgot" to tell us. Nice going, but pretty much par for the course as far as our IT department is concerned!

It was also time for us to fill out documents listing our accomplishments for the year in preparation for annual reviews. In years past, the annual reviews used to take place in March or April of the next year, and we used to get goals for that year only at these reviews. It used to be a constant source of irritation for some, amusement for some others, that we got our goals for a year about a third of the way into that year!

Last time, the company changed practices drastically and had our reviews completed by March of this year. That was a whole 4 to 6 weeks earlier than it had been in years past. Continuing that trend, the goal this time around is to get our reviews completed by January of 2010. Thus, our managers had us complete our accomplishment documents before the end of December. Since I am off on vacation later in the month, I decided to complete my document this week.

As always, I managed to fill a pretty hefty 3 or 4 page document with truths, half-truths and lies about myself and what great things I accomplished during the year. I don't know whether I missed anything significant (things that happen early in the year sometimes get forgotten because I think they happened in the previous year, or they just completely skip my mind sometimes). My manager will review my document and let me know if something is off in the coming week. Hopefully, that is the only major thing that gets accomplished between now and the new year. I am just about ready for a break!

In the world of blogging, I continued my usual schedule of publishing by adding posts to my blog at regular intervals. This last week, I added a post on finding running differences using Access, a post on Vedic Mathematics about mergers, a review of the TomTom XL330S GPS, and a post on funny street signs depicting streets and other place names that might elicit snickers.

I also did some research, and added a way for people to subscribe to my posts using what is known as a feed. I have no experience with RSS, Atom and other services of this ilk, so the terminology was quite confusing. I managed to set it up, but in the process I accidentally created two feeds for my blog instead of one and created other such problems for myself. It turns out my blog already had a feed even though I don't remember setting it up in the first place, so I created another one. Then I had to figure out which one to get rid of because the earlier feed actually had subscribers, so if I deleted the wrong feed, I would have some pissed-off readers who might decide not to read my posts anymore! I ended up spending several hours sorting all this out.

I also figured out how to add a button that enables people to click on it and start "following" my blog. That button is part of widget that actually tells you how many followers there are. Some followers also have profile pictures that you can show off on your blog. It seems to be a good, visually appealing widget to add to your blog if you have one. You can get it by going into Layout->Page Elements in Blogger. Then click on "Add a Widget" and add the "Followers" widget to your blog. You can then place it wherever you like on the sidebar. Unfortunately, my blog does not have any followers right now, so there are no pretty pictures to show to visitors! Maybe somebody will take pity on me and start following me soon!!

During my research, I also found out about something called "page rank". Essentially search providers and other websites out there rank your website based on the popularity of your content as well as the number of other websites that link to your sites and various other criteria. There are then websites that provide you the results of this ranking in the form of widgets you can embed in your website to tout yourself.

After experimenting with several providers of such widgets, I created a bunch of widgets that show my Alexa page rank, my Google page rank, the number of back-links and indexed pages as reported by Google, Yahoo, MSN, etc. I don't know whether any of this makes a big difference, but I figured it wouldn't hurt. You can see these widgets in the left sidebar of the blog.

The Alexa page rank widget comes from Alexa itself. I found this other site called that provides a bunch of widgets related to page ranks. If you own a blog and are in any way concerned about your page ranks and tracking them, these widgets are probably a good way to start. They are not the most visually pleasing widgets, but they seem to be pretty fast, so they don't slow down the loading of the blog, and the information in them might be helpful to some. You can find several websites talking about your page rank and how to increase it by googling for terms like "improve page rank", "how is page rank calculated", etc.

My karate classes take a 2-week hiatus until the new year. I am done learning my black-belt kata, Seiyunchin. It is a complicated and confusing kata with a lot of unconventional moves that I have to keep practicing over and over again so that my body and brain get used to them. But that is pretty much the only thing standing between me and my black belt. My sensei has let me know that as soon as I feel confident that I can perform this kata without hesitation, he is ready to administer the black-belt test to me and see if he can promote me to Shodan.

Maybe 2010 is the big year as far as graduation from my karate class is concerned. I hope I will get some time to practice this kata in the coming days when I am not refreshing my memory of it in my karate class. Then, with some hard work, hopefully, I will be ready to take the test by March or so. My sensei has a reputation for pretty tough black-belt tests, so I have to make sure I don't become over-confident and end up failing in my first attempt because of not enough preparation. Either way, it looks like next year is going to be interesting in terms of my martial arts training! Wish me good luck!!

Now, as always, it is time to take care of various end of week chores before I head back to work tomorrow. I also have to start packing for my vacation, and make sure the rest of my family does not decide to take everything but the kitchen sink along in their suitcases! I will tell you how successful I was when I write after my vacation!!

Friday, December 18, 2009

Perhaps Someone Should Consider Renaming Some Of These!

These are some place names that would elicit fewer snickers if they were renamed to something a little more innocuous. One of the signs just needs to be reworded and doesn't even involve any renaming! In the meantime though, hope you enjoy a few snickers!!

Bat Cave Exit Sign
Sign for Jackass Aeropark
Sign for Bong Recreation Area
Sign for Purgatory
Mobi Ditch sign
Spread Eagle sign
Sign for Intercourse, Pennsylvania
Speed Hump Ahead sign
Sign for Climax High Point
Broomrape Lane sign
Cockburn Street sign
This last one should be named first before it is renamed, I guess!

Sign for street with no name

Thursday, December 17, 2009

First Impression Review Of TomTom XL 330S GPS

This is a review of one of the four GPS units I bought on Black Friday for evaluation. I have been using this one for the past week or so, so this review reflects my own personal experiences with this GPS unit.

Bought at: Best Buy
Price: $99.99 + tax
Discounts: None
Final Price: $99.99 + tax
TomTom XL 330S Special Edition On-The-Go Bundle Pack
Package Comes With: GPS Unit, 2 Car Chargers, USB Cord, User Manual, Windshield mount, Dashboard mount adhesive disk, GPS carrying case. The big outer box contains a car charger and the GPS carrying case along with a smaller inner box that contains everything else.

Screen: 4.3", Color, touchscreen. 480x272 pixels. The touchscreen is operated with fingers, and does not require any stylus of any kind (none is provided). The screen can get noticeably smudged after several uses.

Battery: Lithium ion, non-removable. Takes 4 hours to charge fully, can power the unit for about 3 hours of normal use.

Charger: Only car chargers provided. Straight, non-spiral cords. Plugs in through USB port in GPS unit. The car chargers were normal-sized, not too bulky. The USB port on the GPS unit is hidden in a recess, making it unnecessarily more difficult than it needs to be to plug the cord into it.

Maps: Provided by TeleAtlas. Covers all of the United States and Canada. Extensive POI database. Map updates are free for the first 30 days after purchase, later updates (available on a quarterly basis) can be purchased from TomTom.

Spoken Directions: Navigation directions are provided through on-screen as well as voice prompts. The speaker is on the back of the unit. It was reasonably loud. The GPS provides several choices of language and voice to choose from. The spoken directions do not include street names, if you choose a human voice though. If you choose a computer voice, you do get street names, but they sound very accented and can sometimes be hard to understand.

Keyboard: No physical keyboard. On-screen keyboard appears as and when needed. The on-screen keyboard can be set to ABC, QWERTY, or AZERTY mode depending on user preference.

Package: The unit comes in a small compact package that is easy to open (and repack). The GPS unit itself is about 4.7" x 3.3" x 1.0", and weighs 6.7 ounces.

User Manual: The user manual has the same information repeated in English, French, and Spanish, so it seems thick at first glance, but has only a few pages of relevant instructions in each language.

Mount: Comes with a windshield mount based on a suction cup, and a dashboard mount. The GPS mounts in the provided mount using a proprietary kind of mounting system called EasyPort.

Additional Capabilities: None (no bluetooth, MP3 playback, video player, etc.).

Detailed Review:

The unit was easy to unpack and relatively easy to set up. Once I plugged it into the car charger (this was actually a bit tricky since the USB port on this GPS unit is set in a recessed slot for some reason), I switched it on. It has some legalese to begin with (but you never see this again), then you go through a set of setup screens to set your basic preferences. You set the language (there is a choice of 25 different languages), the voice you want for prompts, etc.

After that, you are given the choice of setting home location (you can choose to enter an address, an intersection, choose a recent destination or point of interest as Home, enter a latitude and longitude, etc.). You are also provided the opportunity to join the TomTom MapShare Community when you set up the GPS, but you can skip these steps if you want to do them later.

This GPS unit has a huge number of options for doing any given task. For instance, there are 25 different types of preferences in the setup screens. This can be quite overwhelming and confusing. Most tasks require multiple inputs to reach the correct screen to accomplish. Sometimes it is difficult to remember how to accomplish a given task even though you know you have done it sometime in the past.

The user manual that comes with the device is completely inadequate, and is close to useless. Most of the screens are not mentioned in the user manual at all. The manual shows you the steps to set up and navigate a simple route, nothing more. But the unit is capable of such a lot more that even a detailed review like this would be inadequate to start exploring all of these capabilities.

By default, you are shown a map view with your current location marked on it. There are zoom buttons on the top left and right of this map view. However, the zoom is temporary, and after a few seconds of inactivity, the map zooms down to a default level. There is no scale on this map, so it is not easy to judge distances in the view of the map. If you are looking at the map while navigating a route, this view also includes the next turn direction and street, your current location, ETA, speed and other details. Tapping the bottom left of the map screen during navigation to a destination repeats the last instruction given by the GPS. The bottom right of this screen enables you to access the route summary screen (which is explained a little later).
TomTom XL 330S Map ScreenMap Screen

Tapping in the middle of the map screen takes you to the first page of the main menu. Here you can start navigating to a destination, find alternatives to the current route, find emergency information, add a favorite to your GPS, change preferences by going to the setup screens, or move on to the next page of the main menu. In the second page, you can prepare a route, browse the map, do corrections to the map, use "TomTom Services" or clear the current route if you are already navigating on a route.
TomTom XL 330S Main MenuMain Menu

When you choose to start navigating to a destination, you can pick a destination from among Home, favorites, an address, a recent destination, a point of interest, a point on the map, the position of the last stop or a given latitude/longitude combination. Addresses can be entered as a city center, a street and house number, a zip code or an intersection. Address entry always proceeds from the city name first (unless you choose zip code). If you know neither the city nor the zip code, you can not navigate to an address.
TomTom XL 330S Navigate To Screen"Navigate To" Screen

The POI database of the GPS is very extensive. It has more than 50 categories, that include border crossings, car dealerships, etc. You can make changes to this database by using the map corrections screen, making this database very powerful and versatile. Each POI also comes with a phone number, so you can use the GPS as a local yellow pages throughout the country!
TomTom XL 330S POI Categories ScreenPOI Categories Screen

After you pick the destination, the GPS calculates a route (there is a large number of preferences you can set in the setup screens to influence what kind of route is calculated), and shows you a route summary screen that has a map of the entire route. From the summary screen there are options to get details of the route calculated, or find alternates to the originally calculated route.

The details of the route can be presented in the form of text, or a series of images of the intersections ( to get a feel for what to expect in terms of road layout at each turn). The images are all map images, not real photographic images. You can also get a map browser with the route overlaid on it. The map browser allows you to pan and zoom the map as desired to get a feel for the environs of the route.

The details screen also allows one to see a demo of the route by simulating driving down the route. You can adjust the simulation speed from 10% of real-life (the simulation would take ten times as long as the actual calculated time according to the GPS) to about 5 times real-life speed (thus the simulation would be over in one-fifth of the calculated time, which can still be very long for long trips).

The GPS then starts giving you directions. You can choose from a number of voices to get directions in. If you choose a human voice, the directions include turn instructions, but do not include any street names. Turn instructions are first given about 1.5 miles before each turn, so when you turn onto a street on your route, if your next turn is more than 1.5 miles away, the GPS does not tell you what your next turn direction is going to be. You can look at the GPS screen to find this information, but there are no voice prompts. At the turn, you are given a voice prompt to turn in the appropriate direction.

If you are approaching a T-junction, the GPS tells you turn "at the end of the road", so there is an attempt to make the instructions as unambiguous as possible. But the lack of voice prompts that include the street name can be a disadvantage when there are many streets very close to each other or you are trying to navigate unconventional intersections that have more than two intersecting streets. The street name to turn on is provided on the GPS screen, so you can use that for guidance under such circumstances.

If you choose a computer-generated voice, then you can turn on the option of spoken street names. Many of the instructions and street names sound fine when spoken by the computer voice, but some of the street names sound accented and clipped. Some street names became almost unintelligible when pronounced by the computer!

By default, you are navigating to the destination from your current location, but instead of choosing to start navigating, if you choose to prepare a route, you can actually choose an origin and a destination independent of your current location and have the GPS map out a route for you. You can then go into the route details screen and get turn by turn directions for the route. You can even lay in a route from somewhere else to your current location, so after you reach that other location, you can choose to follow that route to where you started from instead of fiddling with the GPS at that other location.

This GPS also gives you the ability to lay in a route to multiple destinations in a row. You can add destinations using any method you prefer, then arrange the order in which you want to visit the destinations. The GPS then will start from the top and route you from one destination to the next until you reach the last one. Unfortunately, there is no way to just put in a bunch of destinations and have the GPS find the quickest or shortest route through all of them by rearranging them programmatically. The user has to enter the order in which the destinations are to be visited and the GPS unit will not alter it.

This itinerary planning function occupies the same space on the screen that was occupied by the icon for clearing the current route in the TomTom One 130 GPS unit (you can read my detailed review of that unit here). The option of clearing an existing route now exists only in the route details page of this GPS unit (which is accessed by tapping the bottom right of the map page while navigating a route).

You can modify any route calculated by the GPS by asking it to calculate an alternate based on different criteria (for instance, shortest instead of quickest). You can also get the GPS to route you around parts of the route or detours on part of a road. You can also add a waypoint and have the GPS calculate a route to your final destination via the waypoint.

If you choose to find emergency information, you are presented with a screen where you can choose to phone for help, drive to help, walk to help, find your current location or read information on first aid, car repair, etc. The POI database in this GPS contains emergency service providers like police stations, along with their phone numbers, so if you choose to phone for help, you can choose the kind of emergency service provider you need (police station, fire station, hospital, dentist, pharmacy, veterinarian, etc.), and the GPS provides you their phone number in addition to offering you the option of either navigating you there in your car or by walk.
TomTom XL 330S Help Me Screen"Help Me" Screen

The favorites list on the GPS can consist of places you might want to navigate to frequently. Favorites can be entered into the GPS the same way you enter destinations for routing. The manual does not mention how many favorites the GPS can store. There is no separate address book in the GPS, so the favorites doubles as the address book.

If you choose to browse the map, you get a map with a sliding zoom control. You can pan the map in any direction by dragging it in different directions with your fingers. You can use the sliding zoom control to control how much or how little you want to see. This map has a scale on it, so you can actually zoom out until the whole of the US is visible and use the scale to estimate distances between different locations.

The map corrections screen enables you to make modifications to your local copy of the map and POI database. You can change one-way and turn restrictions, add or remove POI's, change street names, change road speed limits and report other errors. You are encouraged to share your map corrections with other members of the TomTom Community. The corrections are verified and made part of the "approved" corrections, which you can choose to download to your own GPS at any time.

TomTom Services consists of several optional services that require accessories. They include weather, traffic, fuel price information, etc. Some of the services such as fuel price information require a subscription rather than a physical accessory.

The setup screens (there are 5 of them), as mentioned earlier enable you to change preferences in 25 different categories. You can change the color schemes used, the languages used, set up safety preferences (warn you when you drive over the speed limit, etc.), change the voice and its volume or mute it, change the map display, change the defaults used to calculate routes, set a password so that personal data is protected, set units, change keyboard preferences, etc.TomTom XL 330S Setup Screen
Setup Screen

Most of these options are self-explanatory, so they require no great explanation. However, the user manual does not even mention these, letting users stumble upon them, and discover them by trial and error. A more detailed user manual that talks at least about the presence of these capabilities would have been helpful. On the setup screens is an option to take some basic tours of the functionality of the GPS unit. These tours are not very detailed, but they can help a novice get started on using the basic functionalities of the GPS. More extensive online help would have been ideal.

Most of screens on this GPS have a "Done" button that dumps you directly back on the map screen. There are no "Back" buttons to unwind the screens one by one if you navigated through a series of them from the map screen to where you currently are. This can be quite irritating, especially when setting up options, because every time you finish setting up an option, you are taken back to the map screen and have to repeat multiple keystrokes to get back to continue setting up options. There are a few screens though, where hitting "Done" takes you back to some intermediate screen rather than the map screen. Some consistency in user interface design with separate back and home buttons would have been helpful in avoiding possible user confusion and frustration.

When you switch off the GPS, and later switch it on, the GPS opens up at the screen where it was switched off. Thus, if you were in the middle of planning a route when you were called off and had to switch the unit off, you can resume right where you left off just by switching the unit back on.

The windshield mount uses a suction cup that is quite secure. However, the GPS is mounted on this suction cup using what TomTom calls "the EasyPort". This consists of a circular disk on the back of the GPS that fits tightly inside a circular ring on the mount. The GPS snaps into this ring securely, and is quite difficult to take out. Perhaps, I was not following the right technique for doing this, but it certainly seemed as if mounting and unmounting the GPS using this mount was quite difficult. Perhaps the advantage lies in the fact that the mount is much more secure than simple slide in/slide out kinds of mounts, but the chore of using this mount on a daily basis would tempt most people to leave the GPS mounted in their vehicle, which could be dangerous.

The dashboard mount simply consists of a plastic base that is supposed to be affixed to the dashboard with its own adhesive backing. The windshield mount's suction cup is then affixed to this plastic base. I did not test the dashboard mount since it is not clear how easy it would be to remove the plastic base off the dashboard once it is affixed there.

The carry case is somewhat hard-sided and has a zipper along three sides of it to open and close it. The opening is very narrow even when the zipper is unzipped all the way around, so you have to struggle a little to put the GPS in. Nice as the manufacturer was in providing an extra car charger for the unit, the carrying case does not have any space to store anything besides the GPS unit, so I have no idea how one is supposed to carry the charger around. And it would have been far better to provide a car charger and perhaps a regular charger that can charge it off a regular outlet too.
TomTom XL 330S With Carrying CaseCarry Case with GPS Unit


The Good
  • Excellent screen (good colors, etc.), but the touch sensitivity was a little suspect and some actions required repeated poking at the screen to activate
  • Huge number of POI's, categorized for easy access and search. POI's have phone numbers making the GPS a mobile yellow pages
  • Maps for all of the US and Canada
  • Ability to modify the map to a limited extent by blocking and/or unblocking roads, changing the direction on one-way streets, adding items to the POI database etc.
  • Ability to share your changes with a community of users and take advantage of the community's changes
  • Free map updates for 30 days (updates are issued quarterly and any updates after the first 30 days have to be paid for)
  • Multiple languages and voices to choose from. Directions include street names when you choose a computer voice for guidance. They do not include street names if you choose a human voice
  • Ability to enter a destination as a set of coordinates with latitude and longitude
  • Can route to a series of destinations whose order is determined beforehand by the user. You can also add a stopover destination to an existing routing. Itinerary planning however does not involve the GPS figuring out the best order of destinations
  • Very extensive set of options to fine-tune every aspect of use of the GPS. This can be an advantage if you are into tinkering with the gadget and getting the most out of it. It can be a disadvantage because it can be confusing and distracting
  • You have the ability to simulate driving on your route once you have put in your destination. This can be a useful trip-planning exercise when you are going somewhere unfamiliar over unfamiliar roads. The simulation speed can be varied from real-time to about 5 times as fast as real-time. Unfortunately, there is no way to just have the simulation go from turn to turn without navigating each road in full
  • Ability to navigate in pedestrian (no one-way or turn restrictions, avoid freeways) or bicyclist (all restrictions obeyed, but freeways avoided) mode
  • Basic functionality explained through quick function tours loaded on the GPS itself, and accessible through the setup screens
  • Information about first aid and car repair in the help section of the GPS
  • Address book to store frequently visited locations (the manual, however, does not mention what the capacity of the address book is, or even whether it has one)
  • Reasonably loud speaker that can be heard over road noise, radio, etc.
  • Choice of voices and directions in different languages
  • Has emergency locator to find nearest police station, hospital, repair shop, etc, along with phone numbers
  • Power supply through USB port rather than proprietary plug (this may be important because third party power supplies are available for this architecture)
  • Comes with extra car charger and a carrying case for the GPS unit (but unfortunately, there is no space for the extra car charger in the carrying case)
  • Ability to take real-time traffic and weather input even though it requires the purchase of a separate product
  • Can guide you to the cheapest gas prices around if you subscribe to the fuel price service of TomTom
The Bad
  • The touch-sensitive screen sometimes required repeated attempts to get some things accomplished. I don't know whether my particular unit had a problem or this is a problem with the model in general
  • No street names in the spoken directions if you choose a human voice (this can be a big problem when there are cross-streets very close to each other, or if there are more than 2 streets at an intersection). The street names are on the GPS display, but not said out loud
  • Street names can come out accented and unintelligible if you choose a computer voice for guidance
  • No announcement of next turn until you are within 1.5 miles of it
  • No nice-to-have features like parked car locator
  • No scale on map display. There is a scale if you choose to browse the map
  • The user interface can be somewhat confusing and intimidating because of the large number of screens and options
  • Easyport mount is a little tricky to take the GPS in and out of (even though the GPS is very secure once it is mounted in it)
  • Very basic user manual (though it is in 3 languages, making it more bulky than it needs to be). Most functions are not fully explained, or even mentioned. This makes the extensive capabilities of the GPS a bit of a liability because you have to guess what all the features do rather than having a definitive answer
  • The GPS provides you no way of retracing a particular route, either in the original direction or in reverse (so, for instance, if you discover a scenic route by accident and want to store that route to drive on once again, you can not)
  • No way to download previous routes or driving history (locations, routes, speeds, etc.) to your computer for record-keeping or analysis purposes

Wednesday, December 16, 2009

Vedic Mathematics Lesson 31: Mergers 2

In the previous lesson, we learned how to solve an equation by using an operation called a merger. In that lesson, we applied the merger to a standard form of equation in which the coefficients of the unknown in each term of the equation was unity. In this lesson, we will extend the merger operation to deal with a bigger set of equations: equations in which the coefficients of the unknown terms are not necessarily unity.

You can find all the previous posts about Vedic Mathematics below:

Introduction to Vedic Mathematics
A Spectacular Illustration of Vedic Mathematics
10's Complements
Multiplication Part 1
Multiplication Part 2
Multiplication Part 3
Multiplication Part 4
Multiplication Part 5
Multiplication Special Case 1
Multiplication Special Case 2

Multiplication Special Case 3
Vertically And Crosswise I
Vertically And Crosswise II
Squaring, Cubing, Etc.
Division By The Nikhilam Method I
Division By The Nikhilam Method II
Division By The Nikhilam Method III
Division By The Paravartya Method
Digital Roots
Straight Division I
Straight Division II
Divisibility Rules
Simple Osculation
Multiplex Osculation
Solving Equations 1
Solving Equations 2
Solving Equations 3
Solving Equations 4
Mergers 1

In particular, in the previous lesson, we considered equations of the sort below:

p/(x + a) + q/(x + b) = (p + q)/(x + c)

Now, consider an equation like the one below:

3/(2x + 3) + 4/(2x + 5) = 7/(2x -7)

We notice that the coefficients of the unknowns in the equation above are not unity. But we also notice that they are the same (2) in all terms of the equation. Moreover, the numerators on the left hand side add up to the numerator on the right. The question therefore arises as to whether a merger is possible under this scenario. Is it?

It turns out that it is indeed possible to merge the term on the right hand side into the terms on the left hand side using the series of steps below:

3/(2x + 3) + 4/(2x + 5) = 7/(2x - 7) becomes
3/(2x + 3) + 4/(2x + 5) = 3/(2x - 7) + 4/(2x - 7) becomes
3/(2x + 3) - 3/(2x - 7) + 4/(2x + 5) - 4/(2x - 7) = 0 becomes
[3*(2x - 7) - 3*(2x + 3)]/[(2x + 3)*(2x - 7)] + [4*(2x - 7) - 4*(2x + 5)]/[(2x + 5)*(2x - 7)] = 0 becomes
[1/(2x - 7)]*[(6x - 21 - 6x - 9)/(2x + 3) + (8x - 28 - 8x -20)/(2x + 5)] = 0 becomes
-30/(2x + 3) - 48/(2x + 5) = 0 becomes
30/(2x + 3) + 48/(2x + 5) = 0.

At this point, we recognize that the equation is actually a general form of the fourth type of equation we identified in an earlier lesson on solving equations using the Paravartya Yojayet sutra. We then apply the formula we derived for such equations directly from that lesson, and solve the equation to get x = (-30*5 - 48*3)/(30*2 + 48*2) = -49/26. We can verify that this is indeed the correct solution of the given equation.

Thus, we can generalize the form of equation that can be solved using merger to the equation below:

p/(ax + b) + q/(ax + c) = (p + q)/(ax + d)

What is the solution of the above general form of equation? By going through the merger operation step by step as illustrated with the example above, we can derive the solution to it as below:

p/(ax + b) + q/(ax + c) = p/(ax + d) + q/(ax + d) becomes
p/(ax + b) - p/(ax + d) + q/(ax + c) - q/(ax + d) = 0 becomes
[p(ax + d) - p(ax + b)]/[(ax + b)(ax + d)] + [q(ax + d) - q(ax + c)]/[(ax + c)(ax + d)] = 0 becomes
[1/(ax + d)]*[(pd - pb)/(ax + b) + (qd - qc)/(ax + c)] = 0 becomes
(pd - pb)/(ax + b) + (qd - qc)/(ax + c) = 0

Since the numerators are now constants without any unknown quantities in them, the formula from the lesson on solving equations using the Paravartya Yojayet sutra is applicable. We get the solution as:

x = [p*(b - d)*c + q*(c - d)*b]/[a*(p*(d - b) + q*(d - c))]

Once again, the equation looks quite complicated when written down using letters, but once we start applying it, we can recognize the pattern of appearance of various terms in the equation, and after some practice, quickly become able to substitute the appropriate values in the appropriate places to solve equations quickly and efficiently.

In fact, the formula above is actually the same as the formula we derived in the previous lesson except for an extra division by "a" (the coefficient of the unknown quantity in each of the terms of the equation). Thus, this formula becomes the same as the previous formula if in fact the unknown quantities have a coefficient of unity in all the terms of the equation.

Let us solve a few equations of this sort to familiarize ourselves with the mechanics of the application of the above formula.

Take the equation below, for instance:

5/(3x + 7) + 4/(3x + 2) = 9/(3x + 5)

In this case, p = 5, q = 4, a = 3, b = 7, c = 2 and d = 5. Substituting these values in the formula above, we get x = [(5*7 - 5*5)*2 - (4*2 - 4*5)*7]/[3*(5*5 - 5*7 + 4*5 - 4*2)] = -32/3. This solution can be verified to be true.

Take another equation as shown below:

9/(2x - 7) -7/(2x + 3) = 2/(2x - 11)

In this case, p = 9, q = -7, a = 2, b = -7, c = 3 and d = -11. Substituting these values in the formula above, we get x = [(9*(-7) - 9*(-11))*3 + ((-7)*3 - (-7)*(-11))*(-7)]/[2*(9*(-11) - 9*(-7) + (-7)*(-11) - (-7)*(3))] = 397/62.

Now, consider an equation such as the one below:

1/(3x + 5) + 3/(3x + 2) = 4/(3x + 5)

We can instantly recognize that in this case, b = d = 5. What happens to our formula when b = d? We notice that pd - pb becomes zero, thus the numerator and denominator can be simplified by removing those terms from it. This leaves us with x = [(qc - qd)*b]/[(qd - qc)*a], which can be simplified to x = -b/a. Thus, the solution to the above equation would be -5/3.

We saw in the previous lesson that this may seem counterintuitive at first since substituting x = -5/3 in the above equation would seemingly lead to two divisions by zero. But if we go through the process of cross-multiplying and collecting like terms so that there are no terms in the denominator, we do finally get a linear equation whose solution is actually -5/3.

Thus, just like we did in the previous lesson, we can derive a set of corollary results as below:

p/(ax + b) + q/(ax + c) = (p + q)/(ax + b) => x = -b/a
p/(ax + b) + q/(ax + c) = (p + q)/(ax + c) => x = -c/a

Notice, once again, that these formulae become equivalent to the formulae derived in the previous lesson for similar cases when "a" is equal to one. Thus, this lesson is just a derivation of the formulae for the more general case of merger operations we dealt with in the previous lesson.

We will also carry over from the previous lesson the result that if the entire denominator of our original formula becomes zero because of the values of various terms in it, then the equation is not a valid, meaningful equation, and it has no solution. We will not go into proving this result again in this lesson.

Thus, in this lesson, we have extended the merger operation to cover a more general case. We have derived a formula for solving equations of the type that can be solved using this more general form of merger. We then found out that there are some special equation forms that result in much more simplified solutions. We have derived these special forms and their solutions as corollaries. In the next lesson, we will deal with some more extensions of the merger operation.

Visitors Country Map

Free counters!

Content From

In the News

Article of the Day

This Day in History

Today's Birthday

Quote of the Day

Word of the Day

Match Up
Match each word in the left column with its synonym on the right. When finished, click Answer to see the results. Good luck!



Spelling Bee
difficulty level:
score: -
please wait...
spell the word:

Search The Web