<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/1.5.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Taxation without rationalization</title>
	<link>http://bit-player.org/2006/taxation-without-rationalization</link>
	<description>An amateur's outlook on computation and mathematics.</description>
	<pubDate>Fri, 29 Aug 2008 05:10:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>

	<item>
 		<title>Comment on Taxation without rationalization by: Barry Cipra</title>
		<link>http://bit-player.org/2006/taxation-without-rationalization#comment-19</link>
		<pubDate>Mon, 27 Feb 2006 18:27:27 +0000</pubDate>
		<guid>http://bit-player.org/2006/taxation-without-rationalization#comment-19</guid>
					<description>Assuming you can buy your &lt;em&gt;N&lt;/em&gt; items in batches of any size (not strictly &lt;em&gt;k&lt;/em&gt; at a time), here's a recursive algorithm that I think will minimize the total sales tax when the tax rate &lt;em&gt;r&lt;/em&gt; divides the unit of currency exactly, with a quotient that is odd.  (I'll explain below why I need those assumptions.)  For the dollar there are only two such rates:  4% and 20%. ( I recall 4% as the sales tax in Illinois in the early 1960s; the 20% rate, or something like it, has been proposed as a national sales tax to replace the federal income tax.)  I will do the 4% example for simplicity of explanation, although the general principle should be fairly clear.

The first thing is to compute the taxable residue mod 25 (=1/.04) of your &lt;em&gt;N&lt;/em&gt; items, and sort them by size:

0 &amp;#60;= &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;1&lt;/sub&gt; &amp;#60;= &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;2&lt;/sub&gt; &amp;#60;=...&amp;#60;= &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;&lt;em&gt;N&lt;/em&gt;&lt;/sub&gt; &amp;#60;= 24

(This is why I need to assume the tax rate divides the unit of currency exactly; otherwise there are &quot;dislocations&quot; in the residue structure.) Actually you can ignore any residue-0 items; they don't affect the roundoff no matter what you do with them. Next, if there are any items with residue between 1 and 12 (inclusive), buy each of them SEPARATELY -- the sales tax on each of these purchases will be rounded down, and you can't do better than that.  Therefore we may assume at this point that all of the residues are between 13 and 24.  (This is why I assume the quotient is odd; otherwise you have to decide whether tax at the halfway residue gets rounded up or down.) 

The final (pre-recursion) step is to bundle together the items with the smallest and largest residues, &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;1&lt;/sub&gt; and &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;&lt;em&gt;N&lt;/em&gt;&lt;/sub&gt; (both now greater than or equal to 13), treat them as ONE item with residue &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;1&lt;/sub&gt;' =&lt;em&gt;r&lt;/em&gt;&lt;sub&gt;1&lt;/sub&gt; + &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;&lt;em&gt;N&lt;/em&gt;&lt;/sub&gt; mod 25, and re-run the algorithm with the smaller set of residues &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;1&lt;/sub&gt;', &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;2&lt;/sub&gt;,..., &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;&lt;em&gt;N&lt;/em&gt;–1&lt;/sub&gt; (re-ordered to put &lt;em&gt;r&lt;/em&gt;&lt;sub&gt;1&lt;/sub&gt;' in its proper place). 

For example, suppose you have &lt;em&gt;N&lt;/em&gt;=4 items costing 13, 14, 23, and 24 cents.  The algorithm will have you bundle the 13 and 24 cent items together, paying 1 cent tax on the 37 (=12 mod25) cent total, and then bundle the 14 and 23 cent items, paying another 1 cent tax, for 2 cents total sales tax.  Any other way of combining the items results in either 3 or 4 cents tax (the latter if you buy each item separately). 

Come to think of it, this approach probably works even when the quotient is even (e.g., 5% tax).  All that really matters is that there is a threshold below which the tax is rounded down and above (or at) which the tax is rounded up; the threshold doesn't even have to be at or near the halfway point.  The key idea is to buy items below the threshold separately and then bundle together the least and greatest residues above the threshold. 

I don't have a rigorous proof that this algorithm minimizes the total tax; in fact I have lingering doubts that it always does.  Maybe some other loyal reader can supply a proof -- or a counterexample.</description>
		<content:encoded><![CDATA[	<p>Assuming you can buy your <em>N</em> items in batches of any size (not strictly <em>k</em> at a time), here&#8217;s a recursive algorithm that I think will minimize the total sales tax when the tax rate <em>r</em> divides the unit of currency exactly, with a quotient that is odd.  (I&#8217;ll explain below why I need those assumptions.)  For the dollar there are only two such rates:  4% and 20%. ( I recall 4% as the sales tax in Illinois in the early 1960s; the 20% rate, or something like it, has been proposed as a national sales tax to replace the federal income tax.)  I will do the 4% example for simplicity of explanation, although the general principle should be fairly clear.</p>
	<p>The first thing is to compute the taxable residue mod 25 (=1/.04) of your <em>N</em> items, and sort them by size:</p>
	<p>0 &lt;= <em>r</em><sub>1</sub> &lt;= <em>r</em><sub>2</sub> &lt;=&#8230;&lt;= <em>r</em><sub><em>N</em></sub> &lt;= 24</p>
	<p>(This is why I need to assume the tax rate divides the unit of currency exactly; otherwise there are &#8220;dislocations&#8221; in the residue structure.) Actually you can ignore any residue-0 items; they don&#8217;t affect the roundoff no matter what you do with them. Next, if there are any items with residue between 1 and 12 (inclusive), buy each of them SEPARATELY &#8212; the sales tax on each of these purchases will be rounded down, and you can&#8217;t do better than that.  Therefore we may assume at this point that all of the residues are between 13 and 24.  (This is why I assume the quotient is odd; otherwise you have to decide whether tax at the halfway residue gets rounded up or down.) </p>
	<p>The final (pre-recursion) step is to bundle together the items with the smallest and largest residues, <em>r</em><sub>1</sub> and <em>r</em><sub><em>N</em></sub> (both now greater than or equal to 13), treat them as ONE item with residue <em>r</em><sub>1</sub>&#8216; =<em>r</em><sub>1</sub> + <em>r</em><sub><em>N</em></sub> mod 25, and re-run the algorithm with the smaller set of residues <em>r</em><sub>1</sub>&#8216;, <em>r</em><sub>2</sub>,&#8230;, <em>r</em><sub><em>N</em>–1</sub> (re-ordered to put <em>r</em><sub>1</sub>&#8216; in its proper place). </p>
	<p>For example, suppose you have <em>N</em>=4 items costing 13, 14, 23, and 24 cents.  The algorithm will have you bundle the 13 and 24 cent items together, paying 1 cent tax on the 37 (=12 mod25) cent total, and then bundle the 14 and 23 cent items, paying another 1 cent tax, for 2 cents total sales tax.  Any other way of combining the items results in either 3 or 4 cents tax (the latter if you buy each item separately). </p>
	<p>Come to think of it, this approach probably works even when the quotient is even (e.g., 5% tax).  All that really matters is that there is a threshold below which the tax is rounded down and above (or at) which the tax is rounded up; the threshold doesn&#8217;t even have to be at or near the halfway point.  The key idea is to buy items below the threshold separately and then bundle together the least and greatest residues above the threshold. </p>
	<p>I don&#8217;t have a rigorous proof that this algorithm minimizes the total tax; in fact I have lingering doubts that it always does.  Maybe some other loyal reader can supply a proof &#8212; or a counterexample.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
