Let $L$ be a regular language. We will define:
$$L_\text{almost} = \{ w'\mid \exists w\in L\ \text{such that $w'$ is almost similar to }w \}
$$
A word $w'$ is almost similar to $w$ if they are in the same length, and the difference between them is by one letter. for example: $abc$ and $abb$.
Prove that $L_\text{almost}$ is a regular language.
Ok, so I need to prove this by finding automata $M'$ that accepts $L_\text{almost}$. This is what I thought of:
$L$ is a regular language, so there is an automata $M$ which accepts it.
I thought of building $M'$ from $M$, and add parallel states to it for each state at $M$.
i.e., for every $q_i \in Q$, I will add $q'_i$ at $Q'$. The transitions for a word $w'\in L_\text{almost}$ will be just like at $M$, with one difference: if $w=a_1\ldots a_i\ldots a_n\in L$ and $w'=a_1\ldots a'_i\ldots a_n \in L_\text{almost}$, instead of going from $q_{i-1}$ to $q_i$ we will go to $q'_{i}$. From $q'_{i}$, we will proceed just like we would have done it at from $q_i$ at M, but on parallel states at $M'$. For $w=a_1\ldots a_n \in L$, this is the automata I thought of ($a'_i ≠ a_i$ for all $i$):
problem is that I don't know how to define the transition function for $M$. it seemed easy to me when I looked only at $w$, but I just can't describe at for $L$.
How can I define it here? or maybe there is a better way for approaching this question?