Starting with a positive integer $M$ written on the board , Alice plays the following game: in each move, if $x$ is the number on the board, she replaces it with $3x+2$.Similarly, starting with a positive integer $N$ written on the board, Bob plays the following game: in each move, if $x$ is the number on the board, he replaces it with $2x+27$.Given that Alice and Bob reach the same number after  playing $4$ moves each, find the smallest value of $M+N$
1. Let's denote the initial number on the board for Alice as \( M \) and for Bob as \( N \).
2. Alice's transformation rule is \( x \rightarrow 3x + 2 \). After 4 moves, the number on the board for Alice can be expressed as:
   \[
   M_4 = 3(3(3(3M + 2) + 2) + 2) + 2
   \]
   Simplifying step-by-step:
   \[
   M_1 = 3M + 2
   \]
   \[
   M_2 = 3(3M + 2) + 2 = 9M + 6 + 2 = 9M + 8
   \]
   \[
   M_3 = 3(9M + 8) + 2 = 27M + 24 + 2 = 27M + 26
   \]
   \[
   M_4 = 3(27M + 26) + 2 = 81M + 78 + 2 = 81M + 80
   \]

3. Bob's transformation rule is \( x \rightarrow 2x + 27 \). After 4 moves, the number on the board for Bob can be expressed as:
   \[
   N_4 = 2(2(2(2N + 27) + 27) + 27) + 27
   \]
   Simplifying step-by-step:
   \[
   N_1 = 2N + 27
   \]
   \[
   N_2 = 2(2N + 27) + 27 = 4N + 54 + 27 = 4N + 81
   \]
   \[
   N_3 = 2(4N + 81) + 27 = 8N + 162 + 27 = 8N + 189
   \]
   \[
   N_4 = 2(8N + 189) + 27 = 16N + 378 + 27 = 16N + 405
   \]

4. Given that Alice and Bob reach the same number after 4 moves, we set \( M_4 = N_4 \):
   \[
   81M + 80 = 16N + 405
   \]

5. Solving for \( M \) and \( N \):
   \[
   81M + 80 = 16N + 405
   \]
   \[
   81M - 16N = 325
   \]

6. We need to find the smallest positive integers \( M \) and \( N \) that satisfy this equation. We can solve this using the method of integer solutions for linear Diophantine equations. We rewrite the equation as:
   \[
   81M = 16N + 325
   \]

7. To find integer solutions, we can test small values of \( M \) and solve for \( N \):
   \[
   M = 5 \implies 81 \cdot 5 = 405 \implies 16N + 325 = 405 \implies 16N = 80 \implies N = 5
   \]

8. Therefore, the smallest values of \( M \) and \( N \) that satisfy the equation are \( M = 5 \) and \( N = 5 \).

Conclusion:
\[
M + N = 5 + 5 = 10
\]

The final answer is \(\boxed{10}\)