Self-reproducing programs. And Introduction to logic. COS 116, Spring 2012 Adam Finkelstein.

Slides:



Advertisements
Similar presentations
1 Knowledge Representation Introduction KR and Logic.
Advertisements

Discrete Mathematics Lecture 1 Logic of Compound Statements
INTRODUCTION LOGICAL OPERATIONS TRUTH TABLE AND RULES.
What computers just cannot do. (Part II) COS 116, Spring 2012 Adam Finkelstein.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Welcome to ENEE244-02xx Digital Logic Design
Knowledge Representation Methods
CS128 – Discrete Mathematics for Computer Science
Logic: From Greeks to philosophers to circuits. COS 116: 3/11/2008 Sanjeev Arora.
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
1 CA 208 Logic Logic Prof. Josef van Genabith Textbooks:  The Essence of Logic, John Kelly, Prentice Hall, 1997  Prolog Programming, Third Edition, Ivan.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Memory; Sequential & Clocked Circuits; Finite State Machines COS 116: 3/25/2008 Sanjeev Arora.
COMS W1004 Introduction to Computer Science June 11, 2008.
What computers just cannot do. (Part II) COS 116: 3/5/2008 Sanjeev Arora.
BOOLEAN LOGIC CSC 171 FALL 2004 LECTURE 7. ASSIGNMENT Review Quiz # 2 Start reading Chapter 5.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
Self-reproducing programs. And Introduction to logic. COS 116: 3/6/2008 Sanjeev Arora.
Computer Science 101 Boolean Algebra. What’s next? A new type of algebra – Helps us A new type of algebra – Helps us With logical reasoningWith logical.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
22C:19 Discrete Math Boolean Algebra & Digital Logic Fall 2010 Sukumar Ghosh.
Final Exam Review Instructor : Yuan Long CSC2010 Introduction to Computer Science Apr. 23, 2013.
From Greek philosophers to circuits: An introduction to boolean logic. COS 116, Spring 2011 Sanjeev Arora.
Logic: From Greeks to philosophers to circuits. COS 116, Spring 2012 Adam Finkelstein.
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
Memory; Sequential & Clocked Circuits; Finite State Machines
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
Lecture 2 – Boolean Algebra Lecturer: Amy Ching Date: 21 st Oct 2002.
Lecture 17: Digital Design Today’s topic –Intro to Boolean functions Reminders –HW 4 due Wednesday 10/8/2014 (extended) –HW 5 due Wednesday 10/15/2014.
Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
1 8/29/05CS150 Introduction to Computer Science 1 Professor: Shereen Khoja
CS 2210 (22C:019) Discrete Structures Introduction and Scope: Propositions Spring 2015 Sukumar Ghosh.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
(CSC 102) Lecture 8 Discrete Structures. Previous Lectures Summary Predicates Set Notation Universal and Existential Statement Translating between formal.
June 11, 2002© Howard Huang1 Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn.
What computers just cannot do. (Part II) COS 116: 3/1/2011 Sanjeev Arora.
Computing via boolean logic. COS 116: 3/8/2011 Sanjeev Arora.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
COS 116: The Computational Universe Adam Finkelstein Spring 2010.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
CT214 – Logical Foundations of Computing Darren Doherty Rm. 311 Dept. of Information Technology NUI Galway
Chapter 1 Propositional Logic
Logic.
Morgan Kaufmann Publishers
Computer Science 210 Computer Organization
Discrete Mathematics Logic.
MATH 245 Spring 2009 This is mathematics for computer science
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Computer Architecture Syllabus
Administrivia Course Web:
Boolean Algebra Digital Electronics
CSE 311 Foundations of Computing I
CS201: Data Structures and Discrete Mathematics I
Computer Science 210 Computer Organization
Negations of quantifiers
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Discrete Mathematics Logic.
Discrete Structures Prepositional Logic 2
THE LAWS OF LOGIC Let’s be reasonable!.
CS201: Data Structures and Discrete Mathematics I
Conditionals.
Presentation transcript:

Self-reproducing programs. And Introduction to logic. COS 116, Spring 2012 Adam Finkelstein

