Presentation is loading. Please wait.

Presentation is loading. Please wait.

Symbolic Processing. How to Teach “Programming” Lecture 1: Education for kids – Lego Mindstorms (NQC: Not.

Similar presentations


Presentation on theme: "Symbolic Processing. How to Teach “Programming” Lecture 1: Education for kids – Lego Mindstorms (NQC: Not."— Presentation transcript:

1 Symbolic Processing

2 How to Teach “Programming” Lecture 1: Education for kids – Lego Mindstorms (NQC: Not Quite C)NQC – Scratch Lecture 2: Unix for Poets – Request: bring a laptop if possible Windows Users: please install – Target audience: Grad Students in Linguistics – Unix shell scripts (almost not programming) – Small is Beautiful Lecture 3: Symbolic Processing – Target audience: MIT Computer Science Majors (circa 1974) – LISP: Recursion, Eval, Symbolic Differentiation – Lambda Calculus (“Small is Beautiful” beyond reason)

3 Agenda Old Business – Homework from last week – Nothing to Hand-In but Discussion… New Business – No Requests for Next Week Today’s Lecture – Symbolic Processing

4 Symbolic Features (Bet you can’t do this with your favorite statistics package) Complex Numbers: Sqrt(-1) Roots (without approximations) Differentiation (without approximations) Integration (without approximations) The On-Line Encyclopedia of Integer Sequences The On-Line Encyclopedia of Integer Sequences Eval

5 Sqrt(-1)  Error (for many tools)

6 Roots (without approximations)

7 Approximations such as Newton’s Method

8 Complex Roots

9 Newton’s Method

10 Symbolic Alternative

11

12

13 Symbolic Methods  Search

14 Recursion

15 (define (fact x) (if (<= x 1) 1 (* x (fact (- x 1))))) (define (fib x) (if (<= x 2) 1 (+ (fib (- x 1)) (fib (- x 2))))) (define (len x) (if (empty? x) 0 (+ 1 (len (rest x))))) (define (rev x) (if (empty? x) x (append (rev (rest x)) (list (first x))))) More Recursion Lecture3/recursive_examples.lsp

16 The Roots of LISP Eval

17 Symbolic Differentiation

18 Symbolic Differentiation Lecture3/deriv.lsp

19 Syntax

20 Semantics

21 Surprise: Church’s Thesis

22 Effective Procedure – always give some answer – always give the right answer – always be completed in a finite number of steps – work for all instances of problems of the class Recursively Computable – Three definitions later found to be equiv to one another general recursion Turing machines λ-calculus Church's thesis: Church's thesis – Effectively Procedure = Recursively Computable – Not a mathematical statement  No proof Church’s Thesis

23

24 Recursion & Factorial

25 Summary: Symbolic Features (Bet you can’t do this with your favorite statistics package) Complex Numbers: Sqrt(-1) Roots (without approximations) Differentiation (without approximations) Integration (without approximations) The On-Line Encyclopedia of Integer Sequences The On-Line Encyclopedia of Integer Sequences Eval

26 How to Teach “Programming” Lecture 1: Education for kids – Lego Mindstorms (NQC: Not Quite C)NQC – Scratch Lecture 2: Unix for Poets – Request: bring a laptop if possible Windows Users: please install – Target audience: Grad Students in Linguistics – Unix shell scripts (almost not programming) – Small is Beautiful Lecture 3: Symbolic Processing – Target audience: MIT Computer Science Majors (circa 1974) – LISP: Recursion, Eval, Symbolic Differentiation – Lambda Calculus (“Small is Beautiful” beyond reason)

27 Optional Homework Please watch: id= # id= # Google: growing a language Send feedback to – Do you agree? Disagree? – No opinion? Completely lost?


Download ppt "Symbolic Processing. How to Teach “Programming” Lecture 1: Education for kids – Lego Mindstorms (NQC: Not."

Similar presentations


Ads by Google