Sie sind auf Seite 1von 3

Data Structures and Algorithms (Fall 2012)

Guidelines for Programming Assignment #3: Prolems 1 ! 2


Please read the guidelines properly and do adhere to these guidelines. Your assignment may not be
evaluated and may be considered as not submitted if you do not follow the guidelines.
THE DE! "#D $%$" &%'' (E )*HED+'ED ,-! 30"#$ %&#%'() !#&"-D). (E
P-EP"-ED "**!-D%#.'Y.
%mportant #ote/ The aim of this assignment is not 0ust implementing the algorithms1 but proper
e2perimental analysis of these algorithms. You must be able to draw useful inferences about the
algorithms 3li4e time comple2ity1 how does algorithm behave on large input si5es1 which algorithm is
better for practical applications etc6 depending on your e2perimental observations1 and 0ustify these
inferences. 7+)T %P'EE#T%#. THE "'.!-%TH) &%'' #!T .ET Y!+ "-8). You are
e2pected to have a proper understanding and insight about the behaviour of the algorithms. "
significant portion of the mar4s will depend on the inferences you draw.
"lso1 in problem 91 plots have not been e2plicitly as4ed for1 but it is implied in the problem. Y!+
+)T )+(%T THE P'!T) ,!- (!TH THE P-!('E) %# !-DE- T! 7+)T%,Y Y!+-
%#,E-E#*E).
"')! #!TE TH"T THE E:PE-%E#T"' !()E-$"T%!#) &%'' (E $E-%,%ED "T THE T%E
!, DE!.
-eports/
-EP!-T ,!- E"*H P-!('E +)T #!T (E !-E TH"# 9 P".E). %nclude in the report1 the
answers to theoretical ;uestions as4ed1 e2perimental results1 plots1 and the inferences that you have
made. -eports must be concise and to the point. Plots must be properly scaled and readable. The
reports must be typed and you need to bring the print outs of the reports. You must ma4e plots using
some s<w tools 3gnuplot1 matlab1 e2cel etc6 and get their print outs. H"#D D-"&# P'!T) &%''
#!T (E "**EPTED. The plots must be such that you can draw useful inferences from them1 li4e
which algorithm is better1 whats the time comple2ity and how does algorithm behave on very large
input si5es. Therefore choose the scales intelligently. THE E:PE-%E#T"' -E)+'T) TH"T Y!+
E#T%!# %# THE P'!T) !- !THE-&%)E &%'' (E $E-%,%ED "T THE T%E !, DE!. %n
assignment =>1 many students had drawn the plots as e2pected according to the theoretical time
comple2ity of the algorithm and they lost mar4s. P'E")E #!TE TH"T Y!+ H"$E T! D-"& THE
E:PE-%E#T"' P'!T).
D! #!T +P'!"D THE -EP!-T) %# !!D'E. (-%#. THE -EP!-T) *+ #$( &,ASS A#
-:00A. %+ 2-"#$ %&#%'().
Programs/
Problem >/
%nput and !utput format/
The program must ta4e 9 inputs in the following order.
>6 $alue of n 3number of bits in the 9 numbers6
96 "n integer choice3will have value either > or 96
.enerate two n bit numbers randomly and proceed as follows.
%f the user enters choice as >1 then the program should first display the two n bit numbers and then
it should display the multiplication as obtained by the 9 algorithms separately.
%f the choice is 91 then the program should display the time ta4en by both the algorithms in
multiplying the two numbers. The time should be as precise as possible. %n this case you dont need
to output the numbers or the multiplication.
You may modify your code to get the e2perimental results but the final code that you submit should
be according to above specifications. "')! #!TE TH"T THE E:PE-%E#T"' -E)+'T) "#D
THE !()E-$"T%!#) ,-! THE P'!T) &%'' (E $E-%,%ED "T THE T%E !, DE!.
Problem 9/
%nput and !utput format/
The program must ta4e 9 inputs in the following order.
>6 $alue of n 3number of elements to be sorted6
96 "n integer choice3will have value either > or 96
.enerate n numbers randomly and proceed as follows.
%f the user enters choice as >1 then the program should first display the n numbers and then the
sorted lists as obtained by merge sort and ;uic4 sort separately.
%f the choice is 91 then the program should display the time ta4en by both the algorithms in sorting n
numbers. The time should be as precise as possible. %n this case you dont need to output the
numbers or the sorted lists.
You may modify your code to get the e2perimental results but the final code that you submit should
be according to above specifications. "')! #!TE TH"T THE E:PE-%E#T"' -E)+'T) "#D
THE !()E-$"T%!#) ,-! THE P'!T) &%'' (E $E-%,%ED "T THE T%E !, DE!.
ar4s (rea4up
Each problem is of ?@ mar4s divided as follows/
Problem >/
Program and Demo/ 9@ mar4s
$iva and -eport/ A@ mar4s
Problem 9/
Program and Demo/ >@ mar4s
$iva and -eport/ B@ mar4s
!ther %nstructions
The programs must be in * and must compile in .** compiler. The constraint of programming
language has been imposed so that programs can be easily chec4ed for plagiarism using moss.
The programs should be readable and you should use good programming habits.
The programs should have separate functions for separate tas4s.
Proper comments must be given wherever necessary.
Programs will be chec4ed for plagiarism in moss and strict action shall be ta4en if plagiarism is
observed. The reports will also be chec4ed for plagiarism. There is 5ero tolerance for plagiarism.
#ame the program as rollnoCrollnoCprogramno.c. ,or e2ample1 the name of the program >
submitted by the group having roll numbers >@A@D and YE9AB must be >@A@DCYE9ABCprogram>.c
Fip the 9 programs as rollnoCrollnoCProg"ssignA.5ip. ,or e2ample1 the name of the 5ip file submitted
by the group having roll numbers >@A@D and YE9AB must be >@A@DCYE9ABCProg"ssignA.5ip. +pload
this 5ip file in moodle.
#ot adhering to guidelines attracts penalty. %t has been observed that many students did not follow
the guidelines in the first two assignments 3%n fact many students were not even aware that
guidelines have been uploaded6. Even the naming conventions were not followed. #o e2cuses shall
be entertained this time. You may be awarded 5ero mar4s if such carelessness is observed.

Das könnte Ihnen auch gefallen