Skip to content

Instantly share code, notes, and snippets.

@isomorphisms
Created October 8, 2014 23:24
Show Gist options
  • Save isomorphisms/c39f41205d7b867bd510 to your computer and use it in GitHub Desktop.
Save isomorphisms/c39f41205d7b867bd510 to your computer and use it in GitHub Desktop.
eigenvalues of a shift-average operation on a circle
# first page of www.math.sunysb.edu/~kirillov/mat552/liegroups.pdf
# However, explicitly computing the characteristic polynomial and finding the roots is a rather difficult problem.
#He must mean for general N because this seems to work for me??
require(magrittr)
require(matrixcalc)
#result of much futzing
{diag(5) %>% function(x) shift.left(x) + shift.right(x) %>% function(x) x+ rbind( c(rep(0,4),1), rep(0,5), rep(0,5), rep(0,5), c(1,rep(0,4)) ) } -> shape
#> shape
# [,1] [,2] [,3] [,4] [,5]
#[1,] 0 1 0 0 1
#[2,] 1 0 1 0 0
#[3,] 0 1 0 1 0
#[4,] 0 0 1 0 1
#[5,] 1 0 0 1 0
# shape/2 is the desired matrix for shifting 5 points on a circle as described in the PDF
N=55
{diag(N) %>% function(x) shift.left(x,fill=c(1,rep(0,N-1)) ) + shift.right(x,fill=c(rep(0,N-1),1) )} -> big
eigen(big/2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment