CORRECTNESS ISSUES AND LOOP INVARIANTS
|
|
- Curtis Ross
- 5 years ago
- Views:
Transcription
1 The next everal lecture 2 Study algorithm for earching and orting array. Invetigate their complexity how much time and pace they take Formalize the notion of average-cae and wort-cae complexity CORRECTNESS ISSUES AND LOOP INVARIANTS Lecture 8 CS2110 Spring 2015 We want you to know thee algorithm Not y memorizing code ut y Being ale to develop the algorithm from their pecification and, when neceary, a mall idea We give you ome guideline and intruction on how to develop an algorithm from it pecification. Deal mainly with developing loop. 3 Many (mot) of you could ue intruction on developing algorithm, keeping thing imple String[] dummy =.plit(""); // turn into tring array int len =.length()-1; // length of tring String a = ; // will e revere of for (int = len; > -1; --){ a= a.dummy[]; if (.equal(a)) return true; ele return fale; return.equal() Thi umitted code for ody of ipalindrome didn t work ecaue plit wan t ued properly and it wan t deugged Why calculate the revere of 4 Some principle and trategie for development Don t introduce a variale without a good reaon. Put local variale a cloe to their firt ue a poile. Structure expreion to make them readale. Make the tructure of the program reflect the tructure of the data. Never have lot of yntax error. Interpere coding and teting: code a little, tet a little. Write the cla invariant while putting in field declaration. Write a method pec efore writing the method ody. Ue aert tatement to check method precondition a along a it doen t complicate program too much and doen t change the time-complexity of the method. 5 Show development of ipalindrome /** Return true iff i a palindrome */ pulic tatic oolean ipalindrome(string ) Our intruction aid to viit each char of only once! 6 ipalindrome: Set ipal to i a palindrome (forget aout return for now. Store value in ipal. Think of checking equality of outer char, then char inide them, then char inide them, etc. 0.length() ac ca Key idea: Generalize thi to a picture that i true efore/after each iteration 1
2 7 ipalindrome: Set ipal to i a palindrome (forget aout return for now. Store value in ipal. Generalize to a picture that i true efore/after each iteration 0.length() ac ca 0 h k.length() Thee ection are each other revere 8 ipalindrome: Set ipal to i a palindrome int h= 0; Initialization to make picture true int k=.length() 1; // [0..h-1] i the revere of [k+1..] Stop when reult i known Continue when it not while ( h < k &&.charat(h) ==.charat(k) ) { h= h+1; k= k-1; ipal= h >= k; 0 h k.length() Make progre toward termination AND keep picture true Thee ection are each other revere 9 ipalindrome /** Return true iff i a palindrome */ pulic tatic oolean ipal(string ) { int h= 0; int k=.length() 1; // invariant: [0..h-1] i revere of [k+1..] while (h < k) { if (.charat(h)!=.charat(k)) return fale; h= h+1; k= k-1; return true; h 0 k.length() Thee ection are each other revere Loop invariant invariant ecaue it true efore/ after each loop iteration 10 Engineering principle Break a project up into part, making them a independent a poile. When the part are contructed, put them together. Each part can e undertood y itelf, without mentioning the other. Reaon for introducing loop invariant Invariant: i true efore and after each iteration 11 Given c >= 0, tore ^c in x z= 1; x= ; y= c; if (y i even) { ele { {z = ^c Algorithm to compute ^c. Can t undertand any piece of it without undertanding all. In fact, only way to get a handle on it i to execute it on ome tet cae. Need to undertand initialization without looking at any other code. Need to undertand condition y!= 0 without looking at loop ody Etc. 12 initialization; // invariant P while (B) {S Upon termination, we know P true, B fale init {P true B S fale {P and! B invariant mean unchanging. Loop invariant: an aertion a true-fale tatement that i true efore and after each iteration of the loop every time B i to e evaluated. Help u undertand each part of loop without looking at all other part. 2
3 13 Simple example to illutrate methodology Store um of 0..n in // { n >= 0 k= 1; = 0; // = um of 0..k-1 && = + k; { = um of 0..n Firt loopy quetion. Doe it tart right Doe initialization make invariant true Ye! = um of 0..k-1 = <utitute initialization> 0 = um of = <arithmetic> 0 = um of 0..0 We undertand initialization without looking at any other code 14 Simple example to illutrate methodology Store um of 0..n in // { n >= 0 k= 1; = 0; // = um of 0..k-1 && = + k; { = um of 0..n Second loopy quetion. Doe it top right Upon termination, i potcondition true Ye! inv &&! k <= n => <look at inv> inv && k = n+1 => <ue inv> = um of 0..n+1-1 We undertand that potcondition i true without looking at init or repetend Simple example to illutrate methodology Simple example to illutrate methodology 15 Store um of 0..n in // { n >= 0 k= 1; = 0; // = um of 0..k-1 && = + k; { = um of 0..n Third loopy quetion. Progre Doe the repetend make progre toward termination Ye! Each iteration increae k, and when it get larger than n, the loop terminate We undertand that there i no infinite looping without looking at init and focuing on ONE part of the repetend. 16 Store um of 0..n in // { n >= 0 k= 1; = 0; // = um of 0..k-1 && = + k; { = um of 0..n Fourth loopy quetion. Invariant maintained y each iteration I thi property true {inv && k <= n repetend {inv Ye! { = um of 0..k-1 = + k; { = um of 0..k k= k+1; { = um of 0..k-1 4 loopy quetion to enure loop correctne Note on range m..n 17 {precondition Q init; // invariant P while (B) { S {R Four loopy quetion: if anwered ye, algorithm i correct. Firt loopy quetion; Doe it tart right I {Q init {P true Second loopy quetion: Doe it top right Doe P &&! B imply R Third loopy quetion: Doe repetend make progre Will B eventually ecome fale Fourth loopy quetion: Doe repetend keep invariant true I {P &&! B S {P true 18 Range m..n contain n+1 m int: m, m+1,..., n (Think aout thi a Follower (n+1) minu Firt (m) ) 2..4 contain 2, 3, 4: that i = 3 value 2..3 contain 2, 3: that i = 2 value 2..2 contain 2: that i = 1 value 2..1 contain : that i = 0 value Convention: notation m..n implie that m <= n+1 Aume convention even if it i not mentioned! If m i 1 larger than n, the range ha 0 value array egment [m..n]: m n 3
4 Can t undertand thi example without invariant! For loopy quetion to reaon aout invariant 19 Given c >= 0, tore ^c in z z= 1; x= ; y= c; // invariant y >= 0 && // z*x^y = ^c if (y i even) { ele { {z = ^c Firt loopy quetion. Doe it tart right Doe initialization make invariant true Ye! z*x^y = <utitute initialization> 1*^c = <arithmetic> ^c We undertand initialization without looking at any other code 20 Given c >= 0, tore ^c in x z= 1; x= ; y= c; // invariant y >= 0 AND // z*x^y = ^c if (y i even) { ele { {z = ^c Second loopy quetion. Doe it top right When loop terminate, i z = ^c Ye! Take the invariant, which i true, and ue fact that y = 0: z*x^y = ^c = <y = 0> z*x^0 = ^c = <arithmetic> z = ^c We undertand loop condition without looking at any other code For loopy quetion to reaon aout invariant For loopy quetion to reaon aout invariant 21 Given c >= 0, tore ^c in x z= 1; x= ; y= c; // invariant y >= 0 AND // z*x^y = ^c if (y i even) { ele { {z = ^c Third loopy quetion. Doe repetend make progre toward termination Ye! We know that y > 0 when loop ody i executed. The loop ody decreae y. We undertand progre without looking at initialization 22 Given c >= 0, tore ^c in x z= 1; x= ; y= c; // invariant y >= 0 AND // z*x^y = ^c if (y i even) { ele { {z = ^c Fourth loopy quetion. Doe repetend keep invariant true Ye! Becaue of propertie: For y even, x^y = (x*x)^(y/2) z*x^y = z*x*x^(y-1) We undertand invariance without looking at initialization Develop inary earch for v in orted array Develop inary earch in orted array for v 23 pre: 0.length 24 pre: 0.length pot: Example: pre: 0 h.length <= v > v length If v i 4, 5, or 6, h i 5 If v i 7 or 8, h i 6 If v in, h i index of rightmot occurrence of v. If v not in, h i index efore where it elong. Store a value in h to make thi true: 0 h.length pot: <= v > v Get loop invariant y comining pre- and potcondition, adding variale t to mark the other oundary 0 h t.length <= v > v 4
5 How doe it tart (what make the invariant true) When doe it end (when doe invariant look like potcondition) 25 pre: 0.length 26 pot: 0 h.length <= v > v 0 h t.length <= v > v 0 h t.length <= v > v Make firt and lat partition empty: h= -1; t=.length; h= -1; t=.length; Stop when ection i empty. That i when h = t-1. Therefore, continue a long a h!= t-1. How doe ody make progre toward termination (cut in half) and keep invariant true How doe ody make progre toward termination (cut in half) and keep invariant true 27 h= -1; t=.length; int e= (h+t)/2; 0 h t.length <= v > v 0 h e t.length <= v > v Let e e index of middle value of Section. Maye we can et h or t to e, cutting ection in half 28 h= -1; t=.length; int e= (h+t)/2; if ([e] <= v) h= e; 0 h t.length <= v > v 0 h e t.length <= v > v 0 h e t.length <= v <= v > v If [e] <= v, then o i every value to it left, ince the array i orted. Therefore, h= e; keep the invariant true. How doe ody make progre toward termination (cut in half) and keep invariant true Develop inary earch in orted array for v 29 0 h t.length h= -1; t=.length; int e= (h+t)/2; if ([e] <= v) h= e; ele t= e; <= v > v 0 h e t.length <= v > v 0 h e t.length <= v > v > v If [e] > v, then o i every value to it right, ince the array i orted. Therefore, t= e; keep the invariant true length pre: Store a value in h to make thi true: 0 h.length pot: <= v > v DON T TRY TO MEMORIZE CODE! Intead, learn to derive the loop invariant from the preand pot-condition and then to develop the loop uing the pre- and pot-condition and the loop invariant. PRACTICE THIS ON KNOWN ALGORITHMS! 5
6 Proceing array from eg to end (or end to eg) Proceing array from eg to end (or end to eg) 31 Many loop proce element of an array (or a String, or any lit) in order: [0], [1], [2], If the potcondition i R: [0...length-1] ha een proceed Then in the eginning, nothing ha een proceed, i.e. [0..-1] ha een proceed After k iteration, k element have een proceed: P: [0..k-1] ha een proceed 0 k.length invariant P: proceed not proceed 32 Replace.length in potcondition Tak: Proce [0...length-1] y freh variale k to get invariant k= 0; [0..k-1] ha een proceed {inv P while ( k!=.length ) { or draw it a a picture Proce [k]; // maintain invariant // progre toward termination {R: [0...length-1] ha een proceed 0 k.length inv P: proceed not proceed 33 Proceing array from eg to end (or end to eg) 34 Count the numer of zero in. Start with lat program and refine it for thi tak Tak: Proce [0...length-1] k= 0; {inv P while ( k!=.length ) { Proce [k]; // maintain invariant // progre toward termination {R: [0...length-1] ha een proceed Mot loop that proce the element of an array in order will have thi loop invariant and will look like thi. Tak: Set to the numer of 0 in [0...length-1] k= 0; = 0; {inv P while ( k!=.length ) { Proce if ([k] == [k]; 0) = // + maintain 1; invariant // progre toward termination {R: = numer of 0 in [0...length-1] 0 k.length 0 k.length inv P: proceed not proceed inv P: = # 0 here not proceed Be careful. Invariant may require proceing element in revere order! Proce element from end to eginning Thi invariant force proceing from eginning to end 0 k.length inv P: proceed not proceed k=.length 1; // how doe it tart while (k >= 0) { // how doe it end Proce [k]; // how doe it maintain invariant Thi invariant force proceing from end to eginning 0 k.length k= k 1; // how doe it make progre {R: [0...length-1] i proceed inv P: not proceed proceed 0 k.length inv P: not proceed proceed 6
7 Proce element from end to eginning 37 k=.length 1; while (k >= 0) { Proce [k]; k= k 1; {R: [0...length-1] i proceed Head up! It i important that you can look at an invariant and decide whether element are proceed from eginning to end or end to eginning! For ome reaon, ome tudent have difficulty with thi. A quetion like thi could e on the prelim! 0 k.length inv P: not proceed proceed 7
CORRECTNESS ISSUES AND LOOP INVARIANTS
Aout A2 and feedack. Recursion 2 CORRECTNESS ISSUES AND LOOP INVARIANTS S2 has een graded. If you got 30/30, you will proaly have no feedack. If you got less than full credit, there should e feedack showing
More informationLecture Outline. Global flow analysis. Global Optimization. Global constant propagation. Liveness analysis. Local Optimization. Global Optimization
Lecture Outline Global flow analyi Global Optimization Global contant propagation Livene analyi Adapted from Lecture by Prof. Alex Aiken and George Necula (UCB) CS781(Praad) L27OP 1 CS781(Praad) L27OP
More informationTopics. Lecture 37: Global Optimization. Issues. A Simple Example: Copy Propagation X := 3 B > 0 Y := 0 X := 4 Y := Z + W A := 2 * 3X
Lecture 37: Global Optimization [Adapted from note by R. Bodik and G. Necula] Topic Global optimization refer to program optimization that encompa multiple baic block in a function. (I have ued the term
More informationLecture 14: Minimum Spanning Tree I
COMPSCI 0: Deign and Analyi of Algorithm October 4, 07 Lecture 4: Minimum Spanning Tree I Lecturer: Rong Ge Scribe: Fred Zhang Overview Thi lecture we finih our dicuion of the hortet path problem and introduce
More informationOperational Semantics Class notes for a lecture given by Mooly Sagiv Tel Aviv University 24/5/2007 By Roy Ganor and Uri Juhasz
Operational emantic Page Operational emantic Cla note for a lecture given by Mooly agiv Tel Aviv Univerity 4/5/7 By Roy Ganor and Uri Juhaz Reference emantic with Application, H. Nielon and F. Nielon,
More informationLaboratory Exercise 2
Laoratory Exercie Numer and Diplay Thi i an exercie in deigning cominational circuit that can perform inary-to-decimal numer converion and inary-coded-decimal (BCD) addition. Part I We wih to diplay on
More informationA SIMPLE IMPERATIVE LANGUAGE THE STORE FUNCTION NON-TERMINATING COMMANDS
A SIMPLE IMPERATIVE LANGUAGE Eventually we will preent the emantic of a full-blown language, with declaration, type and looping. However, there are many complication, o we will build up lowly. Our firt
More informationShortest Paths Problem. CS 362, Lecture 20. Today s Outline. Negative Weights
Shortet Path Problem CS 6, Lecture Jared Saia Univerity of New Mexico Another intereting problem for graph i that of finding hortet path Aume we are given a weighted directed graph G = (V, E) with two
More informationAVL Tree. The height of the BST be as small as possible
1 AVL Tree re and Algorithm The height of the BST be a mall a poible The firt balanced BST. Alo called height-balanced tree. Introduced by Adel on-vel kii and Landi in 1962. BST with the following condition:
More informationToday s Outline. CS 561, Lecture 23. Negative Weights. Shortest Paths Problem. The presence of a negative cycle might mean that there is
Today Outline CS 56, Lecture Jared Saia Univerity of New Mexico The path that can be trodden i not the enduring and unchanging Path. The name that can be named i not the enduring and unchanging Name. -
More informationAlgorithmic Discrete Mathematics 4. Exercise Sheet
Algorithmic Dicrete Mathematic. Exercie Sheet Department of Mathematic SS 0 PD Dr. Ulf Lorenz 0. and. May 0 Dipl.-Math. David Meffert Verion of May, 0 Groupwork Exercie G (Shortet path I) (a) Calculate
More informationGeneric Traverse. CS 362, Lecture 19. DFS and BFS. Today s Outline
Generic Travere CS 62, Lecture 9 Jared Saia Univerity of New Mexico Travere(){ put (nil,) in bag; while (the bag i not empty){ take ome edge (p,v) from the bag if (v i unmarked) mark v; parent(v) = p;
More informationLaboratory Exercise 2
Laoratory Exercie Numer and Diplay Thi i an exercie in deigning cominational circuit that can perform inary-to-decimal numer converion and inary-coded-decimal (BCD) addition. Part I We wih to diplay on
More information1 The secretary problem
Thi i new material: if you ee error, pleae email jtyu at tanford dot edu 1 The ecretary problem We will tart by analyzing the expected runtime of an algorithm, a you will be expected to do on your homework.
More informationBottom Up parsing. Bottom-up parsing. Steps in a shift-reduce parse. 1. s. 2. np. john. john. john. walks. walks.
Paring Technologie Outline Paring Technologie Outline Bottom Up paring Paring Technologie Paring Technologie Bottom-up paring Step in a hift-reduce pare top-down: try to grow a tree down from a category
More informationDelaunay Triangulation: Incremental Construction
Chapter 6 Delaunay Triangulation: Incremental Contruction In the lat lecture, we have learned about the Lawon ip algorithm that compute a Delaunay triangulation of a given n-point et P R 2 with O(n 2 )
More informationMAT 155: Describing, Exploring, and Comparing Data Page 1 of NotesCh2-3.doc
MAT 155: Decribing, Exploring, and Comparing Data Page 1 of 8 001-oteCh-3.doc ote for Chapter Summarizing and Graphing Data Chapter 3 Decribing, Exploring, and Comparing Data Frequency Ditribution, Graphic
More informationPrelim 1. CS 2110, 14 March 2017, 7:30 PM Total Question Name Short answer. OO Recursion Loop invariants Max Score Grader
Prelim 1 CS 2110, 14 March 2017, 7:30 PM 1 2 3 4 5 Total Question Name Short answer OO Recursion Loop invariants Max 1 36 33 15 15 100 Score Grader The exam is closed ook and closed notes. Do not egin
More informationPrelim 1. CS 2110, 14 March 2017, 5:30 PM Total Question Name Short answer. OO Recursion Loop invariants Max Score Grader
Prelim 1 CS 2110, 14 March 2017, 5:30 PM 1 2 3 4 5 Total Question Name Short answer OO Recursion Loop invariants Max 1 36 33 15 15 100 Score Grader The exam is closed ook and closed notes. Do not egin
More informationChapter S:II (continued)
Chapter S:II (continued) II. Baic Search Algorithm Sytematic Search Graph Theory Baic State Space Search Depth-Firt Search Backtracking Breadth-Firt Search Uniform-Cot Search AND-OR Graph Baic Depth-Firt
More informationxy-monotone path existence queries in a rectilinear environment
CCCG 2012, Charlottetown, P.E.I., Augut 8 10, 2012 xy-monotone path exitence querie in a rectilinear environment Gregory Bint Anil Mahehwari Michiel Smid Abtract Given a planar environment coniting of
More informationCS201: Data Structures and Algorithms. Assignment 2. Version 1d
CS201: Data Structure and Algorithm Aignment 2 Introduction Verion 1d You will compare the performance of green binary earch tree veru red-black tree by reading in a corpu of text, toring the word and
More informationSEARCHING, SORTING, AND ASYMPTOTIC COMPLEXITY
1 A3 and Prelim 2 SEARCHING, SORTING, AND ASYMPTOTIC COMPLEXITY Lecture 11 CS2110 Fall 2016 Deadline for A3: tonight. Only two late days allowed (Wed-Thur) Prelim: Thursday evening. 74 conflicts! If you
More informationQuadrilaterals. Learning Objectives. Pre-Activity
Section 3.4 Pre-Activity Preparation Quadrilateral Intereting geometric hape and pattern are all around u when we tart looking for them. Examine a row of fencing or the tiling deign at the wimming pool.
More informationAnalyzing Hydra Historical Statistics Part 2
Analyzing Hydra Hitorical Statitic Part Fabio Maimo Ottaviani EPV Technologie White paper 5 hnode HSM Hitorical Record The hnode i the hierarchical data torage management node and ha to perform all the
More informationParameters, UVM, Coverage & Emulation Take Two and Call Me in the Morning
Parameter, UVM, Coverage & Emulation Take Two and Call Me in the Morning Michael Horn Mentor Graphic Corporation Colorado, USA Mike_Horn@mentor.com Bryan Ramirez Mentor Graphic Corporation Colorado, USA
More informationPrelim 1. Solution. CS 2110, 14 March 2017, 7:30 PM Total Question Name Short answer
Prelim 1. Solution CS 2110, 14 March 2017, 7:30 PM 1 2 3 4 5 Total Question Name Short answer OO Recursion Loop invariants Max 1 36 33 15 15 100 Score Grader 1. Name (1 point) Write your name and NetID
More informationCS211 Spring 2004 Lecture 06 Loops and their invariants. Software engineering reason for using loop invariants
CS211 Spring 2004 Lecture 06 Loops and teir invariants Reading material: Tese notes. Weiss: Noting on invariants. ProgramLive: Capter 7 and 8 O! Tou ast damnale iteration and art, indeed, ale to corrupt
More informationMidterm 2 March 10, 2014 Name: NetID: # Total Score
CS 3 : Algorithm and Model of Computation, Spring 0 Midterm March 0, 0 Name: NetID: # 3 Total Score Max 0 0 0 0 Grader Don t panic! Pleae print your name and your NetID in the boxe above. Thi i a cloed-book,
More informationSize Balanced Tree. Chen Qifeng (Farmer John) Zhongshan Memorial Middle School, Guangdong, China. December 29, 2006.
Size Balanced Tree Chen Qifeng (Farmer John) Zhonghan Memorial Middle School, Guangdong, China Email:44687@QQ.com December 9, 006 Abtract Thi paper preent a unique trategy for maintaining balance in dynamically
More informationPrelim 1. Solution. CS 2110, 14 March 2017, 5:30 PM Total Question Name Short answer
Prelim 1. Solution CS 2110, 14 March 2017, 5:30 PM 1 2 3 4 5 Total Question Name Short answer OO Recursion Loop invariants Max 1 36 33 15 15 100 Score Grader 1. Name (1 point) Write your name and NetID
More informationEdits in Xylia Validity Preserving Editing of XML Documents
dit in Xylia Validity Preerving diting of XML Document Pouria Shaker, Theodore S. Norvell, and Denni K. Peter Faculty of ngineering and Applied Science, Memorial Univerity of Newfoundland, St. John, NFLD,
More informationCS Lecture 19: Loop invariants
CS 1110 Lecture 19: Loop invariants Announcements Prelim 2 conflicts Today (April 2) is two weeks before the prelim, and the deadline for submitting prelim conflicts. Instructor travel This week and the
More informationToday s Outline. CS 362, Lecture 19. DFS and BFS. Generic Traverse. BFS and DFS Wrapup Shortest Paths. Jared Saia University of New Mexico
Today Outline CS 362, Lecture 9 Jared Saia Univerity of New Mexico BFS and DFS Wrapup Shortet Path Generic Travere DFS and BFS Travere(){ put (nil,) in bag; while (the bag i not empty){ take ome edge (p,v)
More informationelse end while End References
621-630. [RM89] [SK76] Roenfeld, A. and Melter, R. A., Digital geometry, The Mathematical Intelligencer, vol. 11, No. 3, 1989, pp. 69-72. Sklanky, J. and Kibler, D. F., A theory of nonuniformly digitized
More informationLecture 8: More Pipelining
Overview Lecture 8: More Pipelining David Black-Schaffer davidbb@tanford.edu EE8 Spring 00 Getting Started with Lab Jut get a ingle pixel calculating at one time Then look into filling your pipeline Multiplier
More informationCS 151. Graph Algorithms. Wednesday, November 28, 12
CS 151 Graph Algorithm 1 Unweighted Shortet Path Problem input: a graph G=(V,E) and a tart vertex goal: determine the length of the hortet path from to every vertex in V (and while you re at it, compute
More informationTouring a Sequence of Polygons
Touring a Sequence of Polygon Mohe Dror (1) Alon Efrat (1) Anna Lubiw (2) Joe Mitchell (3) (1) Univerity of Arizona (2) Univerity of Waterloo (3) Stony Brook Univerity Problem: Given a equence of k polygon
More informationUninformed Search Complexity. Informed Search. Search Revisited. Day 2/3 of Search
Informed Search ay 2/3 of Search hap. 4, Ruel & Norvig FS IFS US PFS MEM FS IS Uninformed Search omplexity N = Total number of tate = verage number of ucceor (branching factor) L = Length for tart to goal
More informationObjects and Classes. The Big Picture. Classes. Objects. Some paradigms of programming:
Object and Clae The Big Picture Some paradigm of programming: Imperative Programming ue explicit loop, conditional, variable Three paradigm of programming we cover in CS111. Functional Programming Ue function
More informationLaboratory Exercise 6
Laboratory Exercie 6 Adder, Subtractor, and Multiplier The purpoe of thi exercie i to examine arithmetic circuit that add, ubtract, and multiply number. Each circuit will be decribed in Verilog and implemented
More informationDifferentially Private Histogram Publication
Differentially Private Hitogram Publication Jia Xu, Zhenjie Zhang, Xiaokui Xiao, Yin Yang, Ge Yu College of Information Science & Engineering, Northeatern Univerity, China xujia,yuge@ie.neu.edu.cn Advanced
More informationASYMPTOTIC COMPLEXITY
Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better. - Edsger Dijkstra ASYMPTOTIC COMPLEXITY Lecture
More informationObjects, Classes, and Inheritance
Object, Clae, and Inheritance CS111 Computer Programming Department of Computer Science Welleley College The Big Picture Some paradigm of programming: o Imperative Programming Program pecified by conditional,
More informationComputer Arithmetic Homework Solutions. 1 An adder for graphics. 2 Partitioned adder. 3 HDL implementation of a partitioned adder
Computer Arithmetic Homework 3 2016 2017 Solution 1 An adder for graphic In a normal ripple carry addition of two poitive number, the carry i the ignal for a reult exceeding the maximum. We ue thi ignal
More informationGray-level histogram. Intensity (grey-level) transformation, or mapping. Use of intensity transformations:
Faculty of Informatic Eötvö Loránd Univerity Budapet, Hungary Lecture : Intenity Tranformation Image enhancement by point proceing Spatial domain and frequency domain method Baic Algorithm for Digital
More informationLocalized Minimum Spanning Tree Based Multicast Routing with Energy-Efficient Guaranteed Delivery in Ad Hoc and Sensor Networks
Localized Minimum Spanning Tree Baed Multicat Routing with Energy-Efficient Guaranteed Delivery in Ad Hoc and Senor Network Hanne Frey Univerity of Paderborn D-3398 Paderborn hanne.frey@uni-paderborn.de
More informationLecture 17: Shortest Paths
Lecture 7: Shortet Path CSE 373: Data Structure and Algorithm CSE 373 9 WI - KASEY CHAMPION Adminitrivia How to Ace the Technical Interview Seion today! - 6-8pm - Sieg 34 No BS CS Career Talk Thurday -
More informationTouring a Sequence of Polygons
Touring a Sequence of Polygon Mohe Dror (1) Alon Efrat (1) Anna Lubiw (2) Joe Mitchell (3) (1) Univerity of Arizona (2) Univerity of Waterloo (3) Stony Brook Univerity Problem: Given a equence of k polygon
More informationAdvanced Encryption Standard and Modes of Operation
Advanced Encryption Standard and Mode of Operation G. Bertoni L. Breveglieri Foundation of Cryptography - AES pp. 1 / 50 AES Advanced Encryption Standard (AES) i a ymmetric cryptographic algorithm AES
More informationThursday, May 3. No Warmup Remember that the questions and most answers are online at
Thurday, May 3 No Warmup Remember that the quetion and mot anwer are online at http://c.millerville.edu/~ekatz/c162/warmup.html binarytree aignment due Friday due Friday May 4 a o 7am, 4 people had turned
More informationLaboratory Exercise 6
Laboratory Exercie 6 Adder, Subtractor, and Multiplier The purpoe of thi exercie i to examine arithmetic circuit that add, ubtract, and multiply number. Each type of circuit will be implemented in two
More informationShortest Paths with Single-Point Visibility Constraint
Shortet Path with Single-Point Viibility Contraint Ramtin Khoravi Mohammad Ghodi Department of Computer Engineering Sharif Univerity of Technology Abtract Thi paper tudie the problem of finding a hortet
More informationAnnouncements. CSE332: Data Abstractions Lecture 19: Parallel Prefix and Sorting. The prefix-sum problem. Outline. Parallel prefix-sum
Announcement Homework 6 due Friday Feb 25 th at the BEGINNING o lecture CSE332: Data Abtraction Lecture 19: Parallel Preix and Sorting Project 3 the lat programming project! Verion 1 & 2 - Tue March 1,
More informationContents. shortest paths. Notation. Shortest path problem. Applications. Algorithms and Networks 2010/2011. In the entire course:
Content Shortet path Algorithm and Network 21/211 The hortet path problem: Statement Verion Application Algorithm (for ingle ource p problem) Reminder: relaxation, Dijktra, Variant of Dijktra, Bellman-Ford,
More informationChapter 13 Non Sampling Errors
Chapter 13 Non Sampling Error It i a general aumption in the ampling theory that the true value of each unit in the population can be obtained and tabulated without any error. In practice, thi aumption
More informationLaboratory Exercise 6
Laboratory Exercie 6 Adder, Subtractor, and Multiplier The purpoe of thi exercie i to examine arithmetic circuit that add, ubtract, and multiply number. Each circuit will be decribed in VHL and implemented
More informationCutting Stock by Iterated Matching. Andreas Fritsch, Oliver Vornberger. University of Osnabruck. D Osnabruck.
Cutting Stock by Iterated Matching Andrea Fritch, Oliver Vornberger Univerity of Onabruck Dept of Math/Computer Science D-4909 Onabruck andy@informatikuni-onabrueckde Abtract The combinatorial optimization
More informationAUTOMATIC TEST CASE GENERATION USING UML MODELS
Volume-2, Iue-6, June-2014 AUTOMATIC TEST CASE GENERATION USING UML MODELS 1 SAGARKUMAR P. JAIN, 2 KHUSHBOO S. LALWANI, 3 NIKITA K. MAHAJAN, 4 BHAGYASHREE J. GADEKAR 1,2,3,4 Department of Computer Engineering,
More informationarxiv: v1 [cs.ds] 27 Feb 2018
Incremental Strong Connectivity and 2-Connectivity in Directed Graph Louka Georgiadi 1, Giueppe F. Italiano 2, and Niko Parotidi 2 arxiv:1802.10189v1 [c.ds] 27 Feb 2018 1 Univerity of Ioannina, Greece.
More informationCSE 250B Assignment 4 Report
CSE 250B Aignment 4 Report March 24, 2012 Yuncong Chen yuncong@c.ucd.edu Pengfei Chen pec008@ucd.edu Yang Liu yal060@c.ucd.edu Abtract In thi project, we implemented the recurive autoencoder (RAE) a decribed
More informationThe Association of System Performance Professionals
The Aociation of Sytem Performance Profeional The Computer Meaurement Group, commonly called CMG, i a not for profit, worldwide organization of data proceing profeional committed to the meaurement and
More informationRouting Definition 4.1
4 Routing So far, we have only looked at network without dealing with the iue of how to end information in them from one node to another The problem of ending information in a network i known a routing
More informationExercise 4: Markov Processes, Cellular Automata and Fuzzy Logic
Exercie 4: Marko rocee, Cellular Automata and Fuzzy Logic Formal Method II, Fall Semeter 203 Solution Sheet Marko rocee Theoretical Exercie. (a) ( point) 0.2 0.7 0.3 tanding 0.25 lying 0.5 0.4 0.2 0.05
More informationWeb Science and additionality
Admin tuff... Lecture 1: EITN01 Web Intelligence and Information Retrieval Meage, lide, handout, lab manual and link: http://www.eit.lth.e/coure/eitn01 Contact: Ander Ardö, Ander.Ardo@eit.lth.e, room:
More informationDAROS: Distributed User-Server Assignment And Replication For Online Social Networking Applications
DAROS: Ditributed Uer-Server Aignment And Replication For Online Social Networking Application Thuan Duong-Ba School of EECS Oregon State Univerity Corvalli, OR 97330, USA Email: duongba@eec.oregontate.edu
More informationAn Approach to a Test Oracle for XML Query Testing
An Approach to a Tet Oracle for XML Query Teting Dae S. Kim-Park, Claudio de la Riva, Javier Tuya Univerity of Oviedo Computing Department Campu of Vieque, /n, 33204 (SPAIN) kim_park@li.uniovi.e, claudio@uniovi.e,
More informationAn Intro to LP and the Simplex Algorithm. Primal Simplex
An Intro to LP and the Simplex Algorithm Primal Simplex Linear programming i contrained minimization of a linear objective over a olution pace defined by linear contraint: min cx Ax b l x u A i an m n
More informationCERIAS Tech Report EFFICIENT PARALLEL ALGORITHMS FOR PLANAR st-graphs. by Mikhail J. Atallah, Danny Z. Chen, and Ovidiu Daescu
CERIAS Tech Report 2003-15 EFFICIENT PARALLEL ALGORITHMS FOR PLANAR t-graphs by Mikhail J. Atallah, Danny Z. Chen, and Ovidiu Daecu Center for Education and Reearch in Information Aurance and Security,
More informationFall 2010 EE457 Instructor: Gandhi Puvvada Date: 10/1/2010, Friday in SGM123 Name:
Fall 2010 EE457 Intructor: Gandhi Puvvada Quiz (~ 10%) Date: 10/1/2010, Friday in SGM123 Name: Calculator and Cadence Verilog guide are allowed; Cloed-book, Cloed-note, Time: 12:00-2:15PM Total point:
More informationFall 2010 EE457 Instructor: Gandhi Puvvada Date: 10/1/2010, Friday in SGM123 Name:
Fall 2010 EE457 Intructor: Gandhi Puvvada Quiz (~ 10%) Date: 10/1/2010, Friday in SGM123 Name: Calculator and Cadence Verilog guide are allowed; Cloed-book, Cloed-note, Time: 12:00-2:15PM Total point:
More informationASYMPTOTIC COMPLEXITY
Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better. - Edsger Dijkstra ASYMPTOTIC COMPLEXITY Lecture
More informationADAM - A PROBLEM-ORIENTED SYMBOL PROCESSOR
ADAM - A PROBLEM-ORIENTED SYMBOL PROCESSOR A. P. Mullery and R. F. Schauer Thoma J. Waton Reearch Center International Buine Machine Corporation Yorktown Height, New York R. Rice International Buine Machine
More informationDWH Performance Tuning For Better Reporting
DWH Performance Tuning For Better Sandeep Bhargava Reearch Scholar Naveen Hemrajani Aociate Profeor Dineh Goyal Aociate Profeor Subhah Gander IT Profeional ABSTRACT: The concept of data warehoue deal in
More informationFloating Point CORDIC Based Power Operation
Floating Point CORDIC Baed Power Operation Kazumi Malhan, Padmaja AVL Electrical and Computer Engineering Department School of Engineering and Computer Science Oakland Univerity, Rocheter, MI e-mail: kmalhan@oakland.edu,
More informationA Boyer-Moore Approach for. Two-Dimensional Matching. Jorma Tarhio. University of California. Berkeley, CA Abstract
A Boyer-Moore Approach for Two-Dimenional Matching Jorma Tarhio Computer Science Diviion Univerity of California Berkeley, CA 94720 Abtract An imple ublinear algorithm i preented for two-dimenional tring
More informationDistributed Packet Processing Architecture with Reconfigurable Hardware Accelerators for 100Gbps Forwarding Performance on Virtualized Edge Router
Ditributed Packet Proceing Architecture with Reconfigurable Hardware Accelerator for 100Gbp Forwarding Performance on Virtualized Edge Router Satohi Nihiyama, Hitohi Kaneko, and Ichiro Kudo Abtract To
More informationVariable Resolution Discretization in the Joint Space
Variable Reolution Dicretization in the Joint Space Chritopher K. Monon, David Wingate, and Kevin D. Seppi {c,wingated,keppi}@c.byu.edu Computer Science, Brigham Young Univerity Todd S. Peteron peterto@uvc.edu
More informationES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK
ES05 Analyi and Deign of Engineering Sytem: Lab : An Introductory Tutorial: Getting Started with SIMULINK What i SIMULINK? SIMULINK i a oftware package for modeling, imulating, and analyzing dynamic ytem.
More informationA Linear Interpolation-Based Algorithm for Path Planning and Replanning on Girds *
Advance in Linear Algebra & Matrix Theory, 2012, 2, 20-24 http://dx.doi.org/10.4236/alamt.2012.22003 Publihed Online June 2012 (http://www.scirp.org/journal/alamt) A Linear Interpolation-Baed Algorithm
More informationCompiler Construction
Compiler Contruction Lecture 6 - An Introduction to Bottom- Up Paring 3 Robert M. Siegfried All right reerved Bottom-up Paring Bottom-up parer pare a program from the leave of a pare tree, collecting the
More informationMotivation: Level Sets. Input Data Noisy. Easy Case Use Marching Cubes. Intensity Varies. Non-uniform Exposure. Roger Crawfis
Level Set Motivation: Roger Crawfi Slide collected from: Fan Ding, Charle Dyer, Donald Tanguay and Roger Crawfi 4/24/2003 R. Crawfi, Ohio State Univ. 109 Eay Cae Ue Marching Cube Input Data Noiy 4/24/2003
More informationarxiv: v3 [cs.cg] 1 Oct 2018
Improved Time-Space Trade-off for Computing Voronoi Diagram Bahareh Banyaady Matia Korman Wolfgang Mulzer André van Renen Marcel Roeloffzen Paul Seiferth Yannik Stein arxiv:1708.00814v3 [c.cg] 1 Oct 2018
More informationINVERSE DYNAMIC SIMULATION OF A HYDRAULIC DRIVE WITH MODELICA. α Cylinder chamber areas ratio... σ Viscous friction coefficient
Proceeding of the ASME 2013 International Mechanical Engineering Congre & Expoition IMECE2013 November 15-21, 2013, San Diego, California, USA IMECE2013-63310 INVERSE DYNAMIC SIMULATION OF A HYDRAULIC
More informationDescription of background ideas, and the module itself.
CO3008 Semantic of Programming Language 1 Chapter 1 Decription of background idea, and the module itelf. Review ome mathematic. CO3008 Semantic of Programming Language 2 Overview: Background Introduction
More informationA Fast Association Rule Algorithm Based On Bitmap and Granular Computing
A Fat Aociation Rule Algorithm Baed On Bitmap and Granular Computing T.Y.Lin Xiaohua Hu Eric Louie Dept. of Computer Science College of Information Science IBM Almaden Reearch Center San Joe State Univerity
More informationHOW TO WRITE THE PROCEEDINGS AS A PKAS PAPER
Publication of the Korean Atronomical Society pissn: 1225-1534 / eissn: 2287-6936 00: 1 99, 2015 January http://dx.doi.org/10.5303/pkas.2015.00.0.1 c 2015. The Korean Atronomical Society. All right reerved.
More informationKaren L. Collins. Wesleyan University. Middletown, CT and. Mark Hovey MIT. Cambridge, MA Abstract
Mot Graph are Edge-Cordial Karen L. Collin Dept. of Mathematic Weleyan Univerity Middletown, CT 6457 and Mark Hovey Dept. of Mathematic MIT Cambridge, MA 239 Abtract We extend the definition of edge-cordial
More informationAalborg Universitet. Published in: Proceedings of the Working Conference on Advanced Visual Interfaces
Aalborg Univeritet Software-Baed Adjutment of Mobile Autotereocopic Graphic Uing Static Parallax Barrier Paprocki, Martin Marko; Krog, Kim Srirat; Kritofferen, Morten Bak; Krau, Martin Publihed in: Proceeding
More informationRefining SIRAP with a Dedicated Resource Ceiling for Self-Blocking
Refining SIRAP with a Dedicated Reource Ceiling for Self-Blocking Mori Behnam, Thoma Nolte Mälardalen Real-Time Reearch Centre P.O. Box 883, SE-721 23 Väterå, Sweden {mori.behnam,thoma.nolte}@mdh.e ABSTRACT
More informationTrainable Context Model for Multiscale Segmentation
Trainable Context Model for Multicale Segmentation Hui Cheng and Charle A. Bouman School of Electrical and Computer Engineering Purdue Univerity Wet Lafayette, IN 47907-1285 {hui, bouman}@ ecn.purdue.edu
More informationSolutions by Artem Gritsenko, Ahmedul Kabir, Yun Lu, and Prof. Ruiz Problem I. By Artem Gritsenko, Yun Lu, and Prof. Ruiz
CS3 Algorithm. B Term 3. Homework 5 Soltion Soltion b Artem Gritenko, Ahmedl Kabir, Yn L, and Prof. Riz Problem I. B Artem Gritenko, Yn L, and Prof. Riz a. Algorithm. KNAPSACK (,,,,,,, ) # i the knapack
More informationCourse Updates. Reminders: 1) Assignment #13 due Monday. 2) Mirrors & Lenses. 3) Review for Final: Wednesday, May 5th
Coure Update http://www.phy.hawaii.edu/~varner/phys272-spr0/phyic272.html Reminder: ) Aignment #3 due Monday 2) Mirror & Lene 3) Review for Final: Wedneday, May 5th h R- R θ θ -R h Spherical Mirror Infinite
More informationSpring 2012 EE457 Instructor: Gandhi Puvvada
Spring 2012 EE457 Intructor: Gandhi Puvvada Quiz (~ 10%) Date: 2/17/2012, Friday in SLH200 Calculator and Cadence Verilog Guide are allowed; Time: 10:00AM-12:45PM Cloed-book/Cloed-note Exam Total point:
More informationCS 467/567: Divide and Conquer on the PRAM
CS 467/567: Divide and Conquer on the PRAM Stefan D. Bruda Winter 2017 BINARY SEARCH Problem: Given a equence S 1..n orted in nondecreaing order and a value x, find the ubcript k uch that S i x If n proceor
More informationCS 1110: Introduction to Computing Using Python Loop Invariants
CS 1110: Introduction to Computing Using Python Lecture 21 Loop Invariants [Andersen, Gries, Lee, Marschner, Van Loan, White] Announcements Prelim 2 conflicts due by midnight tonight Lab 11 is out Due
More informationTimber Technology(Product) Pencil Box Unit Outline
HOLY CROSS COLLEGE YEAR 7 TECHNOLOGY (Cla: 7.. 7.7) Timber Technology(Product) Pencil Box Unit Outline Aement Tak No: Date Iued: Due Date: Weighting Total Mark Written and Practical Week T3 //7 % 7 SUBMISSION
More informationLaboratory Exercise 6
Laboratory Exercie 6 Adder, Subtractor, and Multiplier a a The purpoe of thi exercie i to examine arithmetic circuit that add, ubtract, and multiply number. Each b c circuit will be decribed in Verilog
More informationHassan Ghaziri AUB, OSB Beirut, Lebanon Key words Competitive self-organizing maps, Meta-heuristics, Vehicle routing problem,
COMPETITIVE PROBABIISTIC SEF-ORGANIZING MAPS FOR ROUTING PROBEMS Haan Ghaziri AUB, OSB Beirut, ebanon ghaziri@aub.edu.lb Abtract In thi paper, we have applied the concept of the elf-organizing map (SOM)
More informationNow consider the following situation after deleting three elements from the queue...
Scheme of valuvation -1I Subject & Code : Data Structure and Application (15CS33) NOTE: ANSWER All FIVE QUESTIONS 1 Explain the diadvantage of linear queue and how it i olved in circular queue. Explain
More information