This volume contains the papers presented at the 29th Symposium on Mat- matical Foundations of Computer Science, MFCS 2004, held in Prague, Czech Republic, August 22–27, 2004. The conference was organized by the Institute for Theoretical Computer Science (ITI) and the Department of Theoretical Com- terScienceandMathematicalLogic(KTIML)oftheFacultyofMathematicsand Physics of Charles University in Prague. It was supported in part by the Eu- pean Association for Theoretical Computer Science (EATCS) and the European Research Consortium for Informatics and Mathematics (ERCIM). Traditionally, the MFCS symposia encourage high-quality research in all branches of theoretical computer science. Ranging in scope from automata, f- mal languages, data structures, algorithms and computational geometry to c- plexitytheory,modelsofcomputation,andapplicationsincludingcomputational biology, cryptography, security and arti?cial intelligence, the conference o?ers a unique opportunity to researchers from diverse areas to meet and present their results to a general audience. The scienti?c program of this year’s MFCS took place in the lecture halls of the recently reconstructed building of the Faculty of Mathematics and P- sics in the historical center of Prague, with the famous Prague Castle and other celebratedhistoricalmonumentsinsight.Theviewfromthewindowswasach- lengingcompetitionforthespeakersinthe?ghtfortheattentionoftheaudience. But we did not fear the result: Due to the unusually tough competition for this year’s MFCS, the admitted presentations certainly attracted considerable in- rest. The conference program (and the proceedings) consisted of 60 contributed papers selected by the Program Committee from a total of 167 submissions.