Introduction To Data Abstractions
CSCI 2320 -  Fall 2008 - Tentative Schedule - 12:45 TT

All Labs/Assignments Are Due The Next Class Period Unless Specified Otherwise!

 Class 

Topics

 Reading Assignments 
& Handouts

 Laboratory 
Assignments 

 

# 1

8/28

R

 

 
Introduction To Class
Fill Out Questionnaire (Lab I-5 points)
Distribute & Discuss Course Outline

Review C & Start To Introduce C++

Read the Course Outline

OOP 1 Slides

Questionnaire HW

Simple Sort Lab

Install Visual Studio 2005/2008 On Your Computer

OOP-1-HW.

 

# 2

9/2

T

 


OOP 2
Classes
Constructors
Destructors
Operator Overloads
Function Overloads
Private & Public
Scope Operator
Accessor Methods
Mutator Methods
 
OOP 2 Slides Study for Quiz 1

Spend At Least an Hour Or Two
Developing Classes, Working With
Constructors, Destructors, Function
Overloading, Etc.

OOP 2 HW
Do Some Of OOP2 Homework
In Preparation For Quiz

 

# 3

9/4

R

 

Quiz 1 Read About
HPP & CPP Files

OOP 2 Slide

 

Finish OOP 2 HW

Athlete Class Lab

 

# 4

9/9

T

 

Introduction To Templates
Memory Management
New, Delete
Deep Copy
Shallow Copy
Stack Slides Stack Lab
DUE 9/16

 

# 5

9/11

R

 


Stack Design Options
Static Integer Stack Class
Dynamic Integer Stack Class
Template Stack Class

Constructors
Destructors,
Push
Pop
Empty
Resize
Copy Constructor
Overload =
Deep Copy

Quiz
2
Stack Slides Stack Lab
Extra Credit If  Correct On 9/16
Jury Duty - OK On  9/17

Stack Must Be Adjusted To Ignore Element 0
Will Have To Modify Code Slightly

 

# 6

9/16

T

 


Direct Access Files

Single Linked List - Direct Access File Implementation

Why Direct Access Files?
Why Direct Access Files, As Opposed To Text Files?
Download Application
Visual Studio Projects Re-visited
Execute Binary Outside Visual Studio Net Environment
Redirecting Output To A Text File
Other Files In The Debug Folder
fopen & fclose- Open To Create New File Close File (wb+)
fseek – moving the Read-Write Pointer
fwrite – Writing Direct Access Records
fopen & fclose- Open To Create New File Close File (rb+)
fread – Reading Direct Access Records
Generic Template ReadRecord, WriteRecord, & FileLength

FILE  *FilePtr;
FilePtr = fopen (NewFileName,"rb+");
FilePtr = fopen (NewFileName,"wb+");
fseek(FilePtr, 4 * sizeof(Student), SEEK_SET);
fwrite(&Students,sizeof(Student),(long)1,FilePtr);
fread(&Students,sizeof(Student),(long)1,FilePtr);
Direct Access Files

Optional
Chap08
TextFiles

Optional
Chap11
Direct Access File

Practice DA
Files 

 

# 7

9/18

R

 

Stack Class
Direct Access Files

Create Direct Access Templated File Display
Read Record
Write Record
File Length

Review Direct Access Files
Direct Access Files DA_Simple Sort Lab

Study For Exam 1

 

# 8

9/23

T

 


Review For Exam
Review Direct Access Files

Introduction To The Direct Access File
Implementation Of A Double Linked List

Generic Design

ListHeader Class
DLNode Class
Inheritance
PartListHeader Class
AutoListHeader Class

 

  DA-DLList.zip

 

# 9

9/25

R

 

Exam I    

 

# 10

9/30

T

 

Explain DA-DLList Management
Constructor For Existing Files
GetNode
FreeNode
Display
  DA-DLList-Hicks.zip

 

# 11

10/2

R

 

