<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some stuff &#187; min</title>
	<atom:link href="http://blog.yhuang.org/?feed=rss2&#038;tag=min" rel="self" type="application/rss+xml" />
	<link>https://blog.yhuang.org</link>
	<description>here.</description>
	<lastBuildDate>Wed, 27 Aug 2025 08:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>t-mobile prepaid optimization</title>
		<link>https://blog.yhuang.org/?p=471</link>
		<comments>https://blog.yhuang.org/?p=471#comments</comments>
		<pubDate>Sat, 28 May 2011 02:50:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[constraint]]></category>
		<category><![CDATA[min]]></category>
		<category><![CDATA[odd occasions]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[prepaid mobile phones]]></category>
		<category><![CDATA[prepaid phones]]></category>
		<category><![CDATA[purch]]></category>
		<category><![CDATA[sum]]></category>
		<category><![CDATA[Table]]></category>
		<category><![CDATA[temporary visitors]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=471</guid>
		<description><![CDATA[t-Mobile has these tiered refill cards for their prepaid mobile phones. The pricing table is here and reproduced below: $10 for 30 minutes, expires in 90 days $25 for 130 minutes, expires in 90 days $40 for 208 minutes, expires in 90 days $50 for 400 minutes, expires in 90 days $100 for 1000 minutes, [...]]]></description>
			<content:encoded><![CDATA[<p>t-Mobile has these tiered refill cards for their prepaid mobile phones. The pricing table is <a href="http://www.callingmart.com/products/wireless/ProductDetail.aspx?ID=35&#038;AspxAutoDetectCookieSupport=1">here</a> and reproduced below:</p>
<p><strong>$10</strong> for 30 minutes, expires in 90 days<br />
<strong>$25</strong> for 130 minutes, expires in 90 days<br />
<strong>$40</strong> for 208 minutes, expires in 90 days<br />
<strong>$50</strong> for 400 minutes, expires in 90 days<br />
<strong>$100</strong> for 1000 minutes, expires in 365 days</p>
<p>So which card should you buy? You could calculate a per minute cost and conclude that $100 for 1000 minutes is the most economical (plus it doesn&#8217;t expire for the longest time). Wrong!</p>
<p>It depends on how much you use the phone. The fact that the minutes expire makes the prepaid plan a <em>virtual monthly plan</em> in the regime where you do not use 1000 or more minutes per year, which is highly likely for people who choose prepaid phones to begin with (e.g. temporary visitors, odd occasions, emergencies, etc.). The constraint in that case is the expiration, not the number of minutes. If you blindly purchased $100 refills one after another, you&#8217;d have more and more unused minutes piling up. Sure, you could still use them, but even at $0.10/min. it is expensive compared to a straight monthly plan if you really mean to call that much. Of course you don&#8217;t, so now what?<br />
<span id="more-471"></span><br />
The trick is time-sharing. (Never thought this phrase would pop up in this context.) Let&#8217;s re-write the table in terms of how much you get for $1, both minutes of call, and days of non-expiry:</p>
<p><strong>$10:</strong> 3 min., 9 days / $1<br />
<strong>$25:</strong> 5.2 min., 3.6 days / $1<br />
<strong>$40:</strong> 5.2 min., 2.25 days / $1<br />
<strong>$50:</strong> 8 min., 1.8 days  / $1<br />
<strong>$100:</strong> 10 min., 3.65 days / $1</p>
<p>We see that the $25, $40, and $50 refills are <em>good for nothing</em>! Why would anyone buy those? A rational person should only buy the $10 and $100 refills in some combination: $10 for when the account is about to expire but there are plenty of minutes, and $100 for when running low on minutes. The &#8220;proof&#8221; is as follows:</p>
<p>We really care about paying the lowest per minute cost for the minutes <em>actually used</em>. To that end, if we divide the purchase between the \(N\) refill options by the weights \(w_i\), \(i=1,&#8230;,N\), and every $1 of the \(i\)th refill option pays for \(m_i\) minutes and \(d_i\) days, then, we want</p>
<p>maximize \(\sum_{i=1}^N w_i d_i\) (equivalently, maximize \(\sum_{i=1}^N w_i m_i\))<br />
subject to \(\sum_{i=1}^N w_i m_i / \sum_{i=1}^N w_i d_i = L\)<br />
and \(\sum_{i=1}^N w_i=1\)</p>
<p><img src="wp-content/uploads/images/tmobile1.png" align="right" />where \(L\) is the minutes per day that we know we use. We don&#8217;t even need to solve this explicitly. The plot shows that every point in the pentagonal region below the red line is achievable with $1, and for any given constraint \(L\), the outer boundary on the red line itself solves the optimization (i.e. is the most economical), and this is done by using only the $10 and $100 refills. Here we assumed infinitely divisible refills. By using the heuristic of when to buy which refill above though, we tend toward the average \(L\) by construction so we are always at the right operating point.</p>
<p><img src="wp-content/uploads/images/tmobile2.png" align="right" />The same analysis can be carried over to the &#8220;gold rewards&#8221; tier, which you get when you purchase the $100 refill and keep the account from expiring year after year (this is what you should do anyway, so even better). The new plot is different but the conclusion is the same, though the $50 refill looks competitive this time.</p>
<p>(For reference, the monthly cost of such a &#8220;virtual monthly plan&#8221; ranges from an incredible $0.82/mo. for 3 min./mo. &#8212; keeping the account active, basically &#8212; to $8.22/mo. for 82 min./mo. For more than 82 min./mo., the cost goes up at a rate of $0.10/min. of course. Unfortunately, you cannot buy &#8220;negative&#8221; refills, otherwise you could do better even in that regime.)</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=471</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>microwave oven controllers</title>
		<link>https://blog.yhuang.org/?p=231</link>
		<comments>https://blog.yhuang.org/?p=231#comments</comments>
		<pubDate>Mon, 04 Jan 2010 22:31:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[analog microwave]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[digital controller]]></category>
		<category><![CDATA[digital microwave]]></category>
		<category><![CDATA[inferior product]]></category>
		<category><![CDATA[measure]]></category>
		<category><![CDATA[microwave]]></category>
		<category><![CDATA[microwave oven]]></category>
		<category><![CDATA[min]]></category>
		<category><![CDATA[progress]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=231</guid>
		<description><![CDATA[The great feature of an analog microwave oven controller is that setting a time is highly efficient and the effort taken to set the time (at worst) scales linearly with the heating need, which seems like a correct scaling. It has additional features such as easy adding and subtracting of time while in progress. A [...]]]></description>
			<content:encoded><![CDATA[<p>The great feature of an analog microwave oven controller is that setting a time is highly efficient and the effort taken to set the time (at worst) scales linearly with the heating need, which seems like a correct scaling. It has additional features such as easy adding and subtracting of time while in progress.</p>
<p>A digital microwave oven controller, by any measure, is an inferior product. The reasons it might be preferred are (1) to reduce component count and save cost for the manufacturer, (2) to appease consumers with an impression of a product in the &#8220;advanced&#8221; style, neither of which are excellent reasons.</p>
<p>This is a mistake, and the inefficiency introduced via the digital controller is only ameliorated somewhat by <a href="http://www.rubyquiz.com/quiz118.html">some oddities of the device</a> (enter 99 and the microwave runs for 99 seconds, enter x:99 and the microwave runs for 60x+99 seconds, etc.). So between 60 and 99 seconds, you manage to save a keystroke but no more. (Ok, also between 10 min. and 10 min. 29 seconds.)</p>
<p>This reminds me why I dislike digital book readers, too. They suffer from the analogous problem versus paper books with regard to page turning.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=231</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>minimax vs. maximin</title>
		<link>https://blog.yhuang.org/?p=160</link>
		<comments>https://blog.yhuang.org/?p=160#comments</comments>
		<pubDate>Fri, 13 Feb 2009 12:16:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arg min]]></category>
		<category><![CDATA[forall]]></category>
		<category><![CDATA[left hand side]]></category>
		<category><![CDATA[lemma]]></category>
		<category><![CDATA[math math]]></category>
		<category><![CDATA[max]]></category>
		<category><![CDATA[min]]></category>
		<category><![CDATA[minimax]]></category>
		<category><![CDATA[multivariable functions]]></category>
		<category><![CDATA[proof]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=160</guid>
		<description><![CDATA[An elementary, nice lemma relating to the optimization of multivariable functions says that the smallest &#8220;big thing&#8221; is still bigger than the biggest &#8220;small thing&#8221;, in other words, . The proof is almost trivial. Let optimize the left hand side and let optimize the right hand side. Now note two facts: for any given , [...]]]></description>
			<content:encoded><![CDATA[<p>An elementary, nice lemma relating to the optimization of multivariable functions says that the smallest &#8220;big thing&#8221; is still bigger than the biggest &#8220;small thing&#8221;, in other words,</p>
<p>\(\min_x \max_y f(x,y) \ge \max_y \min_x f(x,y)\).<br />
<span id="more-160"></span></p>
<p>The proof is almost trivial. Let \((x^*, y^*)\) optimize the left hand side and let \((x_*, y_*)\) optimize the right hand side. Now note two facts: for any given \(x\), \(f(x, \arg\max_y f(x,y)) \ge f(x,y) \forall y\); for any given \(y\), \(f(x, y) \ge f(\arg\min_x f(x,y), y) \forall x\).</p>
<p>So in particular, \(f(x^*, y^*) \ge f(x^*, y_*)\) and \(f(x^*, y_*) \ge f(x_*, y_*)\). So putting everything together, \(f(x^*, y^*) \ge f(x_*,y_*)\). </p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=160</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
