Abstract
This article presents an exact algorithm for the precedence-constrained traveling salesman problem, which is also known as the sequential ordering problem. This NP-hard problem has applications in various domains, including operational research and compilers. In this article, the problem is presented and solved in the context of minimizing switching energy in compilers. Most previous work on minimizing switching energy in the compiler domain has been limited to simple heuristics that are not guaranteed to give an optimal solution. In this work, we present an exact algorithm for solving the switching energy minimization problem using a branch-and-bound approach. The proposed algorithm is simple and intuitive, yet powerful. It is the first exact algorithm for the switching energy problem that is shown to solve real instances of the problem within a few seconds per instance. Compared to previous work in the operational research domain, the proposed algorithm is believed to be the most powerful exact algorithm that does not require a linear programming formulation. The proposed algorithm is experimentally evaluated using instances taken from a production compiler. The results show that with a time limit of 10 ms per node, the proposed algorithm optimally solves 99.8 % of the instances. It optimally solves instances with up to 598 nodes within a few seconds. The resulting switching cost is 16 % less than that produced without energy awareness and 5 % less than that produced by a commonly used heuristic.
Similar content being viewed by others
Notes
Some MiBench benchmarks were excluded due to building problems.
References
Anghinolfi, D., Montemanni, R., Paolucci, M., Gambardella, L.M.: A particle swarm optimization approach for the sequential ordering problem. Comput. Oper. Res. 38(7), 1085–2076 (2011)
Ascheuer, N., Junger, M., Reinelt, G.: A bracnh & cut algorithm for the asymmetric travelling salesman problem with precedence constraints. Comput. Optim. Appl. 17(1), 61–84 (2000)
Bednarski, A., Kessler, C.: Energy-optimal integrated VLIW code generation. In: Proceedings of the 11th Workshop on Compilers for Parallel Computers (2004)
Charikar, M., Motwani, R., Raghavan, P., Silverstien, C.: Constrained TSP and low-power computing. In: Proceedings of the Workshop on Algorithms and Data Structures. Lecture Notes in Computer Science, vol. 1272, pp. 104–115. Springer, Berlin (1997)
Choi, K., Chatterjee, A.: Efficient instruction-level optimization methodology for low-power embedded systems. In: Proceedings of the International Symposium on System Synthesis (2001)
Cooper, K., Torczon, L.: Engineering a Compiler. Morgan Kaufmann, Burlington (2004)
Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)
Dorigo, M., Gambardella, L.M.: Ant colony system: a cooperative learning approach to the traveling salesman problem. IEEE Trans. Evol. Comput. 1(1), 53–66 (1997)
Escudero, L.: An inexact algorithm for the sequential ordering problem. Eur. J. Oper. Res. 37(2), 236–249 (1988)
Guthaus, M.R., Ringenberg, J.S., Ernst, D., Austin, T.M., Mudge, T., Brown, R.B.: MiBench: A free, commercially representative embedded benchmark suite. In: Proceedings of the IEEE International Workshop on Workload Characterization (WWC-4) (2001)
Held, M., Karp, R.M.: The traveling salesman problem and minimum spanning trees. Oper. Res. 18(6), 1138–1162 (1970)
Kandemir, M., Vijaykrishnan, N., Irwin, M.J.: Compiler Optimizations for Low Power Systems, Power Aware Computing, vol. 10. Kluwer Academic Publishers, Norwell (2002)
Karan, M., Skorin-Kapov, N.: A branch and bound algorithm for the sequential ordering problem. In: Proceedings of the 34th International Convention (MIPRO), pp. 452–457. IEEE (2011)
Lee, C., Lee, J.-K., Hwang, T.: Compiler optimization on VLIW instruction scheduling for low power. ACM Trans. Design Autom. Electron. Syst. (TODAES) 8(2), 252–268 (2003)
Gambardella, L.M., Dorigo, M.: HAS-SOP: Hybrid ant system for the sequential ordering problem. Technical Report, Istituto Dalle Molle Di Studi Sull Intelligenza Artificiale (1997)
Montemanni, R., Mojana, M., Di Caro, G., Gambardella, L.M.: A decomposition-based exact approach for the sequential ordering problem. J. Appl. Oper. Res. 5(1), 2–13 (2013)
Pallister, J., Hollis, S., Bennett, J.: Identifying compiler options to minimize energy consumption for embedded platforms. Cornell University Library, CS, Performance. arXiv:1303.6485 [cs.PF] (2013)
Parikh, A., Kim, S., Kandemir, M., Vijaykrishnan, N., Irwin, M.J.: Instruction scheduling for low power. J. VLSI Signal Process. 37, 129–149 (2004)
Shao, Z., Xiao, B., Xue, C., Zhuge, Q., Sha, E.: Loop scheduling with timing and switching-activity minimization for VLIW DSP. ACM Trans. Design Autom. Electron. Syst. (TODAES) 11(1), 165–185 (2006)
Shobaki, G., Wilken, K.: Optimal superblock scheduling using enumeration. In: Proceedings of the 37th International Symposium on Microarchitecture (2004)
Shobaki, G.: Optimal global instruction scheduling using enumeration. PH.D dissertation, Department of Computer Science, UC Davis (2006)
Shobaki, G., Wilken, K., Heffernan, M.: Optimal trace scheduling using enumeration. ACM Trans. Arch. Code Optim. (TACO), 5(4), Article 19 (2009)
Shobaki, G., Shawabkeh, M., Abu-Rmaileh, N.: Pre-allocation instruction scheduling with register pressure minimization using a combinatorial optimization approach. ACM Trans. Arch. Code Optim. (TACO), 10(3), Article 14 (2013)
Skiena, S.: The Algorithm Design Manual. Springer, Berlin (2010)
Su, C.-L., Tsui, C.Y., Despain, A.M.: Low power architecture design and compilation techniques for high-performance processors. In: Proceedings of the IEEE COMPCON, San Francisco, CA (1994)
Tomiyama, H., Ishihara, T., Inoue, A., Hiroto, H.: In: Proceedings of the Conference on Design, Automation and Test in Europe (DATE), pp. 855–860 (1998)
Valluri, M., John, L.: Is Compiling for Performance == Compiling for Power?. In: Proceedings \(5^{{\rm th}}\) Annual Workshop on Interaction between Compilers and Computer Architecture (INTERACT-5), held with HPCA 2001 (2001)
Tiwari, V., Malik, S., Wolfe, A.: Compilation Techniques for Low Energy: An Overview. Presented at the Symposium on Low-Power Electronics, San Diego, CA (1994)
Acknowledgments
This research was partially supported by a Google Faculty Research Award granted in August 2013. The authors are extremely grateful to Prof. Roberto Montemanni of the University of Applied Sciences of Southern Switzerland for providing the experimental results reported in Sect. 6.6 for their MILP-based algorithm. The authors thank the Computer Science (CS) Department at PSUT for providing the machine that was used to perform the experimental evaluation. We specially thank Husam Abed and Waseem F. Faous from the system administration team at PSUT for the technical support they provided to us. We also thank the anonymous reviewers for their constructive comments that led to significantly improving the final version of this paper.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Shobaki, G., Jamal, J. An exact algorithm for the sequential ordering problem and its application to switching energy minimization in compilers. Comput Optim Appl 61, 343–372 (2015). https://doi.org/10.1007/s10589-015-9725-9
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10589-015-9725-9