Data Structures and Algorithms(2)

Size: px
Start display at page:

Download "Data Structures and Algorithms(2)"

Transcription

1 Mg Zhag Data Structures ad Algorthms Data Structures ad Algorthms(2) Istructor: Mg Zhag Textbook Authors: Mg Zhag, Tegjao Wag ad Haya Zhao Hgher Educato Press, (the "Eleveth Fve-Year" atoal plag textbook)

2 Lear Lst 2. Lear Lst 2.2 Sequetal Lst 2.3 Lked Lst Chapter II Lear Lst a 0 a a 2 a Comparso betwee sequetal lst ad lked lst 2 Mg Zhag Data Structures ad Algorthms

3 Lear 目录页 Lst 2.2 Sequetal Lst 2.2 Sequetal Lst Also kow as the vector, fxed-legth oedmesoal array s used as the storage structure Key Features - Elemets are of the same type - Elemets are sequetally stored cotguous storage space, ad each elemet has a uque dex value - The type of vector legth s costat Implemeted as Array Its elemets are easy to read ad wrte, you ca specfy the locato by usg ts subscrpt - Oce the startg posto s got, all the data elemets of the lst ca be radom accessed 3 Zhag Mg Data Structures ad Algorthms

4 Lear 目录页 Lst 2.2 Sequetal Lst 2.2 Sequetal Lst The formula to calculate the elemets of locato s show as below: 元素地址计算如下所示 : Loc k = Loc k 0 + c, c = szeof(elem) Logcal Address (Subscrpt) Data elemets Store Address Data elemets 0 k 0 Loc(k 0 ) k 0 k Loc(k 0 )+c k k Loc(k 0 )+*c k - k - Loc(k 0 )+(-)*c k - 4 Zhag Mg Data Structures ad Algorthms

