# International Journal of Software and Web Sciences (IJSWS)

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 International Association of Scientific Innovation and Research (IASIR) (An Association Unifying the Sciences, Engineering, and Applied Research) ISSN (Print): ISSN (Online): International Journal of Software and Web Sciences (IJSWS) Visualization Tool for Tree and Graph Algorithms with Audio Comments 1 Urvashi Pathania, 2 Aman Singh Dept. of Computer Science and Engineering, Lovely Professional University, Punjab, India Abstract: Data structure is mathematical and logical representation of data in memory. Now the era of this time online learning or and e-learning are widely used in higher education, every student wants flexibility in learning environment that s why visualization tool come in fashion. Visualization tool is graphical representation of data in static or dynamic 2D or 3D format. In this paper we present visualization tool of tree and graph of data structure integrated with audio comments. Using this tool student solve many problem that they faced when the execute algorithms of tree and graph and also do self study at home because of online availability of tool. Keywords: visualization tool, audio comments, visualization tool of tree and graph, visualization with audio comments, tree and graph algorithms. I Introduction In computer science engineering data structure is one of the important subject for undergraduate students but still student find difficulties to understand data structure, its operation and its algorithms due to its complex nature. Data structure is mathematical and logical representation of data. Data structure basically categorized in two parts i.e. linear data structures and non linear data structures. In linear data structures we have arrays, queue, stack and linked list and in non linear data structures we have tree and graph. In this paper we implement non linear data structures algorithms because most of students find difficulties when they worked with different algorithms of trees and graph data structures. Visualization tool is one of the best tool now days used by students and educator of many university to solve the problem of algorithms some extant but still visualization tools have some problem they only visualized the algorithms but they don t illustrate what they are visualized. In this paper we implement visualization tool of tree and graph algorithms of data structure integrated with audio. II Literature Survey Robert Meolic (2013) et al. in this paper author discussed how they implement mobile framework of sorting algorithms. In this implement three sorting algorithms they are insertion sort, quick sort and Gnome Sort. For implementation they used c- style code. Disadvantage of this framework is that they are restricted to some algorithms.[1] Fuad Alhosban (2012) et al., in this paper author implement an interactive visualization tools named DSL in which visualization is integrated with audio. To develop this tool we used java. The DSL (data structure learning) tool, basically have three parts named: Basic Objects, Nodes, and Integration of audio with visualization. [2] Crescenzi Pilu, Malizia Alessio, Verri M. Cecilia, Díaz Paloma and Aedo Ignacio (2012), In this paper author implement the full integration of algorithm visualization movies with the lessons material of data structure. In this students measured that AV movies is useful tool for individual f study. For developing AV movies, Algorithm visualization system is used called AlViE, which is a post-mortem tool. This tool divided into three parts they are (1) a visualization player, (2) a graphical input developer that allows the user to create new input (3) a Java class library. [3] Anghel Traian, Florea Adrian, Gellert Arpad (2011), In this paper author discussed online learning system, Education Management Tool (EDM), the basic agenda of this tool is to improve consistent coaching style and examination methods, without replacing them. This tool has three parts e-learning, e-testing, e-management. The technology used for development is ASP.NET (.aspx), combined with AJAX javascript technologies and for database Microsoft Sql Server Disadvantage of this EDM tool is that database is not protected from hacker.[4] Vírseda Rafael del Vado (2010), In this paper author discussed an interactive visualization tool, which will be helpful for educator. The main benefit this tool is to helps computer science students to understand the conceptual knowledge about data structure algorithms. For development of this tool they used java.[5] III Methods In this we implement various algorithms of tree and graph data structure. Various algorithms that we implemented in tree they are Binary search tree (insertion, deletion, search), AVL (insertion, deletion, search), B- Tree (insertion, deletion, search), Heap (insertion, deletion, search), Red- Black Tree (insertion, deletion, search) and in graph they are BFS( Breath First Search), DFS (Depth First Search), minimum path algorithms i.e. IJSWS ; 2014, IJSWS All Rights Reserved Page 51

