You are on page 1of 3

Submitted by: NFA on Bike engine gear shifting

M R Khan Dipu
ID: 191-35-393
System Submitted to:
Section: AC(C) Ms. Fatama Binta Rafiq
Course Code: SE-234 Lecturer
Couse Name: Theory of Dept. of Software Engineering
Computing Daffodil International University
Dept. of Software Engineering
Daffodil International University

Problem Statement: In a bike there has an engine. In the engine, there has 5 speed gearbox which starts from neutral. In every stage of gear,
the speed of the engine gets increased. I will draw the finite automata of the bike acceleration system along gear shifting.

System Features: In a bike, in order to turn on the engine we need to insert key and the engine stay in neutral firstly. Then when we catch the
clutch down, throttle up and push the gear shifter with leg upward, the gear goes to the next stage. Similarly, we can go up to 5 gears. Again if
we catch the clutch down, throttle up and push the gear shifter with leg downward we can shift gear to lower sequentially and down the speed
to zero. In this case, neutral stage of gear can be a finish state too.
Let consider,
throttle up + clutch down + push gear shifter with leg upward = a,
throttle up + clutch down + push gear shifter with leg downward = b,
System Design:

N
b

b b b
a

1 a 2 a 3 a 4 a 5

b b

Formal Definition:
Q = {N, 1, 2, 3, 4, 5}
∑ = {a, b}
q0 = {N}
F = { N, 1, 2, 3, 4, 5}
State transition table:

State a b
->*N {} 1
*1 {N, 2} {}
*2 3 {N, 1}
*3 4 2
*4 5 3
*5 {} 4

System Description

In the above NFA, there happened below transitions:

 Start at Neutral(N) state.


 From N state input a doesn’t go to any state and input b goes to 1 state.
 From 1 state input a goes to N and 2 state and input b doesn’t go to any state..
 From 2 state input a goes to 3 state and input b goes to N and 1 state.
 From 3 state input a goes to 4 state and input b goes to 2 state.
 From 4 state input a goes to 5 state and input b goes to 3 state.
 From 5 state input a doesn’t go any state and input b goes to 4 state.
Here the whole thing happens when the engine is on and it terminated following the activities of the rider of the bike.
Every stage of gear is finish state because all state works in its time properly.

Reference
Image From: https://www.pinterest.com/pin/487796203393818313/.jpg

You might also like