5 Lear 目录页 Lst Lear Lst Sequece Lst s Class Defto class arrlst : publc Lst<T> { // sequetal lst,vector prvate: // value types ad value space of lear lst T * alst ; // prvate varables,stace of storage for sequetal lst t maxsze; // prvate varables,maxmum legth of the sequetal lst t curle; // prvate varables,curret legth of the sequetal lst t posto; // prvate varables,curret operato locato publc: arrlst(cost t sze) { // costruct a ew lst,set ts legth to the maxmum maxsze = sze; alst = ew T[maxSze]; curle = posto = 0; ~arrlst() { // destructor fucto used to elmate the stace delete [] alst; 5 Zhag Mg Data Structures ad Algorthms

6 目录页 Lear Lst 2.2 Sequetal Lst Sequece Lst s Class Defto ; vod clear() { // delete the cotet,becomg a empty lst delete [] alst; curle = posto = 0; alst = ew T[maxSze]; t legth(); // returs the curret legth bool apped(cost T value); // apped elemet v at ed bool sert(cost t p, cost T value); // sert a elemet at P bool delete(cost t p); // delete the elemet at P bool setvalue(cost t p, cost T value); // set the value of a elemet bool getvalue(cost t p, T& value); // retur the value of a elemet bool getpos(t &p, cost T value); // seek for a elemet 6 Zhag Mg Data Structures ad Algorthms

7 Lear Lst 目录页 2.2 Sequetal Lst Operatos Sequetal Lst Key dscussos Isert elemet operato bool sert(cost t p, cost T value); Delete elemet operato bool delete(cost t p); Others (Thk by yourselves) 7 Zhag Mg Data Structures ad Algorthms

8 目录页 Lear Lst 2.2 Sequetal Lst Dagram for the serto of sequetal lst k 0 k 0 k k X curr k 2 k 3 X curr k 2 k 3 k 4 k 4 k 5 k 5 8 Zhag Mg Data Structures ad Algorthms

9 Lear Lst 目录页 2.2 Sequetal Lst Iserto of sequetal lst // set the elemet type as T, alst s the array to store Sequetal lst, // maxsze s ts maxmum legth; // p s the sert locato of the ew elemet,retur true f succeeds, // otherwse retur false template <class T> bool arrlst<t> :: sert (cost t p, cost T value) { t ; f (curle >= maxsze) { // check f the SL s overflow cout << "The lst s overflow"<< edl; retur false; f (p < 0 p > curle) { // check f the posto to sert s vald cout << "Iserto pot s llegal"<< edl; retur false; for ( = curle; > p; --) alst[] = alst[-]; // move rght from the ed curle - of the lst utl p alst[p] = value; // sert a ew elemet at p curle++; // adds the curret legth of the lst by retur true; 9 Zhag Mg Data Structures ad Algorthms

10 Lear 目录页 Lst 2.2 Sequetal Lst Dagram for sequetal lst s delete operato 2.2 Sequetal Lst k 0 k 0 k k curr k 2 k 3 curr k 2 k 3 k 4 k 5 k 4 k 5 k 6 k 6 0 Zhag Mg Data Structures ad Algorthms

11 Lear Lst 目录页 2.2 Sequetal Lst Delete operato sequetal lst // set the type of the elemet as T;aLs s the array to store sequetal lst // ad p s the posto of elemets to delete // returs true whe delete succeed,otherwse returs false template <class T> // the type of the elemets of SL s T bool arrlst<t> :: delete(cost t p) { t ; f (curle <= 0 ) { // Check f the SL s empty cout << " No elemet to delete \"<< edl; retur false ; f (p < 0 p > curle-) { cout << "deleto s llegal\"<< edl; retur false ; for ( = p; < curle-; ++) alst[] = alst[+]; // Check f the posto s vald // [p, currle) every elemet move left curle--; // the curret legth of the lst decreases by retur true; Zhag Mg Data Structures ad Algorthms

12 Lear 目录页 Lst Algorthm aalyss of sert ad delete operatos sequetal lst The movemet of elemets the lst Isert: move Delete: move 2.2 Sequetal Lst The probablty values to sert or delete posto are respectvely p ad p The average move tme for sert operato s M = =0 p The average move tme of delete operato s M d = =0 p 2 张铭 数据结构与算法

13 3 目录页张铭 数据结构与算法 Algorthm Aalyss If the probablty to sert or delete every locato SL s the same, amely p = +, p = 2.2 Sequetal Lst Lear Lst Chapter II 2 ) 2( ) ( ) ( ) ( ) ( M 2 2 ) ( ) ( ) ( M d Tme cost s O()

14 Lear 目录页 Lst 2.2 Sequetal Lst Thkg What should you thk about whe dog sert or delete operatos sequetal lst? What advatages ad dsadvatages does sequetal lst have? 4 Zhag Mg Data Structures ad Algorthms

15 Mg Zhag Data Structures ad Algorthms Data Structures ad Algorthms Thaks the Natoal Elaborate Course (Oly avalable for IPs Cha) Mg Zhag, Tegjao Wag ad Haya Zhao Hgher Educato Press, (awarded as the "Eleveth Fve-Year" atoal plag textbook)

COMSC 2613 Summer 2000

COMSC 2613 Summer 2000 Programmg II Fal Exam COMSC 63 Summer Istructos: Name:. Prt your ame the space provded Studet Id:. Prt your studet detfer the space Secto: provded. Date: 3. Prt the secto umber of the secto whch you are

More information

Bezier curves. 1. Defining a Bezier curve. A closed Bezier curve can simply be generated by closing its characteristic polygon

Bezier curves. 1. Defining a Bezier curve. A closed Bezier curve can simply be generated by closing its characteristic polygon Curve represetato Copyrght@, YZU Optmal Desg Laboratory. All rghts reserved. Last updated: Yeh-Lag Hsu (--). Note: Ths s the course materal for ME55 Geometrc modelg ad computer graphcs, Yua Ze Uversty.

More information

Data Structures and Algorithms(1)

Data Structures and Algorithms(1) Ming Zhang Data Structures and Algorithms Data Structures and Algorithms(1) Instructor: Ming Zhang Textbook Authors: Ming Zhang, Tengjiao Wang and Haiyan Zhao Higher Education Press, 2008.6 (the "Eleventh

More information

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions:

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions: CS 604 Data Structures Midterm Sprig, 00 VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Istructios: Prit your ame i the space provided below. This examiatio is closed book ad closed

More information

Beijing University of Technology, Beijing , China; Beijing University of Technology, Beijing , China;

Beijing University of Technology, Beijing , China; Beijing University of Technology, Beijing , China; d Iteratoal Coferece o Machery, Materals Egeerg, Chemcal Egeerg ad Botechology (MMECEB 5) Research of error detecto ad compesato of CNC mache tools based o laser terferometer Yuemg Zhag, a, Xuxu Chu, b

More information

1-D matrix method. U 4 transmitted. incident U 2. reflected U 1 U 5 U 3 L 2 L 3 L 4. EE 439 matrix method 1

1-D matrix method. U 4 transmitted. incident U 2. reflected U 1 U 5 U 3 L 2 L 3 L 4. EE 439 matrix method 1 -D matrx method We ca expad the smple plae-wave scatterg for -D examples that we ve see to a more versatle matrx approach that ca be used to hadle may terestg -D problems. The basc dea s that we ca break

More information

Machine Learning: Algorithms and Applications

Machine Learning: Algorithms and Applications /03/ Mache Learg: Algorthms ad Applcatos Florao Z Free Uversty of Boze-Bolzao Faculty of Computer Scece Academc Year 0-0 Lecture 3: th March 0 Naïve Bayes classfer ( Problem defto A trag set X, where each

More information

For all questions, answer choice E) NOTA" means none of the above answers is correct. A) 50,500 B) 500,000 C) 500,500 D) 1,001,000 E) NOTA

For all questions, answer choice E) NOTA means none of the above answers is correct. A) 50,500 B) 500,000 C) 500,500 D) 1,001,000 E) NOTA For all questos, aswer choce " meas oe of the above aswers s correct.. What s the sum of the frst 000 postve tegers? A) 50,500 B) 500,000 C) 500,500 D),00,000. What s the sum of the tegers betwee 00 ad

More information

Biconnected Components

Biconnected Components Presetato for use wth the textbook, Algorthm Desg ad Applcatos, by M. T. Goodrch ad R. Tamassa, Wley, 2015 Bcoected Compoets SEA PVD ORD FCO SNA MIA 2015 Goodrch ad Tamassa Bcoectvty 1 Applcato: Networkg

More information

Optimal Allocation of Complex Equipment System Maintainability

Optimal Allocation of Complex Equipment System Maintainability Optmal Allocato of Complex Equpmet System ataablty X Re Graduate School, Natoal Defese Uversty, Bejg, 100091, Cha edcal Protecto Laboratory, Naval edcal Research Isttute, Shagha, 200433, Cha Emal:rexs841013@163.com

More information

ANALYSIS OF VARIANCE WITH PARETO DATA

ANALYSIS OF VARIANCE WITH PARETO DATA Proceedgs of the th Aual Coferece of Asa Pacfc Decso Sceces Isttute Hog Kog, Jue -8, 006, pp. 599-609. ANALYSIS OF VARIANCE WITH PARETO DATA Lakhaa Watthaacheewakul Departmet of Mathematcs ad Statstcs,

More information

Descriptive Statistics: Measures of Center

Descriptive Statistics: Measures of Center Secto 2.3 Descrptve Statstcs: Measures of Ceter Frequec dstrbutos are helpful provdg formato about categorcal data, but wth umercal data we ma wat more formato. Statstc: s a umercal measure calculated

More information

Differentiated Service of Streaming Media Playback Technology