Explain  Internal Memory DLList Management
Constructor/Destructor
GetNode
FreeNode
Display
  DA-DLList-DLList-1 Lab
Due 10/7

 

# 12

10/7

T

 

Push
Pop
Empty
Insert
Internal Memory DLList 2
Direct Access Files DA-DLList 2
 
  DLList 2-Push-Pop-Empty-Insert-Remove Lab

 

# 13

10/9

R

 

   Mr. Greg Hoffer
Software Testing, Version Control,
Project Management, Documentation
 

Inplace
InsertAfter

KeyTable
Key - Ptr
AddKeyToTable
DeleteKeyFromTable

  DLList-InsertAfter-Inplace Lab

 

# 14

10/14

T

 


Analysis Of Algorithms
Assume # R/W Per Second = 200
No Records = 1,000,000

How To Compute # Read/Writes Per Second
Optimized Drive
Fragmented Drive

Structure : One Unordered File For Data
Compute Average/Worst Search Time
Compute Average/Worst Add Time
Compute Average/Worst Delete Time

Structure : One Ordered File For Data
Must Alwasy Be Maintained In Order
Compute N*N Sort Time
Compute NLogN Sort Time
Compute Average/Worst Search Time
Compute Average/Worst Add Time
Compute Average/Worst Delete Time

Structure : Double Linked List File File For Data
Assume 100 Evenly Distributed Headers

