## "Babes-Bolyai" University of Cluj-Napoca Faculty of Mathematics and Computer Science

 Algorithms
 Code Semes-ter Hours: C+S+L Credits Type Section MI001 1 2+2+2 7 compulsory Matematică MI001 1 2+2+2 7 compulsory Informatică MI001 1 2+2+2 8 compulsory Matematică-Informatică MI001 1 2+2+2 7 compulsory Matematici Aplicate MI001 1 2+2+2 8 compulsory Tehnologie Informatica
 Teaching Staff in Charge
 Prof. FRENTIU Militon, Ph.D., mfrentiu@cs.ubbcluj.roLect. PREJMEREAN Vasile, Ph.D., per@cs.ubbcluj.roLect. IONESCU Clara, clara@cs.ubbcluj.ro
 Aims 1. To understand what an algorithm is. To learn PSEUDOCOD as a language for designing algorithms. 2. To gain skils of designing correct algorithms. 3. To write algorithms for some classes of problems: operations on vectors, matrices, and polynoms; solving linear equations and systems; sorting and searching. 4. To learn Pascal, and to get used to Pascal programming, running, testing, and debugging programs. 5. To acquire and improve a good programming style.
 Content 1.Algorithms and their design. The concepts of algorithm and subalgorithm. Pseudocod language. 2. Clases of algorithms (operations with sequences and matrices; combinatorics; solving ecuations and linear sistems; searching, sorting, and merging). 3. Simple Pascal Programs. The syntax and semantics of Pascal constructs: constants, types, expressions, declarations, statements, functions and procedures. 4. Verifying algorithms (steps in obtaining a program: specification, design, coding, testing and debugging; documentation; complexity). 5. Program correctness. Floyd's Method for proving correctness. Obtaining correct programs from specifications. Programming rules. 6. Design Methods: top-down, stepwise refinement, divide et impera; modular programming; Structured programming. Backtracking.
 References 1. M.Frentiu si altii, Manualul incepatorului in Programarea Pascal, Ed. Microinformatica, Cluj-Napoca, 1995, 252 pagini, ISBN 973-9215-04-1 2. Frentiu, M., I.Lazar, Bazele programarii. Proiectarea algoritmilor, 2000, 184 pagini, Ed.Univ. Petru Maior, Targu-Mures. 3. M.Frentiu si altii, Programare Pascal. Programe ilustrative, probleme propuse, pentru elevi si studenti, Ed. Promedia, 1995, 229 pagini, ISBN 973-96862-1-4. 4. M.Frentiu, V.Prejmereanu, Algoritmica si programare, Lito. Univ. Babes-Bolyai, Cluj-Napoca, 1995, 261 pagini. 5. Frentiu, M., I.Lazar, S.Motogna si V.Prejmereanu, vol.I - Elaborarea algoritmilor, 1997, 188 pagini; vol.II - Programare Pascal, 392 pagini; Ed.Universitatii Babes-Bolyai, Cluj-Napoca. 6. M.Frentiu si B.Parv, Elaborarea programelor. Metode si tehnici moderne, Ed.Promedia, Cluj-Napoca, 1994, 217 pag. 7. Kasa Z., Ismerkedes az informatikaval, Editura Dacia, 1983. 8. Kasa, Z., Algoritmusok tervezese, Ed. Studium, Cluj, 1994. 9. Knuth, D., Tratat de programarea calculatoarelor, Ed. Tehnica (Algoritmi fundamentali; Cautare si sortare) 10. Livovschi, L., H.Georgescu, Sinteza si analiza algoritmilor, Editura St. si Enciclopedica, Bucuresti, 1986. 11. Vaduva, I., Baltac, V., V.Florescu, I.Floricica, M.Jitaru, Ingineria programarii, Editura Academiei RSR, Bucuresti, 1985.
 Assessment Knowledge evaluation will take into account both the theoretical and the practical knowledge, and also, the abilities to use the computer for solving concrete problems. The laboratory activity consists of designing programs (as homework which is controlled by the assistants) and running them. Attention will be given to the way the students design, implement, and document their programs. At the end of term the activity is followed by an exam consisting of two parts: a written exam, and a practical one. The first one must verify the theoretical knowledge and the capacity to design and implement correct Pascal programs, and a first grade (E)is given for this. The practical examination consists in designing, testing and debugging a Pascal program, for which a second grade (P) is given. The laboratory actiovity of students will be graded by a third mark (L), and the documentation written during the term will received the fourth grade (D). The final mark is the average of these four gradess, but only if they are at least 5, otherwise the exam is not given. Therefore, final grade = (E+P+L+D)/4.