Using mobile devices such as smartphones or iPads for various interactive applications is currently very common. In the case of complex applications, e.g. chess games, the capabilities of these devices are insufficient to run the application in real time. One of the solutions is to use cloud computing. However, there is an optimization problem of mobile device and cloud resources allocation. An iterative heuristic algorithm for application distribution is proposed. The algorithm minimizes the energy cost of application execution with constrained execution time.
 B. Chun, S. Ihm, P. Maniatis, M. Naik and A. Patti: Clonecloud: elastic execution between mobile device and cloud. Proc. of the 6th Conf. on Computer Systems, (2001), 301-314.
 Cisco, Cisco Visual Networking Index: Global Mobile Data Traffic Forecast Update, 2013–2018. 2014.
 E. Cuervo. A. Balasubramanian, D. Cho, A. Wolman, S. Saroiu, R. Chandra and P. Bahl: MAUI: making smartphones last longer with code offload. Proc. of the 8th Int. Conf. on Mobile Systems, Applications, and Services, (2010), 49-62.
 E. Czaplicki: Elm: Concurrent FRP for Functional GUIs. Senior thesis, Harvard University, 2012.
 O. Etzion and P. Niblett: Event Processing in Action. Manning Publications Co., 2010.
 J.X. Hao and J.B. Orlin: A faster algorithm for finding the minimum cut in a directed graph. J. of Algorithms, 17(3), (1994), 424-446.
 R. Kemp, N. Palmer, T. Kielmann and H. Bal: Cuckoo: a computation offloading framework for smartphones. Mobile Computing, Applications, and Services. Springer, 2010, 59-79.
 S. Kosta, A. Aucinas, P. Hui, R. Mortier and X. Zhang: Unleashing the power of mobile cloud computing using thinkair. arXiv:1105.3232 [cs.DC], (2011).
 H. Krawczyk, M. Nykiel and J. Proficz: Mobile offloading framework: Solution for optimizing mobile applications using cloud computing. Computer Networks, Springer International Publishing, (2015), 293-305.
 J. Liberty, P. Betts and S. Turalski: Programming Reactive Extensions and LINQ. Springer, 2011.
 R.K. Ma, K.T. Lam and C. Wang: eXCloud: Transparent runtime support for scaling mobile applications in cloud. Int. Conf. on Cloud and Service Computing, (2011), 103-110.
 V. March, Y. Gu, E. Leonardi, G. Goh, M. Kirchberg and B.S. Lee: μcloud: towards a new paradigm of rich mobile applications. Procedia Computer Science, 5 (2011), 618-624.
 H. Nilsson, A. Courtney and J. Peterson: Functional reactive programming, continued. Proc. of the 2002 ACM SIGPLAN Workshop on Haskell, (2002), 51-64.
 M. Othman, S.A. Madani and S.U. Khan: A survey of mobile cloud computing application models. IEEE Communications Surveys & Tutorials, 16(1), (2014), 393-413.
 A. Pathak, C. Hu, M. Zhang, P. Bahl and Y. Wang: Enabling automatic offloading of resource-intensive smartphone applications. Purdue University, Electrical and Computer Engineering Technical Report, 2011.
 M. Satyanarayanan: Mobile computing: the next decade. Proc. of the 1st ACM Workshop on Mobile Cloud Computing & Services: Social Networks and Beyond, (2010).
 M. Satyanarayanan, P. Bahl, R. Caceres and N. Davies: The case for vm-based cloudlets in mobile computing. IEEE Pervasive Computing, 8(4), (2009), 14-23.
 C. Shannon: Programming a computer for playing chess. The London, Edinburgh, and Dublin Philosophical Magazine and J. of Science, 41(314), (1950), 256-275.
 X. Zhang, A. Kunjithapatham, S. Jeong and S. Gibbs: Towards an elastic application model for augmenting the computing capabilities of mobile devices with cloud computing. Mobile Networks and Applications, 16(3), (2011), 270-284.