2 Dijkstra's Algorithm and Floyd Warshall Algorithm and minimum cost spanning tree algorithms are Kruskal Algorithm and Prim s Algorithm. Now we discussed all one by one. BST :- BST referred as binary search tree, it is also known as ordered binary tree. it is node based data structure and each node has not more than two child i.e. only left child, only right child and both left child and right child. the left sub tree element values is always less than root node value and right sub tree element value is always greater than root node value. left tree elements < root element < right tree elements AVL tree: AVL referred as Adelson Velskii and Landis, it is also called balanced binary search tree. Two main properties of AVL tree are first height of each node is always lies between -1 to 1 means -1, 0 and 1. Second properties are balanced binary search tree means every time when node is inserted or deleted rotation is performed in tree if it is necessary. These rotations are one way rotation and two way rotation. In one way rotation we have LL rotation, RR rotation, LR rotation, RL rotation Balance factor = height of left tree height of right tree (values lies between -1 to 1) B-Tree: it is another special type of data structure, in which one node have more than one values and further they are divided into more than two nodes. Suppose node have two values than they divided into three parts and the values of root node are x and y and child node have values lies between x and y means x1 is x<x1<y Heap: Heap is a complete binary tree. Heap is two types min heap and max heap. In min heap all parent node have less values as compared to its child nodes. In max heap all parent nodes have greater value as compared to its child node. In heap nodes are represent as : Parent of x[i] = x[i/2] Left child of x[i] = x[2i] and Right child of x[i] = x[2i + 1]. Red Black Tree: Red black tree is another special type of balanced binary search tree with nodes colored red or black. the basic properties of red black tree are every node have colored either red or black, every leaf (Null) is black, if node is red than its both child node color is black or vice versa and every simple path from a node to a successor leaf contain same number of black nodes. BFS : BFS refer as Breadth first Search, it is traversing techniques of graph. The basic function of algorithm to traverse the graph as close as possible to the start node. BFS starts from top node. To implement BFS algorithm we used queue. Basic steps performed in the BFS are as follows: 1) insert the start node in the queue, 2) Remove element from the queue and execute them, 3) inserted unvisited neighbors node in the queue and 4) Repeat step 2 & 3 until queue is empty. DFS: DFS refers as depth first search; it is another technique to traverse the graph. This algorithm starts from bottom. To implement this algorithm stack is used. Basic steps of algorithm are: 1) Push the bottom element of the graph in the stack. 2) Pop the top element from the stack. 3) Push non visited node in the stack and repeat steps again until stack is empty. Kruskal Algorithm: This algorithm is design by Joseph Kruskal. It is used to find minimum spanning tree in a graph. To determine the spanning tree in a graph, firstly arrange all edge according to the its weight in list (X) and start from smallest one, second select an edge from list (X) who is connected to the starting edge, add this edge in spanning tree list (T) and check it avoid the cycle. Last step is to repeat step second until all edges are covered. Prim s algorithm: It is used to find minimum spanning tree in a graph. To find minimum spanning tree from graph firstly start from any random edge and add, second find the edge that have minimum weight rest available and add to tree list(t) and avoid cycle. Last step cover all edges and then stop. Dijkastra algorithm: Djikstra's algorithm is created by Edsger Dijkastra. It is used to solve the problem of finding the shortest path from given point to all edges in graph. This algorithm can apply on directed and undirected graph but graph should be weighted and weight should be positive only. It is the solution to the single-source shortest path problem. Floyd Warshall Algorithm : The Floyd-Warshall algorithm is designed by Stephen Warshall and implemented by Robert W. Floyd and P. Z. lngeraman. It is used to find shortest paths between all pairs of vertices in an edge weighted directed graph. To developing these algorithms we used ASP.NET (.apsx) with java script and for backend database we used MS SQL server IV Results and Discussion This visualization tool has two parts: 1) visualization of algorithms 2) audio comments. In this visualization tool we visualized various algorithms and we discussed each algorithm with its results. In BST (Binary Search Tree) we performed three operations i.e. insertion, deletion, search. In insertion operation we firstly insert the value 67 in insertion text box and then click on the insert button (step 1) and then algorithm find its location (step 2) and insert 67 that location (step 3) similarly deletion operation is performed. The screen shot of these steps as fallows in fig 1. IJSWS ; 2014, IJSWS All Rights Reserved Page 52

3 Figure 1 Screenshot of binary search tree Second we have AVL tree and in this we performed three operations i.e. insertion, deletion, search. In insertion operation user insert one number i.e. 92 and then click on the insert button (step 1) algorithm check its exact position and then insert on that location (step - 2) and then rearrange the node values and tree (step - 3), similarly we performed deletion. The screen shot of these steps as fallows. Figure 2 Screenshot of AVL Third we have B-tree we performed three operations i.e. insertion, deletion, search. In this implement 3 degree and 4 degree B-tree. In insertion module we insert value 74 and then click on then insert button algorithm (step - 1) then check element position (step -2) and insert value in node (step - 3) and then divided node and rearranged tree if needed. The screen shot of these steps as fallows. Figure 3 Screenshot of B- tree Next we have Red- Black tree and in this we performed three operations i.e. insertion, deletion, search. In insertion operation user insert value 54 in insertion text box (step -1) and the algorithm check its exact position IJSWS ; 2014, IJSWS All Rights Reserved Page 53

