Valter, I do not think that you can tell from your photos. My guess would be Cyperus longus which is common in the Algarve (if not that then maybe C. rotundus). Eight species are recorded from the Algarve (one now probably extinct). Some species can be easily excluded as their growth habit is very different. If you can read Spanish, you could try and identify it from the online Flora Iberica: http://www.floraiberica.es/v.2.0/PHP/cientificos_.php?gen=Cyperus - then choose the pdf option. The Flora Iberica is a brilliant resource covering plants in Spain and Portugal. It is a monumental authorative work, but not all genera are covered yet. For the main page, go to: http://www.floraiberica.org/ Boa Sorte Brian