Midterm One week from today – in class Mar 15 Covers  lectures, labs, homework, readings to date Old midterms will be posted on course web Mar 12 and 14 lab times will be review  feel free to attend either or both  come with questions

Part 1: Self-Reproduction Fallacious argument for impossibility: Blueprint

“Droste Effect”

Fallacy Resolved: “Blueprint” can involve computation; need not be an exact copy! Print the following sentence twice, the second time in quotes. “Print the following sentence twice, the second time in quotes.”

High-level view of self-reproducing program Print 0 Print 1. Print 0... } Prints binary code of B } Takes binary string on tape, and in its place prints (in English) the sequence of statements that produce it, followed by the translation of the binary string into English. A B

Self-reproducing machines [John von Neumann, 1940s] 2-D and 3-D cellular automata (with a “moving arm” controlled by the automaton itself) that makes a precise copy of itself. “Accidental changes” during copying --> mutations, evolution This and related ideas of Pauli motivated discovery of the molecular basis of life on earth (DNA, RNA etc.)

Moving on to part 2… Upcoming lectures: Computational Hardware Boolean logic and Boolean circuits Sequential circuits (circuits with memory) Clocked circuits and Finite State Machines CPUs Operating System Networks, Internet

Ben only rides to class if he overslept, but even then if it is raining he’ll walk and show up late (he hates to bike in the rain). But if there’s an exam that day, he’ll bike if he overslept, even in the rain. Q: It is raining today, Ben overslept, and there’s an exam. Will Ben bike today? “Logical reasoning”, “ Propositional logic.” Discussion Time

Propositional Logic: History Aristotle – Law of excluded middle, Law of contradiction. Stoic Philosophers (3 rd century BC) – Basic inference rules (modus ponens etc.) Some work by medieval philosophers De Morgan and Boole (19 th century): Symbolic logic – “automated”, “mechanical” C. Shannon (1930s) – Proposal to use digital hardware

Example Ed goes to the party if Dan does not and Stella does. Choose “Boolean variables” for 3 events: E: Ed goes to party D: Dan goes to party S: Stella goes to party } { Each is either TRUE or FALSE E = S AND (NOT D) Alternately: E = S AND D

Ed goes to the party if Dan goes or Stella goes E = D OR S E is TRUE if one or both of D and S are TRUE Note: In everyday language OR has another meaning too! Example: You can eat an orange or an apple Logical “OR”

Boolean expressions Composed of boolean variables, AND, OR, and NOT Examples: D AND ( P OR (NOT Q)) C OR D OR E

Truth table Lists the truth value of the Boolean expression for all combinations of values for the variables. Boolean Expression E = S AND D ESD Truth table 0 = FALSE 1 = TRUE Write E for all possible values of D, S.

Let’s work an example… Boolean Expression E = D OR S What are x and y ?!? y x ESD Possibilities: x=0, y=0 x=0, y=1 x=1, y=0 X=1, y=1

Ben Revisited B: Ben Bikes R: It is raining E: There is an exam today O: Ben overslept Break up in groups of three and come up with Boolean expression for B in terms of R, E and O. Ben only rides to class if he overslept. But even then if it is raining he’ll walk and show up late (he hates to bike in the rain). But if there’s an exam that day he’ll bike if he overslept, even in the rain.

Boolean “algebra” A AND B written as A  B A OR B written as A + B = = = 1 0  0 = 0 0  1 = 0 1  1 = 1 Funny arithmetic

Boolean circuit Pictorial representation of Boolean expression using Special symbols for AND, OR and NOT A AND B A OR B A

Three Equivalent Representations Boolean Expression E = S AND D Truth table: Value of E for every possible D, S. TRUE=1; FALSE= ESD Boolean Circuit E S D

Ed goes to the party if Dan doesn’t AND Stella doesn’t E = D AND S Is this equivalent to: Ed goes to the party if NOT (Dan goes OR Stella goes) ….? (De Morgan’s Laws)

Next time: Boolean circuits, the basic components of the digital world Midterm will have a question on boolean logic.