1 | initial version |
Hi Fidelbc, thanks heaps for your help.
You are right that I didn't have 'word: ' at the beginning when I define i and j, but it constantly producing error message says "x is not in the list".
So what I did was print out list S, then I saw it is the format as: ['word: 0000', 'word: 0001', 'word: 0010', 'word: 0011', 'word: 0100', 'word: 0101', 'word: 0110', 'word: 0111', 'word: 1000', 'word: 1001', 'word: 1010', 'word: 1011', 'word: 1100', 'word: 1101', 'word: 1110', 'word: 1111']
That's why I added 'word: ' into the expression for i and j.
I just tried to change to M[i,j] += 1, but still having same error message says "use copy(M) to change a copy of M".
The labels a, b, and c are the labels for edges, as they represent different states for certain group structures.
I also tried your suggested version, but it produce another error message says: "need more than 1 value to unpack".
Do you mind spending a bit more time to help me to look into it please? Thanks a lot for your time.