Computational Perspectives on Democracy