UNIVERSITY OF MANITOBA. SIGNATURE: (in ink) (I understand that cheating is a serious offense)

Size: px
Start display at page:

Download "UNIVERSITY OF MANITOBA. SIGNATURE: (in ink) (I understand that cheating is a serious offense)"

Transcription

1 DATE: Nov. 21, 2013 NAME: (Print in ink) STUDENT NUMBER: SIGNATURE: (in ink) (I understand that cheating is a serious offense) INSTRUCTIONS TO STUDENTS: This is a 90 minute exam. Cearly show all necessary work. Texts, notes, cell phones, electronic translators, and other electronic devices are not permitted. This exam has a title page and 11 pages, including 2 blank pages for rough work. Check that you have all the pages. You may remove blank pages, but be careful not to loosen the staple. If you need more scrap paper, use the backs of pages. Solutions may be continued either on the backs of sheets or on the blank pages, but clearly indicate where a question is to be continued or the remainder will not be marked. To show that you read these instructions and for 2 bonus marks, circle the date on this page. Question Points Score Total: 100

2 PAGE: 1 of 11 [20] 1. Read each statement carefully and indicate, in the left margin beside each, whether it is true (T) or false (F). Statements that are absurd, uninterpretable, or which fail to be true in every case, are considered false. (a) The sum of the indegrees of the vertices of a digraph is always equal to the sum of its outdegrees. (b) A simple graph with 10 vertices cannot have 50 edges. (c) Every graph is isomorphic to itself. (d) If x, y are vertices in a digraph D in which there is no x y path or y x path then D is not connected. (e) Every tree is a forest. (f) A depth first search (DFS) algorithm that begins immediately with vertex v first examines a vertex, u, whose distance from v is maximum. (g) The number of distinct functions from a 7-set to a 4-set is 7 4. (h) If every edge of a connected graph has a different weight, then the graph has exactly one minimal spanning tree. (i) If A, B, C sets and A, C are disjoint, then A B C = A + B + C A B B C. (j) Warshall s algorithm finds the shortest path between vertices. 2. Short answers [3] (a) How many one-to-one functions are there from a five-element set to an eight-element set?

3 PAGE: 2 of 11 [3] (b) How many triples (a, b, c) exist, where a, b, c {1, 2, 3,..., 10} and a < b < c? [4] (c) In a class of 25 engineering students, 9 received a grade of A, 7 received a B, 5 received a C and the rest received a D (nobody fails). How many different ways could these grades be assigned to the 25 students? [4] (d) For n 4, how many subgraphs of K n are isomorphic to C 4 (the cycle of length 4)?

4 PAGE: 3 of 11 [6] 3. The first of the following three graphs is the Peterson Graph (seen in class). For each of the other two either label them to show that they are isomorphic to the first, or explain why they are not isomorphic to it [6] 4. Use inclusion/exclusion to count the number of possible 7-letter passwords that consist of letters (A,B,..., Z), numerical symbols (0,1,..., 9) and special symbols (restricted to #, $, %, &, *) subject to the restriction that one of each of the three types must appear in the password. (HINT: There are three different ways the condition can fail. Altogether, how many strings fail the condition?)

5 PAGE: 4 of 11 [11] 5. For the following graph, G: (a) Find the adjacency matrix A = A G (AzaToth, Wikimedia Commons) (b) Calculate A 4 (c) How many 3 5 paths are there in G? (d) How many distinct open paths of length 4?

6 PAGE: 5 of 11 [4] 6. (a) Construct a tree from the following ordered list of words using algorithm BUILDTREE (which used lexicographical ordering) as seen in class: Grumpy, Happy, Cupid, Dopey, Sleepy, Doc, Bashful, Sneezy, Dasher, Dancer, Prancer, Vixen, Comet, Donner, Blitzen [9] (b) Traverse the tree constructed above in each of the following ways, writing down the words in order processed: Preorder Inorder Postorder

7 PAGE: 6 of For the following (weighted) digraph D: 3 b e 3 a 2 3 d g c [9] (a) Use Dijkstras algorithm to find the shortest a f path in D. Use a table to keep track of the values of d(v) in each iteration. f

8 PAGE: 7 of 11 [9] (b) Apply Warshall s algorithm to D, showing the steps of evolution of the matrix P (until you are sure it has stopped changing).

9 PAGE: 8 of 11 [12] 8. (a) Suppose T is any tree with at least one edge. If a single edge is deleted from T, what kind of graph results? Be as specific as possible. (b) Let us call the result of part (a) the Tree Pruning Lemma. Use complete induction on the order of a tree to prove the result seen in class that the size of a tree is one less than its order. (Begin by introducing a proposition, P n, for each n 0.)

10 PAGE: 9 of 11 BONUS: Do ONLY ONE of the following questions, for extra credit. If you attempt more than one, indicate clearly which you wish marked. There may be more work than you can complete, but any significant progress on a bonus question will receive some credit; marks (up to about 10%) will be assigned according to the quality and completeness of your response, taking into account the difficulty of the question. A: Evaluate the expression S(n) = i+j+k=n n! for n = 0, 1, 2. Guess a general i!j!k! formula for the value of S(n). Prove this formula to be correct, using any method. B: Write an AL algorithm that takes as input an indexed list of numbers a 1,..., a n and the number n, and puts the numbers into increasing order. The only list-editing command available (i.e., you are not allowed to directly assign values to the a i s.) is flip(k), which reverses the order of the first k numbers in the list. for example, if the current list is 3, 5, 2, 7, 1, 4, then the command flip(4) returns the list 7, 2, 5, 3, 1, 4 (before, a 3 = 2; after, a 3 = 5). C: State the rule of inclusion/exclusion for the most general case: n sets, where n can be any positive integer. Use this rule to derive a formula for the number of derangements of an n-set. (A derangements of a set is a permutation of the set in which no element is returned to its original position. For example, 312 is a derangement of 123 but 321 is not.)

11 PAGE: 10 of 11 SCRAP PAPER

12 PAGE: 11 of 11 SCRAP PAPER

THE UNIVERSITY OF MANITOBA

THE UNIVERSITY OF MANITOBA THE UNIVERSITY OF MANITOBA MATHEMATICS 3400 (Combinatorics I) March 4, 2011 MIDTERM EAM 2 hours (6-8 PM) EAMINER: R. Craigen Total Marks: 100 NAME: STUDENT NUMBER: INSTRUCTIONS Write your name and student

More information

Student Name and ID Number. MATH 3012 Final Exam, December 11, 2014, WTT

Student Name and ID Number. MATH 3012 Final Exam, December 11, 2014, WTT MATH 3012 Final Exam, December 11, 2014, WTT Student Name and ID Number 1. Consider the 11-element set X consisting of the three capital letters {A, B, C} and the eight digits {0, 1, 2,..., 7}. a. How

More information

2.) From the set {A, B, C, D, E, F, G, H}, produce all of the four character combinations. Be sure that they are in lexicographic order.