4 (step -2) and then insert on that position (step - 3) and then change node colour red to black or visa versa and then rotate tree if required. similarly deletion operation is performed. Figure 4 Screenshot of Red Black tree Next we Heap in this we implement three operations i.e. insertion, deletion, search. In insertion we insert value 20 and then click on insert button (step -1), next step -2 insertion is done at last node of tree considering property of complete binary tree, in step -3 rearrange the node values while considering every parent node smallest to its both child node and in last step -4 element 20 placed in its exact position. In case of deletion user simply click on the remove smallest n root element deleted and then rearrangement in tree executed automatically according to algorithm steps. The screen shot of these steps as fallows. IJSWS ; 2014, IJSWS All Rights Reserved Page 54

5 Figure 5 Screenshot of Heap Next we have Graph algorithms of traversal i.e. BFS (Breadth first Search) in this we apply visualization two types of graph i.e. directed and undirected graph. In this we represent graph in three forms logical representation, adjacency list representation and adjacency matrix representation and to reuse tool again we have new graph option. To start algorithm user entered starting node i.e. 1 and then click on the start BFS (step - 1) and then algorithm execution started. in next step 2 inserting non visiting element in queue and then executing and in last step 3 shows output in graph highlighted with blue line. The screen shot of these steps as fallows. Figure 6 Screenshot of Breadth First Search Next in Graph algorithms of traversal we have DFS (Depth first Search). In this we simply entered the node value 6 and then click on the run DFS button (step 1) and then visualization started. in next step 2 insert non visited nodes in the queue and execute it and in last step 3 shows output of algorithm and path are highlighted by blue lines. The screen shot of these steps as fallows. IJSWS ; 2014, IJSWS All Rights Reserved Page 55

6 Figure 7 Screenshot of Depth First Search Next in Graph algorithms we have Kruskal algorithm that find minimum cost spanning tree. In this we simply click on the Run Kruskal button (step -1), then visualization started (step -2) and last step -3 output spanning tree is highlighted in red colour. The screen shot of these steps as fallows. Figure 8 Screenshot of Kruskal Algorithm for minimum spanning tree Next in Graph algorithms we have Prim s algorithm that find minimum cost spanning tree. In this we insert staring node value 3 in text box then click on the Run Prim s (step -1), then visualization started (step -2) and last step 3 output spanning tree is highlighted in red colour. The screen shot of these steps as fallows. IJSWS ; 2014, IJSWS All Rights Reserved Page 56

7 Figure 9 Screenshot of Prim s Algorithm for minimum spanning tree Next in Graph algorithms we have Dijkstra shortest path algorithm that find shortest path in the graph. In this we insert node value i.e. 4 in the text box then click on the Run Dijkstra button (step 1), then visualization started(step 2) and in step -3 output with path from 4 node to every node present in graph and if some node don t have path then output shows no path. The screen shot of these steps as fallows. Figure 10 Screenshot of Dijkstra algorithm for shortest path Next in Graph algorithms we have Floyd- warshall algorithm that find all pairs shortest path in the graph. In this we simply click on the Run Floyd- warshall button (step - 1), then visualization started (step 2) and step 3 output will shows all nodes path weight age to all another s nodes in graph. The screen shot of these steps as fallows. IJSWS ; 2014, IJSWS All Rights Reserved Page 57

