python3 generate_input_sort_comparison.py -n 5000 -s 6 -r 5000 -t {} -a 3 -o input_1_sort_comparison.txt
- n is the number used for input
- s is the number by which n is increased by n times
For example: iteration 1: n = 5000, iteration 2: n = 5000*2 ... upto iteration s - r is the range of random numbers that needs to be generated
- t is the input type (input type is present in the document called assignment1.pdf)
- a is the average number of inputs to be considered
For example: if a=3 and s=2 then, input size 5000 would be generated 3 times and input size 10000 would be generated 3 times - o is the output file name (which would eventually will be the input file for the algorithm execution program)
python3 assignment_sort_comparison.py -i input_1_sort_comparison.txt -a 3 -s 'mqi' -o output_1_sort_comparison.json
- a is the number of times a given sorting algorithm should execute (depends upon the average number 'a' that is provided in the input)
- s is the type of sort to be executed on the input
b - bubble sort
s - selection sort
i - insertion sort
m - merge sort
q - quick sort - i is the input file which the file generated using 'generating input' instructions
- o is the output file for which is of type json (eventually this file would be input for the plot generation script)
python3 plot_graph_sort_comparison.py -i output_1_sort_comparison.json -t "Input Plot 1"
- i is the input file from the following 'algorithm execution' instructions
- t is the title of the plot
- a is the avg_required parameter where you should mention a = true or a = false for it to consider mean or the sum while plotting
NOTE: Change the file names according to the input numbers
For example: input_1..... for 1st input, input_2... for 2nd input and so on