2.) From the set {A, B, C, D, E, F, G, H}, produce all of the four character combinations. Be sure that they are in lexicographic order. Discrete Mathematics 2 - Test File - Spring 2013 Exam #1 1.) RSA - Suppose we choose p = 5 and q = 11. You're going to be sending the coded message M = 23. a.) Choose a value for e, satisfying the requirements

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, 2016 Instructions: CS1800 Discrete Structures Final 1. The exam is closed book and closed notes. You may

More information

1. Consider the 62-element set X consisting of the twenty-six letters (case sensitive) of the English

1. Consider the 62-element set X consisting of the twenty-six letters (case sensitive) of the English MATH 3012 Final Exam, May 3, 2013, WTT Student Name and ID Number 1. Consider the 62-element set X consisting of the twenty-six letters (case sensitive) of the English alphabet and the ten digits {0, 1,

More information

University of Toronto Department of Electrical and Computer Engineering. Midterm Examination. ECE 345 Algorithms and Data Structures Fall 2010

University of Toronto Department of Electrical and Computer Engineering. Midterm Examination. ECE 345 Algorithms and Data Structures Fall 2010 University of Toronto Department of Electrical and Computer Engineering Midterm Examination ECE 345 Algorithms and Data Structures Fall 2010 Print your name and ID number neatly in the space provided below;

More information

Prelim 2. CS 2110, November 20, 2014, 7:30 PM Extra Total Question True/False Short Answer

Prelim 2. CS 2110, November 20, 2014, 7:30 PM Extra Total Question True/False Short Answer Prelim 2 CS 2110, November 20, 2014, 7:30 PM 1 2 3 4 5 Extra Total Question True/False Short Answer Complexity Induction Trees Graphs Extra Credit Max 20 10 15 25 30 5 100 Score Grader The exam is closed

More information

Problem 1. Which of the following is true of functions =100 +log and = + log? Problem 2. Which of the following is true of functions = 2 and =3?

Problem 1. Which of the following is true of functions =100 +log and = + log? Problem 2. Which of the following is true of functions = 2 and =3? Multiple-choice Problems: Problem 1. Which of the following is true of functions =100+log and =+log? a) = b) =Ω c) =Θ d) All of the above e) None of the above Problem 2. Which of the following is true

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, 2016 Instructions: CS1800 Discrete Structures Final 1. The exam is closed book and closed notes. You may

More information

CIS 121 Data Structures and Algorithms Midterm 3 Review Solution Sketches Fall 2018

CIS 121 Data Structures and Algorithms Midterm 3 Review Solution Sketches Fall 2018 CIS 121 Data Structures and Algorithms Midterm 3 Review Solution Sketches Fall 2018 Q1: Prove or disprove: You are given a connected undirected graph G = (V, E) with a weight function w defined over its

