No More Worries!

image Our orders are delivered strictly on time without delay

Paper Formatting

  • Double or single-spaced
  • 1-inch margin
  • 12 Font Arial or Times New Roman
  • 300 words per page

No Lateness!

image Our orders are delivered strictly on time without delay

Our Guarantees

image

  • Free Unlimited revisions
  • Guaranteed Privacy
  • Money Return guarantee
  • Plagiarism Free Writing

Sorting Algorithms and Empirical Analysis

Implement the various sorting algorithms we have discussed
in class for lists of integers. Then, you will measure how much CPU time each algorithm takes
for arrays of varying sizes and construct a report comparing and contrasting each algorithm and
discussing how real-world performance mirrors (or not) theoretical performance.
Algorithms to implement
• Bubble – Section 3.1
• Selection – Section 3.1
• Insertion – Section 4.1
• Merge – Section 5.1
• Quick (use 1st element as pivot) – Section 5.2
• Heap – Section 6.4. You must implement your own Heap data structure. Use the topdown method discussed in class to build the heap.
• Counting – Section 7.1
Driver (Main Program): Your main program will generate integer arrays of size 5, 10, 50, 100,
200, 400, 800, 1600, 2400 (or the maximum size your computer will allow) and execute the
sorting algorithms on each of the arrays. You will need to use functions to measure executiontime of each call to each algorithm on each array.
You are allowed to use any programming language of your choice for this assignment. You must
document your code.
With the timing information you collect from your program, write a 2-page, double-spaced
report describing the results. The following are questions (not an exhaustive list) to consider:
• If I plot the time for a specific algorithm, does the curve look like similar to the function
of the asymptotic class?
• How large must the arrays before algorithms such as MergeSort and QuickSort are
faster than Bubble/Selection/Insertion sort?
• Are there algorithms that have similar timing curves?

Sample Solution

njustly towards its own people or have unjustly taken land from the home nation (Begby et al (2006b), Page 310&313); to “teach its enemies a lesson,” but mainly to achieve the aim of war. This validates Aristotle’s argument: ‘there must be war for the sake of peace (Aristotle (1996), Page 187). However, Frowe argues “self-defence” has a plurality of descriptions, seen in Chapter 1, showing that self-defence cannot always justify one’s actions. Even more problematic, is the case of self-defence in war, where two conflicting views are established: The Collectivists, a whole new theory and the Individualists, the continuation of the domestic theory of self-defence (Frowe (2011), Page 9& 29-34). More importantly, Frowe refutes Vittola’s view on vengeance because firstly it empowers the punisher’s authority, but also today’s world prevents this action between countries through legal bodies like the UN, since we have modernised into a relatively peaceful society (Frowe (2011), Page 80-1). Most importantly, Frowe further refutes Vittola through his claim that ‘right intention cannot be used as an excuse to wage war in response to anticipated wrong,’ suggesting we cannot just harm another just because they have done something unjust. Other factors need to be considered, for example, Proportionality. Thirdly, Vittola argues that war should be avoided (Begby et al (2006b), Page 332) and that we should proceed circumstances diplomatically. This is supported by the “last resort” stance in Frowe, where war should not be permitted unless all measures to seek diplomacy fails (Frowe (2011), Page 62). This means war shouldn’t be declared until one party has no choice but to declare war, in order to protect its territory and rights, the aim of war. However, we can also argue that the war can never be the last resort, given there is always a way to try to avoid it, like sanctions or appeasement, showing Vittola’s theory is flawed. Fourthly, Vittola questions upon whose authority can demand a declaration of war, where he implies any commonwealth can go to war, but more importantly, “the prince” where he has “the natural order” according to Augustine, and all authority is given to him. This is further supported by Aristotle’s Politics ((1996), Page 28): ‘a king is the natural superior of his subjects.’ However, he does later emphasise to put all faith in the prince is wrong and has consequences; a thorough examination of the cause of war is required along with the willingness to negotiate rival party (Begby et al (2006b), Page 312& 318). This is supported by the actions of Hitler are deemed unjustly. Also, in today’s world, wars are no longer fought only by states but also non-state actors like Al-Queda and ISIS, showing Vittola’s normative claim on authority is outdated. This is further supported by Frowe’s claim that the leader needs to represent the people’s interests, under legitimate authority, which links on to the fourth condition: Public declaration of war. Agreed with many, there must be an official announcement on a declaration of war (Frowe (2011), Page 59-60&63). Finally, the most controversial condition is that wars should have a reasonable chance of success. As Vittola reiterated, the aim of war is to establish peace and security; securing the public good. If this can’t be achieved, Frowe argues it would be better to surrender to the enemy. This can be justified because the costs of war would have been bigger (Frowe (2011), Page 56-7). Consequently, jus ad bellum comprises several conditions but most importantly: just cause and proportionality. This gives people
PLACE AN ORDER NOW

Price Calculator

Subject:
Type:
Pages/Words:
Single spaced
approx 275 words per page
Urgency:
Level:
Currency:
Total Cost:

12% Discount

image

  • Research Paper Writing
  • Essay Writing
  • Dissertation Writing
  • Thesis Writing

Why Choose Us

image

  • Money Return guarantee
  • Guaranteed Privacy
  • Written by Professionals
  • Paper Written from Scratch
  • Timely Deliveries
  • Free Amendments