Introduction to Julia for Bioinformatics

Size: px
Start display at page:

Download "Introduction to Julia for Bioinformatics"

Transcription

1 Introduction to Juli for Bioinformtics This introduction ssumes tht you hve bsic knowledge of some scripting lnguge nd provides n exmple of the Juli syntx. Continuous Assessment Problems In this course problems for you to solve re presented on the ROSALIND website. You cn enroll here. ( Using Juli's REPL (Red, Evlute, Print Loop), you will solve most of these problems by writing nd executing short Juli scripts. Mny of the Juli detils for solving these problems will be covered in clss, some will not. Solve s mny or s few problems s you cn during the semester. Documenttion The min source of informtion is the Juli Documenttion ( You my need to use some externl resources: ( ( So let's just tret it like scripting lnguge, tke hed-first dive into Juli, nd see wht hppens. Firstly, the Juli REPL itself lso provides lots of built-in documenttion nd wys to find out wht's going on. For exmple, the? gets you to the documenttion for type, function, etc. In [1]:?split serch: split splitext splitdir splitdrive rsplit specilized_bitwise_unry Out[1]: split(string, [chrs]; limit=0, keep=true) Return n rry of substrings by splitting the given string on occurrences of the given chrcter delimiters, which my be specified in ny of the formts llowed by serch's second rgument (i.e. single chrcter, collection of chrcters, string, or regulr expression). If chrs is omitted, it defults to the set of ll spce chrcters, nd keep is tken to be flse. The two keyword rguments re optionl: they re mximum size for the result nd flg determining whether empty fields should be kept in the result. To find out wht methods re vilble, we cn use the methods function. For exmple, let's see how split is defined: In [2]: Out[2]: methods(split) 3 methods for generic function split: split{t<:substring{t<:abstrctstring}}(str::t, splitter; limit, keep) t strings/util.jl:126 ( split(str::abstrctstring) t strings/util.jl:151 ( split{t<:abstrctstring}(str::t, splitter; limit, keep) t strings/util.jl:127 ( We cn inspect type by finding its fields with fieldnmes In [3]:?linspce serch: linspce LinSpce Out[3]: linspce(strt, stop, n=50) Construct rnge of n linerly spced elements from strt to stop.

2 In [4]: Out[4]: fieldnmes(linspce) 4-element Arry{Symbol,1}: :strt :stop :len :divisor more bout itertors lter. We cn find out wht type vrible is with the typeof function: In [19]: = [1 2 3; 5 4 6; 9 8 7] typeof() Out[19]: Arry{Int64,2} In [22]: Out[22]: inv() * 3 3 Arry{Flot64,2}: e e e e Arry Syntx The rry syntx is similr to MATLAB's conventions. In [1]: = Vector{Flot64}(5) # Crete length 5 Vector (dimension 1 rry) of Flot64's = [1;2;3;4;5] # Crete the column vector [ ] = [ ] # Crete the row vector [ ] [3] = 2 # Chnge the third element of (using liner indexing) to 2 Out[1]: 1 4 Arry{Int64,2}: In [7]: b = Mtrix{Flot64}(4,2) # Define Mtrix of Flot64's of size (4,2) c = Arry{Flot64}(4,5,6,7) # Define (4,5,6,7) rry of Flot64's mt = [ ] #Define the mtrix inline mt[1,2] = 4 # Set element (1,2) (row 1, column 2) to 4 mt Out[7]: 4 4 Arry{Int64,2}: Note tht the "vlue" of n rry is its pointer to the memory loction. This mens tht rrys which re set equl ffect the sme vlues: In [8]: = [1;3;4] b = b[1] = 10 Out[8]: 3-element Arry{Int64,1}: To set n rry equl to the vlues to nother rry, use copy

3 In [9]: = [1;4;5] b = copy() b[1] = 10 Out[9]: 3-element Arry{Int64,1}: We cn lso mke n rry of similr size nd shpe vi the function similr, or mke n rry of zeros/ones with zeros or ones respectively: In [23]: = [1 4 5] c = similr() d = zeros() e = ones() println(c); println(d); println(e) [ ] [0 0 0] [1 1 1] Note tht rrys cn be index'd by rrys: In [11]: Out[11]: [1:2] 2-element Arry{Int64,1}: 1 4 Arrys cn be of ny type, specified by the type prmeter. One interesting thing is tht this mens tht rrys cn be of rrys: In [12]: Out[12]: = Vector{Vector{Flot64}}(3) [1] = [1;2;3] [2] = [1;2] [3] = [3;4;5] 3-element Arry{Arry{Flot64,1},1}: [1.0,2.0,3.0] [1.0,2.0] [3.0,4.0,5.0] Agin ssignment sets rry ddresses equl: In [13]: Out[13]: b = b[1] = [1;4;5;9] 3-element Arry{Arry{Flot64,1},1}: [1.0,4.0,5.0,9.0] [1.0,2.0] [3.0,4.0,5.0] To solve this, there is recursive copy function: deepcopy In [14]: Out[14]: b = deepcopy() b[1] = [1;2;3] 3-element Arry{Arry{Flot64,1},1}: [1.0,4.0,5.0,9.0] [1.0,2.0] [3.0,4.0,5.0] Mutting functions For high performnce, Juli provides mutting functions. These functions chnge the input vlues tht re pssed in, insted of returning new vlue. By convention, mutting functions t to be defined with! t the nd t to mutte their first rgument. An exmple of mutting function in scle! which scles n rry by sclr (or rry)

4 In [15]: = [1;6;8] scle!(,2) # chnges Out[15]: 3-element Arry{Int64,1}: The purpose of mutting functions is tht they llow one to reduce the number of memory lloctions which is crucil for chiving high performnce. Control Flow Control flow in Juli is pretty stndrd. You hve your bsic for nd while loops, nd your if sttements. There's more in the documenttion. In [16]: for i=1:5 #for i goes from 1 to 5 print(i," ") println() t = 0 while t<5 print(t," ") t+=1 # t = t + 1 println() school = :UKZN if school==:ukzn println("yy!") else println("not even worth discussing.") yy! One interesting feture bout Juli control flow is tht we cn write multiple loops in one line: In [17]: for i=1:2,j=2:4 print(i*j," ") Function Syntx In [18]: Out[18]: f(x,y) = 2x+y # Crete n inline function f (generic function with 1 method) In [19]: f(1,2) # Cll the function Out[19]: 4 In [20]: Out[20]: function f(x) x+2 # Long form definition f (generic function with 2 methods) By defult, Juli functions return the lst vlue computed within them. In [21]: f(2) Out[21]: 4 Multiple Disptch A key feture of Juli is multiple disptch. Suppose tht there is "one function", f, with two methods. Methods re the ctionble prts of function. One method defined s f(::any,::any) nd nother s f(::any), mening tht if you give f two vlues then it will cll the first method, nd if you give it one vlue then it will cll the second method.

5 Multiple disptch works on types. To define disptch on type, use ::Type signifier: In [2]: Out[2]: f(x,y) = 2x+y f (generic function with 1 method) In [3]: Out[3]: f(x::int,y::int) = 3x+2y f (generic function with 2 methods) Juli will disptch onto the strictest cceptible type signture. In [24]: f(2,3) # 3x+2y Out[24]: 12 In [25]: f(2.0,3) # 2x+y since 2.0 is not n Int Out[25]: 7.0 Types in signtures cn be prmetric. For exmple, we cn define method for "two vlues re pssed in, both Numbers nd hving the sme type". Note tht <: mens " subtype of". In [26]: Out[26]: f{t<:number}(x::t,y::t) = 4x+10y f (generic function with 4 methods) In [27]: f(2,3) # 3x+2y since (::Int,::Int) is stricter Out[27]: 12 In [28]: f(2.0,3.0) # 4x+10y Out[28]: 38.0 In [29]: Out[29]: f(1+2im,1+2im) im We will go into more depth on multiple disptch lter since this is the core design feture of Juli. The key feture is tht Juli functions specilize on the types of their rguments. This mens tht f is seprtely compiled function for ech method (nd for prmetric types, ech possible method). The first time it is clled it will compile. Question Cn you explin these timings? In [30]: f(x,y,z,w) = f(1,1,1,1.0) Out[30]: seconds (385 lloctions: KB) seconds (4 lloctions: 160 bytes) seconds (3 lloctions: 144 bytes) seconds (1.33 k lloctions: KB) seconds (5 lloctions: 176 bytes) functions cn lso feture optionl rguments nd return multiple vlues: In [31]: Out[31]: function test_function(x,y;z=0) #z is n optionl rgument if z==0 return x+y,x*y #Return tuple else return x*y*z,x+y+z #Return different tuple test_function (generic function with 1 method)

6 In [32]: x,y = test_function(1,2) Out[32]: (3,2) In [33]: x,y = test_function(1,2;z=3) Out[33]: (6,6) The return type for multiple return vlues is Tuple. The syntx for tuple is (x,y,z,...) or inside of functions you cn use the shorthnd x,y,z,... Note tht functions in Juli re "first-clss". This mens tht functions re just type themselves. Therefore functions cn mke functions, you cn store functions s vribles, pss them s vribles nd return them. For exmple: In [34]: Out[34]: function plytime(x) y = 2+x function test(z=1) 2y + z # y is defined in the previous scope, so it's vilble here z = test() * test() return z,test #End function definition plytime (generic function with 1 method) In [35]: Out[35]: z,t = plytime(2) (81,test) In [36]: t(3) Out[36]: 11 Notice tht test() does not get pssed in y but knows wht y is. This is due to the function scoping rules: n inner function cn know the vribles defined in the sme scope s the function. This rule is recursive, leding us to the conclusion tht the top level scope is globl. Tht mens: In [37]: = 2 Out[37]: 2 defines globl vrible. We will go into more detil on this. Lstly we show the nonymous function syntx. This llows you to define function inline. In [38]: Out[38]: g = (x,y) -> 2x+y (::#3) (generic function with 1 method) In [3]: ((x,y) -> 4x+2y)(4,5) Out[3]: 26 Unlike nmed functions, g is simply function in vrible nd cn be overwritten t ny time: In [40]: Out[40]: g = (x) -> 2x (::#5) (generic function with 1 method) In [41]: g(3) Out[41]: 6 An nonymous function cnnot hve more thn 1 disptch. However, s of v0.5, they re compiled nd thus do not hve ny performnce disdvntges from nmed functions. In [42]: g(4,5) MethodError: no method mtching (::##5#6)(::Int64, ::Int64) Closest cndidtes re: #5(::Any) t In[40]:1

7 Type Declrtion Syntx A type is wht in mny other lnguges is n "object" thing which hs nmed components. An instntition of the type is specific one. For exmple, you cn think of cr s hving n mke nd model. So tht mens Toyot RAV4 is n instntition of the cr type. In Juli, we would define the cr type s follows: In [43]: type Cr mke model We could then mke the instnce of cr s follows: In [44]: Out[44]: mycr = Cr("Toyot","Rv4") Cr("Toyot","Rv4") In [45]: Out[45]: mycr.mke "Toyot" To "enhnce Juli's performnce", one usully likes to mke the typing stricter. For exmple, we cn define WorkshopPrticipnt (notice the convention for types is cpitl letters, CmelCse) s hving nme nd field. The nme will be string nd the field will be Symbol type, (defined by :Symbol, which we will go into plenty more detil lter). In [46]: Out[46]: type WorkshopPrticipnt nme::string field::symbol tony = WorkshopPrticipnt("Tony",:physics) WorkshopPrticipnt("Tony",:physics) As with functions, types cn be set "prmetriclly". For exmple, we cn hve n StffMember hve nme nd field, but lso n ge. We cn llow this ge to be ny Number type s follows: In [47]: Out[47]: type StffMember{T<:Number} nme::string field::symbol ge::t ter = StffMember("Terry",:footbll,17) StffMember{Int64}("Terry",:footbll,17) Most of Juli's types, like Flot64 nd Int, re ntively defined in Juli in this mnner. This mens tht there's no limit for user defined types, only your imgintion. Juli lso hs bstrct types. These types cnnot be instntited but re used to build the type hierrchy. You've lredy seen one bstrct type, Number. You cn define type heirrchies on bstrct types. See the beutiful explntion t: ( Another "version" of type is immutble. When one uses immutble, the fields of the type cnnot be chnged. Mny things like Juli's built-in Number types re defined s immutble in order to give good performnce. One importnt detil in Juli is tht everything is type (nd every piece of code is n Expression type). Thus functions re lso types, which we cn ccess the fields of.

8 In [48]: Out[48]: foo(x) = 2x foo (generic function with 1 method) In [49]: Out[49]: methods(foo) 1 method for generic function foo: foo(x) t In[48]:1 In [50]: Out[50]: fieldnmes(first(methods(foo))) 15-element Arry{Symbol,1}: :nme :module :file :line :sig :tvrs :mbig :speciliztions :lmbd_templte :roots :invokes :clled :isstged :needs_sprm_vls_ducttpe Symbol("") In [51]: Out[51]: first(methods(foo)).nme :foo Some Bsic Types Juli provides mny bsic types. Indeed, you will come to know Juli s system of multiple disptch on types, mening tht the interction of types with functions is core to the design. Lzy Itertor Types While MATLAB or Python hs esy functions for building rrys, Juli ts to side-step the ctul "rry" prt with specilly mde types. One such exmple re rnges. To define rnge, use the strt:stepsize: syntx. For exmple: In [52]: = 1:5 println() b = 1:2:10 println(b) 1:5 1:2:9 We cn use them like ny rry. For exmple: In [53]: println([2]); println(b[3]) 2 5 But wht is b? In [54]: println(typeof(b)) StepRnge{Int64,Int64} b isn't n rry, it's StepRnge. A StepRnge hs the bility to ct like n rry using its fields: In [55]: Out[55]: fieldnmes(steprnge) 3-element Arry{Symbol,1}: :strt :step :stop Note tht t ny time we cn get the rry from these kinds of type vi the collect function:

9 In [56]: Out[56]: c = collect() 5-element Arry{Int64,1}: The reson why lzy itertor types re preferred is tht they do not do the computtions until it's bsolutely necessry, nd they tke up much less spce. We cn check this In = = b = collect(1:100000); seconds (5 lloctions: 192 bytes) seconds (5 lloctions: 192 bytes) seconds (8 lloctions: KB) Notice tht the mount of time the rnge tkes is much shorter. This is mostly becuse there is lot less memory lloction needed: only StepRnge is built, nd ll tht holds is the three numbers. However, b hs to hold numbers, leding to the huge difference. Dictionries Another common type is the Dictionry. It llows you to ccess (key,vlue) pirs in nmed mnner. For exmple: In [5]: d = Dict(:=>2,:b=>:24) println(d[:]) println(d[:b]) 2 24 Tuples Tuples re immutble rrys. Tht mens they cn't be chnged. However, they re super fst. They re mde with the (x,y,z,...) syntx nd re the stndrd return type of functions which return more thn one object. In [7]: tup = (2.,3) # Don't hve to mtch types x,y = (3.0,"hi") # Cn seprte tuple to multiple vribles println(y) hi Metprogrmming Metprogrmming is huge feture of Juli. The key ide is tht every sttement in Juli is of the type Expression. Juli builds n Abstrct Syntx Tree (AST) from the Expressions. You've lredy been exposed to this little bit: Symbol is not string becuse it is prt of the AST. One interesting thing is tht symbol comprisons re O(1) while string comprisons, like lwys, re O(n). Thus you cn think of metprogrmming s "code which tkes in code nd outputs code". One bsic exmple is mcro: In [60]: Out[60]: mcro my_time(ex) return quote locl t0 = time() locl vl = $ex locl t1 = time() println("elpsed time: ", t1-t0, " seconds") (mcro with 1 method) This tkes in n expression ex, gets the time before nd fter evlution, nd prints the elpsed time. Note tht $ex "interpoltes" the expression into the mcro.

10 Tril Problem Here s full whisky bottle. It hs height of 27cm nd dimeter of 7cm, nd contins 750 cubic centimetres of whisky. It hs dome-like indenttion t the bottom like mny bottles hve. <img src="imges/full.jpg" width=600> You were hoping for dry Jnury but spectculrly fell off the wgon lst night. You cn t remember wht hppened but now bottle only hs 14cm of whisky left in it. When you turn the bottle over, it hs 19cm of whisky. <img src="imges/not_full.jpg" width=600> Exercise: Write Juli script tht tkes two numbers s input nd then prints out how mny cubic centermeters of whiskey is left in the bottle. Homework Attempt the follwing problems from the COMP710-Bioinformtics-2018 course on the Roslind website, ( DNA Counting DNA neucleotides FIB Rbbits nd Recurrence Reltions In ech cse you must write Juli script to solve the problem. When you re stisfied with your script tell the Roslind system you re redy. Roslind will generte new input dt for your script. Run your script nd pste your output into the Roslind system. Uplod your script. Press submit. The Roslind will inform you if you re successful. If not, the Roslind system will llow you further ttempts.

Functor (1A) Young Won Lim 10/5/17

Functor (1A) Young Won Lim 10/5/17 Copyright (c) 2016-2017 Young W. Lim. Permission is grnted to copy, distribute nd/or modify this document under the terms of the GNU Free Documenttion License, Version 1.2 or ny lter version published

More information

Functor (1A) Young Won Lim 8/2/17

Functor (1A) Young Won Lim 8/2/17 Copyright (c) 2016-2017 Young W. Lim. Permission is grnted to copy, distribute nd/or modify this document under the terms of the GNU Free Documenttion License, Version 1.2 or ny lter version published

More information

CS201 Discussion 10 DRAWTREE + TRIES

CS201 Discussion 10 DRAWTREE + TRIES CS201 Discussion 10 DRAWTREE + TRIES DrwTree First instinct: recursion As very generic structure, we could tckle this problem s follows: drw(): Find the root drw(root) drw(root): Write the line for the

More information

MIPS I/O and Interrupt

MIPS I/O and Interrupt MIPS I/O nd Interrupt Review Floting point instructions re crried out on seprte chip clled coprocessor 1 You hve to move dt to/from coprocessor 1 to do most common opertions such s printing, clling functions,

More information

Reference types and their characteristics Class Definition Constructors and Object Creation Special objects: Strings and Arrays

Reference types and their characteristics Class Definition Constructors and Object Creation Special objects: Strings and Arrays Objects nd Clsses Reference types nd their chrcteristics Clss Definition Constructors nd Object Cretion Specil objects: Strings nd Arrys OOAD 1999/2000 Cludi Niederée, Jochim W. Schmidt Softwre Systems

More information

Fig.25: the Role of LEX

Fig.25: the Role of LEX The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing

More information

PYTHON PROGRAMMING. The History of Python. Features of Python. This Course

PYTHON PROGRAMMING. The History of Python. Features of Python. This Course The History of Python PYTHON PROGRAMMING Dr Christin Hill 7 9 November 2016 Invented by Guido vn Rossum* t the Centrum Wiskunde & Informtic in Amsterdm in the erly 1990s Nmed fter Monty Python s Flying

More information

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications.

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications. 15-112 Fll 2018 Midterm 1 October 11, 2018 Nme: Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or

More information

CPSC 213. Polymorphism. Introduction to Computer Systems. Readings for Next Two Lectures. Back to Procedure Calls

CPSC 213. Polymorphism. Introduction to Computer Systems. Readings for Next Two Lectures. Back to Procedure Calls Redings for Next Two Lectures Text CPSC 213 Switch Sttements, Understnding Pointers - 2nd ed: 3.6.7, 3.10-1st ed: 3.6.6, 3.11 Introduction to Computer Systems Unit 1f Dynmic Control Flow Polymorphism nd

More information

Agenda & Reading. Class Exercise. COMPSCI 105 SS 2012 Principles of Computer Science. Arrays

Agenda & Reading. Class Exercise. COMPSCI 105 SS 2012 Principles of Computer Science. Arrays COMPSCI 5 SS Principles of Computer Science Arrys & Multidimensionl Arrys Agend & Reding Agend Arrys Creting & Using Primitive & Reference Types Assignments & Equlity Pss y Vlue & Pss y Reference Copying

More information

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl

More information

box Boxes and Arrows 3 true 7.59 'X' An object is drawn as a box that contains its data members, for example:

box Boxes and Arrows 3 true 7.59 'X' An object is drawn as a box that contains its data members, for example: Boxes nd Arrows There re two kinds of vriles in Jv: those tht store primitive vlues nd those tht store references. Primitive vlues re vlues of type long, int, short, chr, yte, oolen, doule, nd flot. References

More information

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits Systems I Logic Design I Topics Digitl logic Logic gtes Simple comintionl logic circuits Simple C sttement.. C = + ; Wht pieces of hrdwre do you think you might need? Storge - for vlues,, C Computtion

More information

Midterm 2 Sample solution

Midterm 2 Sample solution Nme: Instructions Midterm 2 Smple solution CMSC 430 Introduction to Compilers Fll 2012 November 28, 2012 This exm contins 9 pges, including this one. Mke sure you hve ll the pges. Write your nme on the

More information

Lecture Overview. Knowledge-based systems in Bioinformatics, 1MB602. Procedural abstraction. The sum procedure. Integration as a procedure

Lecture Overview. Knowledge-based systems in Bioinformatics, 1MB602. Procedural abstraction. The sum procedure. Integration as a procedure Lecture Overview Knowledge-bsed systems in Bioinformtics, MB6 Scheme lecture Procedurl bstrction Higher order procedures Procedures s rguments Procedures s returned vlues Locl vribles Dt bstrction Compound

More information

Mid-term exam. Scores. Fall term 2012 KAIST EE209 Programming Structures for EE. Thursday Oct 25, Student's name: Student ID:

Mid-term exam. Scores. Fall term 2012 KAIST EE209 Programming Structures for EE. Thursday Oct 25, Student's name: Student ID: Fll term 2012 KAIST EE209 Progrmming Structures for EE Mid-term exm Thursdy Oct 25, 2012 Student's nme: Student ID: The exm is closed book nd notes. Red the questions crefully nd focus your nswers on wht

More information

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

In the last lecture, we discussed how valid tokens may be specified by regular expressions. LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.

More information

COMP 423 lecture 11 Jan. 28, 2008

COMP 423 lecture 11 Jan. 28, 2008 COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring

More information

10.5 Graphing Quadratic Functions

10.5 Graphing Quadratic Functions 0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions

More information

L2-Python-Data-Structures

L2-Python-Data-Structures L2-Python-Dt-Structures Mrch 19, 2018 1 Principl built-in types in Python (Python ) numerics: int, flot, long, complex sequences: str, unicode, list, tuple, byterry, buffer, xrnge mppings: dict files:

More information

Spring 2018 Midterm Exam 1 March 1, You may not use any books, notes, or electronic devices during this exam.

Spring 2018 Midterm Exam 1 March 1, You may not use any books, notes, or electronic devices during this exam. 15-112 Spring 2018 Midterm Exm 1 Mrch 1, 2018 Nme: Andrew ID: Recittion Section: You my not use ny books, notes, or electronic devices during this exm. You my not sk questions bout the exm except for lnguge

More information

Dr. D.M. Akbar Hussain

Dr. D.M. Akbar Hussain Dr. D.M. Akr Hussin Lexicl Anlysis. Bsic Ide: Red the source code nd generte tokens, it is similr wht humns will do to red in; just tking on the input nd reking it down in pieces. Ech token is sequence

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5 CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,

More information

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples COMPUTER SCIENCE 123 Foundtions of Computer Science 6. Tuples Summry: This lecture introduces tuples in Hskell. Reference: Thompson Sections 5.1 2 R.L. While, 2000 3 Tuples Most dt comes with structure

More information

Section 10.4 Hyperbolas

Section 10.4 Hyperbolas 66 Section 10.4 Hyperbols Objective : Definition of hyperbol & hyperbols centered t (0, 0). The third type of conic we will study is the hyperbol. It is defined in the sme mnner tht we defined the prbol

More information

MATLAB Session for CS4514

MATLAB Session for CS4514 MATLAB Session for CS4514 Adrin Her her @wpi.edu Computing & Communictions Center - November 28, 2006- Prt of the notes re from Mtlb documenttion 1 MATLAB Session for CS4514 1. Mtlb Bsics Strting Mtlb

More information

Reducing a DFA to a Minimal DFA

Reducing a DFA to a Minimal DFA Lexicl Anlysis - Prt 4 Reducing DFA to Miniml DFA Input: DFA IN Assume DFA IN never gets stuck (dd ded stte if necessry) Output: DFA MIN An equivlent DFA with the minimum numer of sttes. Hrry H. Porter,

More information

Reducing Costs with Duck Typing. Structural

Reducing Costs with Duck Typing. Structural Reducing Costs with Duck Typing Structurl 1 Duck Typing In computer progrmming with object-oriented progrmming lnguges, duck typing is lyer of progrmming lnguge nd design rules on top of typing. Typing

More information

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012 Dynmic Progrmming Andres Klppenecker [prtilly bsed on slides by Prof. Welch] 1 Dynmic Progrmming Optiml substructure An optiml solution to the problem contins within it optiml solutions to subproblems.

More information

PNC NC code PROGRAMMER'S MANUAL

PNC NC code PROGRAMMER'S MANUAL PNC-3200 NC code PROGRAMMER'S MANUAL Thnk you very much for purchsing the PNC-3200. To ensure correct nd sfe usge with full understnding of this product's performnce, plese be sure to red through this

More information

From Dependencies to Evaluation Strategies

From Dependencies to Evaluation Strategies From Dependencies to Evlution Strtegies Possile strtegies: 1 let the user define the evlution order 2 utomtic strtegy sed on the dependencies: use locl dependencies to determine which ttriutes to compute

More information

cisc1110 fall 2010 lecture VI.2 call by value function parameters another call by value example:

cisc1110 fall 2010 lecture VI.2 call by value function parameters another call by value example: cisc1110 fll 2010 lecture VI.2 cll y vlue function prmeters more on functions more on cll y vlue nd cll y reference pssing strings to functions returning strings from functions vrile scope glol vriles

More information

Fall 2017 Midterm Exam 1 October 19, You may not use any books, notes, or electronic devices during this exam.

Fall 2017 Midterm Exam 1 October 19, You may not use any books, notes, or electronic devices during this exam. 15-112 Fll 2017 Midterm Exm 1 October 19, 2017 Nme: Andrew ID: Recittion Section: You my not use ny books, notes, or electronic devices during this exm. You my not sk questions bout the exm except for

More information

Fall 2018 Midterm 2 November 15, 2018

Fall 2018 Midterm 2 November 15, 2018 Nme: 15-112 Fll 2018 Midterm 2 November 15, 2018 Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or

More information

Outline. Tiling, formally. Expression tile as rule. Statement tiles as rules. Function calls. CS 412 Introduction to Compilers

Outline. Tiling, formally. Expression tile as rule. Statement tiles as rules. Function calls. CS 412 Introduction to Compilers CS 412 Introduction to Compilers Andrew Myers Cornell University Lectur8 Finishing genertion 9 Mr 01 Outline Tiling s syntx-directed trnsltion Implementing function clls Implementing functions Optimizing

More information

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork MA1008 Clculus nd Liner Algebr for Engineers Course Notes for Section B Stephen Wills Deprtment of Mthemtics University College Cork s.wills@ucc.ie http://euclid.ucc.ie/pges/stff/wills/teching/m1008/ma1008.html

More information

Creating Flexible Interfaces. Friday, 24 April 2015

Creating Flexible Interfaces. Friday, 24 April 2015 Creting Flexible Interfces 1 Requests, not Objects Domin objects re esy to find but they re not t the design center of your ppliction. Insted, they re trp for the unwry. Sequence digrms re vehicle for

More information

ECE 468/573 Midterm 1 September 28, 2012

ECE 468/573 Midterm 1 September 28, 2012 ECE 468/573 Midterm 1 September 28, 2012 Nme:! Purdue emil:! Plese sign the following: I ffirm tht the nswers given on this test re mine nd mine lone. I did not receive help from ny person or mteril (other

More information

a(e, x) = x. Diagrammatically, this is encoded as the following commutative diagrams / X

a(e, x) = x. Diagrammatically, this is encoded as the following commutative diagrams / X 4. Mon, Sept. 30 Lst time, we defined the quotient topology coming from continuous surjection q : X! Y. Recll tht q is quotient mp (nd Y hs the quotient topology) if V Y is open precisely when q (V ) X

More information

Unit 5 Vocabulary. A function is a special relationship where each input has a single output.

Unit 5 Vocabulary. A function is a special relationship where each input has a single output. MODULE 3 Terms Definition Picture/Exmple/Nottion 1 Function Nottion Function nottion is n efficient nd effective wy to write functions of ll types. This nottion llows you to identify the input vlue with

More information

vcloud Director Service Provider Admin Portal Guide vcloud Director 9.1

vcloud Director Service Provider Admin Portal Guide vcloud Director 9.1 vcloud Director Service Provider Admin Portl Guide vcloud Director 9. vcloud Director Service Provider Admin Portl Guide You cn find the most up-to-dte technicl documenttion on the VMwre website t: https://docs.vmwre.com/

More information

- 2 U NIX FILES 1. Explin different file types vilble in UNIX or P OSIX s ystem. ( 08 mrks) ( My-08/Dec-08/My-10/My- 12) 2. Wht is n API? How is it di

- 2 U NIX FILES 1. Explin different file types vilble in UNIX or P OSIX s ystem. ( 08 mrks) ( My-08/Dec-08/My-10/My- 12) 2. Wht is n API? How is it di -1 I NTRODUCTION 1. Wht is posix stndrd? Explin different subset of posix stndrd. Write structure of progrm to filter out non- p osix complint codes from user progrm. ( 06 mrks) ( Dec- 2010). 2. W rite

More information

INTRODUCTION TO SIMPLICIAL COMPLEXES

INTRODUCTION TO SIMPLICIAL COMPLEXES INTRODUCTION TO SIMPLICIAL COMPLEXES CASEY KELLEHER AND ALESSANDRA PANTANO 0.1. Introduction. In this ctivity set we re going to introduce notion from Algebric Topology clled simplicil homology. The min

More information

Lecture T4: Pattern Matching

Lecture T4: Pattern Matching Introduction to Theoreticl CS Lecture T4: Pttern Mtching Two fundmentl questions. Wht cn computer do? How fst cn it do it? Generl pproch. Don t tlk bout specific mchines or problems. Consider miniml bstrct

More information

2 Computing all Intersections of a Set of Segments Line Segment Intersection

2 Computing all Intersections of a Set of Segments Line Segment Intersection 15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design

More information

CS 430 Spring Mike Lam, Professor. Parsing

CS 430 Spring Mike Lam, Professor. Parsing CS 430 Spring 2015 Mike Lm, Professor Prsing Syntx Anlysis We cn now formlly descrie lnguge's syntx Using regulr expressions nd BNF grmmrs How does tht help us? Syntx Anlysis We cn now formlly descrie

More information

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming Lecture 10 Evolutionry Computtion: Evolution strtegies nd genetic progrmming Evolution strtegies Genetic progrmming Summry Negnevitsky, Person Eduction, 2011 1 Evolution Strtegies Another pproch to simulting

More information

Discussion 1 Recap. COP4600 Discussion 2 OS concepts, System call, and Assignment 1. Questions. Questions. Outline. Outline 10/24/2010

Discussion 1 Recap. COP4600 Discussion 2 OS concepts, System call, and Assignment 1. Questions. Questions. Outline. Outline 10/24/2010 COP4600 Discussion 2 OS concepts, System cll, nd Assignment 1 TA: Hufeng Jin hj0@cise.ufl.edu Discussion 1 Recp Introduction to C C Bsic Types (chr, int, long, flot, doule, ) C Preprocessors (#include,

More information

Scanner Termination. Multi Character Lookahead. to its physical end. Most parsers require an end of file token. Lex and Jlex automatically create an

Scanner Termination. Multi Character Lookahead. to its physical end. Most parsers require an end of file token. Lex and Jlex automatically create an Scnner Termintion A scnner reds input chrcters nd prtitions them into tokens. Wht hppens when the end of the input file is reched? It my be useful to crete n Eof pseudo-chrcter when this occurs. In Jv,

More information

On the Detection of Step Edges in Algorithms Based on Gradient Vector Analysis

On the Detection of Step Edges in Algorithms Based on Gradient Vector Analysis On the Detection of Step Edges in Algorithms Bsed on Grdient Vector Anlysis A. Lrr6, E. Montseny Computer Engineering Dept. Universitt Rovir i Virgili Crreter de Slou sin 43006 Trrgon, Spin Emil: lrre@etse.urv.es

More information

CS 241. Fall 2017 Midterm Review Solutions. October 24, Bits and Bytes 1. 3 MIPS Assembler 6. 4 Regular Languages 7.

CS 241. Fall 2017 Midterm Review Solutions. October 24, Bits and Bytes 1. 3 MIPS Assembler 6. 4 Regular Languages 7. CS 241 Fll 2017 Midterm Review Solutions Octoer 24, 2017 Contents 1 Bits nd Bytes 1 2 MIPS Assemly Lnguge Progrmming 2 3 MIPS Assemler 6 4 Regulr Lnguges 7 5 Scnning 9 1 Bits nd Bytes 1. Give two s complement

More information

EasyMP Multi PC Projection Operation Guide

EasyMP Multi PC Projection Operation Guide EsyMP Multi PC Projection Opertion Guide Contents 2 Introduction to EsyMP Multi PC Projection 5 EsyMP Multi PC Projection Fetures... 6 Connection to Vrious Devices... 6 Four-Pnel Disply... 6 Chnge Presenters

More information

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment File Mnger Quick Reference Guide June 2018 Prepred for the Myo Clinic Enterprise Khu Deployment NVIGTION IN FILE MNGER To nvigte in File Mnger, users will mke use of the left pne to nvigte nd further pnes

More information

Epson iprojection Operation Guide (Windows/Mac)

Epson iprojection Operation Guide (Windows/Mac) Epson iprojection Opertion Guide (Windows/Mc) Contents 2 Introduction to Epson iprojection 5 Epson iprojection Fetures... 6 Connection to Vrious Devices... 6 Four-Pnel Disply... 6 Chnge Presenters nd Projection

More information

Allocator Basics. Dynamic Memory Allocation in the Heap (malloc and free) Allocator Goals: malloc/free. Internal Fragmentation

Allocator Basics. Dynamic Memory Allocation in the Heap (malloc and free) Allocator Goals: malloc/free. Internal Fragmentation Alloctor Bsics Dynmic Memory Alloction in the Hep (mlloc nd free) Pges too corse-grined for llocting individul objects. Insted: flexible-sized, word-ligned blocks. Allocted block (4 words) Free block (3

More information

How to Design REST API? Written Date : March 23, 2015

How to Design REST API? Written Date : March 23, 2015 Visul Prdigm How Design REST API? Turil How Design REST API? Written Dte : Mrch 23, 2015 REpresenttionl Stte Trnsfer, n rchitecturl style tht cn be used in building networked pplictions, is becoming incresingly

More information

Preserving Constraints for Aggregation Relationship Type Update in XML Document

Preserving Constraints for Aggregation Relationship Type Update in XML Document Preserving Constrints for Aggregtion Reltionship Type Updte in XML Document Eric Prdede 1, J. Wenny Rhyu 1, nd Dvid Tnir 2 1 Deprtment of Computer Science nd Computer Engineering, L Trobe University, Bundoor

More information

MATH 25 CLASS 5 NOTES, SEP

MATH 25 CLASS 5 NOTES, SEP MATH 25 CLASS 5 NOTES, SEP 30 2011 Contents 1. A brief diversion: reltively prime numbers 1 2. Lest common multiples 3 3. Finding ll solutions to x + by = c 4 Quick links to definitions/theorems Euclid

More information

Section 3.1: Sequences and Series

Section 3.1: Sequences and Series Section.: Sequences d Series Sequences Let s strt out with the definition of sequence: sequence: ordered list of numbers, often with definite pttern Recll tht in set, order doesn t mtter so this is one

More information

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers Mth Modeling Lecture 4: Lgrnge Multipliers Pge 4452 Mthemticl Modeling Lecture 4: Lgrnge Multipliers Lgrnge multipliers re high powered mthemticl technique to find the mximum nd minimum of multidimensionl

More information

such that the S i cover S, or equivalently S

such that the S i cover S, or equivalently S MATH 55 Triple Integrls Fll 16 1. Definition Given solid in spce, prtition of consists of finite set of solis = { 1,, n } such tht the i cover, or equivlently n i. Furthermore, for ech i, intersects i

More information

Scope, Functions, and Storage Management

Scope, Functions, and Storage Management Scope, Functions, nd Storge Mngement Block-structured lnguges nd stck storge In-le Blocks (previous set of overheds) ctivtion records storge for locl, glol vriles First-order functions (previous set of

More information

Stack. A list whose end points are pointed by top and bottom

Stack. A list whose end points are pointed by top and bottom 4. Stck Stck A list whose end points re pointed by top nd bottom Insertion nd deletion tke plce t the top (cf: Wht is the difference between Stck nd Arry?) Bottom is constnt, but top grows nd shrinks!

More information

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona CSc 453 Compilers nd Systems Softwre 4 : Lexicl Anlysis II Deprtment of Computer Science University of Arizon collerg@gmil.com Copyright c 2009 Christin Collerg Implementing Automt NFAs nd DFAs cn e hrd-coded

More information

Homework. Context Free Languages III. Languages. Plan for today. Context Free Languages. CFLs and Regular Languages. Homework #5 (due 10/22)

Homework. Context Free Languages III. Languages. Plan for today. Context Free Languages. CFLs and Regular Languages. Homework #5 (due 10/22) Homework Context Free Lnguges III Prse Trees nd Homework #5 (due 10/22) From textbook 6.4,b 6.5b 6.9b,c 6.13 6.22 Pln for tody Context Free Lnguges Next clss of lnguges in our quest! Lnguges Recll. Wht

More information

Introduction To Files In Pascal

Introduction To Files In Pascal Why other With Files? Introduction To Files In Pscl Too much informtion to input ll t once The informtion must be persistent (RAM is voltile) Etc. In this section of notes you will lern how to red from

More information

Lecture 7: Building 3D Models (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Lecture 7: Building 3D Models (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Grphics (CS 4731) Lecture 7: Building 3D Models (Prt 1) Prof Emmnuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Stndrd d Unit itvectors Define y i j 1,0,0 0,1,0 k i k 0,0,1

More information

Lists in Lisp and Scheme

Lists in Lisp and Scheme Lists in Lisp nd Scheme Lists in Lisp nd Scheme Lists re Lisp s fundmentl dt structures, ut there re others Arrys, chrcters, strings, etc. Common Lisp hs moved on from eing merely LISt Processor However,

More information

2014 Haskell January Test Regular Expressions and Finite Automata

2014 Haskell January Test Regular Expressions and Finite Automata 0 Hskell Jnury Test Regulr Expressions nd Finite Automt This test comprises four prts nd the mximum mrk is 5. Prts I, II nd III re worth 3 of the 5 mrks vilble. The 0 Hskell Progrmming Prize will be wrded

More information

Quiz2 45mins. Personal Number: Problem 1. (20pts) Here is an Table of Perl Regular Ex

Quiz2 45mins. Personal Number: Problem 1. (20pts) Here is an Table of Perl Regular Ex Long Quiz2 45mins Nme: Personl Numer: Prolem. (20pts) Here is n Tle of Perl Regulr Ex Chrcter Description. single chrcter \s whitespce chrcter (spce, t, newline) \S non-whitespce chrcter \d digit (0-9)

More information

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona Implementing utomt Sc 5 ompilers nd Systems Softwre : Lexicl nlysis II Deprtment of omputer Science University of rizon collerg@gmil.com opyright c 009 hristin ollerg NFs nd DFs cn e hrd-coded using this

More information

6.2 Volumes of Revolution: The Disk Method

6.2 Volumes of Revolution: The Disk Method mth ppliction: volumes by disks: volume prt ii 6 6 Volumes of Revolution: The Disk Method One of the simplest pplictions of integrtion (Theorem 6) nd the ccumultion process is to determine so-clled volumes

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

Registering as a HPE Reseller. Quick Reference Guide for new Partners in Asia Pacific

Registering as a HPE Reseller. Quick Reference Guide for new Partners in Asia Pacific Registering s HPE Reseller Quick Reference Guide for new Prtners in Asi Pcific Registering s new Reseller prtner There re five min steps to e new Reseller prtner. Crete your Appliction Copyright 2017 Hewlett

More information

SIMPLIFYING ALGEBRA PASSPORT.

SIMPLIFYING ALGEBRA PASSPORT. SIMPLIFYING ALGEBRA PASSPORT www.mthletics.com.u This booklet is ll bout turning complex problems into something simple. You will be ble to do something like this! ( 9- # + 4 ' ) ' ( 9- + 7-) ' ' Give

More information

LING/C SC/PSYC 438/538. Lecture 21 Sandiway Fong

LING/C SC/PSYC 438/538. Lecture 21 Sandiway Fong LING/C SC/PSYC 438/538 Lecture 21 Sndiwy Fong Tody's Topics Homework 8 Review Optionl Homework 9 (mke up on Homework 7) Homework 8 Review Question1: write Prolog regulr grmmr for the following lnguge:

More information

How. Without. project. your. wanting. personal. Corey. by Galen E

How. Without. project. your. wanting. personal. Corey. by Galen E B or How personl Whout wnting! n by Glen E Corey SO 've built cool A show tell Get grndm tweet out World resume THERE! OUT work how? http:// Coolest locl host Se : 3000 file Ever Mybe 're se tl/users1gien1s1colindexhtml

More information

Geometric transformations

Geometric transformations Geometric trnsformtions Computer Grphics Some slides re bsed on Shy Shlom slides from TAU mn n n m m T A,,,,,, 2 1 2 22 12 1 21 11 Rows become columns nd columns become rows nm n n m m A,,,,,, 1 1 2 22

More information

EasyMP Network Projection Operation Guide

EasyMP Network Projection Operation Guide EsyMP Network Projection Opertion Guide Contents 2 Introduction to EsyMP Network Projection EsyMP Network Projection Fetures... 5 Disply Options... 6 Multi-Screen Disply Function... 6 Movie Sending Mode...

More information

Stack Manipulation. Other Issues. How about larger constants? Frame Pointer. PowerPC. Alternative Architectures

Stack Manipulation. Other Issues. How about larger constants? Frame Pointer. PowerPC. Alternative Architectures Other Issues Stck Mnipultion support for procedures (Refer to section 3.6), stcks, frmes, recursion mnipulting strings nd pointers linkers, loders, memory lyout Interrupts, exceptions, system clls nd conventions

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-188 Technicl Notes on using Anlog Devices' DSP components nd development tools Contct our technicl support by phone: (800) ANALOG-D or e-mil: dsp.support@nlog.com Or visit

More information

PARALLEL AND DISTRIBUTED COMPUTING

PARALLEL AND DISTRIBUTED COMPUTING PARALLEL AND DISTRIBUTED COMPUTING 2009/2010 1 st Semester Teste Jnury 9, 2010 Durtion: 2h00 - No extr mteril llowed. This includes notes, scrtch pper, clcultor, etc. - Give your nswers in the ville spce

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

Alignment of Long Sequences. BMI/CS Spring 2012 Colin Dewey

Alignment of Long Sequences. BMI/CS Spring 2012 Colin Dewey Alignment of Long Sequences BMI/CS 776 www.biostt.wisc.edu/bmi776/ Spring 2012 Colin Dewey cdewey@biostt.wisc.edu Gols for Lecture the key concepts to understnd re the following how lrge-scle lignment

More information

Agilent Mass Hunter Software

Agilent Mass Hunter Software Agilent Mss Hunter Softwre Quick Strt Guide Use this guide to get strted with the Mss Hunter softwre. Wht is Mss Hunter Softwre? Mss Hunter is n integrl prt of Agilent TOF softwre (version A.02.00). Mss

More information

Improper Integrals. October 4, 2017

Improper Integrals. October 4, 2017 Improper Integrls October 4, 7 Introduction We hve seen how to clculte definite integrl when the it is rel number. However, there re times when we re interested to compute the integrl sy for emple 3. Here

More information

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis CS143 Hndout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexicl Anlysis In this first written ssignment, you'll get the chnce to ply round with the vrious constructions tht come up when doing lexicl

More information

Registering as an HPE Reseller

Registering as an HPE Reseller Registering s n HPE Reseller Quick Reference Guide for new Prtners Mrch 2019 Registering s new Reseller prtner There re four min steps to register on the Prtner Redy Portl s new Reseller prtner: Appliction

More information

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin

More information

Sample Midterm Solutions COMS W4115 Programming Languages and Translators Monday, October 12, 2009

Sample Midterm Solutions COMS W4115 Programming Languages and Translators Monday, October 12, 2009 Deprtment of Computer cience Columbi University mple Midterm olutions COM W4115 Progrmming Lnguges nd Trnsltors Mondy, October 12, 2009 Closed book, no ids. ch question is worth 20 points. Question 5(c)

More information

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers Wht do ll those bits men now? bits (...) Number Systems nd Arithmetic or Computers go to elementry school instruction R-formt I-formt... integer dt number text chrs... floting point signed unsigned single

More information

EECS 281: Homework #4 Due: Thursday, October 7, 2004

EECS 281: Homework #4 Due: Thursday, October 7, 2004 EECS 28: Homework #4 Due: Thursdy, October 7, 24 Nme: Emil:. Convert the 24-bit number x44243 to mime bse64: QUJD First, set is to brek 8-bit blocks into 6-bit blocks, nd then convert: x44243 b b 6 2 9

More information

OPERATION MANUAL. DIGIFORCE 9307 PROFINET Integration into TIA Portal

OPERATION MANUAL. DIGIFORCE 9307 PROFINET Integration into TIA Portal OPERATION MANUAL DIGIFORCE 9307 PROFINET Integrtion into TIA Portl Mnufcturer: 2018 burster präzisionsmesstechnik gmbh & co kg burster präzisionsmesstechnik gmbh & co kg Alle Rechte vorbehlten Tlstrße

More information

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1):

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1): Overview (): Before We Begin Administrtive detils Review some questions to consider Winter 2006 Imge Enhncement in the Sptil Domin: Bsics of Sptil Filtering, Smoothing Sptil Filters, Order Sttistics Filters

More information

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs. Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online

More information

Definition of Regular Expression

Definition of Regular Expression Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll

More information

pdfapilot Server 2 Manual

pdfapilot Server 2 Manual pdfpilot Server 2 Mnul 2011 by clls softwre gmbh Schönhuser Allee 6/7 D 10119 Berlin Germny info@cllssoftwre.com www.cllssoftwre.com Mnul clls pdfpilot Server 2 Pge 2 clls pdfpilot Server 2 Mnul Lst modified:

More information

Stained Glass Design. Teaching Goals:

Stained Glass Design. Teaching Goals: Stined Glss Design Time required 45-90 minutes Teching Gols: 1. Students pply grphic methods to design vrious shpes on the plne.. Students pply geometric trnsformtions of grphs of functions in order to

More information

Strings. Chapter 6. Python for Informatics: Exploring Information

Strings. Chapter 6. Python for Informatics: Exploring Information Strings Chpter 6 Python for Informtics: Exploring Informtion www.pythonlern.com String Dt Type A string is sequence of chrcters A string literl uses quotes 'Hello' or "Hello" For strings, + mens conctente

More information

UNIT 11. Query Optimization

UNIT 11. Query Optimization UNIT Query Optimiztion Contents Introduction to Query Optimiztion 2 The Optimiztion Process: An Overview 3 Optimiztion in System R 4 Optimiztion in INGRES 5 Implementing the Join Opertors Wei-Png Yng,

More information