Applied C Fri

Size: px
Start display at page:

Download "Applied C Fri"

Transcription

1 Applied C Fri

2 Outline Introduction Auto-Type Inference Lambda Functions Threading Compiling

3 C++11 C++11 (formerly known as C++0x) is the most recent version of the standard of the C++ Approved by ISO(International Organization for Standardization) on 12 August 2011 Includes several additions to the core language and extends the C++ standard library

4 Core language usability enhancements: Primary purpose is to make the language easier to use Improve type safety Minimize code repetition Make erroneous code less likely

5 Auto Type Inference The compiler can infer the type of a variable at the point of declaration: i n t x = 5 ; auto x = 4 ; Very helpful when working with templates and iterators: v e c t o r <i n t > vec ; auto i t r = vec. i t e r a t o r ( ) ; // i n s t e a d o f v e c t o r <i n t > : : i t e r a t o r i t r

6 Study Case t e m p l a t e <typename BuiltType, typename B u i l d e r > void makeandprocessobject ( const B u i l d e r& b u i l d e r ) { B u i l t T y p e v a l = b u i l d e r. makeobject ( ) ; // do s t u f f w i t h v a l two necessary template parameters type of the builder object type of the object being built MyObjBuilder b u i l d e r ; makeandprocessobject<myobj>( b u i l d e r ) ;

7 Study Case (cont.) By using `auto' no longer need to write the specic type of the built object t e m p l a t e <typename B u i l d e r > void makeandprocessobject ( const B u i l d e r& b u i l d e r ) { auto v a l = b u i l d e r. makeobject ( ) ; // do s t u f f w i t h v a l MyObjBuilder b u i l d e r ; makeandprocessobject ( b u i l d e r ) ;

8 Lambda Functions Lambda Function: is a function dened, and possibly called, without being bound to an identier you can write inline in your source code convenient to pass as an argument to a higher-order function allow to create entirely new ways of writing programs

9 Basic Lambda Syntax #i n c l u d e <i o s t r e a m > u s i n g namespace s t d ; i n t main ( ) { [ ] ( ) { cout << " H e l l o, World! " ; ( ) ; []: capture specier, species for the compiler creation of a lambda function (): argument list What about return values?

10 More on the Lambda Syntax If there is no return statement, uses void as default If you have a simple return expression, the compiler will deduce the type of the return value // c o m p i l e r knows t h i s r e t u r n s an i n t e g e r [ ] ( ) { r e t u r n 1 ; specify the return value explicitly // now we ' r e t e l l i n g t h e c o m p i l e r what we want [ ] ( ) > i n t { r e t u r n 1 ;

11 Example: Sorting a list We create a list of cities. // D e f i n e a c l a s s f o r a c i t y c l a s s C i t y { p u b l i c : i n t p o p u l a t i o n ; i n t f o u n d a t i o n _ y e a r ; i n t s u r f a c e _ a r e a ; ; i n t main ( ) { s t d : : l i s t <C i t y > c i t i e s ; // F i l l t h e l i s t w i t h d a t a To sort a set of objects, we have to dene a comparison function.

12 Example: Sorting a list (cont.) In the STL, comparison functions have two arguments, and return true if the rst argument goes before the second. To sort by population, we can dene a compare function: b o o l compare ( C i t y a, C i t y b ) { r e t u r n a. p o p u l a t i o n < b. p o p u l a t i o n ;... c i t i e s. s o r t ( compare ) ; Alternatively, we can use a lambda function: c i t i e s. s o r t ( [ ] ( C i t y a, C i t y b) >b o o l { r e t u r n a. p u p u l a t i o n < b. p o p u l a t i o n ; ) ;

13 Multithreading C++11 threads are more convenient than directly using Posix threads. #i n c l u d e <t h r e a d > i n t main ( ) {... // D e c l a r i n g t h r e a d s s t d : : t h r e a d t ; // A s s i g n a f u n c t i o n t = s t d : : t h r e a d ( f u n c t i o n, a r g u m e n t s ) ;... // F i n a l i z i n g t. j o i n ( ) ; Compile with the ag -pthread

14 Multithreading example: Dot product // D e f i n i t i o n o f a c l a s s t o s t o r e t h e v a l u e s c l a s s P a r t i a l D P { p u b l i c : double d o t p r o d u c t ; double * x ; double * y ; i n t f i r s t ; // F i r s t i n d e x o f a r r a y i n t l e n g t h ; // Count o f e l e m e n t s P a r t i a l D P ( ) : d o t p r o d u c t ( 0 ) { s e t ( double * x i n, double * y i n, i n t f, i n t l ) { x = x i n ; y = y i n ; f i r s t = f ; l e n g t h = l ; ; o p e r a t o r ( ) ( ) { f o r ( i n t i = f i r s t ; i < f i r s t + l e n g t h ; i ++) { d o t p r o d u c t += x [ i ] + y [ i ] ;

15 Multithreading example (cont.) #i n c l u d e <t h r e a d > const i n t s i z e = , n t h r e a d s = 4 ; i n t main ( ) { s t d : : t h r e a d t [ n t h r e a d s ] ; double x [ s i z e ], y [ s i z e ] ; i n t s u b s i z e = s i z e / n t h r e a d s ; // Assume no r e m a i n d e r P a r t i a l D P dp [ n t h r e a d s ] ; f o r ( i n t i = 0 ; i < n t h r e a d s ; i ++){ dp [ i ]. s e t ( x, y, i * s u b s i z e, s u b s i z e ) ; t [ i ] = s t d : : t h r e a d ( dp [ i ] ) ; // Compute f o r ( i n t i = 0 ; i < n t h r e a d s ; i ++) t [ i ]. j o i n ( ) ; // A c cumulate t h e p r o d u c t double r e s u l t = 0 ; f o r ( i n t i = 0 ; i < n t h r e a d s ; i ++) r e s u l t += dp [ i ]. d o t p r o d u c t ;

16 Compiling C++11 With gcc, C++11 features can be compiled by using g++ -std=c++11 <args>

PHP Extension Development with C++

PHP Extension Development with C++ PHP Extension Development with C++ Wrapping a C preprocessor API in C++ Florian Sowade August 25, 2012 About Me Florian Sowade Head of embedded software development at crosscan GmbH Currently studying

More information

Hydra. A. Augusto Alves Jr and M.D. Sokoloff. University of Cincinnati

Hydra. A. Augusto Alves Jr and M.D. Sokoloff. University of Cincinnati Hydra A library for data analysis in massively parallel platforms A. Augusto Alves Jr and M.D. Sokoloff University of Cincinnati aalvesju@cern.ch Presented at the Workshop Perspectives of GPU computing

More information

CS 7B - Fall Final Exam (take-home portion). Due Wednesday, 12/13 at 2 pm

CS 7B - Fall Final Exam (take-home portion). Due Wednesday, 12/13 at 2 pm CS 7B - Fall 2017 - Final Exam (take-home portion). Due Wednesday, 12/13 at 2 pm Write your responses to following questions on separate paper. Use complete sentences where appropriate and write out code

More information

Operating Systems. VII. Synchronization

Operating Systems. VII. Synchronization Operating Systems VII. Synchronization Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Synchronization issues 2/22 Fall 2017 Institut

More information

import java. u t i l. ;... Scanner sc = new Scanner ( System. in ) ;

import java. u t i l. ;... Scanner sc = new Scanner ( System. in ) ; CPSC 490 Input Input will always arrive on stdin. You may assume input is well-formed with respect to the problem specification; inappropriate input (e.g. text where a number was specified, number out

More information

Introduction to functions

Introduction to functions Introduction to functions Comp Sci 1570 Introduction to C++ Outline 1 2 Functions A function is a reusable sequence of s designed to do a particular job. In C++, a function is a group of s that is given

More information

Python. chrysn

Python. chrysn Python chrysn 2008-09-25 Introduction Structure, Language & Syntax Strengths & Weaknesses Introduction Structure, Language & Syntax Strengths & Weaknesses Python Python is an interpreted,

More information

Modern Functional Programming and Actors With Scala and Akka

Modern Functional Programming and Actors With Scala and Akka Modern Functional Programming and Actors With Scala and Akka Aaron Kosmatin Computer Science Department San Jose State University San Jose, CA 95192 707-508-9143 akosmatin@gmail.com Abstract For many years,

More information

Meta-programming & you

Meta-programming & you Meta-programming & you Robin Message Cambridge Programming Research Group 10 th May 2010 What s meta-programming about? 1 result=somedb. customers. select 2 { first_name+ +last_name } 3 where name LIKE

More information

C++ For Science and Engineering Lecture 8

C++ For Science and Engineering Lecture 8 C++ For Science and Engineering Lecture 8 John Chrispell Tulane University Friday 10, 2010 Arrays Structures are ways of storing more than one type of information together. A structure is a vesatile data

More information

CompA - Complex Analyzer

CompA - Complex Analyzer CompA - Complex Analyzer Xiping Liu(xl2639), Jianshuo Qiu(jq2253), Tianwu Wang(tw2576), Yingshuang Zheng(yz3083), Zhanpeng Su(zs2329) Septembee 25, 2017 1 Introduction The motivation for writing this language

More information

Recursion. Recursion. Steven Zeil. November 25, 2013

Recursion. Recursion. Steven Zeil. November 25, 2013 Steven Zeil November 25, 2013 Outline 1 2 Example: Compressing a Picture 3 Outline I 1 2 Example: Compressing a Picture 3 A function is recursive if it calls itself or calls some other function that eventually

More information

NGsolve::Give me your element

NGsolve::Give me your element NGsolve::Give me your element And let your eyes delight in my ways Jay Gopalakrishnan Portland State University Winter 2015 Download code (works only on version 6.0) for these notes from here. Give me

More information

Functional Programming with F# Overview and Basic Concepts

Functional Programming with F# Overview and Basic Concepts Functional Programming with F# Overview and Basic Concepts Radu Nicolescu Department of Computer Science University of Auckland 27 Sep 2017 1 / 52 1 Background 2 Overview 3 Type System and Type Inference

More information

C++ For Science and Engineering Lecture 17

C++ For Science and Engineering Lecture 17 C++ For Science and Engineering Lecture 17 John Chrispell Tulane University Monday October 4, 2010 Functions and C-Style Strings Three methods for representing the C-style string: An array of char A quoted

More information

MiniMat: Matrix Language in OCaml LLVM

MiniMat: Matrix Language in OCaml LLVM Terence Lim - tl2735@columbia.edu August 17, 2016 Contents 1 Introduction 4 1.1 Goals........................................ 4 1.1.1 Flexible matrix notation......................... 4 1.1.2 Uncluttered................................

More information

Python. Tutorial. Jan Pöschko. March 22, Graz University of Technology

Python. Tutorial. Jan Pöschko. March 22, Graz University of Technology Tutorial Graz University of Technology March 22, 2010 Why? is: very readable easy to learn interpreted & interactive like a UNIX shell, only better object-oriented but not religious about it slower than

More information

C++ For Science and Engineering Lecture 14

C++ For Science and Engineering Lecture 14 C++ For Science and Engineering Lecture 14 John Chrispell Tulane University Monday September 27, 2010 File Input and Output Recall writing text to standard out You must include the iostream header file.

More information

Structural Induction

Structural Induction Structural Induction In this lecture we ll extend the applicability of induction to many universes, ones where we can define certain kinds of objects by induction, in addition to proving their properties

More information

Go Tutorial. Ian Lance Taylor. Introduction. Why? Language. Go Tutorial. Ian Lance Taylor. GCC Summit, October 27, 2010

Go Tutorial. Ian Lance Taylor. Introduction. Why? Language. Go Tutorial. Ian Lance Taylor. GCC Summit, October 27, 2010 GCC Summit, October 27, 2010 Go Go is a new experimental general purpose programming language. Main developers are: Russ Cox Robert Griesemer Rob Pike Ken Thompson It was released as free software in November

More information

Lecture 16 More Profiling: gperftools, systemwide tools: oprofile, perf, DTrace, etc.

Lecture 16 More Profiling: gperftools, systemwide tools: oprofile, perf, DTrace, etc. Lecture 16 More Profiling: gperftools, systemwide tools: oprofile, perf, DTrace, etc. ECE 459: Programming for Performance March 6, 2014 Part I gperftools 2 / 49 Introduction to gperftools Google Performance

More information

Language and Compiler Support for Auto-Tuning Variable-Accuracy Algorithms

Language and Compiler Support for Auto-Tuning Variable-Accuracy Algorithms Language and Compiler Support for Auto-Tuning Variable-Accuracy Algorithms Jason Ansel Yee Lok Wong Cy Chan Marek Olszewski Alan Edelman Saman Amarasinghe MIT - CSAIL April 4, 2011 Jason Ansel (MIT) PetaBricks

More information

Numerical differentiation

Numerical differentiation Chapter 3 Numerical differentiation 3.1 Introduction Numerical integration and differentiation are some of the most frequently needed methods in computational physics. Quite often we are confronted with

More information

PetaBricks: Variable Accuracy and Online Learning

PetaBricks: Variable Accuracy and Online Learning PetaBricks: Variable Accuracy and Online Learning Jason Ansel MIT - CSAIL May 4, 2011 Jason Ansel (MIT) PetaBricks May 4, 2011 1 / 40 Outline 1 Motivating Example 2 PetaBricks Language Overview 3 Variable

More information

Olena Quick Reference Guide LRDE

Olena Quick Reference Guide LRDE Olena Quick Reference Guide LRDE Copyright Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE). This document is part of Olena. Olena is free software: you can redistribute it and/or modify

More information

The Viterbi Algorithm EECS 869: Error Control Coding Fall 2009

The Viterbi Algorithm EECS 869: Error Control Coding Fall 2009 1 Bacground Material 1.1 Organization of the Trellis The Viterbi Algorithm EECS 869: Error Control Coding Fall 2009 The Viterbi algorithm (VA) processes the (noisy) output sequence from a state machine

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.5 Direct Proof and Counterexample V: Floor and Ceiling Copyright Cengage Learning. All

More information

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40 Comp 11 Lectures Mike Shah Tufts University July 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 26, 2017 1 / 40 Please do not distribute or host these slides without prior permission. Mike

More information

The Notion of the Concept Instance : Problems in Modeling Concept Change in SKOS

The Notion of the Concept Instance : Problems in Modeling Concept Change in SKOS DRAFT DISCUSSION PAPER NSF/NSDL Metadata Registry Project September 23, 2006 For DC-Registry Discussions at DC-2006 in Manzanillo, Mexico The tion of the : Problems in Modeling in SKOS Joseph Tennis

More information

Linear Algebra (part 1) : Vector Spaces (by Evan Dummit, 2017, v. 1.07) 1.1 The Formal Denition of a Vector Space

Linear Algebra (part 1) : Vector Spaces (by Evan Dummit, 2017, v. 1.07) 1.1 The Formal Denition of a Vector Space Linear Algebra (part 1) : Vector Spaces (by Evan Dummit, 2017, v. 1.07) Contents 1 Vector Spaces 1 1.1 The Formal Denition of a Vector Space.................................. 1 1.2 Subspaces...................................................

More information

Kirsten Lackner Solberg. Dept. of Math. and Computer Science. Odense University, Denmark

Kirsten Lackner Solberg. Dept. of Math. and Computer Science. Odense University, Denmark Inference Systems for Binding Time Analysis Kirsten Lackner Solberg Dept. of Math. and Computer Science Odense University, Denmark e-mail: kls@imada.ou.dk June 21, 1993 Contents 1 Introduction 4 2 Review

More information

Policy Based Class Design

Policy Based Class Design Policy Based Class Design Policy Based Class Design Christian Gumpert IKTP, TU Dresden 20. June 2011 Christian Gumpert IKTP, TU Dresden 20. June 2011 1 / 15 Policy Based Class Design Outline 1 Policy based

More information

26. Januar Introduction to Computational Semantics

26. Januar Introduction to Computational Semantics 1 Lehrstuhl für Künstliche Intelligenz Institut für Informatik Friedrich-Alexander-Universität Erlangen-Nürnberg 26. Januar 2006 1 Slides are mainly due to J. Bos and P. Blackburn course on An Introduction

More information

Logic and Philosophical Logic. 1 Inferentialism. Inferentialism and Meaning Underdetermination

Logic and Philosophical Logic. 1 Inferentialism. Inferentialism and Meaning Underdetermination Logic and Philosophical Logic Inferentialism and Meaning Underdetermination AC Paseau alexanderpaseau@philosophyoxacuk 28 January 2019 In the rst half of today's class, we looked at Tarski's account of

More information

MURA Office hours Thurs at 12-1pm in CIT 546 Contact for more info.

MURA Office hours Thurs at 12-1pm in CIT 546 Contact for more info. Course Announcements Lecture capture has begun, available from Lectures page. First two and a half weeks are packed. Testing lab done, HTML started, and Stars due next Friday. Department has a lot of student

More information

Bloom Filter Redux. CS 270 Combinatorial Algorithms and Data Structures. UC Berkeley, Spring 2011

Bloom Filter Redux. CS 270 Combinatorial Algorithms and Data Structures. UC Berkeley, Spring 2011 Bloom Filter Redux Matthias Vallentin Gene Pang CS 270 Combinatorial Algorithms and Data Structures UC Berkeley, Spring 2011 Inspiration Our background: network security, databases We deal with massive

More information

An Introduction to Z3

An Introduction to Z3 An Introduction to Z3 Huixing Fang National Trusted Embedded Software Engineering Technology Research Center April 12, 2017 Outline 1 SMT 2 Z3 Huixing Fang (ECNU) An Introduction to Z3 April 12, 2017 2

More information

C++ For Science and Engineering Lecture 10

C++ For Science and Engineering Lecture 10 C++ For Science and Engineering Lecture 10 John Chrispell Tulane University Wednesday 15, 2010 Introducing for loops Often we want programs to do the same action more than once. #i n c l u d e

More information

Monitoring System for ALICE Surface Areas

Monitoring System for ALICE Surface Areas CERN Summer Student Programme Project Report Monitoring System for ALICE Surface Areas Author: Supervisors: Dr. Ombretta Pinazza Peter Matthew Bond September 16, 2016 Contents 1 Introduction 2 2 Development

More information

Programsystemkonstruktion med C++: Övning 1. Karl Palmskog Translated by: Siavash Soleimanifard. September 2011

Programsystemkonstruktion med C++: Övning 1. Karl Palmskog Translated by: Siavash Soleimanifard. September 2011 Programsystemkonstruktion med C++: Övning 1 Karl Palmskog palmskog@kth.se Translated by: Siavash Soleimanifard September 2011 Programuppbyggnad Klassens uppbyggnad A C++ class consists of a declaration

More information

Structure. Background. them to their higher order equivalents. functionals in Standard ML source code and converts

Structure. Background. them to their higher order equivalents. functionals in Standard ML source code and converts Introduction 3 Background functionals factor out common behaviour map applies a function to every element of a list fun map [ ] = [ ] map f ( x : : xs ) = f x : : map f xs filter keeps only those elements

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

Parametric Optimization with Evolutionary Strategies in Particle Physics

Parametric Optimization with Evolutionary Strategies in Particle Physics Rüdiger Berlich Ruhr-Universität Bochum Lehrstuhl für Experimentalphysik I Parametric Optimization with Evolutionary Strategies in Particle Physics Physics Motivation Tools Results Conclusion Physics Motivation

More information

CSCI 490 problem set 6

CSCI 490 problem set 6 CSCI 490 problem set 6 Due Tuesday, March 1 Revision 1: compiled Tuesday 23 rd February, 2016 at 21:21 Rubric For full credit, your solutions should demonstrate a proficient understanding of the following

More information

COMP 204. Object Oriented Programming (OOP) Mathieu Blanchette

COMP 204. Object Oriented Programming (OOP) Mathieu Blanchette COMP 204 Object Oriented Programming (OOP) Mathieu Blanchette 1 / 14 Object-Oriented Programming OOP is a way to write and structure programs to make them easier to design, understand, debug, and maintain.

More information

A Forgery Attack on the Candidate LTE Integrity Algorithm 128-EIA3 (updated version)

A Forgery Attack on the Candidate LTE Integrity Algorithm 128-EIA3 (updated version) A Forgery Attack on the Candidate LTE Integrity Algorithm 128-EIA3 (updated version) Thomas Fuhr, Henri Gilbert, Jean-René Reinhard, and Marion Videau ANSSI, France Abstract In this note we show that the

More information

1 Introduction. 2 First Order Logic. 3 SPL Syntax. 4 Hoare Logic. 5 Exercises

1 Introduction. 2 First Order Logic. 3 SPL Syntax. 4 Hoare Logic. 5 Exercises Contents 1 Introduction INF5140: Lecture 2 Espen H. Lian Institutt for informatikk, Universitetet i Oslo January 28, 2009 2 Proof System 3 SPL 4 GCD 5 Exercises Institutt for informatikk (UiO) INF5140:

More information

CS 7B - Spring Assignment: Adapting the calculator for bitwise expressions. due 2/21/18

CS 7B - Spring Assignment: Adapting the calculator for bitwise expressions. due 2/21/18 CS 7B - Spring 2018 - Assignment: Adapting the calculator for bitwise expressions. due 2/21/18 Background Theory A bitwise number is a number in base 2. In base 2, place values are either a 1 or 0, depending

More information

From syntax to semantics of Dependent Type Theories - Formalized

From syntax to semantics of Dependent Type Theories - Formalized RDP 2015, Jun. 30, 2015, WCMCS, Warsaw. From syntax to semantics of Dependent Type Theories - Formalized by Vladimir Voevodsky from the Institute for Advanced Study in Princeton, NJ. I will be speaking

More information

The DCMI Tools Community Dublin Core 2007 Singapore 29 August 2007

The DCMI Tools Community Dublin Core 2007 Singapore 29 August 2007 The DCMI Tools Community Dublin Core 2007 Singapore 29 August 2007 Jane Greenberg, School of Information and Library Science (SILS) and the SILS Metadata Research Center , University of North Carolina

More information

Functional Database Query Languages as. Typed Lambda Calculi of Fixed Order. Gerd G. Hillebrand and Paris C. Kanellakis

Functional Database Query Languages as. Typed Lambda Calculi of Fixed Order. Gerd G. Hillebrand and Paris C. Kanellakis Functional Database Query Languages as Typed Lambda Calculi of Fixed Order Gerd G. Hillebrand and Paris C. Kanellakis Department of Computer Science Brown University Providence, Rhode Island 02912 CS-94-26

More information

Supplementary Notes on Inductive Definitions

Supplementary Notes on Inductive Definitions Supplementary Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 29, 2002 These supplementary notes review the notion of an inductive definition

More information

Typed Arithmetic Expressions

Typed Arithmetic Expressions Typed Arithmetic Expressions CS 550 Programming Languages Jeremy Johnson TAPL Chapters 3 and 5 1 Types and Safety Evaluation rules provide operational semantics for programming languages. The rules provide

More information

Parallel Polynomial Evaluation

Parallel Polynomial Evaluation Parallel Polynomial Evaluation Jan Verschelde joint work with Genady Yoffe University of Illinois at Chicago Department of Mathematics, Statistics, and Computer Science http://www.math.uic.edu/ jan jan@math.uic.edu

More information

Big-O Notation and Complexity Analysis

Big-O Notation and Complexity Analysis Big-O Notation and Complexity Analysis Jonathan Backer backer@cs.ubc.ca Department of Computer Science University of British Columbia May 28, 2007 Problems Reading: CLRS: Growth of Functions 3 GT: Algorithm

More information

Quantile Precision Issues in CUDA

Quantile Precision Issues in CUDA Quantile Precision Issues in CUDA Thomas Luu and William Shaw UCL, Dec 2011. Corrections to w.shaw@ucl.ac.uk Set up and Introduction In[1]:= This Mathematica notebook uses the high-precision arithmetic

More information

Business Analytics and Data Mining Modeling Using R Prof. Gaurav Dixit Department of Management Studies Indian Institute of Technology, Roorkee

Business Analytics and Data Mining Modeling Using R Prof. Gaurav Dixit Department of Management Studies Indian Institute of Technology, Roorkee Business Analytics and Data Mining Modeling Using R Prof. Gaurav Dixit Department of Management Studies Indian Institute of Technology, Roorkee Lecture - 04 Basic Statistics Part-1 (Refer Slide Time: 00:33)

More information

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way EECS 16A Designing Information Devices and Systems I Spring 018 Lecture Notes Note 1 1.1 Introduction to Linear Algebra the EECS Way In this note, we will teach the basics of linear algebra and relate

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

Econometrics I. Ricardo Mora

Econometrics I. Ricardo Mora Econometrics I Department of Economics Universidad Carlos III de Madrid Master in Industrial Economics and Markets Outline Motivation 1 Motivation 2 3 4 Motivation The Analogy Principle The () is a framework

More information

o is a type symbol. There are no other type symbols.

o is a type symbol. There are no other type symbols. In what follows, the article sets out two main interpretations of the formal logic of Principia Mathematica, one aims to be historical which will be called Principia L and the other is Church s interpretation

More information

Congratulations you're done with CS103 problem sets! Please evaluate this course on Axess!

Congratulations you're done with CS103 problem sets! Please evaluate this course on Axess! The Big Picture Announcements Problem Set 9 due right now. We'll release solutions right after lecture. Congratulations you're done with CS103 problem sets! Practice final exam is Monday, December 8 from

More information

Last name Department Computer Name Legi No. Date Total. Always keep your Legi visible on the table.

Last name Department Computer Name Legi No. Date Total. Always keep your Legi visible on the table. First name Last name Department Computer Name Legi No. Date 12.08.2016 1 2 3 4 5 Total Grade Fill in this cover sheet first. Always keep your Legi visible on the table. Keep your phones, tablets and computers

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 28, 2003 These supplementary notes review the notion of an inductive definition and give

More information

An Efficient Context-Free Parsing Algorithm. Speakers: Morad Ankri Yaniv Elia

An Efficient Context-Free Parsing Algorithm. Speakers: Morad Ankri Yaniv Elia An Efficient Context-Free Parsing Algorithm Speakers: Morad Ankri Yaniv Elia Yaniv: Introduction Terminology Informal Explanation The Recognizer Morad: Example Time and Space Bounds Empirical results Practical

More information

Sunrise: Patrik Jonsson. Panchromatic SED Models of Simulated Galaxies. Lecture 2: Working with Sunrise. Harvard-Smithsonian Center for Astrophysics

Sunrise: Patrik Jonsson. Panchromatic SED Models of Simulated Galaxies. Lecture 2: Working with Sunrise. Harvard-Smithsonian Center for Astrophysics Sunrise: Panchromatic SED Models of Simulated Galaxies Lecture 2: Working with Sunrise Patrik Jonsson Harvard-Smithsonian Center for Astrophysics Lecture outline Lecture 1: Why Sunrise? What does it do?

More information

Designing and Evaluating Generic Ontologies

Designing and Evaluating Generic Ontologies Designing and Evaluating Generic Ontologies Michael Grüninger Department of Industrial Engineering University of Toronto gruninger@ie.utoronto.ca August 28, 2007 1 Introduction One of the many uses of

More information

arxiv: v1 [math.co] 3 Feb 2014

arxiv: v1 [math.co] 3 Feb 2014 Enumeration of nonisomorphic Hamiltonian cycles on square grid graphs arxiv:1402.0545v1 [math.co] 3 Feb 2014 Abstract Ed Wynn 175 Edmund Road, Sheffield S2 4EG, U.K. The enumeration of Hamiltonian cycles

More information

Price Competition and Endogenous Valuation in Search Advertising

Price Competition and Endogenous Valuation in Search Advertising Price Competition and Endogenous Valuation in Search Advertising Lizhen Xu Jianqing Chen Andrew Whinston Web Appendix A Heterogeneous Consumer Valuation In the baseline model, we assumed that consumers

More information

Discriminant Analysis Documentation

Discriminant Analysis Documentation Discriminant Analysis Documentation Release 1 Tim Thatcher May 01, 2016 Contents 1 Installation 3 2 Theory 5 2.1 Linear Discriminant Analysis (LDA).................................. 5 2.2 Quadratic Discriminant

More information

A High Level Programming Language for Quantum Computing

A High Level Programming Language for Quantum Computing QUARK QUantum Analysis and Realization Kit A High Level Programming Language for Quantum Computing Team In lexicographical order: Name UNI Role Daria Jung djj2115 Verification and Validation Jamis Johnson

More information

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in Oracle Turing Machines Nondeterministic OTM defined in the same way (transition relation, rather than function) oracle is like a subroutine, or function in your favorite PL but each call counts as single

More information

ASSIGNMENT 2 TIPS AND TRICKS

ASSIGNMENT 2 TIPS AND TRICKS ROBERT SEDGEWICK KEVIN WAYNE ASSIGNMENT 2 TIPS AND TRICKS n-body simulation problem decomposition the physics bugs universes http://introcs.cs.princeton.edu Alan Kaplan and Kevin Wayne Last updated on

More information

Hydra. A library for data analysis in massively parallel platforms. A. Augusto Alves Jr and Michael D. Sokoloff

Hydra. A library for data analysis in massively parallel platforms. A. Augusto Alves Jr and Michael D. Sokoloff Hydra A library for data analysis in massively parallel platforms A. Augusto Alves Jr and Michael D. Sokoloff University of Cincinnati aalvesju@cern.ch Presented at NVIDIA s GPU Technology Conference,

More information

ITI Introduction to Computing II

ITI Introduction to Computing II (with contributions from R. Holte) School of Electrical Engineering and Computer Science University of Ottawa Version of January 11, 2015 Please don t print these lecture notes unless you really need to!

More information

Type Inference. For the Simply-Typed Lambda Calculus. Peter Thiemann, Manuel Geffken. Albert-Ludwigs-Universität Freiburg. University of Freiburg

Type Inference. For the Simply-Typed Lambda Calculus. Peter Thiemann, Manuel Geffken. Albert-Ludwigs-Universität Freiburg. University of Freiburg Type Inference For the Simply-Typed Lambda Calculus Albert-Ludwigs-Universität Freiburg Peter Thiemann, Manuel Geffken University of Freiburg 24. Januar 2013 Outline 1 Introduction 2 Applied Lambda Calculus

More information

A BRIEF INTRODUCTION TO TYPED PREDICATE LOGIC

A BRIEF INTRODUCTION TO TYPED PREDICATE LOGIC A BRIEF INTRODUCTION TO TYPED PREDICATE LOGIC Raymond Turner December 6, 2010 Abstract Typed Predicate Logic 1 was developed to o er a unifying framework for many of the current logical systems, and especially

More information

Runtime Analysis of 4 VA HiCuM Versions with and without Internal Solver

Runtime Analysis of 4 VA HiCuM Versions with and without Internal Solver Runtime Analysis of 4 VA HiCuM Versions with and without Internal Solver Didier Céli, Jean Remy 28 th ArbeitsKreis Bipolar - Letter Session Unterpremstaetten, Austria, November 5/6, 215 dm23a.15 Outline

More information

Introduction to lambda calculus Part 6

Introduction to lambda calculus Part 6 Introduction to lambda calculus Part 6 Antti-Juhani Kaijanaho 2017-02-16 1 Untyped lambda calculus 2 Typed lambda calculi 2.1 Dynamically typed lambda calculus with integers 2.2 A model of Lisp 2.3 Simply

More information

INF Models of concurrency

INF Models of concurrency INF4140 - Models of concurrency RPC and Rendezvous INF4140 Lecture 15. Nov. 2017 RPC and Rendezvous Outline More on asynchronous message passing interacting processes with different patterns of communication

More information

8.1 THE LANGUAGE OF MOTION

8.1 THE LANGUAGE OF MOTION Unit 3 Motion 8.1 THE LANGUAGE OF MOTION 8.1 LEARNING OUTCOMES Vector quantities, such as displacement and velocity, have both a magnitude and a direction. An object in uniform motion will travel equal

More information

Scripting Languages Fast development, extensible programs

Scripting Languages Fast development, extensible programs Scripting Languages Fast development, extensible programs Devert Alexandre School of Software Engineering of USTC November 30, 2012 Slide 1/60 Table of Contents 1 Introduction 2 Dynamic languages A Python

More information

An Automotive Case Study ERTSS 2016

An Automotive Case Study ERTSS 2016 Institut Mines-Telecom Virtual Yet Precise Prototyping: An Automotive Case Study Paris Sorbonne University Daniela Genius, Ludovic Apvrille daniela.genius@lip6.fr ludovic.apvrille@telecom-paristech.fr

More information

Lambert s problem, to find the unique conic trajectory that

Lambert s problem, to find the unique conic trajectory that CONVERGENCE BEHAVIOR OF SERIES SOLUTIONS OF THE LAMBERT PROBLEM James Thorne Lambert s problem, to find the unique conic trajectory that connects two points in a spherical gravity field in a given time,

More information

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way EECS 16A Designing Information Devices and Systems I Fall 018 Lecture Notes Note 1 1.1 Introduction to Linear Algebra the EECS Way In this note, we will teach the basics of linear algebra and relate it

More information

Industrial Technology: Intro to Industrial Technology Crosswalk to AZ Math Standards

Industrial Technology: Intro to Industrial Technology Crosswalk to AZ Math Standards East Valley Page 1 of 1 August 1998 3M-P6 Perform mathematical operations on expressions and matrices, and solve equations and inequalities. PO 4 PO 5 PO 6 PO 7 PO 8 PO 9 PO 10 5.0 Demonstrate the elements

More information

Programming Languages and Types

Programming Languages and Types Programming Languages and Types Klaus Ostermann based on slides by Benjamin C. Pierce Subtyping Motivation With our usual typing rule for applications the term is not well typed. ` t 1 : T 11!T 12 ` t

More information

Desirable properties of decompositions 1. Decomposition of relational schemes. Desirable properties of decompositions 3

Desirable properties of decompositions 1. Decomposition of relational schemes. Desirable properties of decompositions 3 Desirable properties of decompositions 1 Lossless decompositions A decomposition of the relation scheme R into Decomposition of relational schemes subschemes R 1, R 2,..., R n is lossless if, given tuples

More information

Fall 1999 Formal Language Theory Dr. R. Boyer. 1. There are other methods of nding a regular expression equivalent to a nite automaton in

Fall 1999 Formal Language Theory Dr. R. Boyer. 1. There are other methods of nding a regular expression equivalent to a nite automaton in Fall 1999 Formal Language Theory Dr. R. Boyer Week Four: Regular Languages; Pumping Lemma 1. There are other methods of nding a regular expression equivalent to a nite automaton in addition to the ones

More information

Kurt Schmidt. June 5, 2017

Kurt Schmidt. June 5, 2017 Dept. of Computer Science, Drexel University June 5, 2017 Examples are taken from Kernighan & Pike, The Practice of ming, Addison-Wesley, 1999 Objective: To learn when and how to optimize the performance

More information

CISC 1100: Structures of Computer Science

CISC 1100: Structures of Computer Science CISC 1100: Structures of Computer Science Chapter 2 Sets and Sequences Fordham University Department of Computer and Information Sciences Fall, 2010 CISC 1100/Fall, 2010/Chapter 2 1 / 49 Outline Sets Basic

More information

2. Write a recursive function to add the first n terms of the alternating harmonic series:

2. Write a recursive function to add the first n terms of the alternating harmonic series: CS 7B - Spring 2014 - Midterm 2. 5/8/14 Write responses on separate paper. 1. Write a recursive method that uses only addition, subtraction, and comparison to multiply two numbers. The basic engine for

More information

Productivity-oriented software design for geoscientific modelling

Productivity-oriented software design for geoscientific modelling Productivity-oriented software design for geoscientific modelling Dorota Jarecka, Sylwester Arabas, Anna Jaruga University of Warsaw 2014 April 7 th UCAR SEA Software Engineering Conference 2014 Boulder,

More information

Models of Computation,

Models of Computation, Models of Computation, 2010 1 Induction We use a lot of inductive techniques in this course, both to give definitions and to prove facts about our semantics So, it s worth taking a little while to set

More information

CRISP: Capture-Recapture Interactive Simulation Package

CRISP: Capture-Recapture Interactive Simulation Package CRISP: Capture-Recapture Interactive Simulation Package George Volichenko Carnegie Mellon University Pittsburgh, PA gvoliche@andrew.cmu.edu December 17, 2012 Contents 1 Executive Summary 1 2 Introduction

More information

Nested Differentiation and Symmetric Hessian Graphs with ADTAGEO

Nested Differentiation and Symmetric Hessian Graphs with ADTAGEO Nested Differentiation and Symmetric Hessian Graphs with ADTAGEO ADjoints and TAngents by Graph Elimination Ordering Jan Riehme Andreas Griewank Institute for Applied Mathematics Humboldt Universität zu

More information

Binary Search Trees. Lecture 29 Section Robb T. Koether. Hampden-Sydney College. Fri, Apr 8, 2016

Binary Search Trees. Lecture 29 Section Robb T. Koether. Hampden-Sydney College. Fri, Apr 8, 2016 Binary Search Trees Lecture 29 Section 19.2 Robb T. Koether Hampden-Sydney College Fri, Apr 8, 2016 Robb T. Koether (Hampden-Sydney College) Binary Search Trees Fri, Apr 8, 2016 1 / 40 1 Binary Search

More information

Automated Reasoning. Lecture 9: Isar A Language for Structured Proofs

Automated Reasoning. Lecture 9: Isar A Language for Structured Proofs Automated Reasoning Lecture 9: Isar A Language for Structured Proofs Jacques Fleuriot jdf@inf.ed.ac.uk Acknowledgement: Tobias Nipkow kindly provided the slides for this lecture Apply scripts unreadable

More information

Concurrent Non-malleable Commitments from any One-way Function

Concurrent Non-malleable Commitments from any One-way Function Concurrent Non-malleable Commitments from any One-way Function Margarita Vald Tel-Aviv University 1 / 67 Outline Non-Malleable Commitments Problem Presentation Overview DDN - First NMC Protocol Concurrent

More information

Proofs Propositions and Calculuses

Proofs Propositions and Calculuses Lecture 2 CS 1813 Discrete Mathematics Proofs Propositions and Calculuses 1 City of Königsberg (Kaliningrad) 2 Bridges of Königsberg Problem Find a route that crosses each bridge exactly once Must the

More information