Differentiated Service of Streaming Media Playback Technology Iteratoal Coferece o Advaced Iformato ad Commucato Techology for Educato (ICAICTE 2013) Dfferetated Servce of Streamg Meda Playback Techology CHENG Z-ao 1 MENG Bo 1 WANG Da-hua 1 ZHAO Yue 1 1 Iformatzato

More information

Enumerating XML Data for Dynamic Updating

Enumerating XML Data for Dynamic Updating Eumeratg XML Data for Dyamc Updatg Lau Ho Kt ad Vcet Ng Departmet of Computg, The Hog Kog Polytechc Uversty, Hug Hom, Kowloo, Hog Kog cstyg@comp.polyu.edu.h Abstract I ths paper, a ew mappg model, called

More information

Airline Fleet Routing and Flight Scheduling under Market Competitions. Tang and Ming-Chei

Airline Fleet Routing and Flight Scheduling under Market Competitions. Tang and Ming-Chei Arle Fleet Routg ad Flght Schedulg uder Market Compettos Shagyao Ya, Ch-Hu Tag ad Mg-Che Lee Departmet of Cvl Egeerg, Natoal Cetral Uversty 3/12/2009 Itroducto Lterature revew The model Soluto method Numercal

More information

MATHEMATICAL PROGRAMMING MODEL OF THE CRITICAL CHAIN METHOD

MATHEMATICAL PROGRAMMING MODEL OF THE CRITICAL CHAIN METHOD MATHEMATICAL PROGRAMMING MODEL OF THE CRITICAL CHAIN METHOD TOMÁŠ ŠUBRT, PAVLÍNA LANGROVÁ CUA, SLOVAKIA Abstract Curretly there s creasgly dcated that most of classcal project maagemet methods s ot sutable

More information

LP: example of formulations

LP: example of formulations LP: eample of formulatos Three classcal decso problems OR: Trasportato problem Product-m problem Producto plag problem Operatos Research Massmo Paolucc DIBRIS Uversty of Geova Trasportato problem The decso

More information

From Math to Efficient Hardware. James C. Hoe Department of ECE Carnegie Mellon University

From Math to Efficient Hardware. James C. Hoe Department of ECE Carnegie Mellon University FFT Compler: From Math to Effcet Hardware James C. Hoe Departmet of ECE Carege Mello Uversty jot wor wth Peter A. Mlder, Fraz Frachett, ad Marus Pueschel the SPIRAL project wth support from NSF ACR-3493,

More information

PERSPECTIVES OF THE USE OF GENETIC ALGORITHMS IN CRYPTANALYSIS

PERSPECTIVES OF THE USE OF GENETIC ALGORITHMS IN CRYPTANALYSIS PERSPECTIVES OF THE USE OF GENETIC ALGORITHMS IN CRYPTANALYSIS Lal Besela Sokhum State Uversty, Poltkovskaa str., Tbls, Georga Abstract Moder cryptosystems aalyss s a complex task, the soluto of whch s

More information

Linked Lists 11/16/18. Preliminaries. Java References. Objects and references. Self references. Linking self-referential nodes

