ProjectSpecification.doc

advertisement
1
Linked Lists: (1 student)
2
Implement a double-linked list that support the following
operations:
I - Insert
D - Delete
S - Search for a record
The Hanoi Towers: (1 student)
Write a program that solves the Hanoi Towers problem for N<10
(N is the number of disks).
3
Input : N – number of disks originally stacked in order of size on first peg.
Output: The list of actions that we must take in order to move them from one
peg to the other.
Regular Expression: (1 student)
Write a program that given a set of Strings as input determines whether they are
a member of the language defined by a given REGULAR EXPRESSION.
Example:
The regular expression a*b determines the language of all
strings that contain only one “b” at the end. Sample members of
this language are “b”, “ab”, “aab”, “aaab”, “aaaab”, …
Input :
First line : A regular expression
Second line: number n
Next n lines : n strings from the same alphabet
4
Output :
N lines : you print YES if the “n”th string matches the regular expression
you print NO if the “n”th string doesn’t matches the regular expression.
Longest Common Substring: (1 student)
Write a program that given two text strings as input finds their
Longest Common Substring.
5
Input : you are given two strings as input
Output : you must print out their longest common substring as output
Searching the Dictionary: (1 student)
Write a program that given a text file as input indicates whether
each word in the text belongs to a defined dictionary. The
dictionary is a list of words accommodated in memory.
Input : you have the dictionary in memory, you are given a text file as input
Output : you indicate whether each word is in the dictionary (by printing YES
) or not (by printing NO)
6
In-place Word Reverser: (1 student)
Write a program that reverses every word in a text file. The operation must be
done IN PLACE which means the words shall remain in their original position in
the file.
7
Input : you are given a text file as input
Output : the output is a text file that has all the words of the input file but they
are all reversed.
Painter: (2 students)
Write a program that takes a bitmap file as input and performs the following
operations on it upon request by the user:
c- draws a circle
s- draws a square
l- draws a line
8
Input : you take a bmp file as input, and a set of instructions
Output : the modified bmp file
Exam Scheduling: (3 students)
It’s the end of the term and final exams are about to be held. There are several
courses with different number of students and a number of rooms with different
number of chairs. Some students have registered in more than one course so
their exams can not overlap. It’s your job to come up with a schedule for the
finals so that every one can take their exams.(This could be a one day or N day
schedule)
Input : first line number of the final exams to be scheduled N
In the next N lines the duration and number of students of each exam is
given by two integers separated with a space.
The next line has integer M as the number of available classes.
The next M lines have the capacity of the “i”th class.(0<i<M+1)
The last line has integer P as the number of days you have for setting up
finals.
9
Output: for each class output their schedule for the coming P days.
Elevator Scheduling: (3 students)
We have three separate elevators in a building, each of them have their own
keypad and they can hold 10 people at the time. Your job is to implement an
assembly program that manages and responds to the requests of the residents
of the building. You should implement the appropriate Interrupt Handlers in this
project.
Input: N is the total number of requests made to the elevators.
The next N-lines have the following information separated by space.
-The number of the elevator to which the request is made
-the time of the request
-the direction of the request(up/down)
-number of passengers who want to get in
-the floor they are in
-the floor they want to go to
Output : for each elevator print out its schedule
10 Printer Spooler: (3 students)
You should implement Printer Scheduler which receives the requests for prints
from different components of the operating system and manages them (puts
them in a queue) in accordance to their size and priority.
Input: in the first line there are numbers M and N respectively where M is the
number of operating system components and N is the number of requests
made to the printer.
In the next N-lines the following information is provided and separated by
spaces:
-
an integer indicating the number of the component that sends the
request
an integer indicating the priority of the job(lower numbers represent
higher priorities)
an integer indicating the minute length of the job
output: you must schedule the printer so that all the jobs are processed in
two ways:
- by their priority
- minimizing the total waiting time
11 Packet Switching: (3 students)
You must implement a program that handles the packet switching program in a
network station which has several in/out ports. We have a switch or router. Each
packet has a source and destination port. At each second any number of packet
could come in and go out of any of the ports.You have a buffer with definite
size; it’s your job to program the switch so that it can handle packets.
Example: At time slot 0, you have two packets from ports 1 and 4 which both
want to go to port 2. It’s your job to decide in what order they should line up.
(According to their importance and size).
12 Alarm: (2 students)
You have to implement a personal alarm. The personal alarm must be able to
signal at the specified time. It must be able to sort and store the events in your
agenda.
13 Huffman Code: (3 students)
Write a program that takes an input file in text format and produces the Huffman
Code for it. Output the text coded by the Huffman Algorithm.
14 LCM and GCD: (2 students)
Write a program that given two integers calculates their greatest common
divisor and their Least Common Multiple.
15 Euclidean Algorithm: (2 students)
Implement it in both Iterative and Recursive Methods. (For finding the GCD)
16 Multiplication of Polynomials: (2 students)
Write a program which multiplies two polynomials. The polynomials are defined
by reading the polynomial coefficients from the input.
Note: Implementations with more efficient algorithms and better time order,
receive higher grades.
Input: first line are m integers defining
x m ’s coefficients respectively.
n
Second line are n integers defining x ’s coefficients respectively.
Output: their product as a polynomial with m+n integers defining the answers
coefficients.
17
Prime Numbers Counter: (1 student)
Write an assembly program which counts the number of 32 bit prime numbers.
These prime numbers fall in the range of 21474836 and 424967295.
Output: print out the prime numbers.
18 Random Number Generator: (2 student)
Implement a generator for a sequence of random numbers. The range of the
numbers will be determined every time the program starts its execution.
(Maximum range is 65536). You will provide the number of sequence sentences
and the seed (for generating a random number) as input to the program. Note
that seed ¡ 0 means that Time of system will be used.
Note: implementing different algorithms and comparing them is suggested.
Input : N the number of random numbers that you have to generate
Output: N random numbers
19 CRC: (1 student)
Write a program that accepts n 8-bit characters, computes and displays their
CRC (Cyclic Redundancy Code) using the following polynomial generator.
G(X) = X5 + X3 + 1
Algorithm:
A: XOR the next character with the G(x)
B: Shift the result one bit right
C: If last character is not reached, go to point A
20 My Birthday Book: (2 students)
Write a program that sorts the given list of entries alphabetically in ascending or
descending order. Each record of the list consists of two parts: Name and date
of Birth. The program must support the following commands:
f) Sort according to names
l) Sort according to last names
a) Sort in ascending order
d) Sort in descending order
q) Quit
21 Polyndrome: (1 student)
Write a program that counts the number of Polyndromes (words that remain the
same after being spelled backwards) in an input text file.
Input: input text file
Output: the number of polyndromes in the input.
22 Definite Integral Computation: (1 student)
Write a program to compute the definite integral of a given polynomial function
of a maximum order of 5. The polynomial is mdefined by reading its coefficients
as input and integration interval. Use the different Numerical integration
methods.
23 Traffic Light: (2 students)
You must implement the traffic light scheduler for a set of crossroads. The map
of the city and the density of cars on each way will be given to you.
There are streets which only have one lane, but there are cars who want to
pass from both sides. You must decide how they should do this.
24 Grey Code: (1 student)
Implement a program that produces the Grey Code for a binary string.
25 6800 Animation Project: (3 students)
The program Should support the following commands:
a) Accepting an instruction
b) Reporting Syntax Fault if any exists
c) Generating Machine Code
d) Showing the execution of the instructions graphically
This project has to be implemented in C or C++ and can have
extra credit if the program has high quality.
Download