Category Archives: iPhone

Installing iPhone Apps: Apple Doesn’t Care About Average Completion Time

Having recently spent some time outside the US, I found, upon my return, that many of the Apps on my iPhone needed to be updated. No big deal: I clicked “Update all”, typed in my password, and let the operating system finish the job. After watching the update process for a minute or so, I noticed one interesting fact: Apps were updated (i.e. downloaded+installed) in the order the updates became available (chronologically increasing), rather than by increasing order of the size of the update (in bytes). If you’re asking “why does it matter?”, read on.

The App update process has no release dates (all outdated Apps are ready to be updated at time zero), is non-preemptive (once started, the update of an App continues until it’s finished; ignoring crashes and other issues), and doesn’t involve sequence-dependent setup times (as soon as an App finishes updating, the next App in line can start its update right away). Under these circumstances, the makespan of a group of outdated Apps is always the same, regardless of the order in which they get updated. For example, if App A takes 15 seconds to download and install, and App B takes 10 seconds to download and install, it will take me 25 seconds to update both of them, regardless of which one is updated first. So far, so good. But let’s see what happens with the total (or average) completion time.

Continuing with the two-App example above, if I update the Apps in the order A, B, the completion time of A is 15, and the completion time of B is 25. The total completion time is 15+25=40, and the average completion time is 40/2=20 seconds. If the Apps are updated in the reverse order B, A, the completion time of B is 10, and the completion time of A is 25. The total completion time now is 10+25=35, and the average completion time decreases to 35/2=17.5 seconds. If there were other Apps being updated before or after the pair A, B, swapping them to make sure that B goes before A (because B takes less time) would have the same effect (the A, B swap doesn’t change the completion time of other Apps). What I just explained is called an exchange argument. It proves that whenever two Apps are out of order (in the sense that a smaller one is placed after a larger one), swapping them reduces the total/average completion time. Therefore, the minimum total/average completion time is obtained when the Apps are sorted by increasing order of duration. In the scheduling literature, this is called the SPT rule (Shortest Processing Time first).

I still haven’t answered the question of whether all of this matters because the makespan doesn’t depend on the order of Apps (updating A and B always takes 25 seconds). The answer is I don’t know! It’s a psychological effect. Shorter completion times may give the user the impression that the update process is going fast because a bunch of small Apps get updated quickly. By updating larger Apps first, the user may have the impression that the process is taking longer because, after a while, there are still many Apps to go. Should Apple worry about this? I’ll leave that question to my colleagues in the Marketing department who specialize in Consumer Behavior. If the answer turns out to be “yes”, then you now know what to do.

P.S. I’d like to know what other mobile operating systems do. Do they use SPT? Please let me know in the comments.

Filed under Applications, iPhone

INFORMS 2010 Wrap-Up

I had a very productive and fun time at the INFORMS Annual Meeting in Austin, Texas. So I thought I’d share with you some of my observations about the meeting:

• Analytics initiative by INFORMS: great idea! I believe that we (INFORMS members) have to jump onto the Analytics bandwagon and let everyone know that we can do Analytics too! It’s all about the power of words these days (see the country’s political arena for a perfect example). Starting today, I’ll tell everyone that I can do “Advanced Prescriptive Analytics” (optimization).
• Panel on Social Networks: it was nice to hear from some of the most popular OR bloggers and learn about their motivations, fun stories, and blogging strategies. Great job Mike and Laura!
• John Birge‘s plenary (Omega Rho Distinguished Lecture): very informative and entertaining. The simple and powerful take-home message was: align incentives. What’s good for the employees has to be good for the company as well.
• RAS Problem Solving Competition: Michael Trick and I (a.k.a. Team MATHY) received an honorable mention at the Railway Applications Section (RAS) 2010 Challenge (certificate + photo :-). After watching the three finalists’ presentations, we were happy to see that our solution value of \$11,399,670.88 was equal to the best solution found by the winning team, and better than the solution found by the other two finalists. Nobody managed to prove optimality, though. Interestingly, none of the finalists thought about scaling the problem (thinking in terms of tanks of gasoline instead of gallons of gasoline), which made a huge difference in the performance of our model. Overall, it was a lot of fun to participate in this competition and I want to thank the organizers for putting it together. Here’s a picture of team MATHY with Juan Morales from BNSF Railway.

And here’s a picture of the railroad network we had to deal with:

• Technical sessions: I watched many interesting and inspiring talks (as a matter of fact, I had some great ideas for my own research while watching a number of presentations). It’s nice to see that *a lot* of people are using Latex Beamer these days. Let’s aim for a Powerpoint-free INFORMS by 2020!
• Idea for an iPhone App? I applaud the going-green initiative of reducing the number of conference program booklets that have to be printed out. However, for this to work it requires a lot of organization from each of us: we have to go over the program in advance, select the talks we want, and print the appropriate pages. I don’t know about you, but I never manage to get this done. So I propose we create an iPhone (mobile) app to allow participants to browse the program on-the-go. It’s not convenient to browse the program PDF on a phone. We need an app. We need to be able to filter by author, by chair, by topic/keyword, etc. We want a time-sensitive app that tells you what’s next. We want an app that sends notifications to your phone reminding you that a talk/event is coming up so that you ask for the check in time. If we had something like that, I think that a lot fewer people would ask for a printed program (myself included).
• Thumbs up for all the vegetarian food: being a vegetarian myself, I was impressed with the generous availability of vegetarian food (i.e. not only salad) at both the Sunday and Tuesday receptions. Well done!
• Austin’s Convention Center: in addition to being huge, the convention center’s numerous under-construction areas made it very hard to navigate from session to session. I always felt like I was taking the longest path from point A to point B.
• Meeting old and new friends: it was great to make many new friends and to meet old friends from my PhD days at Carnegie Mellon at the Tepper Alumni reception. I also had some very productive research meetings with several colleagues.

Last but not least, I’d like to thank John Hooker, Christopher Beck, and Willem-Jan van Hoeve for agreeing to give a talk in my session, and Willem for inviting me to present in his session.

Time to say bye-bye to weird Austin and fly back to Miami! Hence, I had to put on my “U” shirt:

Filed under Analytics, Challenge, INFORMS, iPhone, Travel

OR on the iPhone

I’m the proud owner of an iPhone (1st generation; anxiously waiting for the 3rd gen. release later this year). With all its bells and whistles and intuitive easy-to-use interface, the iPhone can also be used as an effective educational tool. The upcoming hardware and software updates promise to make it even better.

Stanford University has a computer science course entitled “iPhone Application Programming” and, guess what, they’ve made it publicly available (free of charge) from iTunesU. That includes everything: slides, homework assignments and video recordings of the lectures! It doesn’t get any better than this.

This brings me to the reason for this post: why not have an OR-related iPhone App? The possibilities are endless: from teaching the Simplex graphical method, to using the location-aware services and maps to help people navigate and meet during our gigantic INFORMS annual meetings. Incidentally, this ties in with Mike Trick’s last post on social networking technologies. I already have an App idea of my own but, for the time being, it will have to remain a secret.

The main question now becomes: what percentage of INFORMS members own an iPhone?