8 Figure 11 Screenshot of Floyd - Warshall Algorithm for all pairs shortest path In next we have feedback in which student give its feedback according to feedback form question and then submit feedback online and if student have some query then they submit their query online with its id and educator revert back on his/her mail id. Main advantage of this tool is student can used this tool in campus or out campus due to online availability of tool. By using this tool they more easily clear the concept without help of any one and also improve its performance in exams and test. V Conclusion and Future work In this paper we discussed the visualization tool of tree and graph algorithms of data structure integrated with audio instruction. main algorithm implemented are BST(insertion, deletion, search), AVL(insertion, deletion, search), B-tree(insertion, deletion, search), Red- Black tree(insertion, deletion, search), Min heap(insertion, deletion, search), BFS, DFS, Prim s, Kruskal, Dijkstra and Floyd warshall. It is web based tool and student can do self study at home using this tool and if they have some query then they send online query to educator and they answered on his/her id. In future work we can add online testing module for the student and also design one platform where student draw its own data structure like AVL tree, Red- black tree and so on and tool indentified whether the draw data structure in correct or not. References [1] Meolic Robert (2013), Demonstration of Sorting Algorithms on Mobile Platforms, Proceedings of International Conference on Computer Supported Education, pp [2] F. Alhosban (2012), Aural Instruction with Visualization in E-Learning, Proceedings of Frontiers in Education Conference. [3] P. Crescenzi, A. Malizia, M. Cecilia Verri, P. Díaz and I. Aedo (2012), Integrating Algorithm Visualization Video into a First- Year Algorithm and Data Structure Course, International Forum of Educational Technology & Society, pp: [4] A. Traian, F. Adrian, G. Arpad (2011), Web- Based Technologies for Online E-Learning Environment, Proceedings of 7th International scientific conference elearning and Software for Education Bucharest. [5] V. Rafael d. V. (2010), A Visualization Tool for Tutoring the Interactive Learning of Data Structures and Algorithmic Schemes, Proceedings of the 41st ACM technical symposium on Computer science education, pp: IJSWS ; 2014, IJSWS All Rights Reserved Page 58

### Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as:

Graph A graph G consist of 1. Set of vertices V (called nodes), (V = {v1, v2, v3, v4...}) and 2. Set of edges E (i.e., E {e1, e2, e3...cm} A graph can be represents as G = (V, E), where V is a finite and

### COURSE: B.TECH-ECE. IV Sem. Data structure Using C. b) Deletion of element in an array

COURSE: B.TECH-ECE. IV Sem Data structure Using C 1. Determine the formula to find the address location of an element in three dimensions array, suppose each element takes four bytes of space & elements

### AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm

AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm Time: Three Hours] [Maximum Marks: 60 Note Attempts all the questions. All carry equal marks Section A

### CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.

Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure

### Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate

### CS2 Final Study Guide

CS2 Final Study Guide - Know how to write an assignment operator, copy constructor and destructor for a simple class that has dynamically allocated memory. Trees 1. Define the following terms o binary

### CMSC 451: Graph Properties, DFS, BFS, etc.

CMSC 451: Graph Properties, DFS, BFS, etc. Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Chapter 3 of Algorithm Design by Kleinberg & Tardos. Graphs

### Exam study sheet for CS2711. List of topics

Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure

### 5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The

### INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY A PATH FOR HORIZING YOUR INNOVATIVE WORK A REVIEW ON THE USAGE OF OLD AND NEW DATA STRUCTURE ARRAYS, LINKED LIST, STACK,

### COT5405 Analysis of Algorithms Homework 3 Solutions

COT0 Analysis of Algorithms Homework 3 Solutions. Prove or give a counter example: (a) In the textbook, we have two routines for graph traversal - DFS(G) and BFS(G,s) - where G is a graph and s is any

### 12 Abstract Data Types

12 Abstract Data Types 12.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT).

### Social Media Mining. Graph Essentials

Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures

### ITEC2620 Introduction to Data Structures

ITEC2620 Introduction to Data Structures Lecture 8b Search Trees Traversals Typical covered as graph traversals in data structures courses I ve never seen a graph traversal in practice! AI background Tree

### Java Software Structures

INTERNATIONAL EDITION Java Software Structures Designing and Using Data Structures FOURTH EDITION John Lewis Joseph Chase This page is intentionally left blank. Java Software Structures,International Edition

### Sample Questions Csci 1112 A. Bellaachia

Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k

### A Comparison of Dictionary Implementations

A Comparison of Dictionary Implementations Mark P Neyer April 10, 2009 1 Introduction A common problem in computer science is the representation of a mapping between two sets. A mapping f : A B is a function

### Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Data Structures Page 1 of 24 A.1. Arrays (Vectors) n-element vector start address + ielementsize 0 +1 +2 +3 +4... +n-1 start address continuous memory block static, if size is known at compile time dynamic,

### Definition. E.g. : Attempting to represent a transport link data with a tree structure:

The ADT Graph Recall the ADT binary tree: a tree structure used mainly to represent 1 to 2 relations, i.e. each item has at most two immediate successors. Limitations of tree structures: an item in a tree

### S. Muthusundari. Research Scholar, Dept of CSE, Sathyabama University Chennai, India e-mail: nellailath@yahoo.co.in. Dr. R. M.

A Sorting based Algorithm for the Construction of Balanced Search Tree Automatically for smaller elements and with minimum of one Rotation for Greater Elements from BST S. Muthusundari Research Scholar,

### Previous Lectures. B-Trees. External storage. Two types of memory. B-trees. Main principles