Linked Lists 11/16/18. Preliminaries. Java References. Objects and references. Self references. Linking self-referential nodes Prelimiaries Liked Lists public class StrageObject { Strig ame; StrageObject other; Arrays are ot always the optimal data structure: A array has fixed size eeds to be copied to expad its capacity Addig

More information

top() Applications of Stacks

top() Applications of Stacks CS22 Algorithms ad Data Structures MW :00 am - 2: pm, MSEC 0 Istructor: Xiao Qi Lecture 6: Stacks ad Queues Aoucemets Quiz results Homework 2 is available Due o September 29 th, 2004 www.cs.mt.edu~xqicoursescs22

More information

CIS 121. Introduction to Trees

CIS 121. Introduction to Trees CIS 121 Itroductio to Trees 1 Tree ADT Tree defiitio q A tree is a set of odes which may be empty q If ot empty, the there is a distiguished ode r, called root ad zero or more o-empty subtrees T 1, T 2,

More information

Speeding- Up Fractal Image Compression Using Entropy Technique

Speeding- Up Fractal Image Compression Using Entropy Technique Avalable Ole at www.jcsmc.com Iteratoal Joural of Computer Scece ad Moble Computg A Mothly Joural of Computer Scece ad Iformato Techology ISSN 2320 088X IMPACT FACTOR: 5.258 IJCSMC, Vol. 5, Issue. 4, Aprl

More information

Managing Moving Objects on Dynamic Transportation Networks

Managing Moving Objects on Dynamic Transportation Networks Maagg Movg Objects o Dyamc Trasportato Networks Zhmg Dg Ralf Hartmut Gütg Praktsche Iformatk IV, Feruverstät Hage, D-58084 Hage, Germay {zhmg.dg, rhg}@feru-hage.de Abstract Oe of the key research ssues

More information

Data Structures and Algorithms(3)

Data Structures and Algorithms(3) Ming Zhang Data Structures and Algorithms Data Structures and Algorithms(3) Instructor: Ming Zhang Textbook Authors: Ming Zhang, Tengjiao Wang and Haiyan Zhao Higher Education Press, 2008.6 (the "Eleventh

More information

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 201 Heaps 201 Goodrich ad Tamassia xkcd. http://xkcd.com/83/. Tree. Used with permissio uder

More information

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures Uiversity of Waterloo Departmet of Electrical ad Computer Egieerig ECE 250 Algorithms ad Data Structures Midterm Examiatio ( pages) Istructor: Douglas Harder February 7, 2004 7:30-9:00 Name (last, first)

More information

SVM Classification Method Based Marginal Points of Representative Sample Sets

SVM Classification Method Based Marginal Points of Representative Sample Sets P P College P P College P Iteratoal Joural of Iformato Techology Vol. No. 9 005 SVM Classfcato Method Based Margal Pots of Represetatve Sample Sets Wecag ZhaoP P, Guagrog JP P, Ru NaP P, ad Che FegP of

More information

A Novel Optimization Algorithm for Adaptive Simplex Method with Application to High Dimensional Functions

A Novel Optimization Algorithm for Adaptive Simplex Method with Application to High Dimensional Functions A Novel Optmzato Algorthm for Adaptve Smplex Method th Applcato to Hgh Dmesoal Fuctos ZuoYg LIU, XaWe LUO 2 Southest Uversty Chogqg 402460, Cha, zuyglu@alyu.com 2 Southest Uversty Chogqg 402460, Cha, xael@su.edu.c.

More information

Mesh Connectivity Compression for Progressive-to-Lossless Transmission

Mesh Connectivity Compression for Progressive-to-Lossless Transmission Mesh Coectvty Compresso for Progressve-to-Lossless Trasmsso Pegwe Hao, Yaup Paer ad Ala Pearma ISSN 1470-5559 RR-05-05 Jue 005 Departmet of Computer Scece Mesh Coectvty Compresso for Progressve-to-Lossless

More information

Eight Solved and Eight Open Problems in Elementary Geometry

Eight Solved and Eight Open Problems in Elementary Geometry Eght Solved ad Eght Ope Problems Elemetary Geometry Floret Smaradache Math & Scece Departmet Uversty of New Mexco, Gallup, US I ths paper we revew eght prevous proposed ad solved problems of elemetary

More information

CS 111: Program Design I Lecture 16: Module Review, Encodings, Lists

CS 111: Program Design I Lecture 16: Module Review, Encodings, Lists CS 111: Program Desig I Lecture 16: Module Review, Ecodigs, Lists Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago October 18, 2016 Last time Dot otatio ad methods Padas: user maual poit

More information

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13 CIS Data Structures ad Algorithms with Java Sprig 08 Stacks ad Queues Moday, February / Tuesday, February Learig Goals Durig this lab, you will: Review stacks ad queues. Lear amortized ruig time aalysis

More information

Adaptive Clustering Algorithm for Mining Subspace Clusters in High-Dimensional Data Stream *

Adaptive Clustering Algorithm for Mining Subspace Clusters in High-Dimensional Data Stream * ISSN 673-948 CODEN JKYTA8 E-mal: fcst@vp.63.com Joural of Froters of Computer Scece ad Techology http://www.ceaj.org 673-948/200/04(09)-0859-06 Tel: +86-0-566056 DOI: 0.3778/j.ss.673-948.200.09.009 *,2,

More information

A Type of Variation of Hamilton Path Problem with Applications

A Type of Variation of Hamilton Path Problem with Applications Edth Cowa Uersty Research Ole ECU Publcatos Pre. 20 2008 A Type of Varato of Hamlto Path Problem wth Applcatos Jta Xao Edth Cowa Uersty Ju Wag Wezhou Uersty, Zhejag, Cha 0.09/ICYCS.2008.470 Ths artcle

More information

A New Newton s Method with Diagonal Jacobian Approximation for Systems of Nonlinear Equations

A New Newton s Method with Diagonal Jacobian Approximation for Systems of Nonlinear Equations Joural of Mathematcs ad Statstcs 6 (3): 46-5, ISSN 549-3644 Scece Publcatos A New Newto s Method wth Dagoal Jacoba Appromato for Systems of Nolear Equatos M.Y. Wazr, W.J. Leog, M.A. Hassa ad M. Mos Departmet

More information

A graphical view of big-o notation. c*g(n) f(n) f(n) = O(g(n))

A graphical view of big-o notation. c*g(n) f(n) f(n) = O(g(n)) ca see that time required to search/sort grows with size of We How do space/time eeds of program grow with iput size? iput. time: cout umber of operatios as fuctio of iput Executio size operatio Assigmet:

More information

MINIMIZATION OF THE VALUE OF DAVIES-BOULDIN INDEX

MINIMIZATION OF THE VALUE OF DAVIES-BOULDIN INDEX MIIMIZATIO OF THE VALUE OF DAVIES-BOULDI IDEX ISMO ÄRÄIE ad PASI FRÄTI Departmet of Computer Scece, Uversty of Joesuu Box, FI-800 Joesuu, FILAD ABSTRACT We study the clusterg problem whe usg Daves-Bould

More information

UNIT 4C Iteration: Scalability & Big O. Efficiency

UNIT 4C Iteration: Scalability & Big O. Efficiency UNIT 4C Iteratio: Scalability & Big O 1 Efficiecy A computer program should be totally correct, but it should also execute as quickly as possible (time-efficiecy) use memory wisely (storage-efficiecy)

More information

Data Structures Week #5. Trees (Ağaçlar)

Data Structures Week #5. Trees (Ağaçlar) Data Structures Week #5 Trees Ağaçlar) Trees Ağaçlar) Toros Gökarı Avrupa Gökarı October 28, 2014 Boraha Tümer, Ph.D. 2 Trees Ağaçlar) October 28, 2014 Boraha Tümer, Ph.D. 3 Outlie Trees Deiitios Implemetatio

More information

Face Recognition using Supervised & Unsupervised Techniques

Face Recognition using Supervised & Unsupervised Techniques Natoal Uversty of Sgapore EE5907-Patter recogto-2 NAIONAL UNIVERSIY OF SINGAPORE EE5907 Patter Recogto Project Part-2 Face Recogto usg Supervsed & Usupervsed echques SUBMIED BY: SUDEN NAME: harapa Reddy

More information

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3

More information

CSE 417: Algorithms and Computational Complexity

CSE 417: Algorithms and Computational Complexity Time CSE 47: Algorithms ad Computatioal Readig assigmet Read Chapter of The ALGORITHM Desig Maual Aalysis & Sortig Autum 00 Paul Beame aalysis Problem size Worst-case complexity: max # steps algorithm

More information

Preventing Information Leakage in C Applications Using RBAC-Based Model

Preventing Information Leakage in C Applications Using RBAC-Based Model Proceedgs of the 5th WSEAS It. Cof. o Software Egeerg Parallel ad Dstrbuted Systems Madrd Spa February 5-7 2006 (pp69-73) Prevetg Iformato Leakage C Applcatos Usg RBAC-Based Model SHIH-CHIEN CHOU Departmet

More information

PRIVATE set intersection (PSI) is a cryptographic protocol that

PRIVATE set intersection (PSI) is a cryptographic protocol that Effcet Delegated Prvate Set Itersecto o Outsourced Prvate Datasets Ayd Abad, Sotros Terzs, Roberto Metere, Chagyu Dog Abstract Prvate set tersecto (PSI) s a essetal cryptographc protocol that has may real

More information

Blind Steganalysis for Digital Images using Support Vector Machine Method

Blind Steganalysis for Digital Images using Support Vector Machine Method 06 Iteratoal Symposum o Electrocs ad Smart Devces (ISESD) November 9-30, 06 Bld Stegaalyss for Dgtal Images usg Support Vector Mache Method Marcelus Hery Meor School of Electrcal Egeerg ad Iformatcs Badug

More information

Computational Geometry

Computational Geometry Computatioal Geometry Chapter 4 Liear programmig Duality Smallest eclosig disk O the Ageda Liear Programmig Slides courtesy of Craig Gotsma 4. 4. Liear Programmig - Example Defie: (amout amout cosumed

More information

Recurrent Formulas of the Generalized Fibonacci Sequences of Third & Fourth Order

Recurrent Formulas of the Generalized Fibonacci Sequences of Third & Fourth Order Natioal Coferece o 'Advaces i Computatioal Mathematics' 7-8 Sept.03 :- 49 Recurret Formulas of the Geeralized Fiboacci Sequeces of hird & Fourth Order A. D.Godase Departmet of Mathematics V.P.College Vaijapur

More information

CSE 111 Bio: Program Design I Lecture 17: software development, list methods

CSE 111 Bio: Program Design I Lecture 17: software development, list methods CSE 111 Bio: Program Desig I Lecture 17: software developmet, list methods Robert H. Sloa(CS) & Rachel Poretsky(Bio) Uiversity of Illiois, Chicago October 19, 2017 NESTED LOOPS: REVIEW Geerate times table

More information

Developer Recommendation with Awareness of Accuracy and Cost

Developer Recommendation with Awareness of Accuracy and Cost Developer Recommedato wth Awareess of Accuracy ad Cost * J Lu, Yquz Ta State Key Lab of Software Egeerg Computer School, Wuha Uversty Wuha, Cha *Correspodg author jlu@whu.edu.c tayquz@whu.edu.c Lag Hog

More information

Overview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup

Overview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup Chapter 18 Vectors ad Arrays Bjare Stroustrup Vector revisited How are they implemeted? Poiters ad free store Destructors Iitializatio Copy ad move Arrays Array ad poiter problems Chagig size Templates

More information

Advanced Information Technology of Slot-Switching Network Schemes for on All-Optical Variable-Length Packet

Advanced Information Technology of Slot-Switching Network Schemes for on All-Optical Variable-Length Packet Joural of Computer Scece 6 (): -, 200 ISS 549-3636 200 Scece Publcatos Advaced Iformato Techology of Slot-Swtchg etwork Schemes for o All-Optcal Varable-Legth Packet Soug Yue Lew, 2 Edward Sek Kh Wog ad

More information

Homework 1 Solutions MA 522 Fall 2017

Homework 1 Solutions MA 522 Fall 2017 Homework 1 Solutios MA 5 Fall 017 1. Cosider the searchig problem: Iput A sequece of umbers A = [a 1,..., a ] ad a value v. Output A idex i such that v = A[i] or the special value NIL if v does ot appear

More information

Improved MOPSO Algorithm Based on Map-Reduce Model in Cloud Resource Scheduling

Improved MOPSO Algorithm Based on Map-Reduce Model in Cloud Resource Scheduling Improved MOPSO Algorthm Based o Map-Reduce Model Cloud Resource Schedulg Heg-We ZHANG, Ka NIU *, J-Dog WANG, Na WANG Zhegzhou Isttute of Iformato Scece ad Techology, Zhegzhou 45000, Cha State Key Laboratory

More information

DATA STRUCTURES. amortized analysis binomial heaps Fibonacci heaps union-find. Data structures. Appetizer. Appetizer

DATA STRUCTURES. amortized analysis binomial heaps Fibonacci heaps union-find. Data structures. Appetizer. Appetizer Data structures DATA STRUCTURES Static problems. Give a iput, produce a output. Ex. Sortig, FFT, edit distace, shortest paths, MST, max-flow,... amortized aalysis biomial heaps Fiboacci heaps uio-fid Dyamic

More information

A Comparison of Heuristics for Scheduling Spatial Clusters to Reduce I/O Cost in Spatial Join Processing

A Comparison of Heuristics for Scheduling Spatial Clusters to Reduce I/O Cost in Spatial Join Processing Edth Cowa Uversty Research Ole ECU Publcatos Pre. 20 2006 A Comparso of Heurstcs for Schedulg Spatal Clusters to Reduce I/O Cost Spatal Jo Processg Jta Xao Edth Cowa Uversty 0.09/ICMLC.2006.258779 Ths

More information

最短路径算法 Dijkstra 一 图的邻接表存储结构及实现 ( 回顾 ) 1. 头文件 graph.h. // Graph.h: interface for the Graph class. #if!defined(afx_graph_h C891E2F0_794B_4ADD_8772_55BA3

最短路径算法 Dijkstra 一 图的邻接表存储结构及实现 ( 回顾 ) 1. 头文件 graph.h. // Graph.h: interface for the Graph class. #if!defined(afx_graph_h C891E2F0_794B_4ADD_8772_55BA3 最短路径算法 Dijkstra 一 图的邻接表存储结构及实现 ( 回顾 ) 1. 头文件 graph.h // Graph.h: interface for the Graph class. #if!defined(afx_graph_h C891E2F0_794B_4ADD_8772_55BA3 67C823E INCLUDED_) #define AFX_GRAPH_H C891E2F0_794B_4ADD_8772_55BA367C823E

More information

Abstract Data Types (ADTs) Stacks. The Stack ADT ( 4.2) Stack Interface in Java

Abstract Data Types (ADTs) Stacks. The Stack ADT ( 4.2) Stack Interface in Java Abstract Data Types (ADTs) tacks A abstract data type (ADT) is a abstractio of a data structure A ADT specifies: Data stored Operatios o the data Error coditios associated with operatios Example: ADT modelig

More information

How do we evaluate algorithms?

How do we evaluate algorithms? F2 Readig referece: chapter 2 + slides Algorithm complexity Big O ad big Ω To calculate ruig time Aalysis of recursive Algorithms Next time: Litterature: slides mostly The first Algorithm desig methods:

More information

An Improved Fuzzy C-Means Clustering Algorithm Based on Potential Field

An Improved Fuzzy C-Means Clustering Algorithm Based on Potential Field 07 d Iteratoal Coferece o Advaces Maagemet Egeerg ad Iformato Techology (AMEIT 07) ISBN: 978--60595-457-8 A Improved Fuzzy C-Meas Clusterg Algorthm Based o Potetal Feld Yua-hag HAO, Zhu-chao YU *, X GAO

More information

Fitting. We ve learned how to detect edges, corners, blobs. Now what? We would like to form a. compact representation of

Fitting. We ve learned how to detect edges, corners, blobs. Now what? We would like to form a. compact representation of Fttg Fttg We ve leared how to detect edges, corers, blobs. Now what? We would lke to form a hgher-level, h l more compact represetato of the features the mage b groupg multple features accordg to a smple

More information

Grid Resource Discovery Algorithm Based on Distance

Grid Resource Discovery Algorithm Based on Distance 966 JOURNAL OF SOFTWARE, OL. 9, NO., NOEMBER 4 Grd Resource Dscovery Algorthm Based o Dstace Zhogpg Zhag,, Log He, Chao Zhag The School of Iformato Scece ad Egeerg, Yasha Uversty, Qhuagdao, Hebe, 664,

More information

Hash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.

Hash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015. Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Hash Tables xkcd. http://xkcd.com/221/. Radom Number. Used with permissio uder Creative

More information

Algorithm. Counting Sort Analysis of Algorithms

Algorithm. Counting Sort Analysis of Algorithms Algorithm Coutig Sort Aalysis of Algorithms Assumptios: records Coutig sort Each record cotais keys ad data All keys are i the rage of 1 to k Space The usorted list is stored i A, the sorted list will

More information

A Perfect Load Balancing Algorithm on Cube-Connected Cycles

A Perfect Load Balancing Algorithm on Cube-Connected Cycles Proceedgs of the 5th WSEAS It Cof o COMPUTATIONAL INTELLIGENCE, MAN-MACINE SYSTEMS AND CYBERNETICS, Vece, Italy, November -, 6 45 A Perfect Load Balacg Algorthm o Cube-Coected Cycles Gee Eu Ja Shao-We

More information

An Efficient Approach to Mining Frequent Itemsets on Data Streams

An Efficient Approach to Mining Frequent Itemsets on Data Streams A Effcet Approach to Mg Frequet Itemsets o Data Streams Sara Asar, ad Mohammad Had Sadredd Abstract The creasg mportace of data stream arsg a wde rage of advaced applcatos has led to the extesve study

More information

A Dynamic Bayesian Network Model for Hierarchial Classification and its Application in Predicting Yeast Genes Functions

A Dynamic Bayesian Network Model for Hierarchial Classification and its Application in Predicting Yeast Genes Functions Assocato for Iformato Systems AIS Electroc Lbrary (AISeL AMCIS 2005 Proceedgs Amercas Coferece o Iformato Systems (AMCIS 2005 A Dyamc Bayesa Networ Model for Herarchal Classfcato ad ts Applcato Predctg

More information

Lecture 7. Binary Trees

Lecture 7. Binary Trees Lecture 7. Binary Trees Instructor: 罗国杰 gluo@pku.edu.cn School of EECS Peking University Outline Preliminaries of trees Basic concepts Example: trees in a file system Binary trees Full, complete, extended

More information

Abstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup Note:

Abstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup   Note: Chapter 4 Computatio Bjare Stroustrup www.stroustrup.com/programmig Abstract Today, I ll preset the basics of computatio. I particular, we ll discuss expressios, how to iterate over a series of values

More information

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4

More information

Data Structures and Algorithms Part 1.4

Data Structures and Algorithms Part 1.4 1 Data Structures ad Algorithms Part 1.4 Werer Nutt 2 DSA, Part 1: Itroductio, syllabus, orgaisatio Algorithms Recursio (priciple, trace, factorial, Fiboacci) Sortig (bubble, isertio, selectio) 3 Sortig

More information

Recursive Procedures. How can you model the relationship between consecutive terms of a sequence?

Recursive Procedures. How can you model the relationship between consecutive terms of a sequence? 6. Recursive Procedures I Sectio 6.1, you used fuctio otatio to write a explicit formula to determie the value of ay term i a Sometimes it is easier to calculate oe term i a sequece usig the previous terms.

More information

Web Page Clustering by Combining Dense Units

Web Page Clustering by Combining Dense Units Web Page Clusterg by Combg Dese Uts Morteza Haghr Chehregha, Hassa Abolhassa ad Mostafa Haghr Chehregha Departmet of CE, Sharf Uversty of Techology, Tehra, IRA {haghr, abolhassa}@ce.sharf.edu Departmet

More information

AN IMPROVED TEXT CLASSIFICATION METHOD BASED ON GINI INDEX

AN IMPROVED TEXT CLASSIFICATION METHOD BASED ON GINI INDEX Joural of Theoretcal ad Appled Iformato Techology 30 th September 0. Vol. 43 No. 005-0 JATIT & LLS. All rghts reserved. ISSN: 99-8645 www.jatt.org E-ISSN: 87-395 AN IMPROVED TEXT CLASSIFICATION METHOD

More information

Application of Genetic Algorithm for Computing a Global 3D Scene Exploration

Application of Genetic Algorithm for Computing a Global 3D Scene Exploration Joural of Software Egeerg ad Applcatos, 2011, 4, 253-258 do:10.4236/jsea.2011.44028 Publshed Ole Aprl 2011 (http://www.scrp.org/joural/jsea) 253 Applcato of Geetc Algorthm for Computg a Global 3D Scee

More information

On (K t e)-saturated Graphs

On (K t e)-saturated Graphs Noame mauscript No. (will be iserted by the editor O (K t e-saturated Graphs Jessica Fuller Roald J. Gould the date of receipt ad acceptace should be iserted later Abstract Give a graph H, we say a graph

More information

Package RcppRoll. December 22, 2014

Package RcppRoll. December 22, 2014 Type Package Package RcppRoll December 22, 2014 Title Fast rollig fuctios through Rcpp ad RcppArmadillo Versio 0.1.0 Date 2013-01-10 Author Kevi Ushey Maitaier Kevi Ushey RcppRoll

More information

Transistor/Gate Sizing Optimization

Transistor/Gate Sizing Optimization Trasstor/Gate Szg Optmzato Gve: Logc etwork wth or wthout cell lbrary Fd: Optmal sze for each trasstor/gate to mmze area or power, both uder delay costrat Statc szg: based o tmg aalyss ad cosder all paths

More information

International Mathematical Forum, 1, 2006, no. 31, ON JONES POLYNOMIALS OF GRAPHS OF TORUS KNOTS K (2, q ) Tamer UGUR, Abdullah KOPUZLU

International Mathematical Forum, 1, 2006, no. 31, ON JONES POLYNOMIALS OF GRAPHS OF TORUS KNOTS K (2, q ) Tamer UGUR, Abdullah KOPUZLU Iteratoal Mathematcal Forum,, 6, o., 57-54 ON JONES POLYNOMIALS OF RAPHS OF TORUS KNOTS K (, q ) Tamer UUR, Abdullah KOPUZLU Atatürk Uverst Scece Facult Dept. of. Math. 54 Erzurum, Turkey tugur@atau.edu.tr

More information

Recursion. Recursion. Mathematical induction: example. Recursion. The sum of the first n odd numbers is n 2 : Informal proof: Principle:

Recursion. Recursion. Mathematical induction: example. Recursion. The sum of the first n odd numbers is n 2 : Informal proof: Principle: Recursio Recursio Jordi Cortadella Departmet of Computer Sciece Priciple: Reduce a complex problem ito a simpler istace of the same problem Recursio Itroductio to Programmig Dept. CS, UPC 2 Mathematical

More information

d. 90, 118 Throttle to 104%

d. 90, 118 Throttle to 104% Nme: Clss: Dte: By redg vlues from the gve grph of f, use fve rectgles to fd lower estmte d upper estmte, respectvely, for the re uder the gve grph of f from = to =. Whe we estmte dstces from velocty dt,

More information

! Given the following Structure: ! We can define a pointer to a structure. ! Now studentptr points to the s1 structure.

! Given the following Structure: ! We can define a pointer to a structure. ! Now studentptr points to the s1 structure. Liked Lists Uit 5 Sectios 11.9 & 18.1-2 CS 2308 Fall 2018 Jill Seama 11.9: Poiters to Structures! Give the followig Structure: struct Studet { strig ame; // Studet s ame it idnum; // Studet ID umber it

More information

Search and Surveillance in emergency situations A GIS-based approach to construct optimal visibility graphs

Search and Surveillance in emergency situations A GIS-based approach to construct optimal visibility graphs Mor et al. Costructg optmal vsblty graphs Search ad Survellace emergecy stuatos A GIS-based approach to costruct optmal vsblty graphs Mchael Mor, Irèe Ab-Zed, 2, Thah Tug Nguye, Luc Lamotage Departmet

More information

CS 2710 Foundations of AI Lecture 22. Machine learning. Machine Learning

CS 2710 Foundations of AI Lecture 22. Machine learning. Machine Learning CS 7 Foudatos of AI Lecture Mache learg Mlos Hauskrecht mlos@cs.ptt.edu 539 Seott Square Mache Learg The feld of mache learg studes the desg of computer programs (agets) capable of learg from past eperece

More information

CS200: Hash Tables. Prichard Ch CS200 - Hash Tables 1

CS200: Hash Tables. Prichard Ch CS200 - Hash Tables 1 CS200: Hash Tables Prichard Ch. 13.2 CS200 - Hash Tables 1 Table Implemetatios: average cases Search Add Remove Sorted array-based Usorted array-based Balaced Search Trees O(log ) O() O() O() O(1) O()

More information

CHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs

CHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs CHAPTER IV: GRAPH THEORY Sectio : Itroductio to Graphs Sice this class is called Number-Theoretic ad Discrete Structures, it would be a crime to oly focus o umber theory regardless how woderful those topics

More information

Software reliability is defined as the probability of failure

Software reliability is defined as the probability of failure Evolutoary Regresso Predcto for Software Cumulatve Falure Modelg: a comparatve study M. Beaddy, M. Wakrm & S. Aljahdal 2 : Dept. of Math. & Ifo. Equpe MMS, Ib Zohr Uversty Morocco. beaddym@yahoo.fr 2:

More information

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8)

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8) CIS 11 Data Structures ad Algorithms with Java Fall 017 Big-Oh Notatio Tuesday, September 5 (Make-up Friday, September 8) Learig Goals Review Big-Oh ad lear big/small omega/theta otatios Practice solvig

More information

Region Matching by Optimal Fuzzy Dissimilarity

Region Matching by Optimal Fuzzy Dissimilarity Rego Matchg by Optmal Fuzzy Dssmlarty Zhaggu Zeg, Ala Fu ad Hog Ya School of Electrcal ad formato Egeerg The Uversty of Sydey Phoe: +6--935-6659 Fax: +6--935-3847 Emal: zzeg@ee.usyd.edu.au Abstract: Ths

More information

A MapReduce-Based Multiple Flow Direction Runoff Simulation

A MapReduce-Based Multiple Flow Direction Runoff Simulation A MapReduce-Based Multple Flow Drecto Ruoff Smulato Ahmed Sdahmed ad Gyozo Gdofalv GeoIformatcs, Urba lag ad Evromet, KTH Drottg Krstas väg 30 100 44 Stockholm Telephoe: +46-8-790 8709 Emal:{sdahmed, gyozo}@

More information

Research on Circular Target Center Detection Algorithm Based on Morphological Algorithm and Subpixel Method

Research on Circular Target Center Detection Algorithm Based on Morphological Algorithm and Subpixel Method Research o Crcular Target Ceter Detecto Algorthm Based o Morphologcal Algorthm ad Subpxel Method Yu Le 1, Ma HuZhu 1, ad Yag Wezhou 1 1 College of Iformato ad Commucato Egeerg, Harb Egeerg Uversty, Harb

More information

Priority queues and heaps Professors Clark F. Olson and Carol Zander

Priority queues and heaps Professors Clark F. Olson and Carol Zander Prorty queues and eaps Professors Clark F. Olson and Carol Zander Prorty queues A common abstract data type (ADT) n computer scence s te prorty queue. As you mgt expect from te name, eac tem n te prorty

More information

COMBINATORIAL METHOD OF POLYNOMIAL EXPANSION OF SYMMETRIC BOOLEAN FUNCTIONS

COMBINATORIAL METHOD OF POLYNOMIAL EXPANSION OF SYMMETRIC BOOLEAN FUNCTIONS COMBINATORIAL MTHOD O POLYNOMIAL XPANSION O SYMMTRIC BOOLAN UNCTIONS Dala A. Gorodecky The Uted Isttute of Iformatcs Prolems of Natoal Academy of Sceces of Belarus, Msk,, Belarus, dala.gorodecky@gmal.com.

More information

Classification Web Pages By Using User Web Navigation Matrix By Mementic Algorithm

Classification Web Pages By Using User Web Navigation Matrix By Mementic Algorithm Classfcato Web Pages By Usg User Web Navgato Matrx By Memetc Algorthm 1 Parvaeh roustae 2 Mehd sadegh zadeh 1 Studet of Computer Egeerg Software EgeergDepartmet of ComputerEgeerg, Bushehr brach,

More information

Lower Bounds for Sorting

Lower Bounds for Sorting Liear Sortig Topics Covered: Lower Bouds for Sortig Coutig Sort Radix Sort Bucket Sort Lower Bouds for Sortig Compariso vs. o-compariso sortig Decisio tree model Worst case lower boud Compariso Sortig

More information

Chapter 3 Descriptive Statistics Numerical Summaries

Chapter 3 Descriptive Statistics Numerical Summaries Secto 3.1 Chapter 3 Descrptve Statstcs umercal Summares Measures of Cetral Tedecy 1. Mea (Also called the Arthmetc Mea) The mea of a data set s the sum of the observatos dvded by the umber of observatos.

More information

Network Security Evaluation Based on Variable Weight Fuzzy Cloud Model

Network Security Evaluation Based on Variable Weight Fuzzy Cloud Model 207 2 d Iteratoal Coferece o Computer Scece ad Techology (CST 207) ISBN: 978--60595-46-5 Networ Securty Evaluato Based o Varable Weght Fuzzy Cloud Model Yag JIANG a*, Cheg-ha LI, Zh-peg LI ad Mg-ca SUN

More information

An Optimal Thresholding Method for the Voxel Coloring in the 3D Shape Reconstruction

An Optimal Thresholding Method for the Voxel Coloring in the 3D Shape Reconstruction ICCAS00 Jue -, KINTEX, Gyeogg-Do, Korea A Optmal Thresholdg Method or the oxel Colorg the D Shape Recostructo Soo-Youg Ye*, Hyo-Sug Km*, Youg-Youl Y*, ad K-Go Nam ** * Dept. o Electrocs Egr., Pusa Natoal

More information

Priority Queues and Heaps (Ch 5.5) Huffman Coding Trees (Ch 5.6) Binary Search Trees (Ch 5.4) Lec 5: Binary Tree. Dr. Patrick Chan

Priority Queues and Heaps (Ch 5.5) Huffman Coding Trees (Ch 5.6) Binary Search Trees (Ch 5.4) Lec 5: Binary Tree. Dr. Patrick Chan ata Structure hapter Biary Trees r. Patrick ha School of om puter Sciece ad Egieerig South hia Uiversity of Techolog y Recursio recursio is a procedure which calls itself The recursive procedure call must

More information

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example Unversty of Brtsh Columba CPSC, Intro to Computaton Jan-Apr Tamara Munzner News Assgnment correctons to ASCIIArtste.java posted defntely read WebCT bboards Arrays Lecture, Tue Feb based on sldes by Kurt

More information