Abstract. In this paper we study the Revocable Online Knapsack Problem (ROKP) which is an extension of the Online Knapsack Problem . We prove an optimal upper bound of 1/t for the competitive ratio of ROKP, where t is a real root of 4x 3 + 5x 2 − x − 4 = 0 (t ≈ 0.76850 and 1/t ≈ 1.3012). To prove this result, we made a full use of computer programs as follows: For the base algorithm that is designed in a conventional manner, we first construct an equivalent finite state diagram with about 300 states. Then for each state, we generate a finite set of inequalities such that the competitive ratio at that state is at most 1/t if the set of inequalities do not have a real solution. The latter can be checked by Mathematica. The number of inequalities generated was approximately 600 in total, and our computation time was 30 minutes using Athlon XP 2600+.