Spring 2010 CSE310 Midterm Examination 01B (in class) Instructions:
There are ve problems in this paper. Please use the space provided (below the questions) to write the answers. Budget your time to solve various problems (roughly 15 minutes for each pro
CSE310 HW02, Solution and Grading Keys
1. (15 pt) Suppose we have two algorithms A1 and A2 for solving the same problem. Let T 1 (n) be the worst case time complexity of Algorithm A1 and T2 (n) be the worst case time complexity of Algorithm A2. We kn
CSE310 HW01 Grading Keys
1. (10 pts) Let f (n) = n2 and g(n) = 100 n log2 n. Find the smallest integer N 0 such that f (N ) g(N ) but f (N + 1) > g(N + 1). Show the values of N , f (N ), g(N ), f (N + 1) and g(N + 1). Solutions: How to obtain the
Spring 2010 CSE310 Midterm Examination 01A (in class) Instructions:
There are ve problems in this paper. Please use the space provided (below the questions) to write the answers. Budget your time to solve various problems (roughly 15 minutes for each pro
CSE310 HW03, Thursday, 02/18/2010, Due: Thursday, 02/25/2010
A Please note that you have to typeset your assignment using either L TEX or Microsoft Word. Hand-written assignment will not be graded. You need to submit a hardcopy before the lecture on the d
CSE310 HW04, Thursday, 03/11/2010, Due: Thursday, 03/25/2010
A Please note that you have to typeset your assignment using either L TEX or Microsoft Word. Hand-written assignment will not be graded. You need to submit a hardcopy before the lecture on the d
Assignment
1/28/15, 10:48 PM
CSE310 Assignment 1
Due Date
Friday, January 16th, 5:30pm, 2015
Important: This is an individual assignment. Please do not collaborate.
No late assignment will be accepted.
Make sure that you write every line of your code. Usi
CSE310 Assignment3
Due: Friday, February 6th, 5:30pm
On-line submission, No late assignment will be accepted
Important: This is an individual assignment. Please do not collaborate.
1. (4 pts) Suppose that T(n) = T(n/8) + T(7n/8) +5n. Prove that T(n) = (n
Review List for Midterm
Contents and Requirements
Contents
Requirements
Midterm 1, 09/30/2013
CLOSED BOOK
What to bring:
ASU ID
Calculator
What NOT to bring:
Cell phone (should be turned off during
Cell
exam)
exam)
Laptop
Notes/Books
Analysis of Alg
CSE310 HW01 Grading Keys
A Please note that you have to typeset your assignment using either L TEX or Microsoft Word. Hand-written assignment will not be graded. You need to submit a hardcopy before the lecture on the due date. You also need to submit an
CSE310 HW06, Thursday, 04/22/2010, Due: Thursday, 04/29/2010
A Please note that you have to typeset your assignment using either L TEX or Microsoft Word. Hand-written assignment will not be graded. You need to submit a hardcopy before the lecture on the d
CSE 310 : Data Structures and Algorithms
Homework 1
PART 1: written assignment
Due: Wednesday, Jan 23, 2013 (at the beginning of class )
1. Do a big- analysis for those statements inside each of the following
nested loop constructs.
Note: If you cannot ge
CSE310 Exam 2 Review (Fall 2016)
-Bring your picture ID (ASU ID).
-Closed notes, closed books.
-One cheat sheet of the size of 8.5 in by 5.5 in (half of the regular sheet of paper) is
allowed.
You will be asked to submit your cheat sheet along with your e
CSE310 Exam 1 Review (Fall 2016)
-Bring your picture ID.
-Closed notes, closed books.
-One cheat sheet of the size of 8.5 in by 5.5 in (half of the regular sheet of paper) is
allowed.
You will be asked to submit your cheat sheet along with your exam at th
B-TREES
B-Tree: a rooted tree having the following properties:
1). Every node x has the following fields:
a). x.n, the number of keys stored in node x.
b). The n keys are stored in non-decreasing order:
x.key1 <= x.key2 <= .<= x.keyn
c). x.leaf, a boolean
Correctness of Algorithms
An invariant of a loop is a property that holds before and after each
iteration and can be used to prove that an algorithms with a loop is
correct. (i.e., it gives a correct result for any input)
To prove correctness of an algori
CSE310 Exam 3 Review (Fall 2016)
-Bring your picture ID.
-Closed notes, closed books.
-One cheat sheet of the size of 8.5 in by 5.5 in (half of the regular sheet of paper) is
allowed.
You will be asked to submit your cheat sheet along with your exam at th
B+-Trees
A B+-tree is a rooted tree satisfying the following properties:
All paths from root to leaf are of the same length
Each node that is not a root or a leaf has between t and 2t
children.
A leaf node has between (2t1)/2 and 2t-1 values
Special cases
OpenMP
Using OpenMP : Portable Shared Memory Parallel
Programming
Barbara Chapman, Gabriele Jost, and Ruud van der Pas
Cambridge, MA, USA: MIT Press, 2007.
Overview of OpenMP
OpenMP API developed to enable share
CSE310 Lectures 03-04:
Recurrences And the Master Method
Guoliang (Larry) Xue
Department of CSE
Arizona State University
http:/optimization.asu.edu/~xue
[email protected]
Topics of this lecture
Recurrences
General form of recurrence
1st example: block matri
CSE 310
Data Structures and Algorithms
Disjoint Sets
1
Disjoint Sets
A disjoint set data structure maintains a collection (set)
S = cfw_S1, S2, . Sk
of disjoint dynamic (sub) sets.
Each element x of a set is a pointer to an object, possibly with
multiple
CSE 310
Data Structures and Algorithms
Hash Tables
1
Dynamic Sets
A set (of elements) that may change over time (e.g., due to manipulations of an algorithm).
An element has a key and possibly satellite data.
<x.key, x.data>
Operations on dynamic sets:
CSE310 Lecture 16: Red-Black Trees
Guoliang (Larry) Xue
Department of CSE
Arizona State University
http:/optimization.asu.edu/~xue
[email protected]
Topics of this lecture
Problems with binary search trees
Properties of Red-Black Trees
Tree Height
R
CSE310 Lecture 13:
Disjoint Set Operations
Guoliang (Larry) Xue
Computer Science and Engineering
Arizona State University
http:/optimization.asu.edu/~xue
[email protected]
Topics of this lecture
Disjoint Sets
Operations on Disjoint sets
Applications
CSE310 Lecture 15: Binary Search Trees
Guoliang Xue
Computer Science and Engineering
Arizona State University
[email protected]
Topics of this lecture
Binary Search Trees
Representation
Search
Min and Max
Successor
Insertion
Deletion
2
Guoliang.X
CSE 310 Review
2/17/2016
Patrick Michaelson
Ian Nall
Topics
Divide and Conquer Algorithm
Base Concept
Merge-Sort
Quick Sort
Analysis of Algorithms
Recurrence
Iterative
Insertion Sort
Correctness through Loop Invariants
Heaps
Priority Queue
Dec
ARIZONA STATE UNIVERSITY
CSE 310, All Sections Data Structures and Algorithms Spring 2016
Solution to Assignment #5
1. Bridge Crossing. [15 marks total; 5 marks each]
(a) The idea of the algorithm is as follows. Repeat the following step n 2 times: send t
ARIZONA STATE UNIVERSITY
CSE 310, All Sections Data Structures and Algorithms Spring 2016
Assignment #5
Available Tuesday, 04/05/2016; due Tuesday, 04/26/2016
This assignment covers Chapters 16 (greedy algorithms) and Chapter 2224 (graphs and graph algori
1. a. Well prove by induction on that that 2 for any nonempty binary
tree with height 0 and the number of leaves
For the basis case of
= 0 we have 20 1 For the general case, assume that 2 holds
for any binary tree whose height doesnt exceed
Consider an ar
ARIZONA STATE UNIVERSITY
CSE 310, All Sections Data Structures and Algorithms Spring
2016
Solution to Assignment #4
1. Traversals of BSTs. [5 marks total; 1 mark each]
(a) The sequence: 2, 252, 401, 398, 330, 344, 397, 363 is valid as the keys visited sat