. Given a sequence of integers, a longest increasing sequence corresponds to a longest directed path in DAG (Directed Acyclic Graph), such as 1 → 23 →6 →7, in the DAG below for the sequence 1, 18, 5, 3, 6, 9, 7 2 3 4 5 6 6 7 8

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
icon
Related questions
Question

please explain why the missing entires are 2,3,5 

Given a sequence of integers, a longest increasing sequence corresponds to a longest directed path in a
DAG (Directed Acyclic Graph), such as 1 → 2 → 3 → 6 → 7, in the DAG below for the sequence 1, 2,
18, 5, 3, 6, 9, 7
1
2
2
8
3
1
5
4
3
5
Figure 2: DAG for the sequence 1, 2, 8, 5, 3, 6, 9, 7
The length, L[j], of a longest strictly increasing sequence ending at node indexed, j (index label of a
node is outside the circle), is found using the formula:
L[j] = 1 + max{L[i]: (i, j) € E},
(1)
where (i, j) is a directed edge (arrow) going from index i to index j and E is set of all such directed
edges. The array L[1..8] below, has some entries missing. Fill them up using the formula above:
6
3 4
Ans: From left to right, the missing entries are 2, 3 and 5.
8
5
Transcribed Image Text:Given a sequence of integers, a longest increasing sequence corresponds to a longest directed path in a DAG (Directed Acyclic Graph), such as 1 → 2 → 3 → 6 → 7, in the DAG below for the sequence 1, 2, 18, 5, 3, 6, 9, 7 1 2 2 8 3 1 5 4 3 5 Figure 2: DAG for the sequence 1, 2, 8, 5, 3, 6, 9, 7 The length, L[j], of a longest strictly increasing sequence ending at node indexed, j (index label of a node is outside the circle), is found using the formula: L[j] = 1 + max{L[i]: (i, j) € E}, (1) where (i, j) is a directed edge (arrow) going from index i to index j and E is set of all such directed edges. The array L[1..8] below, has some entries missing. Fill them up using the formula above: 6 3 4 Ans: From left to right, the missing entries are 2, 3 and 5. 8 5
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,