B-Trees Algorithms and data structures for external memory as opposed to the main memory B-Trees Previous Lectures Height balanced binary search trees: AVL trees, red-black trees. Multiway search trees:

### TREE BASIC TERMINOLOGIES

TREE Trees are very flexible, versatile and powerful non-liner data structure that can be used to represent data items possessing hierarchical relationship between the grand father and his children and

### Any two nodes which are connected by an edge in a graph are called adjacent node.

. iscuss following. Graph graph G consist of a non empty set V called the set of nodes (points, vertices) of the graph, a set which is the set of edges and a mapping from the set of edges to a set of pairs

### A. V. Gerbessiotis CS Spring 2014 PS 3 Mar 24, 2014 No points

A. V. Gerbessiotis CS 610-102 Spring 2014 PS 3 Mar 24, 2014 No points Problem 1. Suppose that we insert n keys into a hash table of size m using open addressing and uniform hashing. Let p(n, m) be the

### B-Trees. Algorithms and data structures for external memory as opposed to the main memory B-Trees. B -trees

B-Trees Algorithms and data structures for external memory as opposed to the main memory B-Trees Previous Lectures Height balanced binary search trees: AVL trees, red-black trees. Multiway search trees:

### From Last Time: Remove (Delete) Operation

CSE 32 Lecture : More on Search Trees Today s Topics: Lazy Operations Run Time Analysis of Binary Search Tree Operations Balanced Search Trees AVL Trees and Rotations Covered in Chapter of the text From

### Analysis of Algorithms I: Binary Search Trees

Analysis of Algorithms I: Binary Search Trees Xi Chen Columbia University Hash table: A data structure that maintains a subset of keys from a universe set U = {0, 1,..., p 1} and supports all three dictionary

### Minimum Spanning Trees

Minimum Spanning Trees Algorithms and 18.304 Presentation Outline 1 Graph Terminology Minimum Spanning Trees 2 3 Outline Graph Terminology Minimum Spanning Trees 1 Graph Terminology Minimum Spanning Trees

### Multi-Way Search Trees (B Trees)

Multi-Way Search Trees (B Trees) Multiway Search Trees An m-way search tree is a tree in which, for some integer m called the order of the tree, each node has at most m children. If n

### Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

Binary Search Trees A Generic Tree Nodes in a binary search tree ( B-S-T) are of the form P parent Key A Satellite data L R B C D E F G H I J The B-S-T has a root node which is the only node whose parent

### Data Structures. Topic #9

Data Structures Topic #9 Today s Agenda Continue Discussing Trees Examine the algorithm to insert Examine the algorithm to remove Begin discussing efficiency of tree Are there any alternatives? 2-3 2-3-4

### 1 2-3 Trees: The Basics

CS10: Data Structures and Object-Oriented Design (Fall 2013) November 1, 2013: 2-3 Trees: Inserting and Deleting Scribes: CS 10 Teaching Team Lecture Summary In this class, we investigated 2-3 Trees in

### PES Institute of Technology-BSC QUESTION BANK

PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions

### A Review And Evaluations Of Shortest Path Algorithms

A Review And Evaluations Of Shortest Path Algorithms Kairanbay Magzhan, Hajar Mat Jani Abstract: Nowadays, in computer networks, the routing is based on the shortest path problem. This will help in minimizing

### International Journal of Advanced Research in Computer Science and Software Engineering

Volume 3, Issue 7, July 23 ISSN: 2277 28X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Greedy Algorithm:

### CSC 421: Algorithm Design Analysis. Spring 2014

CSC 421: Algorithm esign Analysis Spring 2014 Transform & conquer transform-and-conquer approach presorting balanced search trees, heaps Horner's Rule problem reduction 1 Transform & conquer the idea behind

### Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *

Binary Heaps A binary heap is another data structure. It implements a priority queue. Priority Queue has the following operations: isempty add (with priority) remove (highest priority) peek (at highest

### Data Structures and Algorithm Analysis (CSC317) Intro/Review of Data Structures Focus on dynamic sets

Data Structures and Algorithm Analysis (CSC317) Intro/Review of Data Structures Focus on dynamic sets We ve been talking a lot about efficiency in computing and run time. But thus far mostly ignoring data

### The relationship of a trees to a graph is very important in solving many problems in Maths and Computer Science

Trees Mathematically speaking trees are a special class of a graph. The relationship of a trees to a graph is very important in solving many problems in Maths and Computer Science However, in computer

### A Fast Method For Accessing Nodes In The Binary Search Trees

A Fast Method For Accessing Nodes In The Binary Search Trees İbrahim Ates, Mustafa Akpınar, Beyza Eken, Nejat YUMUSAK Sakarya University, Department of Computer Engineering, Serdivan-Sakarya, Turkey ibrahimates@yahoo.com

### UNIVERSITI MALAYSIA SARAWAK KOTA SAMARAHAN SARAWAK PSD2023 ALGORITHM & DATA STRUCTURE

STUDENT IDENTIFICATION NO UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI SAINS KOMPUTER & TEKNOLOGI MAKLUMAT (Faculty of Computer Science & Information Technology) Diploma in Multimedia

### DATA STRUCTURES USING C

DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give

### 2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

### CSE 326: Data Structures B-Trees and B+ Trees

Announcements (4//08) CSE 26: Data Structures B-Trees and B+ Trees Brian Curless Spring 2008 Midterm on Friday Special office hour: 4:-5: Thursday in Jaech Gallery (6 th floor of CSE building) This is

### Introduction Advantages and Disadvantages Algorithm TIME COMPLEXITY. Splay Tree. Cheruku Ravi Teja. November 14, 2011

November 14, 2011 1 Real Time Applications 2 3 Results of 4 Real Time Applications Splay trees are self branching binary search tree which has the property of reaccessing the elements quickly that which

### Heap. Binary Search Tree. Heaps VS BSTs. < el el. Difference between a heap and a BST:

Heaps VS BSTs Difference between a heap and a BST: Heap el Binary Search Tree el el el < el el Perfectly balanced at all times Immediate access to maximal element Easy to code Does not provide efficient

### Announcements. CSE332: Data Abstractions. Lecture 9: B Trees. Today. Our goal. M-ary Search Tree. M-ary Search Tree. Ruth Anderson Winter 2011

Announcements CSE2: Data Abstractions Project 2 posted! Partner selection due by 11pm Tues 1/25 at the latest. Homework due Friday Jan 28 st at the BEGINNING of lecture Lecture 9: B Trees Ruth Anderson

### Chapter 7. Multiway Trees. Data Structures and Algorithms in Java

Chapter 7 Multiway Trees Data Structures and Algorithms in Java Objectives Discuss the following topics: The Family of B-Trees Tries Case Study: Spell Checker Data Structures and Algorithms in Java 2 Multiway

### Two General Methods to Reduce Delay and Change of Enumeration Algorithms

ISSN 1346-5597 NII Technical Report Two General Methods to Reduce Delay and Change of Enumeration Algorithms Takeaki Uno NII-2003-004E Apr.2003 Two General Methods to Reduce Delay and Change of Enumeration

Chapter 7. Indexes Table of Contents Objectives... 1 Introduction... 2 Context... 2 Review Questions... 3 Single-level Ordered Indexes... 4 Primary Indexes... 4 Clustering Indexes... 8 Secondary Indexes...

### 5. Binary objects labeling

Image Processing - Laboratory 5: Binary objects labeling 1 5. Binary objects labeling 5.1. Introduction In this laboratory an object labeling algorithm which allows you to label distinct objects from a

### Data Structures and Algorithms in C++

Data Structures and Algorithms in C++ Second Edition Michael T. Goodrich Department of Computer Science University of California, Irvine Roberto Tamassia Department of Computer Science Brown University

### Formulas, Functions and Charts

Formulas, Functions and Charts :: 167 8 Formulas, Functions and Charts 8.1 INTRODUCTION In this leson you can enter formula and functions and perform mathematical calcualtions. You will also be able to

### Binary Search Trees. Data in each node. Larger than the data in its left child Smaller than the data in its right child

Binary Search Trees Data in each node Larger than the data in its left child Smaller than the data in its right child FIGURE 11-6 Arbitrary binary tree FIGURE 11-7 Binary search tree Data Structures Using

### Sorting algorithms. CS 127 Fall A brief diversion: What's on the midterm. Heaps: what to know. Binary trees: What to know

CS 127 Fall 2003 Sorting algorithms A brief diversion: What's on the midterm Same format as last time 5 questions, 20 points each, 100 points total 15% of your grade 2 topics: trees, trees, and more trees

### Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb

Binary Search Trees Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 27 1 Properties of Binary Search Trees 2 Basic BST operations The worst-case time complexity of BST operations

### Data Structures Using C++ 2E. Chapter 11 Binary Trees and B-Trees

Data Structures Using C++ 2E Chapter 11 Binary Trees and B-Trees Binary Trees Definition: a binary tree, T, is either empty or such that T has a special node called the root node T has two sets of nodes,

### Data Structure [Question Bank]

Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:

### CS 210 Algorithms and Data Structures College of Information Technology and Engineering Weisberg Division of Engineering and Computer Science

CS 210 Algorithms and Data Structures College of Information Technology and Engineering Weisberg Division of Engineering and Computer Science Semester and Year: Spring 2009 Classroom Section, Meeting Times,

### Binary Heap Algorithms

CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn G. Chappell

### Binary Heaps. CSE 373 Data Structures

Binary Heaps CSE Data Structures Readings Chapter Section. Binary Heaps BST implementation of a Priority Queue Worst case (degenerate tree) FindMin, DeleteMin and Insert (k) are all O(n) Best case (completely

### Network (Tree) Topology Inference Based on Prüfer Sequence

Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 vanniarajanc@hcl.in,

### 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The

### Ordered Lists and Binary Trees

Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 6-0:

### Chapter 14 The Binary Search Tree

Chapter 14 The Binary Search Tree In Chapter 5 we discussed the binary search algorithm, which depends on a sorted vector. Although the binary search, being in O(lg(n)), is very efficient, inserting a

### 1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated

### CS711008Z Algorithm Design and Analysis

CS711008Z Algorithm Design and Analysis Lecture 7 Binary heap, binomial heap, and Fibonacci heap 1 Dongbo Bu Institute of Computing Technology Chinese Academy of Sciences, Beijing, China 1 The slides were

### Multiway Search Tree (MST)

Multiway Search Tree (MST) Generalization of BSTs Suitable for disk MST of order n: Each node has n or fewer sub-trees S1 S2. Sm, m n Each node has n-1 or fewer keys K1 Κ2 Κm-1 : m-1 keys in ascending

### Response to Microsoft Research Tablet PC and Computing Curriculum Request for Proposal, November 2004

Response to Microsoft Research Tablet PC and Computing Curriculum Request for Proposal, November 2004 Name: Title: University: Email: Roy P. Pargas Associate Professor of Computer Science Clemson University

### Data Structures Using C++

Data Structures Using C++ 1.1 Introduction Data structure is an implementation of an abstract data type having its own set of data elements along with functions to perform operations on that data. Arrays

### CSE 373 Analysis of Algorithms Date: Nov. 1, Solution to HW3. Total Points: 100

CSE 373 Analysis of Algorithms Date: Nov. 1, 2016 Steven Skiena Problem 1 5-4 [5] Solution to HW3 Total Points: 100 Let T be the BFS-tree of the graph G. For any e in G and e T, we have to show that e

### COMPUTER SCIENCE TRIPOS

CST.2010.3.1 COMPUTER SCIENCE TRIPOS Part IB Monday 31 May 2010 1.30 to 4.30 COMPUTER SCIENCE Paper 3 Answer five questions. Submit the answers in five separate bundles, each with its own cover sheet.

### COS 226 Algorithms and Data Structures Fall Final

COS 22 Algorithms and Data Structures Fall 200 Final This test has 4 questions worth a total of 00 points. You have 80 minutes. The exam is closed book, except that you are allowed to use a one page cheatsheet

### Self-adaptive e-learning Website for Mathematics

Self-adaptive e-learning Website for Mathematics Akira Nakamura Abstract Keyword searching and browsing on learning website is ultimate self-adaptive learning. Our e-learning website KIT Mathematics Navigation

### Trees & Binary Search Trees

CMSC 132: Object-Oriented Programming II Trees & Binary Search Trees Department of Computer Science University of Maryland, College Park Trees Trees are hierarchical data structures One-to-many relationship

### Questions 1 through 25 are worth 2 points each. Choose one best answer for each.

Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in

### A Functional Graph Library

A Functional Graph Library Based on Inductive Graphs and Functional Graph Algorithms by Martin Erwig Presentation by Christian Doczkal March 22 nd, 2006 Structure Motivation Inductive graph definition

### CIS 631 Database Management Systems Sample Final Exam

CIS 631 Database Management Systems Sample Final Exam 1. (25 points) Match the items from the left column with those in the right and place the letters in the empty slots. k 1. Single-level index files

### Binary Search Trees CMPSC 122

Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than

### Fast Sequential Summation Algorithms Using Augmented Data Structures

Fast Sequential Summation Algorithms Using Augmented Data Structures Vadim Stadnik vadim.stadnik@gmail.com Abstract This paper provides an introduction to the design of augmented data structures that offer

### Lecture Notes on Spanning Trees

Lecture Notes on Spanning Trees 15-122: Principles of Imperative Computation Frank Pfenning Lecture 26 April 26, 2011 1 Introduction In this lecture we introduce graphs. Graphs provide a uniform model

### INTERNATIONAL EDITION. Problem Solving with C++ Data Abstraction & SIXTH EDITION. Walls and Mirrors. Frank M. Carrano Timothy Henry

INTERNATIONAL EDITION Data Abstraction & Problem Solving with C++ Walls and Mirrors SIXTH EDITION Frank M. Carrano Timothy Henry Operator Meaning Associativity Usage * multiply left expr * expr / divide

### Graph Algorithms. Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar

Graph Algorithms Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar To accompany the text Introduction to Parallel Computing, Addison Wesley, 3. Topic Overview Definitions and Representation Minimum

### Balanced Trees Part One

Balanced Trees Part One Balanced Trees Balanced trees are surprisingly versatile data structures. Many programming languages ship with a balanced tree library. C++: std::map / std::set Java: TreeMap /

### CompSci-61B, Data Structures Final Exam

Your Name: CompSci-61B, Data Structures Final Exam Your 8-digit Student ID: Your CS61B Class Account Login: This is a final test for mastery of the material covered in our labs, lectures, and readings.

### Lecture 6: Binary Search Trees CSCI 700 - Algorithms I. Andrew Rosenberg

Lecture 6: Binary Search Trees CSCI 700 - Algorithms I Andrew Rosenberg Last Time Linear Time Sorting Counting Sort Radix Sort Bucket Sort Today Binary Search Trees Data Structures Data structure is a

### MATHEMATICS Unit Decision 1

General Certificate of Education January 2008 Advanced Subsidiary Examination MATHEMATICS Unit Decision 1 MD01 Tuesday 15 January 2008 9.00 am to 10.30 am For this paper you must have: an 8-page answer

### Romania Slide 1/18. Romania. Fall Semester. Artificial Intelligence

Romania Slide 1/18 Romania Fall Semester Romania Slide 2/18 Topic Outline Road Map of Romania Statement of the Problem Examples Optimal path Breadth-first Depth-first alphabetical Uniform Cost Search Compare

### Algorithms and Data Structures

Algorithms and Data Structures CMPSC 465 LECTURES 20-21 Priority Queues and Binary Heaps Adam Smith S. Raskhodnikova and A. Smith. Based on slides by C. Leiserson and E. Demaine. 1 Trees Rooted Tree: collection

### 1 Representing Graphs With Arrays

Lecture 0 Shortest Weighted Paths I Parallel and Sequential Data Structures and Algorithms, 5-20 (Spring 202) Lectured by Margaret Reid-Miller 6 February 202 Today: - Representing Graphs with Arrays -

### Long questions answer Advanced Mathematics for Computer Application If P= , find BT. 19. If B = 1 0, find 2B and -3B.

Unit-1: Matrix Algebra Short questions answer 1. What is Matrix? 2. Define the following terms : a) Elements matrix b) Row matrix c) Column matrix d) Diagonal matrix e) Scalar matrix f) Unit matrix OR