More information

Graph Algorithms Using Depth First Search

Graph Algorithms Using Depth First Search Graph Algorithms Using Depth First Search Analysis of Algorithms Week 8, Lecture 1 Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Graph Algorithms Using Depth

More information

CS490 Quiz 1. This is the written part of Quiz 1. The quiz is closed book; in particular, no notes, calculators and cell phones are allowed.

CS490 Quiz 1. This is the written part of Quiz 1. The quiz is closed book; in particular, no notes, calculators and cell phones are allowed. CS490 Quiz 1 NAME: STUDENT NO: SIGNATURE: This is the written part of Quiz 1. The quiz is closed book; in particular, no notes, calculators and cell phones are allowed. Not all questions are of the same

More information

Undirected Graphs. Hwansoo Han

Undirected Graphs. Hwansoo Han Undirected Graphs Hwansoo Han Definitions Undirected graph (simply graph) G = (V, E) V : set of vertexes (vertices, nodes, points) E : set of edges (lines) An edge is an unordered pair Edge (v, w) = (w,

More information

2. True or false: even though BFS and DFS have the same space complexity, they do not always have the same worst case asymptotic time complexity.

2. True or false: even though BFS and DFS have the same space complexity, they do not always have the same worst case asymptotic time complexity. 1. T F: Consider a directed graph G = (V, E) and a vertex s V. Suppose that for all v V, there exists a directed path in G from s to v. Suppose that a DFS is run on G, starting from s. Then, true or false:

More information

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1 Graph fundamentals Bipartite graph characterization Lemma. If a graph contains an odd closed walk, then it contains an odd cycle. Proof strategy: Consider a shortest closed odd walk W. If W is not a cycle,

More information

Prelim 2 Solutions. CS 2110, November 20, 2014, 7:30 PM Extra Total Question True/False Short Answer

Prelim 2 Solutions. CS 2110, November 20, 2014, 7:30 PM Extra Total Question True/False Short Answer Prelim 2 Solutions CS 2110, November 20, 2014, 7:30 PM 1 2 3 4 5 Extra Total Question True/False Short Answer Complexity Induction Trees Graphs Extra Credit Max 20 10 15 25 30 5 100 Score Grader The exam

More information

CS 373: Combinatorial Algorithms, Spring 1999

CS 373: Combinatorial Algorithms, Spring 1999 CS 373: Combinatorial Algorithms, Spring 1999 Final Exam (May 7, 1999) Name: Net ID: Alias: This is a closed-book, closed-notes exam! If you brought anything with you besides writing instruments and your

More information

Problem Score Maximum MC 34 (25/17) = 50 Total 100

Problem Score Maximum MC 34 (25/17) = 50 Total 100 Stony Brook University Midterm 2 CSE 373 Analysis of Algorithms November 22, 2016 Midterm Exam Name: ID #: Signature: Circle one: GRAD / UNDERGRAD INSTRUCTIONS: This is a closed book, closed mouth exam.

More information

Prelim One Solution. CS211 Fall Name. NetID

Prelim One Solution. CS211 Fall Name. NetID Name NetID Prelim One Solution CS211 Fall 2005 Closed book; closed notes; no calculators. Write your name and netid above. Write your name clearly on each page of this exam. For partial credit, you must

More information

Introduction to Algorithms May 14, 2003 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser.

Introduction to Algorithms May 14, 2003 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser. Introduction to Algorithms May 14, 2003 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Practice Final Practice Final Do not open this exam booklet until

More information

CMSC351 - Fall 2014, Final Exam

CMSC351 - Fall 2014, Final Exam CMSC351 - Fall 2014, Final Exam Type A WAIT FOR INSTRUCTIONS BEFORE BEGINNING HONOR PLEDGE: I pledge on my honor that I have not given or received any unauthorized assistance on this examination. Signature

More information

Questions Total Points Score

Questions Total Points Score HKUST Department of Computer Science and Engineering # COMP3711H: Design and Analysis of Algorithms Fall 2016 Final Examination Date: Friday December 16, 2016 Time: 16:30-19:30 Venue: LG3 Multipurpose

More information

CSCE 310 Assignment 3 Summer 2018

CSCE 310 Assignment 3 Summer 2018 Name(s) CSE Login Programming Language(s) Used Question Points Score 1 10 2 10 3 20 4 5 5 5 6 10 7 20 8 120 Total: 200 Graders Notes: Instructions Follow instructions carefully, failure to do so may result

More information

Exam Datenstrukturen und Algorithmen D-INFK

Exam Datenstrukturen und Algorithmen D-INFK Eidgenössische Technische Hochschule Zürich Ecole polytechnique fédérale de Zurich Politecnico federale di Zurigo Federal Institute of Technology at Zurich Institut für Theoretische Informatik Peter Widmayer

More information

1 Digraphs. Definition 1

1 Digraphs. Definition 1 1 Digraphs Definition 1 Adigraphordirected graphgisatriplecomprisedofavertex set V(G), edge set E(G), and a function assigning each edge an ordered pair of vertices (tail, head); these vertices together

More information

THE EULER TOUR TECHNIQUE: EVALUATION OF TREE FUNCTIONS

THE EULER TOUR TECHNIQUE: EVALUATION OF TREE FUNCTIONS PARALLEL AND DISTRIBUTED ALGORITHMS BY DEBDEEP MUKHOPADHYAY AND ABHISHEK SOMANI http://cse.iitkgp.ac.in/~debdeep/courses_iitkgp/palgo/index.htm THE EULER TOUR TECHNIQUE: EVALUATION OF TREE FUNCTIONS 2

More information

Homework Assignment #3 Graph

Homework Assignment #3 Graph CISC 4080 Computer Algorithms Spring, 2019 Homework Assignment #3 Graph Some of the problems are adapted from problems in the book Introduction to Algorithms by Cormen, Leiserson and Rivest, and some are

More information

D. Θ nlogn ( ) D. Ο. ). Which of the following is not necessarily true? . Which of the following cannot be shown as an improvement? D.

D. Θ nlogn ( ) D. Ο. ). Which of the following is not necessarily true? . Which of the following cannot be shown as an improvement? D. CSE 0 Name Test Fall 00 Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to convert an array, with priorities stored at subscripts through n,

More information

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 PRINT Your Name:, (last) READ AND SIGN The Honor Code: As a member of the UC Berkeley community, I act with honesty,

More information

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May www.jwjobs.net R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May - 2012 (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 *******-****** 1. a) Which of the given options provides the

More information

( ) D. Θ ( ) ( ) Ο f ( n) ( ) Ω. C. T n C. Θ. B. n logn Ο

( ) D. Θ ( ) ( ) Ο f ( n) ( ) Ω. C. T n C. Θ. B. n logn Ο CSE 0 Name Test Fall 0 Multiple Choice. Write your answer to the LEFT of each problem. points each. The expected time for insertion sort for n keys is in which set? (All n! input permutations are equally

More information

ASSIGNMENT 4 SOLUTIONS

ASSIGNMENT 4 SOLUTIONS MATH 71 ASSIGNMENT SOLUTIONS 1. If F : X X is a function, define f (x) to be (f f)(x), and inductively define f k (x) (f f k 1 )(x) for each integer k. (So f (x) (f f )(x) f(f(f(x))) for instance.) We

More information

Math Summer 2012

Math Summer 2012 Math 481 - Summer 2012 Final Exam You have one hour and fifty minutes to complete this exam. You are not allowed to use any electronic device. Be sure to give reasonable justification to all your answers.

More information

Solutions for the Exam 6 January 2014

Solutions for the Exam 6 January 2014 Mastermath and LNMB Course: Discrete Optimization Solutions for the Exam 6 January 2014 Utrecht University, Educatorium, 13:30 16:30 The examination lasts 3 hours. Grading will be done before January 20,

More information

UNIVERSITY OF MANITOBA FINAL EXAMINATION TITLE PAGE TIME: 3 hours EXAMINER: M. Davidson. DATE: April 14, 2012

UNIVERSITY OF MANITOBA FINAL EXAMINATION TITLE PAGE TIME: 3 hours EXAMINER: M. Davidson. DATE: April 14, 2012 TITL PG MILY NM: (Print in ink) GIVN NM(S): (Print in ink) STUDNT NUMBR: ST NUMBR: SIGNTUR: (in ink) (I understand that cheating is a serious offense) INSTRUCTIONS TO STUDNTS: This is a hour exam. Please

More information

1 Some Solution of Homework

1 Some Solution of Homework Math 3116 Dr. Franz Rothe May 30, 2012 08SUM\3116_2012h1.tex Name: Use the back pages for extra space 1 Some Solution of Homework Proposition 1 (Counting labeled trees). There are n n 2 different labeled

More information

THE EULER TOUR TECHNIQUE: EVALUATION OF TREE FUNCTIONS

THE EULER TOUR TECHNIQUE: EVALUATION OF TREE FUNCTIONS PARALLEL AND DISTRIBUTED ALGORITHMS BY DEBDEEP MUKHOPADHYAY AND ABHISHEK SOMANI http://cse.iitkgp.ac.in/~debdeep/courses_iitkgp/palgo/index.htm THE EULER TOUR TECHNIQUE: EVALUATION OF TREE FUNCTIONS 2

More information

2. CONNECTIVITY Connectivity

2. CONNECTIVITY Connectivity 2. CONNECTIVITY 70 2. Connectivity 2.1. Connectivity. Definition 2.1.1. (1) A path in a graph G = (V, E) is a sequence of vertices v 0, v 1, v 2,..., v n such that {v i 1, v i } is an edge of G for i =

More information

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE Professor Kindred Math 104, Graph Theory Homework 2 Solutions February 7, 2013 Introduction to Graph Theory, West Section 1.2: 26, 38, 42 Section 1.3: 14, 18 Section 2.1: 26, 29, 30 DO NOT RE-DISTRIBUTE

More information

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH 1301 DISCRETE MATHEMATICS TIME ALLOWED: 2 HOURS

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH 1301 DISCRETE MATHEMATICS TIME ALLOWED: 2 HOURS NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION 2015-2016 MH 1301 DISCRETE MATHEMATICS May 2016 TIME ALLOWED: 2 HOURS INSTRUCTIONS TO CANDIDATES 1. This examination paper contains FIVE (5) questions

More information

Read this before starting!

Read this before starting! Points missed: Student's Name: Total score: /100 points East Tennessee State University Department of Computer and Information Sciences CSCI 2150 (Tarnoff) Computer Organization TEST 1 for Spring Semester,

More information

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below: Chapter 4 Relations & Graphs 4.1 Relations Definition: Let A and B be sets. A relation from A to B is a subset of A B. When we have a relation from A to A we often call it a relation on A. When we have

More information

Mathematics Masters Examination

Mathematics Masters Examination Mathematics Masters Examination OPTION 4 March 30, 2004 COMPUTER SCIENCE 2 5 PM NOTE: Any student whose answers require clarification may be required to submit to an oral examination. Each of the fourteen

More information

CSE332 Summer 2012 Final Exam, August 15, 2012

CSE332 Summer 2012 Final Exam, August 15, 2012 Name: UW NetID: CSE332 Summer 2012 Final Exam, August 15, 2012 Please do not turn the page until the bell rings. Rules: The exam is closed-book and limited-note. You are permitted a single, handwritten

More information

CSE Winter 2015 Quiz 1 Solutions

CSE Winter 2015 Quiz 1 Solutions CSE 101 - Winter 2015 Quiz 1 Solutions January 12, 2015 1. What is the maximum possible number of vertices in a binary tree of height h? The height of a binary tree is the length of the longest path from

More information

Discrete Mathematics 2 Exam File Spring 2012

Discrete Mathematics 2 Exam File Spring 2012 Discrete Mathematics 2 Exam File Spring 2012 Exam #1 1.) Suppose f : X Y and A X. a.) Prove or disprove: f -1 (f(a)) A. Prove or disprove: A f -1 (f(a)). 2.) A die is rolled four times. What is the probability

More information

Chapter 3 Trees. Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path.

Chapter 3 Trees. Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path. Chapter 3 Trees Section 3. Fundamental Properties of Trees Suppose your city is planning to construct a rapid rail system. They want to construct the most economical system possible that will meet the

More information

r=1 The Binomial Theorem. 4 MA095/98G Revision

r=1 The Binomial Theorem. 4 MA095/98G Revision Revision Read through the whole course once Make summary sheets of important definitions and results, you can use the following pages as a start and fill in more yourself Do all assignments again Do the

More information

Chapter 9 Graph Algorithms

Chapter 9 Graph Algorithms Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 3 Definitions an undirected graph G = (V, E)

More information

Graph Algorithms (part 3 of CSC 282),

Graph Algorithms (part 3 of CSC 282), Graph Algorithms (part of CSC 8), http://www.cs.rochester.edu/~stefanko/teaching/11cs8 Homework problem sessions are in CSB 601, 6:1-7:1pm on Oct. (Wednesday), Oct. 1 (Wednesday), and on Oct. 19 (Wednesday);

More information

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f? 1. Prove: A full m-ary tree with i internal vertices contains n = mi + 1 vertices. 2. For a full m-ary tree with n vertices, i internal vertices, and l leaves, prove: (i) i = (n 1)/m and l = [(m 1)n +

More information

Worksheet for the Final Exam - Part I. Graphs

Worksheet for the Final Exam - Part I. Graphs Worksheet for the Final Exam - Part I. Graphs Date and Time: May 10 2012 Thursday 11:50AM~1:50PM Location: Eng 120 Start with the Self-Test Exercises (pp.816) in Prichard. 1. Give the adjacency matrix

More information

Problem Pts Score Grader Problem Pts Score Grader

Problem Pts Score Grader Problem Pts Score Grader CSE 502 Fundamentals of Computer Science Spring Semester 2015 Homework 5 Assigned: 4/10/2015 Due Date: 4/21/2015 You must read and sign the following statement to get credit for this assignment: I have

More information

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions Introduction Chapter 9 Graph Algorithms graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 2 Definitions an undirected graph G = (V, E) is

More information

CS 280 Problem Set 10 Solutions Due May 3, Part A

CS 280 Problem Set 10 Solutions Due May 3, Part A CS 280 Problem Set 10 Due May 3, 2002 Part A (1) You are given a directed graph G with 1000 vertices. There is one weakly connected component of size 800 and several other weakly connected components of

More information

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE Professor Kindred Math 104, Graph Theory Homework 3 Solutions February 14, 2013 Introduction to Graph Theory, West Section 2.1: 37, 62 Section 2.2: 6, 7, 15 Section 2.3: 7, 10, 14 DO NOT RE-DISTRIBUTE

More information

Santa s Reindeer Challenge - A solution using DMN and BPMN

Santa s Reindeer Challenge - A solution using DMN and BPMN Santa s Reindeer Challenge - A solution using DMN and BPMN Rob Parker, 11 Dec 2017 Problem The DMCommunity.org has created a Christmas challenge. The challenge is replicated below; Santa always leaves

More information

COSC 2007 Data Structures II Final Exam. Part 1: multiple choice (1 mark each, total 30 marks, circle the correct answer)

COSC 2007 Data Structures II Final Exam. Part 1: multiple choice (1 mark each, total 30 marks, circle the correct answer) COSC 2007 Data Structures II Final Exam Thursday, April 13 th, 2006 This is a closed book and closed notes exam. There are total 3 parts. Please answer the questions in the provided space and use back

More information

Exam 3 Practice Problems

Exam 3 Practice Problems Exam 3 Practice Problems HONOR CODE: You are allowed to work in groups on these problems, and also to talk to the TAs (the TAs have not seen these problems before and they do not know the solutions but

More information

Friday 24 May 2013 Morning

Friday 24 May 2013 Morning Friday 24 May 2013 Morning AS GCE MATHEMATICS 4736/01 Decision Mathematics 1 QUESTION PAPER *4715580613* Candidates answer on the Printed Answer Book. OCR supplied materials: Printed Answer Book 4736/01

More information

Reference Sheet for CO142.2 Discrete Mathematics II

Reference Sheet for CO142.2 Discrete Mathematics II Reference Sheet for CO14. Discrete Mathematics II Spring 017 1 Graphs Defintions 1. Graph: set of N nodes and A arcs such that each a A is associated with an unordered pair of nodes.. Simple graph: no

More information

CS161 - Final Exam Computer Science Department, Stanford University August 16, 2008

CS161 - Final Exam Computer Science Department, Stanford University August 16, 2008 CS161 - Final Exam Computer Science Department, Stanford University August 16, 2008 Name: Honor Code 1. The Honor Code is an undertaking of the students, individually and collectively: a) that they will

More information

End-Term Examination Second Semester [MCA] MAY-JUNE 2006

End-Term Examination Second Semester [MCA] MAY-JUNE 2006 (Please write your Roll No. immediately) Roll No. Paper Code: MCA-102 End-Term Examination Second Semester [MCA] MAY-JUNE 2006 Subject: Data Structure Time: 3 Hours Maximum Marks: 60 Note: Question 1.

More information

Trees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017

Trees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017 12. Graphs and Trees 2 Aaron Tan 6 10 November 2017 1 10.5 Trees 2 Definition Definition Definition: Tree A graph is said to be circuit-free if, and only if, it has no circuits. A graph is called a tree

More information

Mathematics Masters Examination

Mathematics Masters Examination Mathematics Masters Examination OPTION 4 Fall 2011 COMPUTER SCIENCE??TIME?? NOTE: Any student whose answers require clarification may be required to submit to an oral examination. Each of the twelve numbered

More information

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise. Final exam This is a closed book exam. No calculators are allowed. Unless stated otherwise, justify all your steps. You may use lemmas and theorems that were proven in class and on assignments unless stated

More information

Trees. Arash Rafiey. 20 October, 2015

Trees. Arash Rafiey. 20 October, 2015 20 October, 2015 Definition Let G = (V, E) be a loop-free undirected graph. G is called a tree if G is connected and contains no cycle. Definition Let G = (V, E) be a loop-free undirected graph. G is called

More information

Packet #6: Counting & Graph Theory. Applied Discrete Mathematics

Packet #6: Counting & Graph Theory. Applied Discrete Mathematics Packet #6: Counting & Graph Theory Applied Discrete Mathematics Table of Contents Counting Pages 1-8 Graph Theory Pages 9-16 Exam Study Sheet Page 17 Counting Information I. Product Rule: A B C = A * B

More information

OF VICTORIA EXAMINATIONS- DECEMBER 2011 CSC

OF VICTORIA EXAMINATIONS- DECEMBER 2011 CSC Name: ID Number: UNIVERSITY OF VICTORIA EXAMINATIONS- DECEMBER 2011 CSC 225- Algorithms and Data Structures: I Section A01, CRN 10568 Instructor: Wendy Myrvold Duration: 3 hours TO BE ANSWERED ON THE PAPER.

More information

logn D. Θ C. Θ n 2 ( ) ( ) f n B. nlogn Ο n2 n 2 D. Ο & % ( C. Θ # ( D. Θ n ( ) Ω f ( n)

logn D. Θ C. Θ n 2 ( ) ( ) f n B. nlogn Ο n2 n 2 D. Ο & % ( C. Θ # ( D. Θ n ( ) Ω f ( n) CSE 0 Test Your name as it appears on your UTA ID Card Fall 0 Multiple Choice:. Write the letter of your answer on the line ) to the LEFT of each problem.. CIRCLED ANSWERS DO NOT COUNT.. points each. The

More information

Computer Science E-22 Practice Final Exam

Computer Science E-22 Practice Final Exam name Computer Science E-22 This exam consists of three parts. Part I has 10 multiple-choice questions that you must complete. Part II consists of 4 multi-part problems, of which you must complete 3, and

More information

Introduction to Algorithms April 21, 2004 Massachusetts Institute of Technology. Quiz 2 Solutions

Introduction to Algorithms April 21, 2004 Massachusetts Institute of Technology. Quiz 2 Solutions Introduction to Algorithms April 21, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Quiz 2 Solutions Quiz 2 Solutions Do not open this quiz booklet

More information

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points MC 0 GRAPH THEORY 0// Solutions to HW # 0 points + XC points ) [CH] p.,..7. This problem introduces an important class of graphs called the hypercubes or k-cubes, Q, Q, Q, etc. I suggest that before you

More information

Solving problems on graph algorithms

Solving problems on graph algorithms Solving problems on graph algorithms Workshop Organized by: ACM Unit, Indian Statistical Institute, Kolkata. Tutorial-3 Date: 06.07.2017 Let G = (V, E) be an undirected graph. For a vertex v V, G {v} is

More information

one hour after the start time

one hour after the start time FAMILY NAME GIVEN NAME(S) STUDENT NUMBER DATE START TIME FINISH TIME EXAMINER any date any time one hour after the start time Norman Do Instructions 1. Fill in your name and student number clearly in the

More information

Math 454 Final Exam, Fall 2005

Math 454 Final Exam, Fall 2005 c IIT Dept. Applied Mathematics, December 12, 2005 1 PRINT Last name: Signature: First name: Student ID: Math 454 Final Exam, Fall 2005 I. Examples, Counterexamples and short answer. (6 2 ea.) Do not give

More information

1. Let n and m be positive integers with n m. a. Write the inclusion/exclusion formula for the number S(n, m) of surjections from {1, 2,...

1. Let n and m be positive integers with n m. a. Write the inclusion/exclusion formula for the number S(n, m) of surjections from {1, 2,... MATH 3012, Quiz 3, November 24, 2015, WTT Student Name and ID Number 1. Let n and m be positive integers with n m. a. Write the inclusion/exclusion formula for the number S(n, m) of surjections from {1,

More information

Read this before starting!

Read this before starting! Points missed: Student's Name: Total score: /100 points East Tennessee State University Department of Computer and Information Sciences CSCI 2150 (Tarnoff) Computer Organization TEST 1 for Spring Semester,

More information

UNIT III TREES. A tree is a non-linear data structure that is used to represents hierarchical relationships between individual data items.

UNIT III TREES. A tree is a non-linear data structure that is used to represents hierarchical relationships between individual data items. UNIT III TREES A tree is a non-linear data structure that is used to represents hierarchical relationships between individual data items. Tree: A tree is a finite set of one or more nodes such that, there

More information

Graph Algorithms (part 3 of CSC 282),

Graph Algorithms (part 3 of CSC 282), Graph Algorithms (part of CSC 8), http://www.cs.rochester.edu/~stefanko/teaching/10cs8 1 Schedule Homework is due Thursday, Oct 1. The QUIZ will be on Tuesday, Oct. 6. List of algorithms covered in the

More information

R13. II B. Tech I Semester Supplementary Examinations, May/June DATA STRUCTURES (Com. to ECE, CSE, EIE, IT, ECC)

R13. II B. Tech I Semester Supplementary Examinations, May/June DATA STRUCTURES (Com. to ECE, CSE, EIE, IT, ECC) SET - 1 II B. Tech I Semester Supplementary Examinations, May/June - 2016 PART A 1. a) Write a procedure for the Tower of Hanoi problem? b) What you mean by enqueue and dequeue operations in a queue? c)

More information

Read this before starting!

Read this before starting! Points missed: Student's Name: Total score: /100 points East Tennessee State University Department of Computer and Information Sciences CSCI 2150 (Tarnoff) Computer Organization TEST 1 for Spring Semester,

More information

Chapter 9 Graph Algorithms

Chapter 9 Graph Algorithms Introduction graph theory useful in practice represent many real-life problems can be if not careful with data structures Chapter 9 Graph s 2 Definitions Definitions an undirected graph is a finite set

More information

First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms... First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms.... Q1) What are some of the applications for the tree data structure? Q2) There are 8, 15, 13, and

More information

Lecture 22 Tuesday, April 10

Lecture 22 Tuesday, April 10 CIS 160 - Spring 2018 (instructor Val Tannen) Lecture 22 Tuesday, April 10 GRAPH THEORY Directed Graphs Directed graphs (a.k.a. digraphs) are an important mathematical modeling tool in Computer Science,

More information

CMSC Theory of Algorithms Second Midterm

CMSC Theory of Algorithms Second Midterm NAME (please PRINT in large letters): SECTION: 01 02 (circle one) CMSC 27200 Theory of Algorithms Second Midterm 02-26-2015 The exam is closed book. Do not use notes. The use of ELECTRONIC DEVICES is strictly

More information

COMPSCI 311: Introduction to Algorithms First Midterm Exam, October 3, 2018

COMPSCI 311: Introduction to Algorithms First Midterm Exam, October 3, 2018 COMPSCI 311: Introduction to Algorithms First Midterm Exam, October 3, 2018 Name: ID: Answer the questions directly on the exam pages. Show all your work for each question. More detail including comments

More information

CMSC th Lecture: Graph Theory: Trees.

CMSC th Lecture: Graph Theory: Trees. CMSC 27100 26th Lecture: Graph Theory: Trees. Lecturer: Janos Simon December 2, 2018 1 Trees Definition 1. A tree is an acyclic connected graph. Trees have many nice properties. Theorem 2. The following

More information

Chapter 9 Graph Algorithms

Chapter 9 Graph Algorithms Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be if not careful with data structures 3 Definitions an undirected graph G = (V, E) is a

More information

Characterizations of Trees

Characterizations of Trees Characterizations of Trees Lemma Every tree with at least two vertices has at least two leaves. Proof. 1. A connected graph with at least two vertices has an edge. 2. In an acyclic graph, an end point

More information

York University AS/AK/ITEC INTRODUCTION TO DATA STRUCTURES. Midterm Sample I. Examiner: S. Chen Duration: One Hour and 30 Minutes

York University AS/AK/ITEC INTRODUCTION TO DATA STRUCTURES. Midterm Sample I. Examiner: S. Chen Duration: One Hour and 30 Minutes York University AS/AK/ITEC 2620 3.0 INTRODUCTION TO DATA STRUCTURES Midterm Sample I Examiner: S. Chen Duration: One Hour and 30 Minutes This exam is closed textbook(s) and closed notes. Use of any electronic

More information

Module 2: NETWORKS AND DECISION MATHEMATICS

Module 2: NETWORKS AND DECISION MATHEMATICS Further Mathematics 2017 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,

More information

Graph Theory Questions from Past Papers

Graph Theory Questions from Past Papers Graph Theory Questions from Past Papers Bilkent University, Laurence Barker, 19 October 2017 Do not forget to justify your answers in terms which could be understood by people who know the background theory

More information

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,

More information

Algorithms CMSC Homework set #2 due January 21, 2015

Algorithms CMSC Homework set #2 due January 21, 2015 Algorithms CMSC-27200 http://alg15.cs.uchicago.edu Homework set #2 due January 21, 2015 Read the homework instructions on the website. The instructions that follow here are only an incomplete summary.

More information

DFS & STRONGLY CONNECTED COMPONENTS

DFS & STRONGLY CONNECTED COMPONENTS DFS & STRONGLY CONNECTED COMPONENTS CS 4407 Search Tree Breadth-First Search (BFS) Depth-First Search (DFS) Depth-First Search (DFS) u d[u]: when u is discovered f[u]: when searching adj of u is finished

More information

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures Final Examination (17 pages) Instructor: Douglas Harder April 14, 2004 9:00-12:00 Name (last,

More information

CS 341: Algorithms. Douglas R. Stinson. David R. Cheriton School of Computer Science University of Waterloo. February 26, 2019

CS 341: Algorithms. Douglas R. Stinson. David R. Cheriton School of Computer Science University of Waterloo. February 26, 2019 CS 341: Algorithms Douglas R. Stinson David R. Cheriton School of Computer Science University of Waterloo February 26, 2019 D.R. Stinson (SCS) CS 341 February 26, 2019 1 / 296 1 Course Information 2 Introduction

More information

Graphs and networks Mixed exercise

Graphs and networks Mixed exercise Graphs and networks Mixed exercise E.g. 2 a, e and h are isomorphic. b and i are isomorphic. c and g are isomorphic. d and f are isomorphic. 3 a b i ii iii Pearson Education Ltd 208. Copying permitted

More information

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge. 1 Graph Basics What is a graph? Graph: a graph G consists of a set of vertices, denoted V (G), a set of edges, denoted E(G), and a relation called incidence so that each edge is incident with either one

More information