
132 PUZZLE 32 COMPUTING TAXES
PUZZLE
32 COMPUTING TAXES
Richard Romley sent this problem via CompuServe. This is a simplified
version of a problem relating to tax calculations. I will define a tax area as
being made up of multiple tax authorities. For example, a tax area might
be a city, and the tax authorities for that city might be the city, the city’s
county, and the state. When you pay tax on a purchase in the city, the
tax rate you pay is made up of the city tax, the county tax, and the state
tax. Each of these taxing authorities changes its tax rate independently.
You have the following table:
CREATE TABLE TaxAuthorities
(tax_authority CHAR(10) ...