CPSC 413 - Fall 2018 - Mini-Assignment 4.pdf

V 3 i j it has a unique vertex s 1 of in degree zero

Info icon This preview shows pages 1–2. Sign up to view the full content.

V 3 | i < j } . It has a unique vertex s = 1 of in-degree zero, and a unique vertex t = 8 of out-degree zero. Mini-assignment 4 asks for weights on each of these three graphs. s 1 2 3 4 5 6 7 8 t Figure 1: Graph G 1 s 1 2 3 4 t Figure 2: Graph G 2 — The notes for the mini-assignment continues on the next page — 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Longest Strictly Increasing Subsequence. Mini-assignment 4 also discusses a problem called the longest strictly increasing subsequence problem. Consider we are given an array A [1 ..n ] of n integers and want to find a longest strictly increasing subsequence in A . We say a sequence of integers ( x 1 , x 2 , . . . , x m ) is strictly increasing if x 1 < x 2 < · · · < x m . Here is an example of an array C of length n = 15. C = 3 4 7 1 12 4 6 10 5 7 11 8 4 2 9 The subsequence ( c 1 , c 2 , c 8 , c 11 ) = (3 , 4 , 10 , 11) is strictly increasing since 3 < 4 < 10 < 11, and the subsequence is of length 4. In contrast, the subsequence ( c 1 , c 2 , c 6 , c 10 ) = (3 , 4 , 4 , 7) is not strictly increasing. Similarly, the integers (1 , 4 , 5 , 10 , 12) do occur in array A , but not as a subsequence. Strictly increasing subsequences Input: an array A of n positive integers.
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '13
  • GeoffCruttwell
  • Graph Theory, subsequence, Directed acyclic graph

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern