# Mathematical Foundations of Computer Science

### About

**Module:**Mathematical Foundations to Computer Science (CH-233)**Semester:**Fall 2024**Prerequisites:**None**Instructor:**Jürgen Schönwälder**Office Hours:**Monday, 11:15-12:30 (Research I, Room 87)**TA (Group A):**Babayev, Gazanfar**TA (Group B):**Borovlev, Petr**TA (Group C):**Cprljakovic, Bogdan**TA (Group D):**Mitov, Rumen Valentinov**TA (Group E):**Nuredini, Kejsi**TA (Group F):**Paniukhin, Nikita**TA (Group G):**Valean, Andrei-Gheorghe**TA (Group H):**Valladares, Zaara**Lecture:**Tuesday, 11:15-12:30 (RLH-172)**Lecture:**Friday, 08:15-09:30 (RLH-172)**Tutorial:**Friday, 09:45-11:00 (RLH-172)**1st Module Exam:**TBD**2nd Module Exam:**TBD

### Content and Educational Aims

The module introduces students to the mathematical foundations of computer science. Students learn to reason logically and clearly. They acquire the skill to formalize arguments and to prove propositions mathematically using elementary logic. Students are also introduced to fundamental concepts of graph theory and elementary graph algorithms.

After establishing the concept of algorithms, the first part covers basic elements of discrete mathematics, leading to Boolean algebra, propositional logic, and predicate logic. Students learn how to use fundamental proof techniques to prove (or disprove) simple propositions. The second part of the module introduces students to basic concepts of algebraic structures like groups, rings, and fields and different structure preserving maps (homomorphisms). Students study how these abstract concepts relate to problems in computer science. The last part of the module covers the basic elements of graph theory and the different representation of graphs. Elementary graph algorithms are introduced that have a wide range of applicability in computer science.

### Intended Learning Outcomes

By the end of this module, students will be able to

- explain basic concepts and properties of algorithms;
- understand the concept of termination and complexity metrics;
- illustrate basic concepts of discrete math (sets, relations, functions);
- use basic proof techniques and apply them to prove properties of algorithms;
- summarize basic principles of Boolean algebra and propositional logic;
- use predicate logic and outline concepts such as validity and satisfiability;
- distinguish abstract algebraic structures such as groups, rings and fields;
- classify different structure preserving maps (homomorphisms);
- understand calculations in finite fields and their applicability to computer science;
- explain elementary concepts of graph theory and use different graph representations;
- outline basic graph algorithms (e.g., traversal, search, spanning trees).

### Resources

### Literature

- Eric Lehmann, F. Thomson Leighton, Albert R. Meyer: "Mathematics for Computer Science", 2018
- Richard Hammack: "Book of Proof", 3rd edition, 2020
- Mike Gordon: "Background reading on Hoare Logic", 2016
- Michael Stonebank: "UNIX Tutorial for Beginners", 2001

### Schedule

Tue 11:15 | Fri 08:15 | Topics |
---|---|---|

2024-09-03 | 2024-09-06 | Introduction and maze generation algorithms |

2024-09-10 | 2024-09-13 | String search algorithms, complexity and correctness |

2024-09-17 | 2024-09-20 | Mathematical notations and proof techniques |

2024-09-24 | 2024-09-27 | Sets, relations, functions |

2024-10-01 | 2024-10-04 | Representation of integer and floating point numbers |

2024-10-08 | 2024-10-11 | Representation of characters, strings, date and time |

2024-10-15 | 2024-10-18 | Boolean algebra, functions, expressions, laws |

2024-10-22 | 2024-10-25 | Normal forms, minimization of Boolean functions |

2024-10-29 | 2024-11-01 | Propositional logic and predicate logic |

2024-11-05 | 2024-11-08 | Abstract algebra, group theory, Lagrange's theorem |

2024-11-12 | 2024-11-15 | Rings, fields, homomorphisms, and lattices |

2024-11-19 | 2024-11-22 | Graph theory and elementary graph algorithms |

2024-11-26 | 2024-11-29 | Software correctness, specification and verification |

2024-12-03 | 2024-12-06 | Automated generation of proof goals and termination proofs |

### Assignments

Date/Due | Name | Topics |
---|---|---|

2024-09-13 | Sheet 01 | Kruskal's algorithm and Boyer-Moore algorithm |

2024-09-20 | Sheet 02 | Boyer-Moore algorithm, Landau Notation, Kruskal's algorithm |

2024-09-27 | ||

2024-10-04 | ||

2024-10-11 | ||

2024-10-18 | ||

2024-10-25 | ||

2024-10-31 | ||

2024-11-07 | ||

2024-11-14 | ||

2024-11-21 | ||

2024-12-28 | ||

2025-01-15 | extra sheet for students who did not manage to obtain 50/120 points |

### Rules

The grade is determined by the final exam (100%). To attend the final exam, it is necessary to collect 50 points in weekly assignments. There are ten regular assignments and two bonus assignments during the semester and there is another bonous assignment before the second module exam. Each assignment is worth 10 points. Hence, students have to obtain 50/120 points during the semester to qualify for the first module exam or 50/130 points to qualify for the second module exam. Once a module achievement has been obtained, it remains valid for all subsequent module exams.

Electronic submission is the preferred way to hand in homework solutions. Please submit documents (plain ASCII/UTF-8 text or PDF, no Word) and your source code (packed into a zip archive after removing all binaries and temporary files) via the online submission system. If you have problems, please contact one of the TAs. Solutions for assignments may need to be defended in an oral interview.

Late submissions will not be accepted. In case you are ill, you have to follow the procedures defined in the university policies to obtain an official excuse. If you obtain an excuse, the new deadline will be calculated as follows:

- Determine the number of days you were excused until the deadline day, not counting excused weekend days.
- Determine the day of the end of your excuse and add the number of day you obtained in first step. This gives you the initial new deadline.
- If the period between the end of your excuse and the new deadline calculated in the second step includes weekend days, add them as well to the new deadline. (Iterate this step if necessary.)

For any questions stated on assignment sheets or exam sheets, we by default expect a reasoning for the answer given, unless explicitly stated otherwise.

Students must submit individual solutions. If you copy material verbatim from the Internet or other sources, you have to provide a proper reference. If we find your solution text on the Internet without a proper reference, you risk to lose your points. Any cheating cases will be reported to the registrar. In addition, you will lose the points (of course). These rules also apply to any generative AI tool, such as ChatGPT.

- You are discouraged from using AI tools UNLESS under direct instruction from your instructor to do so.
- If AI is permitted to be used, you must clearly state how AI was used in completing the assignments. No more than 25% of an assignment should be created with AI if the instructor gives permission for its use.
- Note that the material generated by these programs may be inaccurate, incomplete, or otherwise problematic. Their use may also stifle your own independent thinking and creativity. Accordingly, reduction in the grade is likely when using AI. Rather use your own brain.

Any programs, which have to be written, will be evaluated based on the following criteria:

- correctness including proper handling of error conditions
- proper use of programming language constructs
- clarity of the program organization and design
- readability of the source code and any output produced

Source code must be accompanied by a README file providing an overview of the source files and giving instructions how to build the programs. A suitable Makefile is required if the build process involves more than a single source file.

If any part of these rules are confusing or uncertain, please reach out to your instructor for a conversation before submitting your work.

If you are unhappy with the grading, please report immediately (within one week) to the TAs. If you can't resolve things, contact the instructor. Problem reports which come late, that is after the one-week period, are not considered anymore.