### Binary Search Trees (continued)

Binary Search Trees (continued) Remove: Starting at the root, search for the value to be remove. If we reach an empty tree, the value is not in the tree. Otherwise, at some point the value is the root

### GRAPH THEORY and APPLICATIONS. Trees

GRAPH THEORY and APPLICATIONS Trees Properties Tree: a connected graph with no cycle (acyclic) Forest: a graph with no cycle Paths are trees. Star: A tree consisting of one vertex adjacent to all the others.

### EE602 Algorithms GEOMETRIC INTERSECTION CHAPTER 27

EE602 Algorithms GEOMETRIC INTERSECTION CHAPTER 27 The Problem Given a set of N objects, do any two intersect? Objects could be lines, rectangles, circles, polygons, or other geometric objects Simple to

### Computational Geometry

Motivation 1 Motivation Polygons and visibility Visibility in polygons Triangulation Proof of the Art gallery theorem Two points in a simple polygon can see each other if their connecting line segment

### 10CS35: Data Structures Using C

CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a

### Learning Outcomes. COMP202 Complexity of Algorithms. Binary Search Trees and Other Search Trees

Learning Outcomes COMP202 Complexity of Algorithms Binary Search Trees and Other Search Trees [See relevant sections in chapters 2 and 3 in Goodrich and Tamassia.] At the conclusion of this set of lecture

### Solutions. 1) Is the following Boolean function linearly separable? Explain.

CS/ES 480, CES 510 Mid-term # 1 Practice Problems Solutions 1) Is the following Boolean function linearly separable? Explain. f ( x, y,z ) ( x y z ) ( x y z ) ( x y z ) Solution: Geometric representation