# the Pascal graph ####
Pascal <- function(n) {
M <- matrix(0, nrow = n+1, ncol = n+2)
for(i in 1:(n+1)) {
M[i, ][c(i, i+1L)] <- 1
}
M
}
bratteliKernels(Pascal, 4)
# the Euler graph ####
Euler <- function(n) {
M <- matrix(0, nrow = n+1, ncol = n+2)
for(i in 1:(n+1)) {
M[i, ][c(i, i+1L)] <- c(i, n+2-i)
}
M
}
bratteliKernels(Euler, 4)
Run the code above in your browser using DataLab