Discrete Math with Programming: A Principled Approach
Autor: | Yanhong A. Liu, Matthew Castellana |
---|---|
Jazyk: | angličtina |
Rok vydání: | 2020 |
Předmět: |
Discrete mathematics
Set-builder notation FOS: Computer and information sciences Computer science 020207 software engineering 02 engineering and technology Predicate (mathematical logic) computer.file_format Notation Set (abstract data type) Computer Science - Computers and Society 020204 information systems Product (mathematics) Computers and Society (cs.CY) 0202 electrical engineering electronic engineering information engineering Computer Science::Programming Languages Executable computer Declarative programming |
Zdroj: | SIGCSE |
Popis: | Discrete mathematics is the foundation of computer science. It focuses on concepts and reasoning methods that are studied using math notations. It has long been argued that discrete math is better taught with programming, which takes concepts and computing methods and turns them into executable programs. What has been lacking is a principled approach that supports all central concepts of discrete math---especially predicate logic---and that directly and precisely connects math notations with executable programs. This paper introduces such an approach. It is based on the use of a powerful language that extends the Python programming language with proper logic quantification ("for all'' and "exists some''), as well as declarative set comprehension (also known as set builder) and aggregation (e.g., sum and product). Math and logical statements can be expressed precisely at a high level and be executed directly on a computer, encouraging declarative programming together with algorithmic programming. We describe the approach, detailed examples, experience in using it, and the lessons learned. |
Databáze: | OpenAIRE |
Externí odkaz: |