- #1
evinda
Gold Member
MHB
- 3,836
- 0
Hello! (Wave)
Let $X=<x_1,x_2, \dots , x_m>$ and $Y=<y_1,y_2, \dots, y_n>$ be sequences and let $Z=<z_1, z_2, \dots, z_k>$ a greatest common subsequence(GCS) of $X$ and $Y$.Then:
Could you explain me the above sentences? (Thinking)
If we conclude at the first sentence that $Z_{k-1}$ is a GCS of $X_{m-1}$ and $Y_{n-1}$,does this mean that we take into consideration the order of the elements of the sequences? (Thinking)
Also, at the second sentence,do we consider that $n<m$ and that $k=m$ ? (Thinking)
Let $X=<x_1,x_2, \dots , x_m>$ and $Y=<y_1,y_2, \dots, y_n>$ be sequences and let $Z=<z_1, z_2, \dots, z_k>$ a greatest common subsequence(GCS) of $X$ and $Y$.Then:
- If $x_m=y_n$,then $z_k=x_m=y_n$ and $Z_{k-1}$ is a GCS of $X_{m-1}$ and $Y_{n-1}$.
- If $x_m \neq y_n$ and $z_k \neq x_m$,then $Z_{k-1}$ is a GCS of $X_{m-1}$ and $Y$.
Could you explain me the above sentences? (Thinking)
If we conclude at the first sentence that $Z_{k-1}$ is a GCS of $X_{m-1}$ and $Y_{n-1}$,does this mean that we take into consideration the order of the elements of the sequences? (Thinking)
Also, at the second sentence,do we consider that $n<m$ and that $k=m$ ? (Thinking)