l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9.

Size: px
Start display at page:

Download "l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9."

Transcription

1 Sets & Hash Tabes Week 13 Weiss: chapter 20 CS 5301 Fa 2017 What are sets? A set is a coection of objects of the same type that has the foowing two properties: - there are no dupicates in the coection - the order of the objects in the coection is irreevant {6,9,11,-5 and {11,9,6,-5 are equivaent Ji Seaman 1 There is no first eement, and no successor of 9 2 Set Operations Set Operations Set construction - the empty set (0 eements in the set) is() - True, if the set is empty; fase, otherwise Insert(eement) - If eement is aready in the set, do nothing; otherwise add it to the set Deete(eement) - If eement is not a member of the set, do nothing; Member(eement): booean - True, if eement is a member of the set; fase, otherwise Union(Set1,Set2): Set - returns a Set containing a eements of the two Sets, no dupications Intersection(Set1,Set2): Set - returns a Set containing a eements common to both sets otherwise remove it from the set 3 4

2 Set Operations Difference(Set1,Set2): Set - returns a Set containing a eements of the first set except for the eements that are in common with the second set Subset(Set1,Set2): booean - True, if Set1 is a subset of Set2 (if a eements of the Set1 are aso eements of Set2) Equas(Set1,Set2): booean - True, if both sets contain exacty the same eements 5 Array of eements impementation - each eement of the set wi occupy a position in the array - the member (find) operation wi be inefficient, must use inear search cass IntSet { int count; //number of eements in the set, set to 0 in constr int intset[100]; //stores the eements in positions 0count - insert must not add dupicates: void insert(int x) { if (!member(x) && count<100) { intset[count] = x; count++; 6 Array of eements impementation: member boo member(int x) { for (int i=0; i<count; i++) { if (intset[i]==x) return true; return fase; Array of eements impementation: union IntSet operator+(intset rhs) { IntSet newset; for (int i=0; i<count; i++) newsetinsert(intset[i]); for (int i=0; i<rhscount; i++) newsetinsert(rhsintset[i]); return newset; - Exercise: impement a of the set operations for 7 the IntSet Booean array impementation - size of the array must be equa to number of a possibe eements (the universe) //This array wi represent a set of days of the week // (Sunday, Monday, Tuesday, ) boo daysofweek[7] = {fase; //sets a eements to fase - Here is the set {Monday, Wednesday, Friday: FALSE TRUE FALSE TRUE FALSE TRUE FALSE Sunday 0 Monday 1 Tuesday 2 Wednesday - if daysofweek[1] is true, then Monday is in the Set 3 Thursday 4 Friday 5 Saturday 6 8

3 Booean array impementation - need a mapping function to convert an eement of the universe to a position in the array int map(string x) { if (x=="sunday") return 0; if (x=="monday") return 1; if (x=="tuesday") return 2; if (x=="wednesday") return 3; if (x=="thursday") return 4; if (x=="friday") return 5; if (x=="saturday") return 6; - if daysofweek[map( Monday )] is true, then Monday is in the Set 9 Booean array impementation: member boo member(string x) { int pos = map(x); if (0<=pos && pos<7) return daysofweek[pos]; return fase; Booean array impementation: union // c wi be the union of a and b: void union(boo a[], boo b[], boo c[]) { for (int pos=0; pos<7; pos++) // if either a or b is true for pos, make c true for pos c[pos] = (a[pos] b[pos]); - Exercise: impement a of the set operations for 10 the set impemented as a booean array What are hash tabes? A Hash Tabe is used to impement a set (or a search tabe), providing basic operations in constant time (no oops/recursion): - insert - deete (optiona) - find (aso caed member ) - make (need not be constant time) It uses a function that maps an object in the set (a key) to its ocation in the tabe Using a hash function The function is caed a hash function 11 in the array HandyParts company makes no more than 100 different parts But the parts a have four digit numbers This hash function can be used to store and retrieve parts in an array Hash(partNum) = partnum % 100 Use the hash function to pace the eement with part number

4 Pacing eements in the array How to resove the coision? Next pace part number 6702 in the array One way is by inear probing This uses the foowing function Hash(partNum) = partnum % % 100 = 2 But [2] is aready occupied (HashVaue + 1) % 100 repeatedy unti an empty ocation is found for part number 6702 COLLISION OCCURS Coision resoved Coision resoved (Hash(6702) + 1) % 100 = 3 But [3] is aready occupied (Hash(6702) + 2) % 100 = 4 Part 6702 can be paced at the ocation with index Part 6702 is paced at the ocation with index 4 Where woud the part with number 4598 be paced using inear probing? 46 47

5 Hashing concepts Hash Tabe: (usuay an array) where objects are stored according to their key - key: attribute of an object used for searching/ sorting - number of vaid keys usuay greater than number of sots in the tabe - number of keys in use usuay much smaer than tabe size boo find(int); //return true if int in tabe void insert (int); //add int to tabe void dispay(); //show eements in tabe // do not impement remove same ocation ; Hash function: maps a key to a Tabe index Coision: when two separate keys hash to the Simpe array impementation - keys are ints, a greater than or equa to 0: cass HashTabe { private: int *array; // array of int eements // use -1 to indicate empty sot int size; // size of array int hash (int key) ; // maps key to position in array pubic: HashTabe (int size); //initiaize a eements to -1 ~HashTabe(); Simpe array impementation: HashTabe::HashTabe (int s) { size = s; array = new int[size]; //dynamic aocation for (int i=0; i<size; i++) { //set a to -1 array[i] = -1; int HashTabe::hash(int key) { return key % size; //maps keys to array position Coision Resoution: Linear Probing Insert: When there is a coision, search sequentiay for the next open sot (-1) - Put the vaue in the tabe at that position Find: if the key is not at the hashed ocation, keep searching sequentiay for it - if it reaches an open sot (-1), the key is not found Remove: if the key is not at the hashed ocation, keep searching sequentiay for it void HashTabe::insert ( int eement) { int index = hash(eement); //inear probing, if not at index - if the key is found, set the status to -1 whie (array[index]!=-1 && array[index]!= eement) { index = (index+1)%size; array[index] = eement; //puts eement at first open sot 19 a chain The Find method needs to know to 20 Probem: Removing an eement in the midde of keep searching to the end of the chain

6 Coision Resoution: Separate chaining Use an array of inked ists for the hash tabe Each inked ist contains a objects that hashed to that ocation - no coisions Hash function is sti: h(k) = k % Array of inked ists impementation - The data structure: cass ChainedTabe { private: static const int SIZE = 10; struct Node { int key; node *nextnode; ; Node* tabe[size]; //array of pointers to Nodes int hash (int key) ; // maps key to position in array pubic: ChainedTabe(); //inits a pointers in array to NULL boo find(int); //return true if int in tabe void insert (int); //add int to tabe ; 22 Separate Chaining To insert a an object: - compute hash(k) - if the object is not aready in the ist at that ocation, insert the object into the ist To find an object: - compute hash(k) - search the inked ist there for the key of the object To deete an object: - compute hash(k) - search the inked ist there for the key of the object - if found, remove it 23

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9.

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9. Sets & Hash Tabes Week 13 Weiss: chapter 20 CS 5301 Spring 2018 What are sets? A set is a coection of objects of the same type that has the foowing two properties: - there are no dupicates in the coection

More information

! A set is a collection of objects of the same. ! {6,9,11,-5} and {11,9,6,-5} are equivalent. ! There is no first element, and no successor. of 9.

! A set is a collection of objects of the same. ! {6,9,11,-5} and {11,9,6,-5} are equivalent. ! There is no first element, and no successor. of 9. Sets & Hash Tables Week 13 Weiss: chapter 20 CS 5301 Fall 2015 What are sets?! A set is a collection of objects of the same type that has the following two properties: - there are no duplicates in the

More information

l Tree: set of nodes and directed edges l Parent: source node of directed edge l Child: terminal node of directed edge

l Tree: set of nodes and directed edges l Parent: source node of directed edge l Child: terminal node of directed edge Trees & Heaps Week 12 Gaddis: 20 Weiss: 21.1-3 CS 5301 Fa 2016 Ji Seaman 1 Tree: non-recursive definition Tree: set of nodes and directed edges - root: one node is distinguished as the root - Every node

More information

Searching & Sorting. Definitions of Search and Sort. Other forms of Linear Search. Linear Search. Week 11. Gaddis: 8, 19.6,19.8.

Searching & Sorting. Definitions of Search and Sort. Other forms of Linear Search. Linear Search. Week 11. Gaddis: 8, 19.6,19.8. Searching & Sorting Week 11 Gaddis: 8, 19.6,19.8 CS 5301 Fa 2017 Ji Seaman 1 Definitions of Search and Sort Search: find a given item in a ist, return the position of the item, or -1 if not found. Sort:

More information

Searching, Sorting & Analysis

Searching, Sorting & Analysis Searching, Sorting & Anaysis Unit 2 Chapter 8 CS 2308 Fa 2018 Ji Seaman 1 Definitions of Search and Sort Search: find a given item in an array, return the index of the item, or -1 if not found. Sort: rearrange

More information

Searching & Sorting. Definitions of Search and Sort. Other forms of Linear Search. Linear Search. Week 11. Gaddis: 8, 19.6,19.8. CS 5301 Spring 2017

Searching & Sorting. Definitions of Search and Sort. Other forms of Linear Search. Linear Search. Week 11. Gaddis: 8, 19.6,19.8. CS 5301 Spring 2017 Searching & Sorting Week 11 Gaddis: 8, 19.6,19.8 CS 5301 Spring 2017 Ji Seaman 1 Definitions of Search and Sort Search: find a given item in a ist, return the position of the item, or -1 if not found.

More information

Week 4. Pointers and Addresses. Dereferencing and initializing. Pointers as Function Parameters. Pointers & Structs. Gaddis: Chapters 9, 11

Week 4. Pointers and Addresses. Dereferencing and initializing. Pointers as Function Parameters. Pointers & Structs. Gaddis: Chapters 9, 11 Week 4 Pointers & Structs Gaddis: Chapters 9, 11 CS 5301 Spring 2017 Ji Seaman 1 Pointers and Addresses The address operator (&) returns the address of a variabe. int x; cout

More information

Introduction to the Stack. Stacks and Queues. Stack Operations. Stack illustrated. elements of the same type. Week 9. Gaddis: Chapter 18

Introduction to the Stack. Stacks and Queues. Stack Operations. Stack illustrated. elements of the same type. Week 9. Gaddis: Chapter 18 Stacks and Queues Week 9 Gaddis: Chapter 18 CS 5301 Spring 2017 Ji Seaman Introduction to the Stack Stack: a data structure that hods a coection of eements of the same type. - The eements are accessed

More information

Functions. 6.1 Modular Programming. 6.2 Defining and Calling Functions. Gaddis: 6.1-5,7-10,13,15-16 and 7.7

Functions. 6.1 Modular Programming. 6.2 Defining and Calling Functions. Gaddis: 6.1-5,7-10,13,15-16 and 7.7 Functions Unit 6 Gaddis: 6.1-5,7-10,13,15-16 and 7.7 CS 1428 Spring 2018 Ji Seaman 6.1 Moduar Programming Moduar programming: breaking a program up into smaer, manageabe components (modues) Function: a

More information

index.pdf March 17,

index.pdf March 17, index.pdf March 17, 2013 1 ITI 1121. Introduction to omputing II Marce Turcotte Schoo of Eectrica Engineering and omputer Science Linked List (Part 2) Tai pointer ouby inked ist ummy node Version of March

More information

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-4,6

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-4,6 Arrays Unit 5 Gaddis: 7.1-4,6 CS 1428 Fa 2017 Ji Seaman Array Data Type Array: a variabe that contains mutipe vaues of the same type. Vaues are stored consecutivey in memory. An array variabe definition

More information

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-3,5

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-3,5 Arrays Unit 5 Gaddis: 7.1-3,5 CS 1428 Spring 2018 Ji Seaman Array Data Type Array: a variabe that contains mutipe vaues of the same type. Vaues are stored consecutivey in memory. An array variabe decaration

More information

Straight-line code (or IPO: Input-Process-Output) If/else & switch. Relational Expressions. Decisions. Sections 4.1-6, , 4.

Straight-line code (or IPO: Input-Process-Output) If/else & switch. Relational Expressions. Decisions. Sections 4.1-6, , 4. If/ese & switch Unit 3 Sections 4.1-6, 4.8-12, 4.14-15 CS 1428 Spring 2018 Ji Seaman Straight-ine code (or IPO: Input-Process-Output) So far a of our programs have foowed this basic format: Input some

More information

! A Hash Table is used to implement a set, ! The table uses a function that maps an. ! The function is called a hash function.

! A Hash Table is used to implement a set, ! The table uses a function that maps an. ! The function is called a hash function. Hash Tables Chapter 20 CS 3358 Summer II 2013 Jill Seaman Sections 201, 202, 203, 204 (not 2042), 205 1 What are hash tables?! A Hash Table is used to implement a set, providing basic operations in constant

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program? Intro to Programming & C++ Unit 1 Sections 1.1-3 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Spring 2018 Ji Seaman 1.1 Why Program? Computer programmabe machine designed to foow instructions Program a set of

More information

RDF Objects 1. Alex Barnell Information Infrastructure Laboratory HP Laboratories Bristol HPL November 27 th, 2002*

RDF Objects 1. Alex Barnell Information Infrastructure Laboratory HP Laboratories Bristol HPL November 27 th, 2002* RDF Objects 1 Aex Barne Information Infrastructure Laboratory HP Laboratories Bristo HPL-2002-315 November 27 th, 2002* E-mai: Andy_Seaborne@hp.hp.com RDF, semantic web, ontoogy, object-oriented datastructures

More information

Lecture outline Graphics and Interaction Scan Converting Polygons and Lines. Inside or outside a polygon? Scan conversion.

Lecture outline Graphics and Interaction Scan Converting Polygons and Lines. Inside or outside a polygon? Scan conversion. Lecture outine 433-324 Graphics and Interaction Scan Converting Poygons and Lines Department of Computer Science and Software Engineering The Introduction Scan conversion Scan-ine agorithm Edge coherence

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated Intro to Programming & C++ Unit 1 Sections 1.1-3 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Fa 2017 Ji Seaman 1.1 Why Program? Computer programmabe machine designed to foow instructions Program instructions

More information

A Fast Block Matching Algorithm Based on the Winner-Update Strategy

A Fast Block Matching Algorithm Based on the Winner-Update Strategy In Proceedings of the Fourth Asian Conference on Computer Vision, Taipei, Taiwan, Jan. 000, Voume, pages 977 98 A Fast Bock Matching Agorithm Based on the Winner-Update Strategy Yong-Sheng Chenyz Yi-Ping

More information

Nearest Neighbor Learning

Nearest Neighbor Learning Nearest Neighbor Learning Cassify based on oca simiarity Ranges from simpe nearest neighbor to case-based and anaogica reasoning Use oca information near the current query instance to decide the cassification

More information

Professor: Alvin Chao

Professor: Alvin Chao Professor: Avin Chao CS149 For Each and Reference Arrays Looping Over the Contents of an Array We often use a for oop to access each eement in an array: for (int i = 0; i < names.ength; i++) { System.out.printn("Heo

More information

CS349/SE382 A1 C Programming Tutorial

CS349/SE382 A1 C Programming Tutorial CS349/SE382 A1 C Programming Tutorial Erin Lester January 2005 Outline Comments Variable Declarations Objects Dynamic Memory Boolean Type structs, enums and unions Other Differences The Event Loop Comments

More information

NB Series 430/440 SETUP AND OPERATION MANUAL

NB Series 430/440 SETUP AND OPERATION MANUAL Powe Process Improvement 73 Ward Hi ve. Haverhi, M 01835 US 781.935.3450 www.newcastesys.com N Series 430/440 STUP ND OPRTION MNUL N Series 430/440 Setup and Operation Manua Document Number: NS100_N430_00_

More information

As Michi Henning and Steve Vinoski showed 1, calling a remote

As Michi Henning and Steve Vinoski showed 1, calling a remote Reducing CORBA Ca Latency by Caching and Prefetching Bernd Brügge and Christoph Vismeier Technische Universität München Method ca atency is a major probem in approaches based on object-oriented middeware

More information

Professor: Alvin Chao

Professor: Alvin Chao Professor: Avin Chao CS149 More with Casses and Objects OverLoading Let's ook at the Car cass... Terminoogy Method definition pubic void acceerate(doube amount) { speed += amount; if (speed > MAX_SPEED)

More information

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Advanced Memory Management

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Advanced Memory Management CSE120 Principes of Operating Systems Prof Yuanyuan (YY) Zhou Advanced Memory Management Advanced Functionaity Now we re going to ook at some advanced functionaity that the OS can provide appications using

More information

Collaborative Approach to Mitigating ARP Poisoning-based Man-in-the-Middle Attacks

Collaborative Approach to Mitigating ARP Poisoning-based Man-in-the-Middle Attacks Coaborative Approach to Mitigating ARP Poisoning-based Man-in-the-Midde Attacks Seung Yeob Nam a, Sirojiddin Djuraev a, Minho Park b a Department of Information and Communication Engineering, Yeungnam

More information

l A program is a set of instructions that the l It must be translated l Variable: portion of memory that stores a value char

l A program is a set of instructions that the l It must be translated l Variable: portion of memory that stores a value char Week 1 Operators, Data Types & I/O Gaddis: Chapters 1, 2, 3 CS 5301 Fa 2018 Ji Seaman Programming A program is a set of instructions that the computer foows to perform a task It must be transated from

More information

Meeting Exchange 4.1 Service Pack 2 Release Notes for the S6200/S6800 Servers

Meeting Exchange 4.1 Service Pack 2 Release Notes for the S6200/S6800 Servers Meeting Exchange 4.1 Service Pack 2 Reease Notes for the S6200/S6800 Servers The Meeting Exchange S6200/S6800 Media Servers are SIP-based voice and web conferencing soutions that extend Avaya s conferencing

More information

CHAPTER : 9 FLOW OF CONTROL

CHAPTER : 9 FLOW OF CONTROL CHAPTER 9 FLOW OF CONTROL Statements-Statements are the instructions given to the Computer to perform any kind of action. Null Statement-A null statement is useful in those case where syntax of the language

More information

Computer Science 302 Spring 2007 Practice Final Examination: Part I

Computer Science 302 Spring 2007 Practice Final Examination: Part I Computer Science 302 Spring 2007 Practice Final Examination: Part I Name: This practice examination is much longer than the real final examination will be. If you can work all the problems here, you will

More information

MIDTERM EXAM THURSDAY MARCH

MIDTERM EXAM THURSDAY MARCH Week 6 Assignments: Program 2: is being graded Program 3: available soon and due before 10pm on Thursday 3/14 Homework 5: available soon and due before 10pm on Monday 3/4 X-Team Exercise #2: due before

More information

IBC DOCUMENT PROG007. SA/STA SERIES User's Guide V7.0

IBC DOCUMENT PROG007. SA/STA SERIES User's Guide V7.0 IBC DOCUMENT SA/STA SERIES User's Guide V7.0 Page 2 New Features for Version 7.0 Mutipe Schedues This version of the SA/STA firmware supports mutipe schedues for empoyees. The mutipe schedues are impemented

More information

Randomized Algorithms: Element Distinctness

Randomized Algorithms: Element Distinctness Randomized Algorithms: Element Distinctness CSE21 Winter 2017, Day 24 (B00), Day 16-17 (A00) March 13, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Element Distinctness: WHAT Given list of positive integers

More information

CS 302 ALGORITHMS AND DATA STRUCTURES

CS 302 ALGORITHMS AND DATA STRUCTURES CS 302 ALGORITHMS AND DATA STRUCTURES A famous quote: Program = Algorithm + Data Structure General Problem You have some data to be manipulated by an algorithm E.g., list of students in a school Each student

More information

Special Edition Using Microsoft Excel Selecting and Naming Cells and Ranges

Special Edition Using Microsoft Excel Selecting and Naming Cells and Ranges Specia Edition Using Microsoft Exce 2000 - Lesson 3 - Seecting and Naming Ces and.. Page 1 of 8 [Figures are not incuded in this sampe chapter] Specia Edition Using Microsoft Exce 2000-3 - Seecting and

More information

CitiBusiness Online Token

CitiBusiness Online Token Commercia Bank CitiBusiness Onine Token Quick Reference Guide Thank you for choosing Citi and CitiBusiness Onine to manage your accounts and move funds securey onine. Here is a guide to your new, easy-to-use

More information

This is a CLOSED-BOOK-CLOSED-NOTES exam consisting of five (5) questions. Write your answer in the answer booklet provided. 1. OO concepts (5 points)

This is a CLOSED-BOOK-CLOSED-NOTES exam consisting of five (5) questions. Write your answer in the answer booklet provided. 1. OO concepts (5 points) COMP2012H Object Oriented Programming and Data Structures Spring Semester 2013 Midterm Exam Soution March 26, 2013, 10:30-11:50am in Room 3598 Instructor: Chi Keung Tang This is a CLOSED-OOK-CLOSED-NOTES

More information

Sample of a training manual for a software tool

Sample of a training manual for a software tool Sampe of a training manua for a software too We use FogBugz for tracking bugs discovered in RAPPID. I wrote this manua as a training too for instructing the programmers and engineers in the use of FogBugz.

More information

Structures and Pointers

Structures and Pointers Structures and Pointers Comp-206 : Introduction to Software Systems Lecture 11 Alexandre Denault Computer Science McGill University Fall 2006 Note on Assignment 1 Please note that handin does not allow

More information

Lecture 12. Data Types and Strings

Lecture 12. Data Types and Strings Lecture 12 Data Types and Strings Class v. Object A Class represents the generic description of a type. An Object represents a specific instance of the type. Video Game=>Class, WoW=>Instance Members of

More information

You must include this cover sheet. Either type up the assignment using theory5.tex, or print out this PDF.

You must include this cover sheet. Either type up the assignment using theory5.tex, or print out this PDF. 15-122 Assignment 5 Page 1 of 11 15-122 : Principles of Imperative Computation Fall 2012 Assignment 5 (Theory Part) Due: Tuesday, October 30, 2012 at the beginning of lecture Name: Andrew ID: Recitation:

More information

Load Balancing by MPLS in Differentiated Services Networks

Load Balancing by MPLS in Differentiated Services Networks Load Baancing by MPLS in Differentiated Services Networks Riikka Susitaiva, Jorma Virtamo, and Samui Aato Networking Laboratory, Hesinki University of Technoogy P.O.Box 3000, FIN-02015 HUT, Finand {riikka.susitaiva,

More information

Navigating and searching theweb

Navigating and searching theweb Navigating and searching theweb Contents Introduction 3 1 The Word Wide Web 3 2 Navigating the web 4 3 Hyperinks 5 4 Searching the web 7 5 Improving your searches 8 6 Activities 9 6.1 Navigating the web

More information

Alpha labelings of straight simple polyominal caterpillars

Alpha labelings of straight simple polyominal caterpillars Apha abeings of straight simpe poyomina caterpiars Daibor Froncek, O Nei Kingston, Kye Vezina Department of Mathematics and Statistics University of Minnesota Duuth University Drive Duuth, MN 82-3, U.S.A.

More information

Development of a National Portal for Tuvalu. Business Case. SPREP Pacific iclim

Development of a National Portal for Tuvalu. Business Case. SPREP Pacific iclim Deveopment of a Nationa Porta for Tuvau Business Case SPREP Pacific iclim Apri 2018 Tabe of Contents 1. Introduction... 3 1.1 Report Purpose... 3 1.2 Background & Context... 3 1.3 Other IKM Activities

More information

Data Structures and Object-Oriented Design VIII. Spring 2014 Carola Wenk

Data Structures and Object-Oriented Design VIII. Spring 2014 Carola Wenk Data Structures and Object-Oriented Design VIII Spring 2014 Carola Wenk Collections and Maps The Collection interface is for storage and access, while a Map interface is geared towards associating keys

More information

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Lecture 4: Threads

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Lecture 4: Threads CSE120 Principes of Operating Systems Prof Yuanyuan (YY) Zhou Lecture 4: Threads Announcement Project 0 Due Project 1 out Homework 1 due on Thursday Submit it to Gradescope onine 2 Processes Reca that

More information

Further Concepts in Geometry

Further Concepts in Geometry ppendix F Further oncepts in Geometry F. Exporing ongruence and Simiarity Identifying ongruent Figures Identifying Simiar Figures Reading and Using Definitions ongruent Trianges assifying Trianges Identifying

More information

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester Programming Language Control Structures: Selection (switch) Eng. Anis Nazer First Semester 2018-2019 Multiple selection choose one of two things if/else choose one from many things multiple selection using

More information

Outerjoins, Constraints, Triggers

Outerjoins, Constraints, Triggers Outerjoins, Constraints, Triggers Lecture #13 Autumn, 2001 Fa, 2001, LRX #13 Outerjoins, Constraints, Triggers HUST,Wuhan,China 358 Outerjoin R S = R S with danging tupes padded with nus and incuded in

More information

View a Students Schedule Through Student Services Trigger:

View a Students Schedule Through Student Services Trigger: Department Responsibility/Role File Name Version Document Generation Date 6/10/2007 Date Modified 6/10/2007 Last Changed by Status View a Students Schedule Through Student Services_BUSPROC View a Students

More information

A METHOD FOR GRIDLESS ROUTING OF PRINTED CIRCUIT BOARDS. A. C. Finch, K. J. Mackenzie, G. J. Balsdon, G. Symonds

A METHOD FOR GRIDLESS ROUTING OF PRINTED CIRCUIT BOARDS. A. C. Finch, K. J. Mackenzie, G. J. Balsdon, G. Symonds A METHOD FOR GRIDLESS ROUTING OF PRINTED CIRCUIT BOARDS A C Finch K J Mackenzie G J Basdon G Symonds Raca-Redac Ltd Newtown Tewkesbury Gos Engand ABSTRACT The introduction of fine-ine technoogies to printed

More information

Register Allocation. Consider the following assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x

Register Allocation. Consider the following assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x Register Aocation Consider the foowing assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x Assume that two registers are avaiabe. Starting from the eft a compier woud generate

More information

Solutions to the Final Exam

Solutions to the Final Exam CS/Math 24: Intro to Discrete Math 5//2 Instructor: Dieter van Mekebeek Soutions to the Fina Exam Probem Let D be the set of a peope. From the definition of R we see that (x, y) R if and ony if x is a

More information

COMDlAL Solo II. TeleDhone. User s Guide :

COMDlAL Solo II. TeleDhone. User s Guide : COMDAL Soo II TeeDhone User s Guide : This pubication is appicabe for the foowing Soo II Teephone modes: 5531 -xx Manufacturing Code REV E and Later 5531 S-xx Manufacturing Code REV F and Later 5432X-xx

More information

C C C C++ 2 ( ) C C++ 4 C C

C C C C++ 2 ( ) C C++ 4 C C # 7 11 13 C 4 8 11 20 C 9 11 27 C++ 1 10 12 4 C++ 2 11 12 11 C++ 3 12 12 18 C++ 4 C++ 5 13 1 8 ( ) 14 1 15 C++ 15 1 22 2 (D) ( ) C++ 3 7 new delete 4 5 1. 0 99 1000 0 99. 0 hist[ r ]++; (*(hist + r ))++;

More information

BEA WebLogic Server. Release Notes for WebLogic Tuxedo Connector 1.0

BEA WebLogic Server. Release Notes for WebLogic Tuxedo Connector 1.0 BEA WebLogic Server Reease Notes for WebLogic Tuxedo Connector 1.0 BEA WebLogic Tuxedo Connector Reease 1.0 Document Date: June 29, 2001 Copyright Copyright 2001 BEA Systems, Inc. A Rights Reserved. Restricted

More information

Distance Weighted Discrimination and Second Order Cone Programming

Distance Weighted Discrimination and Second Order Cone Programming Distance Weighted Discrimination and Second Order Cone Programming Hanwen Huang, Xiaosun Lu, Yufeng Liu, J. S. Marron, Perry Haaand Apri 3, 2012 1 Introduction This vignette demonstrates the utiity and

More information

No connection establishment Do not perform Flow control Error control Retransmission Suitable for small request/response scenario E.g.

No connection establishment Do not perform Flow control Error control Retransmission Suitable for small request/response scenario E.g. UDP & TCP 2018/3/26 UDP Header Characteristics of UDP No connection estabishment Do not perform Fow contro Error contro Retransmission Suitabe for sma request/response scenario E.g., DNS Remote Procedure

More information

NetIQ Access Manager - Advanced Authentication Plugin. Installation Guide. Version 5.1.0

NetIQ Access Manager - Advanced Authentication Plugin. Installation Guide. Version 5.1.0 NetIQ Access Manager - Advanced Authentication Pugin Instaation Guide Version 5.1.0 Tabe of Contents 1 Tabe of Contents 2 Introduction 3 About This Document 3 Environment 4 NetIQ Access Manager Advanced

More information

MCSE TestPrep SQL Server 6.5 Design & Implementation - 3- Data Definition

MCSE TestPrep SQL Server 6.5 Design & Implementation - 3- Data Definition MCSE TestPrep SQL Server 6.5 Design & Impementation - Data Definition Page 1 of 38 [Figures are not incuded in this sampe chapter] MCSE TestPrep SQL Server 6.5 Design & Impementation - 3- Data Definition

More information

An Exponential Time 2-Approximation Algorithm for Bandwidth

An Exponential Time 2-Approximation Algorithm for Bandwidth An Exponentia Time 2-Approximation Agorithm for Bandwidth Martin Fürer 1, Serge Gaspers 2, Shiva Prasad Kasiviswanathan 3 1 Computer Science and Engineering, Pennsyvania State University, furer@cse.psu.edu

More information

Databases and PHP. Accessing databases from PHP

Databases and PHP. Accessing databases from PHP Databases and PHP Accessing databases from PHP PHP & Databases PHP can connect to virtuay any database There are specific functions buit-into PHP to connect with some DB There is aso generic ODBC functions

More information

Hash Tables: Handling Collisions

Hash Tables: Handling Collisions CSE 373: Data Structures and Algorithms Hash Tables: Handling Collisions Autumn 208 Shrirang (Shri) Mare shri@cs.washington.edu Thanks to Kasey Champion, Ben Jones, Adam Blank, Michael Lee, Evan McCarty,

More information

Hash Table and Hashing

Hash Table and Hashing Hash Table and Hashing The tree structures discussed so far assume that we can only work with the input keys by comparing them. No other operation is considered. In practice, it is often true that an input

More information

Algorithms and Data Structures

Algorithms and Data Structures Lesson 4: Sets, Dictionaries and Hash Tables Luciano Bononi http://www.cs.unibo.it/~bononi/ (slide credits: these slides are a revised version of slides created by Dr. Gabriele D Angelo)

More information

Enumeration of MSO Queries on Strings with Constant Delay and Logarithmic Updates

Enumeration of MSO Queries on Strings with Constant Delay and Logarithmic Updates Enumeration of MSO Queries on Strings with Constant Deay and Logarithmic Updates ABSTRACT Matthias Niewerth University of Bayreuth We consider the enumeration of MSO queries over strings under updates.

More information

A Top-to-Bottom View: Energy Analysis for Mobile Application Source Code

A Top-to-Bottom View: Energy Analysis for Mobile Application Source Code A Top-to-Bottom View: Energy Anaysis for Mobie Appication Source Code Xueiang Li John P. Gaagher Roskide University Emai: {xueiang, jpg}@ruc.dk arxiv:1510.04165v1 [cs.oh] 14 Oct 2015 Abstract Energy efficiency

More information

Enumerated Types. CSE 114, Computer Science 1 Stony Brook University

Enumerated Types. CSE 114, Computer Science 1 Stony Brook University Enumerated Types CSE 114, Computer Science 1 Stony Brook University http://www.cs.stonybrook.edu/~cse114 1 Enumerated Types An enumerated type defines a list of enumerated values Each value is an identifier

More information

Objectives. Describe ways to create constants const readonly enum

Objectives. Describe ways to create constants const readonly enum Constants Objectives Describe ways to create constants const readonly enum 2 Motivation Idea of constant is useful makes programs more readable allows more compile time error checking 3 Const Keyword const

More information

JavaScript. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C.

JavaScript. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C. It has been around just about as long as PHP, also having been invented in 1995. JavaScript, HTML, and CSS make

More information

A Memory Grouping Method for Sharing Memory BIST Logic

A Memory Grouping Method for Sharing Memory BIST Logic A Memory Grouping Method for Sharing Memory BIST Logic Masahide Miyazai, Tomoazu Yoneda, and Hideo Fuiwara Graduate Schoo of Information Science, Nara Institute of Science and Technoogy (NAIST), 8916-5

More information

Tables. The Table ADT is used when information needs to be stored and acessed via a key usually, but not always, a string. For example: Dictionaries

Tables. The Table ADT is used when information needs to be stored and acessed via a key usually, but not always, a string. For example: Dictionaries 1: Tables Tables The Table ADT is used when information needs to be stored and acessed via a key usually, but not always, a string. For example: Dictionaries Symbol Tables Associative Arrays (eg in awk,

More information

CSE 143. Linked Lists. Linked Lists. Manipulating Nodes (1) Creating Nodes. Manipulating Nodes (3) Manipulating Nodes (2) CSE 143 1

CSE 143. Linked Lists. Linked Lists. Manipulating Nodes (1) Creating Nodes. Manipulating Nodes (3) Manipulating Nodes (2) CSE 143 1 CSE 143 Linked Lists [Chapter 4; Chapter 6, pp. 265-271] Linked Lists A linked list is a collection of dynamically allocated nodes Each node contains at least one member (field) that points to another

More information

Binarized support vector machines

Binarized support vector machines Universidad Caros III de Madrid Repositorio instituciona e-archivo Departamento de Estadística http://e-archivo.uc3m.es DES - Working Papers. Statistics and Econometrics. WS 2007-11 Binarized support vector

More information

O R A C L E H Y P E R I O N E N T E R P R I S E P E R F O R M A N C E M A N A G E M E N T S Y S T E M

O R A C L E H Y P E R I O N E N T E R P R I S E P E R F O R M A N C E M A N A G E M E N T S Y S T E M O R A C L E H Y P E R I O N E N T E R P R I S E P E R F O R M A N C E M A N A G E M E N T S Y S T E M O R A C L E H Y P E R I O N S T R A T E G I C F I N A N C E, F U S I O N E D I T I O N R E L E A S

More information

libknx Generated by Doxygen Wed Aug :37:55

libknx Generated by Doxygen Wed Aug :37:55 libknx Generated by Doxygen 1.8.1.2 Wed Aug 7 2013 01:37:55 Contents 1 KNX interface library 1 2 Namespace Index 3 2.1 Namespace List............................................ 3 3 Class Index 5 3.1

More information

A Method for Calculating Term Similarity on Large Document Collections

A Method for Calculating Term Similarity on Large Document Collections $ A Method for Cacuating Term Simiarity on Large Document Coections Wofgang W Bein Schoo of Computer Science University of Nevada Las Vegas, NV 915-019 bein@csunvedu Jeffrey S Coombs and Kazem Taghva Information

More information

! A data structure representing a list. ! A series of dynamically allocated nodes. ! A separate pointer (the head) points to the first

! A data structure representing a list. ! A series of dynamically allocated nodes. ! A separate pointer (the head) points to the first Linked Lists Introduction to Linked Lists A data structure representing a Week 8 Gaddis: Chapter 17 CS 5301 Spring 2014 Jill Seaman A series of dynamically allocated nodes chained together in sequence

More information

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Synchronization: Semaphore

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Synchronization: Semaphore CSE120 Principes of Operating Systems Prof Yuanyuan (YY) Zhou Synchronization: Synchronization Needs Two synchronization needs Mutua excusion Whenever mutipe threads access a shared data, you need to worry

More information

Darshan Institute of Engineering & Technology for Diploma Studies Unit 5

Darshan Institute of Engineering & Technology for Diploma Studies Unit 5 1 What is structure? How to declare a Structure? Explain with Example Structure is a collection of logically related data items of different data types grouped together under a single name. Structure is

More information

Lecture 16 More on Hashing Collision Resolution

Lecture 16 More on Hashing Collision Resolution Lecture 16 More on Hashing Collision Resolution Introduction In this lesson we will discuss several collision resolution strategies. The key thing in hashing is to find an easy to compute hash function.

More information

An Introduction to Design Patterns

An Introduction to Design Patterns An Introduction to Design Patterns 1 Definitions A pattern is a recurring soution to a standard probem, in a context. Christopher Aexander, a professor of architecture Why woud what a prof of architecture

More information

Hour 3: Linux Basics Page 1 of 16

Hour 3: Linux Basics Page 1 of 16 Hour 3: Linux Basics Page 1 of 16 Hour 3: Linux Basics Now that you ve instaed Red Hat Linux, you might wonder what to do next. Whether you re the kind of person who earns by jumping right in and starting

More information

Language Identification for Texts Written in Transliteration

Language Identification for Texts Written in Transliteration Language Identification for Texts Written in Transiteration Andrey Chepovskiy, Sergey Gusev, Margarita Kurbatova Higher Schoo of Economics, Data Anaysis and Artificia Inteigence Department, Pokrovskiy

More information

Self-Control Cyclic Access with Time Division - A MAC Proposal for The HFC System

Self-Control Cyclic Access with Time Division - A MAC Proposal for The HFC System Sef-Contro Cycic Access with Time Division - A MAC Proposa for The HFC System S.M. Jiang, Danny H.K. Tsang, Samue T. Chanson Hong Kong University of Science & Technoogy Cear Water Bay, Kowoon, Hong Kong

More information

Computer Networks. College of Computing. Copyleft 2003~2018

Computer Networks. College of Computing.   Copyleft 2003~2018 Computer Networks Computer Networks Prof. Lin Weiguo Coege of Computing Copyeft 2003~2018 inwei@cuc.edu.cn http://icourse.cuc.edu.cn/computernetworks/ http://tc.cuc.edu.cn Attention The materias beow are

More information

CSE120 Principles of Operating Systems. Architecture Support for OS

CSE120 Principles of Operating Systems. Architecture Support for OS CSE120 Principes of Operating Systems Architecture Support for OS Why are you sti here? You shoud run away from my CSE120! 2 CSE 120 Architectura Support Announcement Have you visited the web page? http://cseweb.ucsd.edu/casses/fa18/cse120-a/

More information

Lecture 18. Collision Resolution

Lecture 18. Collision Resolution Lecture 18 Collision Resolution Introduction In this lesson we will discuss several collision resolution strategies. The key thing in hashing is to find an easy to compute hash function. However, collisions

More information

! Tree: set of nodes and directed edges. ! Parent: source node of directed edge. ! Child: terminal node of directed edge

! Tree: set of nodes and directed edges. ! Parent: source node of directed edge. ! Child: terminal node of directed edge Trees (& Heaps) Week 12 Gaddis: 20 Weiss: 21.1-3 CS 5301 Spring 2015 Jill Seaman 1 Tree: non-recursive definition! Tree: set of nodes and directed edges - root: one node is distinguished as the root -

More information

EE 122 Final Exam - Solution Date: December 14, 2002

EE 122 Final Exam - Solution Date: December 14, 2002 Name: SID: ee ogin: Day/Time of section you atten: EE Fina Exam - Soution Date: December 4, 00 Probem Points /0 /0 3 /0 4 /0 5 /0 6 /0 7 /0 8 /0 9 /0 0 /0 Tota /00 . Question (0 pt) (a) (5 pt) Expain briefy

More information

AN EVOLUTIONARY APPROACH TO OPTIMIZATION OF A LAYOUT CHART

AN EVOLUTIONARY APPROACH TO OPTIMIZATION OF A LAYOUT CHART 13 AN EVOLUTIONARY APPROACH TO OPTIMIZATION OF A LAYOUT CHART Eva Vona University of Ostrava, 30th dubna st. 22, Ostrava, Czech Repubic e-mai: Eva.Vona@osu.cz Abstract: This artice presents the use of

More information

Relational Model. Lecture #6 Autumn, Fall, 2001, LRX

Relational Model. Lecture #6 Autumn, Fall, 2001, LRX Reationa Mode Lecture #6 Autumn, 2001 #06 Reationa Mode HUST,Wuhan,China 121 Reationa Mode Tabe = reation. Coumn headers = attributes. Row = tupe Reation schema = name(attributes). Exampe: Beers(name,

More information

2012 Academic Challenge

2012 Academic Challenge 2012 Academic Challenge COMPUTER SCIENCE TEST - REGIONAL This Test Consists of 30 Questions Computer Science Test Production Team Jim Feher, McKendree University Author/Team Leader Nathan White, McKendree

More information

ECE250: Algorithms and Data Structures Midterm Review

ECE250: Algorithms and Data Structures Midterm Review ECE250: Algorithms and Data Structures Midterm Review Ladan Tahvildari, PEng, SMIEEE Associate Professor Software Technologies Applied Research (STAR) Group Dept. of Elect. & Comp. Eng. University of Waterloo

More information

Replication of Virtual Network Functions: Optimizing Link Utilization and Resource Costs

Replication of Virtual Network Functions: Optimizing Link Utilization and Resource Costs Repication of Virtua Network Functions: Optimizing Link Utiization and Resource Costs Francisco Carpio, Wogang Bziuk and Admea Jukan Technische Universität Braunschweig, Germany Emai:{f.carpio, w.bziuk,

More information

3GPP TS V7.1.0 ( )

3GPP TS V7.1.0 ( ) TS 29.199-7 V7.1.0 (2006-12) Technica Specification 3rd Generation Partnership Project; Technica Specification Group Core Network and Terminas; Open Service Access (OSA); Paray X Web Services; Part 7:

More information

Guardian 365 Pro App Guide. For more exciting new products please visit our website: Australia: OWNER S MANUAL

Guardian 365 Pro App Guide. For more exciting new products please visit our website: Australia:   OWNER S MANUAL Guardian 365 Pro App Guide For more exciting new products pease visit our website: Austraia: www.uniden.com.au OWNER S MANUAL Privacy Protection Notice As the device user or data controer, you might coect

More information