Question 5 (Sorting) Write down the list content at the end of each iteration of the main loop (ie. end of each pass) of Insertion Sort for the following list: [14,12,7,4,18,9]

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

Application: Apply Algorithm (Q5 – Q7)

The following questions ask you to manually apply an algorithm introduced in the lecture and demonstrate your understanding by describing intermediate states of the computation.

 

Question 5 (Sorting)

Write down the list content at the end of each iteration of the main loop (ie. end of each pass) of Insertion Sort for the following list:

[14,12,7,4,18,9]

Use one line for each pass.   

 

Question 6 (Graph Traversal)

Apply Depth First Search (DFS) to traverse the following graph. Start your traversal from vertex 0, and write down the order in which vertices will be visited during the traversal. (image for this question also attached)

Question 7 (Gaussian elimination) (image for this question also attached)

Apply forward elimination to this system of linear equations to put it into the upper triangular form. 

⎛⎝⎜⎜1 1 2225−12−1⎞⎠⎟⎟⎛⎝⎜⎜? ? ?⎞⎠⎟⎟=⎛⎝⎜⎜6 3 13⎞⎠⎟⎟(12−1 122 25−1)(� � �)=(6 3 13)

Write each row operation you use to solve the problem. 

Find the values of x, y, and z using back substitution. 

Write the matrix and the right-hand side after each row operation, for example, the initial matrix and right-hand side can be represented as:

A = [ [1, 2, -1],

        [1, 2, 2],

        [2, 5, -1] ]

b = [6, 3,13]

Note: Do NOT write code. Show the values in A and b after each row operation and then find the values of x, y and z using back substitution.

0
1
6
5
2
4
3
7
8
Transcribed Image Text:0 1 6 5 2 4 3 7 8
1
2 -1 X
12 2 y
25
−1
N
6
3
13
Transcribed Image Text:1 2 -1 X 12 2 y 25 −1 N 6 3 13
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

May I ask for the answer and explanation for question 7?

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Types of Linked List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education