Download B-tree construction & Traversal

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
[Project 1]
Computer Architecture
B-tree construction & Traversal
YongSoo Bae
[email protected]
Room 236, Engineering Building
Project1

Due date : 2010. 5. 14. (Mon.)

Main Purpose of this Project
 Understand ARM assembly language and Recursive Function algorithm
 Develop a ARM machine program
 ARM Developer Suite v1.2
 Using this program, it’s possible to run a ARM assembly code
 Download an Installation Guide from the following website :

http://it.korea.ac.kr/class/2012/1_com/project1/project_gauid.zip
 B-tree construction & Traversal
ARM Developer Suite

Install guide in zip file is available, further information
is searched in internet.

You can use developer guide documents in PDF polder
 ADS_AssemblerGuide_B.pdf
 ADS_DeveloperGuide_D.pdf

You can get much information to search it from google
B-tree construction & Traversal

What to submit?
 A code file [student number.s] : 60%
 ex) 20XX170XXX.s
 Include detailed comments inside your code
 A WORD/HWP document that describes your algorithm : 40%
 File name is same as code file, ex) 20XX170XXX.xxx
 You can use any word processor.
 You must explain your code and algorithm in detail.
 Your document will be used to determine partial credit if the code
fails to run.
 Save your files in [student number] folder, and zip.
 Follow this example. ex) 20XX170XXX.zip
 Submit your zip file through E-Mail < [email protected] >
B-tree construction & Traversal

B-Tree
 A B-tree is a tree data structure that keeps data sorted and allows
searches, sequential access, insertions, and deletions in logarithmic
time
 The B-tree is a generalization of a binary search tree in that a node
can have more than two children
 2-4 tree : it is B-tree that has 4 max children and 3 max data
 You can consult B-tree information from internet
B-tree construction & Traversal
< B-tree construction & Traversal>
Construct B-tree
 Insert 30 integer sequence of right insertion
sequence to tree.
 Test B-tree implementation, you can use simple
sequence
 Use insert function that use memorized data in
memory, not input data by keyboard
1
2
3
4
5
6
7
8
9
10
Insertion Sequence
0x
1x
37
923
445
715
655
933
760
949
929
917
622
501
358
765
241
645
502
4
287
974
2x
667
970
587
244
50
218
929
321
102
885
0x
Deletion Sequence
1
2
241
933
3
885
Delete element
 Delete 3 integer sequence of right deletion
sequence in tree
 You must use insert function that use input data
by keyboard
Show
traversal sequences from the B-tree.
 pre-order, in-order, and post-order
Upper value is example .
It will be change 10 days
ago from deadline.
Use this sequence for
input data
B-tree construction & Traversal

Tree traversal : tree structures can be traversed in many different
ways. Starting at the root of a binary tree, there are three main steps
that can be performed and the order in which they are performed
defines the traversal type.
 To traverse a non-empty binary tree in pre-order, perform the following
operations recursively at each node, starting with the root node
 Visit the root ⇒ Traverse the left subtree ⇒ Traverse the right subtree
 To traverse a non-empty binary tree in in-order, perform the following
operations recursively at each node
 Traverse the left subtree ⇒ Visit the root ⇒ Traverse the right subtree
 To traverse a non-empty binary tree in post-order, perform the
following operations recursively at each node
 Traverse the left subtree ⇒ Traverse the right subtree ⇒ Visit the root
B-tree construction & Traversal
Input
*****************
OPTION
*****************
1. Insert sequence
2. Delete data
3. Pre-order
4. In-order
5. Post-order
*****************
>3
Output
*********************************
RESULT
*********************************
Root : 244
| 4,37,50 | 102,218,241 | 244,287
| 321 | 358,445 | 501,502,587 |
*********************************
This is only example.
 At 10 days ago from deadline, I will update correct data and result.
 You can test simple data that you choose.

B-tree construction & Traversal

Point!

You have to use recursive function.

If you don’t understand about this project,
You can use E-mail < [email protected] >
or Use the board in our laboratory homepage
< http://it.korea.ac.kr >
 Use only assembly language, don`t use mixing c/c++
 Don’t use disassembler. I will check this strictly
 To get input data from console except insertion put output
data and to console, you must use swi


http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0058d/BA
CDHDCD.html
http://infocenter.arm.com/help/topic/com.arm.doc.dui0058d/DUI0058.pdf
Related documents