Undergrad Cycles from patterns in a permutation matrix

Click For Summary
In a permutation matrix, identifying fixed points and transpositions is straightforward, but finding cycles efficiently remains a challenge. The cycle decomposition of a permutation is ideally O(n), yet achieving faster detection methods is questioned. The complexity may actually be O(n^2) if all entries must be read to identify the next column in a cycle. The discussion suggests that detecting a cycle before it closes could relate to the complexities of sorting algorithms, which average O(n log n) and can reach O(n^2) in the worst case. Ultimately, the consensus is that no faster method for cycle detection exists beyond these complexities.
nomadreid
Gold Member
Messages
1,762
Reaction score
248
TL;DR
Beyond fixed points and transpositions, is there an easy way to spot the subset of rows in a permutation matrix that indicate a cycle ?
In a permutation matrix (the identity matrix with rows possibly rearranged), it is easy to spot those rows which will indicate a fixed point -- the one on the diagonal -- and to spot the pairs of rows that will indicate a transposition: a pair of ones on a backward diagonal, i.e., where the row+column subscripts are a constant -- and of course one can find cycles by multiplying a vector and tracing around what goes to what. But is there some quicker way to spot the collections of rows that will correspond to a cycle?
 
Physics news on Phys.org
The cycle decomposition of a permutation should be ##O(n)##. How could you hope to find something faster? You still have to read those ##n## entries.
 
Thanks, fresh_42. So the answer to my question is "no". That seems pretty clear.
 
nomadreid said:
Thanks, fresh_42. So the answer to my question is "no". That seems pretty clear.
Maybe I made a mistake. It could be ##O(n^2)## if we have to read all entries of a row to find the next column: if ##(i,j)## read ##k## until ##k=j##. So it depends a bit on what we are counting. Your question then could be phrased as: can we detect a cycle before closing the cycle? The answer is likely the complexity of a sorting algorithm which are in general ##O(n\log n)## average and ##O(n^2)## worst case.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
12K