You are on page 1of 5

Algorithms And Data Structures In C Assignment Page 1 of 5

ASSIGNMENT REQUIREMENTS:
You are required to submit a hardcopy as well as a soft copy of your source code. You
may use your own PC or a computer in the college for completing this work. You are
required to present when you have submitted your assignment. However your system
must work on college PCs.

Referencing code

If you use some code or ideas for code which have been taken or adapted from another
source (book, magazine, internet, forum etc.) then this must be cited and referenced using
the Harvard Name convention within your source code. Failure to reference code
properly is considered as plagiarism.

PART A: GRAPHS

The graph below shows the directed cost of travel between several connected cities A-H.
Students are required to illustrate the following criteria with suitable explanations.

- Apply Dijkshtra’s Algorithm to determine the minimum cost of travel from E to


every other city in the graph.
- Draft the shortest path tree from the results of the algorithm.
- Demonstrate Depth Frist Traversal and Breadth First Traversal over the graph
from the starting vertex B.

Asia Pacific University of Technology and Innovation 2015


Algorithms And Data Structures In C Assignment Page 2 of 5

PART B: STACKS

Write a program for an automated warehouse. The merchandise is stored and retrieved
from the warehouse using a computerized robotics system. The procedure for storing and
retrieving from the warehouse is as follows:

1. A truck with merchandise pulls up to the loading dock.


2. A robot called a Stacker, retrieves the merchandise from the truck and stacks the
boxed merchandise onto itself.
3. Once the Stacker has reached its capacity or it empties the truck, the Stacker
moves into the warehouse with the merchandise.
4. In the warehouse, Stacker unload items starting with the box on top, and loads it
into the appropriate storage bin based on the bin id on each box which identifies
the type of merchandise in the box.
5. Once the Stacker is empty and if the truck is not empty, the Stacker returns to the
truck to get another load. If the truck is empty the Stacker's job is done.
6. As merchandise is needed from the warehouse, merchandise
removed from the top of the appropriate bin.

Write your program to simulate this procedure above, using the following guidelines.

- The size of the truck is allocated dynamically according to user input. The number
of boxes hold by the truck is based on user input.
- The Stacker can hold up to 5 boxes.
- There are 5 different types of merchandise, thus 5 different storage bins.
- Each bin can hold up to 5 items. If a new item needs to go into a bin that is full,
the item that is at the top of the bin is removed and thrown away using the stack
concept.
- Each box has a bin id number and an item id number. Bin id numbers are 0 to 4.
- Input: item id and bin id for each box on truck (The input order is the order in
which boxes are taken off the truck.)
- Output: item id and bin id (The output shows the order the warehouse would be
emptied if we start at bin 0, then bin 1, then bin 2, etc....)
- The object stacker and storage bins are stacks.

Sample: Input: item id bin id


234 0
345 2
123 0
456 3
890 2
999 4
333 2
322 3
111 2
112 2
113 2
114 2

Asia Pacific University of Technology and Innovation 2015


Algorithms And Data Structures In C Assignment Page 3 of 5

Output: 234 0
123 0
345 2
114 2
113 2
112 2
111 2
456 3
322 3
999 4

DELIVERABLES

You are required to submit:

Documentation (hardcopy)
1. Cover page
2. Table of contents
3. Introduction
4. Explanations :
Part A: Algorithm
Part B: Data structure concepts implemented (with code snippet)
5. Output :
Part A: Screenshots of outputs when program is executed – with some
explanation
6. Additional features (optional)
7. Conclusion
8. References

CD Content (softcopy)
1. Documentation report (.docx/.doc/.rtf)
2. Source file (.c file)
3. Executable file (.exe file)
4. Header files (.h files) - optional

Asia Pacific University of Technology and Innovation 2015


Algorithms And Data Structures In C Assignment Page 4 of 5

Marking Scheme

NAME : ID :
Marks
Criteria (PART-A) Good Average Poor Very
Excellent
Poor
1. Correctness of the application of the (5) (4) (3) (2) (1/0)
algorithms
2. Steps and explanation of the working (9-10) (7-8) (5-6) (3-4) (0-2)
of the algorithms
3. Presentation of the solutions (5) (4) (3) (2) (1/0)
obtained
4. Discussion and Critical Appraisal (5) (4) (3) (2) (1/0)

SUB-TOTAL (T1)

Marks (5 marks for each criteria below)


Criteria (PART-B) Excellent Good Average Poor Very
Poor
5. Correctness of the program and (9-10) (7-8) (5-6) (3-4) (0-2)
accomplishment of the required
functions
6. Usefulness of instructions for (5) (4) (3) (2) (1/0)
compiling and running the
program including comment lines
in source codes.
7. Reporting of appropriate tests of (5) (4) (3) (2) (1/0)
program execution
8. Discussion and Critical Appraisal (5) (4) (3) (2) (1/0)

SUB-TOTAL (T2)

Total Marks = (T1 + T2) *2

Asia Pacific University of Technology and Innovation 2015


Algorithms And Data Structures In C Assignment Page 5 of 5

Comments:

Performance Criteria

The criteria used to evaluate the assignment are as follows:

PART - A
 Degree of correctness of the applied algorithmic technique.
 Explanation of the working of the discussed algorithm.
 Depth of discussion – listing of section(s) that did not meet requirements and/or
code extracts of sections that met requirements.
 Critical Appraisal

PART - B
 Appropriateness of coding techniques.
 Appropriateness of the C programming facilities used
 Program runs appropriately
 Usefulness of instructions for compiling and running the program including
comment lines in source codes.
 Presentation of the source code listings

Asia Pacific University of Technology and Innovation 2015

You might also like