ABSTRACT

Keywords: vending machine; FA; returning change

q5-the state of requiring more 2.5 yuan to buy beverages

q6-the state of requiring more 2 yuan to buy beverages

q7-the state of requiring more 1.5 yuan to buy beverages

q8-the state of requiring more 1 yuan to buy beverages

q9-the state of requiring more 0.5 yuan to buy beverages

q10-the state of normal exit without returning changes (final state)

q11-the state of returning changes and exit (final state)

q12-the state of returning the coins and banknotes (final state)

2.2 A finite set of input symbols

We consider the existing business processes as input symbols denoted as Σ (the letters in the parentheses are operation codes):

Σ = {a, b, c, d, e, f, g, h, i, j, k, l}; a-submit the coin valued 0.5 yuan b-submit the coin valued 1 yuan c-submit the banknotes valued 5 yuan d-submit the banknotes valued 10 yuan e-submit the counterfeit money or other sums f-select the beverages valued 2.5 yuan g-select the beverages valued 3 yuan h-select the beverages valued 3.5 yuan i-select the beverages valued 4.5 yuan j-submit the banknotes valued 20 yuan k-submit the banknotes valued 50 yuan l-submit the banknotes valued 100 yuan

1 INTRODUCTION

1.1 The situation

Beverages in the vending machine [1-3] can be divided into four kinds according to the following price: drinks valued 2.5 yuan, drinks valued 3 yuan, drinks valued 3.5 yuan and drinks valued 4.5 yuan. Vending machines can accept coins and banknotes, including coins valued 0.5 yuan and 1 yuan and banknotes valued 5 yuan, 10 yuan, 20 yuan, 50 yuan and 100 yuan. Now, we discuss the case of each purchasing operation for only one drink. According to the requirement for the analysis of the vending machine, we regard the whole process of vending machines as a finite state automaton M = (Q, Σ, δ, q0, F).