Discrete Math with Programming: A Principled Approach

11/28/2020
by   Yanhong A. Liu, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/22/2022

Conceptual Mathematics via Literate Programming

Recent developments in computer programming and in mathematics suggest t...
research
07/07/2019

A Bridge Anchored on Both Sides: Formal Deduction in Introductory CS, and Code Proofs in Discrete Math

There is a sharp disconnect between the programming and mathematical por...
research
08/07/2020

Cons-free Programs and Complexity Classes between LOGSPACE and PTIME

Programming language concepts are used to give some new perspectives on ...
research
06/20/2017

An Online Development Environment for Answer Set Programming

Recent progress in logic programming (e.g., the development of the Answe...
research
08/28/2020

An Experience of Introducing Primary School Children to Programming using Ozobots

Algorithmic thinking is a central concept in the context of computationa...
research
08/14/2023

Disco: A Functional Programming Language for Discrete Mathematics

Disco is a pure, strict, statically typed functional programming languag...
research
04/29/2021

Predicate Invention by Learning From Failures

Discovering novel high-level concepts is one of the most important steps...

Please sign up or login with your details

Forgot password? Click here to reset