Answered step by step
Verified Expert Solution
Question
1 Approved Answer
there isnt a graph component to this question. thank you! Q5 (10 points) On your scratch paper, draw the portion of the decision tree for
there isnt a graph component to this question. thank you!
Q5 (10 points) On your scratch paper, draw the portion of the decision tree for insertion sort on 5 elements 21, 22, 23, 24, 25 that contains the path from the root node to the permutation . Then answer the following questions on the answer sheet. Here the 1st node on the root to leaf () path is the root node, which contains the comparison a > 02 ? (a) What is comparison at the 2nd node on the root to leaf path? (b) What is comparison at the 3rd node on the root to leaf path? (C) What is comparison at the 4th node on the root to leaf path? (d) What is comparison at the 5th node on the root to leaf path? (e) What is comparison at the 6th node on the root to leaf path? Q6 (12 pts) This question tests your understanding of the time complexities of sorting algorithms. (a) In the decision tree for insertion sort on n elements, what is the length of the shortest root-to-leaf path? Check the corresponding box on the answer sheet. (b) In the decision tree for insertion sort on n elements, what is the length of the shortest root-to-leaf path? Check the corresponding box on the answer sheet. (e) In the decision tree for quicksort on n elements, what is the length of the shortest root- to-leaf path? Check the corresponding box on the answer sheet. (d) In the decision tree for quicksort on n elements, what is the length of the shortest root- to-leaf path? Check the corresponding box on the answer sheet. (e) In the decision tree for mergesort on n elements, what is the length of the shortest root-to-leaf path? Check the corresponding box on the answer sheet. (f) In the decision tree for mergesort on n elements, what is the length of the shortest root-to-leaf path? Check the corresponding box on the answer sheet. Q5: Read the instructions for question 05 in the assignment document. For each of the five sub-questions, check the box that corresponds to the answer. (a): The comparison at the 2nd node on the path: a> 3? 02 > 3? a>? 03 > ? 41 >as? 04>? None of the above (c): The comparison at the 4th node on the path: Q1 > az? 42 > 3? 41 >? 43 >? Q1 > us? 04 > us? None of the above (b): The comparison at the 3rd node on the path: 01 > 3? 42 > 3? 4>? 43 >? 4, >? 44 >as? None of the above (d): The comparison at the 5th node on the path: 01 > 3? u2 > 3? 41 > 4? 43 >1? >? 04 > Us? None of the above (e): The comparison at the 5th node on the path: 01 > 3? 02 > 3? 414? 03 > 24? a> as? 04 >as? None of the above Q6: Read the instructions for question Q6 in the assignment document. For each of the five sub-questions, check the box that corresponds to the answer. (a): Length of shortest root-leaf path for insertion sort: (b): Length of longest root-leaf path for insertion sort: (1) (1) (logn) (logn) e(n) nlogn) nlogn) (n?) 6(n) None of the above None of the above (c): Length of shortest root-leaf path for quicksortsort: (d): Length of longest root-leaf path for quicksort: (1) (1) (logn) (logn) e(n) e(n) nlogn) Halogn) (n?) (n?) None of the above None of the above (e): Length of shortest root-leaf path for mergesort: (f): Length of longest root-leaf path for mergesort: (1) 0(1) (logn) (logn) e(n) e(n) wnlogn) nlog n) (n) (n?) None of the above None of the above Q5 (10 points) On your scratch paper, draw the portion of the decision tree for insertion sort on 5 elements 21, 22, 23, 24, 25 that contains the path from the root node to the permutation . Then answer the following questions on the answer sheet. Here the 1st node on the root to leaf () path is the root node, which contains the comparison a > 02 ? (a) What is comparison at the 2nd node on the root to leaf path? (b) What is comparison at the 3rd node on the root to leaf path? (C) What is comparison at the 4th node on the root to leaf path? (d) What is comparison at the 5th node on the root to leaf path? (e) What is comparison at the 6th node on the root to leaf path? Q6 (12 pts) This question tests your understanding of the time complexities of sorting algorithms. (a) In the decision tree for insertion sort on n elements, what is the length of the shortest root-to-leaf path? Check the corresponding box on the answer sheet. (b) In the decision tree for insertion sort on n elements, what is the length of the shortest root-to-leaf path? Check the corresponding box on the answer sheet. (e) In the decision tree for quicksort on n elements, what is the length of the shortest root- to-leaf path? Check the corresponding box on the answer sheet. (d) In the decision tree for quicksort on n elements, what is the length of the shortest root- to-leaf path? Check the corresponding box on the answer sheet. (e) In the decision tree for mergesort on n elements, what is the length of the shortest root-to-leaf path? Check the corresponding box on the answer sheet. (f) In the decision tree for mergesort on n elements, what is the length of the shortest root-to-leaf path? Check the corresponding box on the answer sheet. Q5: Read the instructions for question 05 in the assignment document. For each of the five sub-questions, check the box that corresponds to the answer. (a): The comparison at the 2nd node on the path: a> 3? 02 > 3? a>? 03 > ? 41 >as? 04>? None of the above (c): The comparison at the 4th node on the path: Q1 > az? 42 > 3? 41 >? 43 >? Q1 > us? 04 > us? None of the above (b): The comparison at the 3rd node on the path: 01 > 3? 42 > 3? 4>? 43 >? 4, >? 44 >as? None of the above (d): The comparison at the 5th node on the path: 01 > 3? u2 > 3? 41 > 4? 43 >1? >? 04 > Us? None of the above (e): The comparison at the 5th node on the path: 01 > 3? 02 > 3? 414? 03 > 24? a> as? 04 >as? None of the above Q6: Read the instructions for question Q6 in the assignment document. For each of the five sub-questions, check the box that corresponds to the answer. (a): Length of shortest root-leaf path for insertion sort: (b): Length of longest root-leaf path for insertion sort: (1) (1) (logn) (logn) e(n) nlogn) nlogn) (n?) 6(n) None of the above None of the above (c): Length of shortest root-leaf path for quicksortsort: (d): Length of longest root-leaf path for quicksort: (1) (1) (logn) (logn) e(n) e(n) nlogn) Halogn) (n?) (n?) None of the above None of the above (e): Length of shortest root-leaf path for mergesort: (f): Length of longest root-leaf path for mergesort: (1) 0(1) (logn) (logn) e(n) e(n) wnlogn) nlog n) (n) (n?) None of the above None of the above Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started