Universitetet i Linköping Institutionen för datavetenskap Anders Haraldsson
|
|
|
- Bruce Horton
- 10 years ago
- Views:
Transcription
1 list functions TDDC65 Artificial intelligence and Lisp Lecture 2 in Lisp Recursion, symbols and lists (chapter 4, 5, 6 Haraldssons book) local variables and local functions recursion over sequences * patterns * recursive / iterative process * double recursion * back tracking the function cons graphical representation of lists the list as a binary tree traversing formulas Test of equality (= 5 5) - numbers (eq 'a 'a) - symbols (or pointers) (eql 5 5) - atoms (eql #\a #\a) (eql 'a 'a) (equal '(a b c) '(a b c)) - lists Test of data types (numberp 5) - number? (symbolp 'a) - symbol? (atom 5) - atom? = not a list? (atom 'a) (listp '(a b c)) - list? To create lists The primitive (cons 'a '(b c)) => (a b c) Concatenate 2 (or more) lists (append '(a b) '(x y)) => (a b x y) Create a list of a fixed number of elements (list 'a (1+ 4) (first '(b c))) => (a 5 b) Constant list '(a b c d) or (quote (a b c d)) Observe the difference. What is? (cons '(1 2) '(a b)) =>? (append '(1 2) '(a b)) =>? (list '(1 2) '(a b)) =>? Common Lisp functions for lists Some of them: Is an element on a list? (member 'x '(a b x c)) => true Remove all occurrences of an element (remove 'q '(a b q r q)) => (a b r) Reverse the elements on a list (reverse '(a b c)) => (c b a) Replace all occurrences of an element (subst 'new-q 'q '(a q (b q))) => (a new-q (b new-q)) Find the last part of a list (last '(ett två tre)) => (tre) Find the n+1 element (nth '(a b c d) 2) => c
2 How to add a new last element? Put five last on the list (one two three four). Example: (append '(one two three four) (list 'five)) => (one two three four five) Define a function add-to-the-end (defun add-to-the-end (e l) (append l (list e))) What happens here? (setq number-list '(one two three four)) (add-to-the-end 'five number-list) => (one two three four five) number-list =>? Local variables (let ((var expr) (var expr)...) expr) Avoid double calculations: g(x) = sin(f(x)) + cos(f(x)) (defun g (x) (let ((f-value (f x))) (+ (sin f-value) (cos f-value))) After the let-expression the binding disappear between the variable and value. Introduce a local name for a value: (let ((vocals (a e i o u å ä ö)))... (member (first l) vocals)... ) Local functions (labels ((fn (argument) body)) (fn (argument) body))...) expression) Example: f(x,y) = x!/y 2 (defun f (x y) (labels ((square (n) (* n n)) (fak (n) (if (= n 0) 1 (* n (fak (- n 1)))))) (/ (fak x) (square y)))) The function definitions are only valid inside f! Example: When we have iterative process the recursive function is defined locally. (defun fak (n) (fak-iter n 1)) (defun fak-iter (n res) (if (= n 0) res (fak-iter (- n 1) (* n res)))) (defun fak (n) (labels ((fak-iter (n res) (if (= n 0) res (fak-iter (- n 1) (* n res)))) ) (fak-iter n 1)))
3 Sequential processing of lists recursive process Sequential processing of lists iterative process (defun fn-sekv (l) ((endp l) init-value ) ( other condition expression ) (t ( operation (first l) (fn-sekv (rest l)) ))) (defun fn (l) (fn-iter l init-value )) (defun fn-iter (l res) ((endp l) res) ( other condition expression ) (t (fn-iter (rest l) ( operation (first l) res)) ))) recursive process: Example Replace the first occurrence of a given element (change 'karl kalle '(lisa per kalle stina)) => (lisa per karl stina) (defun change (new old l) ((endp l) ()) ((eq old (first l)) (cons new (rest l))) (t (cons (first l) (change new old (rest l))) ))) iterative process: (defun change (new old l) (change-iter new old l ())) (defun change-iter (n g l res) ((endp l) res) ((eq g (first l)) (append res (cons n (rest l)))) (t (change-iter n g (rest l) (add-to-the-end (first l) res))))) Why add-to-the-end instead of cons?
4 The substitution model for the two solutions: recursive process: (change 'karl kalle '(lisa per kalle stina)) -> (cons lisa (change karl kalle (per kalle stina)) -> (cons lisa (cons per (change karl kalle (kalle stina))) -> (cons lisa (cons per (cons karl (stina)))) -> (cons lisa (cons per (karl stina))) -> (cons lisa (per karl stina)) => (lisa per karl stina) iterative process: (change 'karl kalle '(lisa per kalle stina)) -> (ch-i karl kalle (lisa per kalle stina) ()) -> (ch-i karl kalle (per kalle stina) (lisa)) -> (ch-i karl kalle (kalle stina) (lisa per)) -> (ch-i karl kalle (append (lisa per) (cons karl (stina)))) => (lisa per karl stina) Double recursion Lists with lists as elements Pattern for sequences: (defun fn (l) ((endp l) init-value ) ( operation (first l) (fn (rest l)))) (t ( operation (fn (first l)) (fn (rest l)))) )) Total number of elements (defun symbols-in-seq (l) ((endp l) 0) (+ 1 (symbols-in-seq (rest l)))) (t (+ (symbols-in-seq (first l)) (symbols-in-seq (rest l))) ))) (symbols-in-seq '(a (b c (d e)) f)) => 6 Remove all occurrences of a symbol on all levels (defun my-all-remove (x l) ((endp l) ()) (if (eq x (first l)) (my-all-remove x (rest l)) (cons (first l) (my-all-remove x (rest l)))) (t (cons (my-all-remove x (first l)) (my-all-remove x (rest l))) ))) (my-all-remove 'q '(a q (b q (q)) c)) => (a (b nil) c)
5 Back tracking Is a given element somewhere in a list? (exist? 'q '(a (b q) c)) => t (defun exist? (x l) ((endp l) nil) (if (eq x (first l)) t (exist? x (rest l)))) (t (or (exist? x (first l)) (exist? x (rest l))) ))) Some problems are of the nature that you can not directly say if you have reached the right element or not. You must go on. Typical in search problems you must handle back tracking. Search one alternative, if it fails come back and try another alternative. Lab 2 and 3 use this concept. Here we will solve the following problem: Find the element after the last occurrence of a given element. We assume that the given element is not last in the list. (find-after x (a b x c)) => c (find-after x (a b x c x d x e)) => e (find-after x (a b c)) => element-not-on-list (defun find-after (x l) ((endp l) element-not-on-list) ((eq x (first l)) ; the element is found (let ((next-value (find-after x (rest l)))) ; check further (if (eq next-value element-not-on-list) (second l) next-value))) (t (find-after x (rest l))))) The function cons dotted pair: (cons a b) => (a. b) dotted list: (cons x (cons y z)) => (x y. z) association list: ((ett. one) (två. two) (tre. three)) Observe that all of these expressions describes the same list: (x y z) = (x y z. nil) = (x y. (z. nil)) = (x. (y. (z. nil)))
6 The list seen as a binary tree Pattern - binary tree: (defun fn (bt) (if (atom bt) <- leaf? processing of the leaf ( operation (fn (car bt)) (fn (cdr bt))))) The list seen as a binary tree pattern - binary tree - nil a special case: (defun fn (bt) ((eq bt nil) value ) ((atom bt) processing of the leaf ) (t ( operation (fn (car bt)) (fn (cdr bt))))) Observe: Here I use car and cdr instead of first and rest. (Better with primitives left and right) Number of elements (as leaves) Here is nil a leaf, it will be counted. (defun count-leaves (bt) (if (atom bt) 1 (+ (count-leaves (car bt)) (count-leaves (cdr bt)) ))) Here is nil not a leaf (defun count-leaves (bt) ((eq bt nil) 0) ((atom bt) 1) (t (+ (count-leaves (car bt)) (count-leaves (cdr bt)) ))) Sequence solution: Observations 3 cases - end of list - first element is an atom - first element is a list Binary tree solution 2 cases - atom (the leaf) - list (intern nod in the tree) Observe: The binary tree algorithm is more general, it includes the sequential algorithm. But, of course the problems nature gives what solution to use.
7 An arithmetic formula as a binary tree We represent the binary tree as a list with the following structure: (left-tree operator right-tree) * Define a function to calculate its value (value 3) => 3 (value ((2 + 4) * ((8-2) / 3))) => / 3 (defun value (expr) ((number? expr) expr) ((eq (operator expr) +) (+ (value (arg1 expr)) (value (arg2 expr)))) ((eq (operator expr) -) (- (value (arg1 expr)) (value (arg2 expr)))) ((eq (operator expr) *) (*......)) ((eq (operator expr) /) (/......)) (t (error... error message...)))) (defun number? (expr) (numberp expr)) (defun arg1 (expr) (first expr)) (defun arg2 (expr) (third expr) (defun operator (expr) (second expr))
Basic Lisp Operations
Basic Lisp Operations BLO-1 Function invocation It is an S-expression just another list! ( function arg1 arg2... argn) First list item is the function prefix notation The other list items are the arguments
Programming Languages in Artificial Intelligence
Programming Languages in Artificial Intelligence Günter Neumann, German Research Center for Artificial Intelligence (LT Lab, DFKI) I. AI programming languages II. Functional programming III. Functional
Chapter 15 Functional Programming Languages
Chapter 15 Functional Programming Languages Introduction - The design of the imperative languages is based directly on the von Neumann architecture Efficiency (at least at first) is the primary concern,
How To Program In Scheme (Prolog)
The current topic: Scheme! Introduction! Object-oriented programming: Python Functional programming: Scheme! Introduction Next up: Numeric operators, REPL, quotes, functions, conditionals Types and values
DATA STRUCTURES USING C
DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give
Functional Programming. Functional Programming Languages. Chapter 14. Introduction
Functional Programming Languages Chapter 14 Introduction Functional programming paradigm History Features and concepts Examples: Lisp ML 1 2 Functional Programming Functional Programming Languages The
Robot Programming with Lisp
4. More Functional Programming: Map/Reduce, Recursions Institute for Artificial Universität Bremen Outline 2 Mapping Mapping in functional programming is the process of applying a function to all members
QUERYING THE COMPONENT DATA OF A GRAPHICAL CADASTRAL DATABASE USING VISUAL LISP PROGRAM
University 1 Decembrie 1918 of Alba Iulia RevCAD 16/2014 QUERYING THE COMPONENT DATA OF A GRAPHICAL CADASTRAL DATABASE USING VISUAL LISP PROGRAM Caius DIDULESCU, Associate Professor PhD eng. - Faculty
Data Mining Algorithms Parallelizing in Functional Programming Language for Execution in Cluster
Data Mining Algorithms Parallelizing in Functional Programming Language for Execution in Cluster Ivan Holod, PhD, Assoc. Prof., [email protected] Aleksey Malov, PhD, [email protected] Sergey Rodionov,
ML for the Working Programmer
ML for the Working Programmer 2nd edition Lawrence C. Paulson University of Cambridge CAMBRIDGE UNIVERSITY PRESS CONTENTS Preface to the Second Edition Preface xiii xv 1 Standard ML 1 Functional Programming
Vector storage and access; algorithms in GIS. This is lecture 6
Vector storage and access; algorithms in GIS This is lecture 6 Vector data storage and access Vectors are built from points, line and areas. (x,y) Surface: (x,y,z) Vector data access Access to vector
Outline Basic concepts of Python language
Data structures: lists, tuples, sets, dictionaries Basic data types Examples: int: 12, 0, -2 float: 1.02, -2.4e2, 1.5e-3 complex: 3+4j bool: True, False string: "Test string" Conversion between types int(-2.8)
Party Time! Computer Science I. Signature Examples PAIR OBJ. The Signature of a Procedure. Building a Set. Testing for Membership in a Set
Computer Science I Professor Tom Ellman Lecture 21 Party Time! Whom shall you invite? We will write the Party Planner program. It will select SETS of guests. By reasoning with RELATIONS. Before we party,
Semester Review. CSC 301, Fall 2015
Semester Review CSC 301, Fall 2015 Programming Language Classes There are many different programming language classes, but four classes or paradigms stand out:! Imperative Languages! assignment and iteration!
10CS35: Data Structures Using C
CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a
The following themes form the major topics of this chapter: The terms and concepts related to trees (Section 5.2).
CHAPTER 5 The Tree Data Model There are many situations in which information has a hierarchical or nested structure like that found in family trees or organization charts. The abstraction that models hierarchical
Algorithms and Data Structures
Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. Ralf-Peter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2
1 Idioms, Patterns, and Programming
1 Idioms, Patterns, and Programming Chapter Objectives Chapter Contents This chapter introduces the ideas that we use to organize our thinking about languages and how they shape the design and implementation
KITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php [email protected] [email protected] Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
1. Relational database accesses data in a sequential form. (Figures 7.1, 7.2)
Chapter 7 Data Structures for Computer Graphics (This chapter was written for programmers - option in lecture course) Any computer model of an Object must comprise three different types of entities: 1.
Symbol Tables. Introduction
Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The
Analyse et Conception Formelle. Lesson 5. Crash Course on Scala
Analyse et Conception Formelle Lesson 5 Crash Course on Scala T. Genet (ISTIC/IRISA) ACF-5 1 / 36 Bibliography Simply Scala. Online tutorial: http://www.simply.com/fr http://www.simply.com/ Programming
We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.
LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.
ESPResSo Summer School 2012
ESPResSo Summer School 2012 Introduction to Tcl Pedro A. Sánchez Institute for Computational Physics Allmandring 3 D-70569 Stuttgart Germany http://www.icp.uni-stuttgart.de 2/26 Outline History, Characteristics,
SEQUENCES ARITHMETIC SEQUENCES. Examples
SEQUENCES ARITHMETIC SEQUENCES An ordered list of numbers such as: 4, 9, 6, 25, 36 is a sequence. Each number in the sequence is a term. Usually variables with subscripts are used to label terms. For example,
Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students
Eastern Washington University Department of Computer Science Questionnaire for Prospective Masters in Computer Science Students I. Personal Information Name: Last First M.I. Mailing Address: Permanent
Logistic Regression. Jia Li. Department of Statistics The Pennsylvania State University. Logistic Regression
Logistic Regression Department of Statistics The Pennsylvania State University Email: [email protected] Logistic Regression Preserve linear classification boundaries. By the Bayes rule: Ĝ(x) = arg max
Algorithms Chapter 12 Binary Search Trees
Algorithms Chapter 1 Binary Search Trees Outline Assistant Professor: Ching Chi Lin 林 清 池 助 理 教 授 [email protected] Department of Computer Science and Engineering National Taiwan Ocean University
Lecture 10: Regression Trees
Lecture 10: Regression Trees 36-350: Data Mining October 11, 2006 Reading: Textbook, sections 5.2 and 10.5. The next three lectures are going to be about a particular kind of nonlinear predictive model,
Sample Questions Csci 1112 A. Bellaachia
Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k
Master of Sciences in Informatics Engineering Programming Paradigms 2005/2006. Final Examination. January 24 th, 2006
Master of Sciences in Informatics Engineering Programming Paradigms 2005/2006 Final Examination January 24 th, 2006 NAME: Please read all instructions carefully before start answering. The exam will be
1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++
Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The
This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.
Algebra I Overview View unit yearlong overview here Many of the concepts presented in Algebra I are progressions of concepts that were introduced in grades 6 through 8. The content presented in this course
COMPUTER SCIENCE TRIPOS
CST.98.5.1 COMPUTER SCIENCE TRIPOS Part IB Wednesday 3 June 1998 1.30 to 4.30 Paper 5 Answer five questions. No more than two questions from any one section are to be answered. Submit the answers in five
DEFINITION 5.1.1 A complex number is a matrix of the form. x y. , y x
Chapter 5 COMPLEX NUMBERS 5.1 Constructing the complex numbers One way of introducing the field C of complex numbers is via the arithmetic of matrices. DEFINITION 5.1.1 A complex number is a matrix of
OPTIMAL BINARY SEARCH TREES
OPTIMAL BINARY SEARCH TREES 1. PREPARATION BEFORE LAB DATA STRUCTURES An optimal binary search tree is a binary search tree for which the nodes are arranged on levels such that the tree cost is minimum.
GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: 3330704)
GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT Course Curriculum DATA STRUCTURES (Code: 3330704) Diploma Programme in which this course is offered Semester in which offered Computer Engineering,
ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)
ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) Subject Description: This subject deals with discrete structures like set theory, mathematical
Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I
Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I John McCarthy, Massachusetts Institute of Technology, Cambridge, Mass. April 1960 1 Introduction A programming system
Web Document Clustering
Web Document Clustering Lab Project based on the MDL clustering suite http://www.cs.ccsu.edu/~markov/mdlclustering/ Zdravko Markov Computer Science Department Central Connecticut State University New Britain,
The Smalltalk Programming Language. Beatrice Åkerblom [email protected]
The Smalltalk Programming Language Beatrice Åkerblom [email protected] 'The best way to predict the future is to invent it' - Alan Kay. History of Smalltalk Influenced by Lisp and Simula Object-oriented
Data Structure with C
Subject: Data Structure with C Topic : Tree Tree A tree is a set of nodes that either:is empty or has a designated node, called the root, from which hierarchically descend zero or more subtrees, which
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety
Mathematical Induction. Lecture 10-11
Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach
DELAWARE MATHEMATICS CONTENT STANDARDS GRADES 9-10. PAGE(S) WHERE TAUGHT (If submission is not a book, cite appropriate location(s))
Prentice Hall University of Chicago School Mathematics Project: Advanced Algebra 2002 Delaware Mathematics Content Standards (Grades 9-10) STANDARD #1 Students will develop their ability to SOLVE PROBLEMS
Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the 2012-13 school year.
This document is designed to help North Carolina educators teach the Common Core (Standard Course of Study). NCDPI staff are continually updating and improving these tools to better serve teachers. Algebra
Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students
Eastern Washington University Department of Computer Science Questionnaire for Prospective Masters in Computer Science Students I. Personal Information Name: Last First M.I. Mailing Address: Permanent
Chapter 5. Recursion. Data Structures and Algorithms in Java
Chapter 5 Recursion Data Structures and Algorithms in Java Objectives Discuss the following topics: Recursive Definitions Method Calls and Recursion Implementation Anatomy of a Recursive Call Tail Recursion
COMPUTER SCIENCE. FACULTY: Jennifer Bowen, Chair Denise Byrnes, Associate Chair Sofia Visa
FACULTY: Jennifer Bowen, Chair Denise Byrnes, Associate Chair Sofia Visa COMPUTER SCIENCE Computer Science is the study of computer programs, abstract models of computers, and applications of computing.
Why? A central concept in Computer Science. Algorithms are ubiquitous.
Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online
Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation
Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science updated 03/08/2012 Unit 1: JKarel 8 weeks http://www.fcps.edu/is/pos/documents/hs/compsci.htm
C H A P T E R Regular Expressions regular expression
7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun
The previous chapter provided a definition of the semantics of a programming
Chapter 7 TRANSLATIONAL SEMANTICS The previous chapter provided a definition of the semantics of a programming language in terms of the programming language itself. The primary example was based on a Lisp
PES Institute of Technology-BSC QUESTION BANK
PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions
SYSM 6304: Risk and Decision Analysis Lecture 5: Methods of Risk Analysis
SYSM 6304: Risk and Decision Analysis Lecture 5: Methods of Risk Analysis M. Vidyasagar Cecil & Ida Green Chair The University of Texas at Dallas Email: [email protected] October 17, 2015 Outline
How To Understand The Theory Of Computer Science
Theory of Computation Lecture Notes Abhijat Vichare August 2005 Contents 1 Introduction 2 What is Computation? 3 The λ Calculus 3.1 Conversions: 3.2 The calculus in use 3.3 Few Important Theorems 3.4 Worked
FX 115 MS Training guide. FX 115 MS Calculator. Applicable activities. Quick Reference Guide (inside the calculator cover)
Tools FX 115 MS Calculator Handouts Other materials Applicable activities Quick Reference Guide (inside the calculator cover) Key Points/ Overview Advanced scientific calculator Two line display VPAM to
Overview. Essential Questions. Precalculus, Quarter 4, Unit 4.5 Build Arithmetic and Geometric Sequences and Series
Sequences and Series Overview Number of instruction days: 4 6 (1 day = 53 minutes) Content to Be Learned Write arithmetic and geometric sequences both recursively and with an explicit formula, use them
Properties of sequences Since a sequence is a special kind of function it has analogous properties to functions:
Sequences and Series A sequence is a special kind of function whose domain is N - the set of natural numbers. The range of a sequence is the collection of terms that make up the sequence. Just as the word
Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.
7 Catalan Numbers Thomas A. Dowling, Department of Mathematics, Ohio State Uni- Author: versity. Prerequisites: The prerequisites for this chapter are recursive definitions, basic counting principles,
Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2
Unix Shell Scripts Norman Matloff July 30, 2008 Contents 1 Introduction 1 2 Invoking Shell Scripts 2 2.1 Direct Interpretation....................................... 2 2.2 Indirect Interpretation......................................
Chapter 13: Query Processing. Basic Steps in Query Processing
Chapter 13: Query Processing! Overview! Measures of Query Cost! Selection Operation! Sorting! Join Operation! Other Operations! Evaluation of Expressions 13.1 Basic Steps in Query Processing 1. Parsing
Intelligent Agents. Chapter 2. Chapter 2 1
Intelligent Agents Chapter 2 Chapter 2 1 Reminders Assignment 0 (lisp refresher) due 1/28 Lisp/emacs/AIMA tutorial: 11-1 today and Monday, 271 Soda Chapter 2 2 Outline Agents and environments Rationality
Turing Degrees and Definability of the Jump. Theodore A. Slaman. University of California, Berkeley. CJuly, 2005
Turing Degrees and Definability of the Jump Theodore A. Slaman University of California, Berkeley CJuly, 2005 Outline Lecture 1 Forcing in arithmetic Coding and decoding theorems Automorphisms of countable
Analysis of Algorithms I: Binary Search Trees
Analysis of Algorithms I: Binary Search Trees Xi Chen Columbia University Hash table: A data structure that maintains a subset of keys from a universe set U = {0, 1,..., p 1} and supports all three dictionary
Feature Construction for Time Ordered Data Sequences
Feature Construction for Time Ordered Data Sequences Michael Schaidnagel School of Computing University of the West of Scotland Email: [email protected] Fritz Laux Faculty of Computer Science
Partitioning and Divide and Conquer Strategies
and Divide and Conquer Strategies Lecture 4 and Strategies Strategies Data partitioning aka domain decomposition Functional decomposition Lecture 4 and Strategies Quiz 4.1 For nuclear reactor simulation,
Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)
Computer Graphics CS 54 Lecture 1 (Part 1) Curves Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) So Far Dealt with straight lines and flat surfaces Real world objects include
Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: [email protected] Alfonso Ortega: alfonso.ortega@uam.
Compilers Spring term Mick O Donnell: [email protected] Alfonso Ortega: [email protected] Lecture 1 to Compilers 1 Topic 1: What is a Compiler? 3 What is a Compiler? A compiler is a computer
2 Integrating Both Sides
2 Integrating Both Sides So far, the only general method we have for solving differential equations involves equations of the form y = f(x), where f(x) is any function of x. The solution to such an equation
THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES
THE SEARCH FOR NATURAL DEFINABILITY IN THE TURING DEGREES ANDREW E.M. LEWIS 1. Introduction This will be a course on the Turing degrees. We shall assume very little background knowledge: familiarity with
WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math
Textbook Correlation WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Following Directions Unit FIRST QUARTER AND SECOND QUARTER Logic Unit
Lecture 1: Introduction
Programming Languages Lecture 1: Introduction Benjamin J. Keller Department of Computer Science, Virginia Tech Programming Languages Lecture 1 Introduction 2 Lecture Outline Preview History of Programming
root node level: internal node edge leaf node CS@VT Data Structures & Algorithms 2000-2009 McQuain
inary Trees 1 A binary tree is either empty, or it consists of a node called the root together with two binary trees called the left subtree and the right subtree of the root, which are disjoint from each
The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,
The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints
Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students
Eastern Washington University Department of Computer Science Questionnaire for Prospective Masters in Computer Science Students I. Personal Information Name: Last First M.I. Mailing Address: Permanent
Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C
Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate
Lab 4: 26 th March 2012. Exercise 1: Evolutionary algorithms
Lab 4: 26 th March 2012 Exercise 1: Evolutionary algorithms 1. Found a problem where EAs would certainly perform very poorly compared to alternative approaches. Explain why. Suppose that we want to find
AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities
AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities The classroom is set up like a traditional classroom on the left side of the room. This is where I will conduct my
1. Classification problems
Neural and Evolutionary Computing. Lab 1: Classification problems Machine Learning test data repository Weka data mining platform Introduction Scilab 1. Classification problems The main aim of a classification
CS510 Software Engineering
CS510 Software Engineering Propositional Logic Asst. Prof. Mathias Payer Department of Computer Science Purdue University TA: Scott A. Carr Slides inspired by Xiangyu Zhang http://nebelwelt.net/teaching/15-cs510-se
Decision Making under Uncertainty
6.825 Techniques in Artificial Intelligence Decision Making under Uncertainty How to make one decision in the face of uncertainty Lecture 19 1 In the next two lectures, we ll look at the question of how
Data Analysis 1. SET08104 Database Systems. Copyright @ Napier University
Data Analysis 1 SET08104 Database Systems Copyright @ Napier University Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship?
Lecture 8 February 4
ICS273A: Machine Learning Winter 2008 Lecture 8 February 4 Scribe: Carlos Agell (Student) Lecturer: Deva Ramanan 8.1 Neural Nets 8.1.1 Logistic Regression Recall the logistic function: g(x) = 1 1 + e θt
Ordered Lists and Binary Trees
Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 6-0:
Data Structures and Algorithms
Data Structures and Algorithms CS245-2016S-06 Binary Search Trees David Galles Department of Computer Science University of San Francisco 06-0: Ordered List ADT Operations: Insert an element in the list
DRAFT. Algebra 1 EOC Item Specifications
DRAFT Algebra 1 EOC Item Specifications The draft Florida Standards Assessment (FSA) Test Item Specifications (Specifications) are based upon the Florida Standards and the Florida Course Descriptions as
Y. Xiang, Constraint Satisfaction Problems
Constraint Satisfaction Problems Objectives Constraint satisfaction problems Backtracking Iterative improvement Constraint propagation Reference Russell & Norvig: Chapter 5. 1 Constraints Constraints are
Analysis of Algorithms I: Optimal Binary Search Trees
Analysis of Algorithms I: Optimal Binary Search Trees Xi Chen Columbia University Given a set of n keys K = {k 1,..., k n } in sorted order: k 1 < k 2 < < k n we wish to build an optimal binary search
Lecture 1: Course overview, circuits, and formulas
Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik
