I wrote a post on my blog detailing how to come up with this solution https://codual.github.io/2019/07/03/traversal
Fun exercise: Write a Haskell function `update :: Tree a → [a] → Maybe (Tree a)`, that updates the leaves of a Tree by those given in a list (if there are not enough, return Nothing). My attempt after CW
pop :: Compose (State [a]) Maybe a
pop = Compose $ do
xs <- get
modify' (drop 1)
pure (listToMaybe xs)
update = evalState . getCompose . go
go (Node _ ) = pure <$> pop
go (Node x ts) = Node x <$> traverse go ts
Me hice hace un tiempo una lista de ideas para TFG para mates/info y me la he vuelto a encontrar. Como a mí ya no me va a servir, voy a retocarla un momento y cederla al mundo. Si alguien se anima con algo de esto porfa que me escriba que me va a hacer ilusión y tengo bibliografía de casi todo por ahí.
"I was quite surprised as well to not find this hierarchy in the literature, so I wrote my graduate thesis about it" https://cstheory.stackexchange.com/questions/39260
How do I make base phi a meme?
There are 10 types of people: 1 that is easily understood and the other 0.1 that's completely irrational
original source for the image (birdsite link)
The friends win if any of them writes down the number on their own forehead. If none of them manage to do so, then the demon wins.
To motivate them we may assume that if the friends win then they all receive a small prize such as cupcakes. Otherwise the demon will keep the cupcakes and the friends will not get any.
Under what circumstances can the friends win?
I am inspired by a toot of @mx_psi to write down a puzzle I heard last year from a friend.
Three friends are standing around when a demon appears and writes a real number on each one's forehead (they have large foreheads). The demon then invites each of them to write down a finite list of real numbers on a piece of paper. The friends may see each other's foreheads, but must not communicate otherwise. All three simultaneously reveal their papers. (1/2)
The Axiom of Choice is Wrong https://cornellmath.wordpress.com/2007/09/13/the-axiom-of-choice-is-wrong/
Math & computer science student (undergraduate) from Spain. I like theoretical computer science and puns.
A Mastodon instance for maths people. The kind of people who make \(\pi z^2 \times a\) jokes.
\) for inline LaTeX, and
\] for display mode.