tailieunhanh - Prolog Experiments in Discrete Mathematics, Logic, and Computability

The preceding paragraph is not an indictment of application-oriented curricula per se, only of the particular way [N1] wants such a curriculum implemented: it allows the utilitarian impulse to overwhelm the basic ed- ucational mission, with the result that basic ideas and skills not directly related to the so-called real world problems often get left out. By yielding to the temptation of “doing just enough to get the problems solved”, the curriculum of [N1] ends up presenting a fragmented and amorphous version of mathematics. What the Standards should have done is to bring the idea of mathematical closure to the forefront. In other words, if certain tools are developed. | Prolog Experiments in Discrete Mathematics Logic and Computability James L. Hein Portland State University March 2009 Copyright 2009 by James L. Hein. All rights reserved. Contents 1 Introduction to Getting An Introductory Some Programming 2 Beginning Variables Predicates and Equality Unification and Numeric Type Family Interactive Reading and Writing. 23 Adding N ew Modifying Deleting Clauses . 28 3 Recursive T The Ancester Writing and Switching Inductively Defined 4 Negation and Inference The Blocks Verifying Arguments in First-Order Logic. 46 Equality Axioms . 48 SLD-Resolution. 49 The Cut Operation . 51 5 List List and String Notation . 54 Sets and Bags of Solutions to a Query. 56 List Membership and Set List Operations . 64 2 Contents 3 6 List Binary Arranging Simple The Birthday Predicates as Mapping Numeric Mapping Comparing Numeric Functions . 83 Comparing Predicates . 84 7 Languages and Grammar and A Parsing Programming Language Parsing. 89 Arithmetic Expression Evaluation. 90 8 Deterministic Finite Automata . 94 Nondeterministic Finite Mealy Machines. 99 Moore Pushdown Automata . 104 Turing Markov Algorithms. 110 Post Algorithms . 112 9 Problems and Lambda Closure . 116 Transforming an NFA into a Minimum-State Defining Tautology Tester. 130 CNF Generator . 134 .