I am trying to prove problem 1.59 in Sipser's book: Introduction to the theory of computation , 2nd Edition.
Let $M=(Q,\Sigma,\delta,q_0,A)$ be a DFA and let $q'$ be a state of $M$ called its "home". A Synchronizing sequence for $M$ and $q'$ is a string $s\in \Sigma^*$ where $\delta (q,s)=q'$ for every $q\in Q$. (We actually have extended $\delta$ to strings so that $\delta(q,s)$ equals the state where $M$ ends up when $M$ starts at state $q$ and reads input $s$).
Say that $M$ is Synchronizable if it has a synchronizing sequence for some state $q'$.
Prove that, if $M$ is a $k$-state synchronizable DFA, then it has a synchronizing sequence of length at most $k^3$. Moreover, can you improve upon this bound?
I'm more interested in proving that the synchronized sequence is of length of at most $k^3$ then trying to improve upon this bound.
I tried to prove (with no success) that there exists $w\in \Sigma^*$ which $|w| \leq k^2 $ so that: $\delta(q_1,w)=\delta(q_2,w)$ for two distinct states in $M$: $q_1,q_2\in Q$ (thus, $w$ can be read from two states in the automaton and get to the same final state).
If I prove it, I could construct a word $w$ which will be a synchronizing sequence in $M$ and $|w|\leq k^3$ as required.