Compute Average/Worst Search Time (if know which header)
Compute Average/Worst Search Time (if don't know which header)
Compute Average/Worst Add Time (if know which header)
Compute Average/Worst Delete Time (if know which header & Ptr)

Structure : Double Linked List File File For Data
KeyTable(s) Available For All Search
Assume 100 Evenly Distributed Headers

Compute Average/Worst Search Time

Introduction To Binary Trees
Balanced Tree
Complete Tree
Skew Tree
Start BinTree application.
 

  DLList-Search-Delete Lab

 

# 15

10/16

R

 


Quiz
40% On Analysis Of Algorithms
60% On DLList & DA-DLList

SetLeft
SetRight
Inplace

Inorder Traversal
PreOrder Traversal
PostOrder Traversal

Board Work
Single Linked List
Double Linked List
Circular Linked List
Double Circular Linked List
 

  BinTree-Const-Dest-Get-Free-SetLeft-SetRight-Inplace Lab

 

# 16

10/21

T

 


Binary Tree Applications
InOrder Traversal
PreOrder Traversal
PostOrder Traversal
 

Non-Recursive Tree Traversals

Left InThreaded Binary Tree
General Tree

Figuring Binary Tree Distribution
Skew To Balanced
 
 

BinTreeTraversals
BinTree-Stats-Levels Lab
Due 10/28

 

# 17

10/23

R

 


3 Binary Tree
Deletion Strategies
1-Lazy Deletion (may not use)
2-Extend-Level Deletion (80% credit)
3- Bubble-Up Deletion (100% Credit)

----------------- Material For Exam III -----------------
Introduction To Graph Theory
Königsberg - Seven bridges
Car 54 Poster
Traveling Salesman Problem
Four Color Problem
Maps-Connectivity
Define Graph G = (V,E)
Verticies (V) - Nodes
Edges (E) - Arcs
Adjacency
Connectivity
Undirected Graphs
V = {A, B, C, D, E}
E = { (A,B), (A,D), (A,E), (B,E) }
Sketching Graphs
Directed Graphs
V = {A, B, C, D}

GraphTheory1
BinTree-Stats-Levels Lab

 

# 18

10/28

T

 


Graph Theory

E = { (A,B), (A,D), (A,E), (B,E) }
Sketching Graphs
Directed Graphs
V = {A, B, C, D}

Planar Graphs
Problems with Adjacency Matrix Solutions
E-Mail & Airline Reservation
IP Addresses ==> 4,294,967,296
Adj Matrix ==> 4,294,967,296 x 4,294,967,296 =
18,446,744,073,709,551,616 cells
Sparce - Dense - Graph
Vertex Adjacency
Vertex Connectivity
Adjacency List
Creating Adjacency Lists
Data Inputs
Data Dictionary
Build Adjacency List For
Shortest Path
Dijkstra's Algorithm
 

GraphTheory1

GraphTheory2
Study For
Exam

 

# 19

10/30

R

 

Exam II  

 

Delete-DeleteTree
Due 11/4

 

# 20

11/4

T

 


Cross Roads Game
.NET Programming
  Cross-Roads-Game-1Lab

 

# 21

11/6

R

 

Graph Theory

Build Adjacency List For
Shortest Path
Dijkstra's Algorithm

 
AVL Trees
Two Russians named Adelson-Velskii and Landis.

An empty tree is height balanced.

For a tree T, T-L shall denote the left subtree and T-R shall denote the right subtree.

For a tree T, h-L shall denote the height of the left subtree (T-L) and h-R shall denote the height of the right subtree (T-R).

A non empty binary tree is HEIGHT BALANCED if and only if
T-R and T-L are height balanced
-1 <= (h-L) - (h-R)| <= +1

The BALANCE FACTOR of a node T in a binary tree bf(T) = h-L - h-R.

 For any node T in an AVL tree, bf(T) = -1, 0, or +1

Introduction To AVL Trees
Rotate Left
 

 

AVLTrees

RotateLeft

RotateRight

DoubleRotateRight

 
AVL-Applet-Tutorials HW

 

# 22

11/11

T

 

Work On Cross Roads   AVL-Tree-Single-Rotates
Due 11/18

 

# 23

11/13

R

 


AVL Trees

Two Russians named Adelson-Velskii and Landis.

An empty tree is height balanced.

For a tree T, T-L shall denote the left subtree and T-R shall denote the right subtree.

For a tree T, h-L shall denote the height of the left subtree (T-L) and h-R shall denote the height of the right subtree (T-R).

A non empty binary tree is HEIGHT BALANCED if and only if
T-R and T-L are height balanced
-1 <= (h-L) - (h-R)| <= +1

The BALANCE FACTOR of a node T in a binary tree bf(T) = h-L - h-R.

 For any node T in an AVL tree, bf(T) = -1, 0, or +1

Introduction To AVL Trees
Rotate Left
Rotate Right
Double Rotate Left
Double Rotate Right
 

   

 

# 24

11/18

T

 


Introduction To B Trees & B+ Trees

B Tree Requirements
M-Way Tree
Searching A B Tree
M = 5 Data Split -Two Levels
M = 5 Data Split - Three Levels
Size Of A B Tree Node
Calculating M For A Given Buffer Size & Info Size
2 Files - Header File & Node File

B+ Tree Requirements
M-Way Tree
Searching A B+ Tree
M = 5 Data Split -Two Levels
M = 5 Data Split - Three Levels
Size Of A B+ Tree Node
Calculating M For A Given Buffer Size & Key Size &  Info Size
3 Files - Header File & Node File & Data File

Difference Between A B Tree & A B+ Tree
Search Efficiency
At Least 1/2 Full - Average 3/4 Full - Max = 4/4 Full
No Reads & Writes

Demo With FoxPro Database 

B+Tree B+Tree - HW

AVL-Tree-Double-Rotates
Due 12/2

 

# 25

11/20

R

 

Introduction To Hashing   Cross-Roads-Game-Lab 2
Due 12/9

No Assignments Accepted After
Noon on 12/10

 

# 26

11/25

T

 

Work On AVL Trees    

 

# 27

11/27

R

 

Thanksgiving

 

# 28

12/2

T

 

Hashing Completed    

 

# 29

12/4

R

 

Exam III    

 

# 30

12/9

T

 

Red Black Trees
Heaps & Heap Sort
   

12/10
12/11

Reading Days Reading Days
No assignments will be accepted after 12/10/2008 Noon