Catalan numbers for

  • triangulations
  • gambler’s ruin
  • binary trees
  • trees

…from the Flajolet/Sedgewick coursera analysis of algorithms

in R:

catalan <- function(n) {
    if(n<=1) 1
    else lapply(1:n,
        FUN=function(k) catalan(k-1) * catalan(n-k) ) %>% unlist %>% sum

(This is slow above catalan(10) though, so here’s a memoised version. Then if you want to run above catalan(250) you’ll need to adjust options(expressions=5e3) to something higher; otherwise the nesting of calls goes too deep.)

RP Tagging Game (repost, don’t reblog)

Tagged by: larebelleenrouge

Name of your muse: Jéröme “R” Grantaire

One picture that you like of your muse’s FC:

Two headcanons about your muse that you have never told anyone:

  • Grantaire has a fascination with Italy. It’s architecture and cities built on water.
  • Despite himself and what he makes other’s believe, Grantaire does love his family. Including his step-father. But it’s not through choice. He believes the only reason for his love for this man who isn’t his father is because he spent years growing up with him. And he hates himself for it. 

Three things your muse likes to do in their free time:

  • Drinking with Joly, Bossuet, Jehan and Bahorel.
  • Sketch in the park, though nowhere touristy.
  • Boxing.

Eight people your muse admires/loves:

  • Joly
  • Bossuet
  • His father
  • Enjolras
  • Jehan
  • Jacques-Louis David
  • Jean Baptiste Lemoyne
  • Bahorel

Three fond childhood memories:

  • When his grandparents took him to Italy when he was nine. 
  • His father putting up all his drawings up in his bedroom. 
  • Running away from the school trip in Spain. 

Two things your muse regrets:

  • Letting words and opinions get to him
  • Unable to survive without some sort of substance in his system.
  • For not telling his mother that he forgives her.

Tagging: phxlosophxes apxllxascending orxstxs willbesoufflegxrl notyouraveragesecretary jackthemonkcy e-isforfrance

bre-bunny asked:

YOOOO I ship Nic, Alex, and Worick as an ot3 too!!

at the beginning i liked alex/nic a lot but while reading the manga i wasn’t really sure anymore!!!! worick/alex was also helLLA CUTE AND SO WAS NIC/WORICK!!!!! so fuck it OT3 it is lol

anonymous asked:

hmu whenever you havin' these nights b, and I'll ship some of my homemade green tea ice cream to you. i'll even send a little bit of almonds in a bag on the side, with big spoons. cause you know, you can be the lil' spoon on those nights (☞゚∀゚)☞

you’re so cute oh my god. <33