I found this problem on a programming competition website, and decided to analyze it a bit. The problem involves two players playing Rock-Paper-Scissors until one player has won 2 rounds (this is called "best-of-3", even if there may be more than 3 rounds played, due to ties). This can be generalized in at least two ways:
- The game is generalized to include more than 3 possible moves, such as Rock-Paper-Scissors-Lizard-Spock.
- Players play until one of them has won
rounds, with
.
In this post I explore both generalizations, finding solutions to them.
I had often heard the expression "C++ now has covariant return types". To be honest, I vaguely knew covariance was a mathematical term, and I was also pretty sure it had nothing to do with statistical covariance.
Now that I understand a bit more about category theory, I feel I can clarify some things about this usage of the word "covariance" in programming languages. Surprisingly, it is not a terrible bastardization of the mathematical term, as C++ and Java have done to the word "functor".
A few days ago I attended a series of lectures on graph theory and optimization at the National University of Rosario, Santa Fe. I'd like to discuss one of the topics presented there by Nicolás Stier-Moses, from Columbia University. This topic is selfish routing, Braess's paradox, and the price of anarchy, in the field of algorithmic game theory.
I'll give a brief overview of these points in his talk, and present one of his results, a short proof of the
upper bound on the price of anarchy in linear path cost congestion routing problems.
Given a graph
, with
,
, we can define a matrix
, called
's incidence matrix, defined as such:
In this post, we study some of this matrix's algebraic properties.
Given a graph
, with
,
, we can consider the matrix
defined as such:
We call this the adjacency matrix. In this article we study some of its algebraic properties.