# Design a DFA that accepts numbers whose sum of digits is $2 \mod 3$

Design a DFA that accepts language $$L = \left\{ x \in \{ 0, 1, 2 \} : \text{ sum of digits in } x \text{ is } 2 \mod 3 \right\}$$

How to make a DFA for this? I have no idea how to solve this dfa problem. I have a solution by someone but I am not getting concept to start this solution.

Then you need to devise the state transitions between the states representing these values. A convenient fact of modular arithmetic to remember is that $$a + b \equiv a - (n-b) \mod n$$.