Jade Yu Cheng ICS 311 Homework 10 Oct 7, 2008

Similar documents
2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Full and Complete Binary Trees

CMPSCI611: Approximating MAX-CUT Lecture 20

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

Data Structures and Algorithms Written Examination

GRAPH THEORY LECTURE 4: TREES

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Binary Search Trees CMPSC 122

Binary Search Trees. Data in each node. Larger than the data in its left child Smaller than the data in its right child

Lecture 19: Introduction to NP-Completeness Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Euler Paths and Euler Circuits

TU e. Advanced Algorithms: experimentation project. The problem: load balancing with bounded look-ahead. Input: integer m 2: number of machines

The Basics of Graphical Models

Lecture 1: Course overview, circuits, and formulas

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Data Structures Fibonacci Heaps, Amortized Analysis

Introduction to Algorithms March 10, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Quiz 1.

Lecture 16 : Relations and Functions DRAFT

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Distributed Computing over Communication Networks: Maximal Independent Set

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

CAD Algorithms. P and NP

Problem Set 7 Solutions

Section IV.1: Recursive Algorithms and Recursion Trees

Triangle deletion. Ernie Croot. February 3, 2010

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

Sorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2)

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Math Circle Beginners Group October 18, 2015

A Non-Linear Schema Theorem for Genetic Algorithms

Dynamic Programming. Lecture Overview Introduction

CS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin

Binary Search Trees. Ric Glassey

8.1 Min Degree Spanning Tree

Network Flow I. Lecture Overview The Network Flow Problem

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Helvetic Coding Contest 2016

Lecture 2 Mathcad Basics

3. The Junction Tree Algorithms

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

5.1 Bipartite Matching

The following themes form the major topics of this chapter: The terms and concepts related to trees (Section 5.2).

Sample Questions Csci 1112 A. Bellaachia

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Chapter 20. Vector Spaces and Bases

Vector storage and access; algorithms in GIS. This is lecture 6

International Journal of Software and Web Sciences (IJSWS)

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Single machine parallel batch scheduling with unbounded capacity

CIS 700: algorithms for Big Data

Discuss the size of the instance for the minimum spanning tree problem.

Symbol Tables. Introduction

Strategic Deployment in Graphs. 1 Introduction. v 1 = v s. v 2. v 4. e 1. e e 3. e 2. e 4

Ordered Lists and Binary Trees

Exam study sheet for CS2711. List of topics

A binary search tree is a binary tree with a special property called the BST-property, which is given as follows:

Session 6 Number Theory

Data Structures and Algorithms

Examination paper for MA0301 Elementær diskret matematikk

Integration. Topic: Trapezoidal Rule. Major: General Engineering. Author: Autar Kaw, Charlie Barker.

Analysis of Binary Search algorithm and Selection Sort algorithm

Graph Theory Problems and Solutions

Linear Equations and Inequalities

Linear functions Increasing Linear Functions. Decreasing Linear Functions

CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015

Data Structures. Chapter 8

Mathematical Induction. Lecture 10-11

Minimum Spanning Trees

Approximation Algorithms

Combinatorial 5/6-approximation of Max Cut in graphs of maximum degree 3

root node level: internal node edge leaf node Data Structures & Algorithms McQuain

Reading 13 : Finite State Automata and Regular Expressions

Persistent Binary Search Trees

Lecture 6: Binary Search Trees CSCI Algorithms I. Andrew Rosenberg

Topology-based network security

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1

Converting a Number from Decimal to Binary

Optimizations. Optimization Safety. Optimization Safety. Control Flow Graphs. Code transformations to improve program

Outline. Introduction Linear Search. Transpose sequential search Interpolation search Binary search Fibonacci search Other search techniques

SOLUTIONS FOR PROBLEM SET 2

Lecture 11: Tail Recursion; Continuations

Linear Programming. March 14, 2014

CS 598CSC: Combinatorial Optimization Lecture date: 2/4/2010

Approximating Minimum Bounded Degree Spanning Trees to within One of Optimal

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

Actually Doing It! 6. Prove that the regular unit cube (say 1cm=unit) of sufficiently high dimension can fit inside it the whole city of New York.

Lecture 22: November 10

Graphs without proper subgraphs of minimum degree 3 and short cycles

The ADT Binary Search Tree

Loop Invariants and Binary Search

8 Primes and Modular Arithmetic

Picture Maze Generation by Successive Insertion of Path Segment

Solutions to Homework 6

Shortest Inspection-Path. Queries in Simple Polygons

Transcription:

Jade Yu Cheng ICS 311 Homework 10 Oct 7, 2008 Question for lecture 13 Problem 23-3 on p. 577 Bottleneck spanning tree A bottleneck spanning tree of an undirected graph is a spanning tree of whose largest edge weight is minimum over all spanning trees of. We say that the value of the bottleneck spanning tree is the weight of the maximum0weight edge in. a. Argue that a minimum spanning tree is a bottleneck spanning tree. Answer: Assume we have the MST for graph. The largest weight edge of the MST is,. The argument is converted to arguing that this edge, is not the part of the bottleneck spanning tree of the same graph. Case 1. The largest edge, in the bottleneck spanning tree is larger than edge,,. In this case, it s clear that the edge, can t be the return value of the bottleneck spanning tree of graph. Otherwise there exists another tree structure that provides a smaller largest edge. It s a conflict of the definition of bottleneck spanning tree. Case 2. The largest edge, in the bottleneck spanning tree is smaller than edge,,. In this case, we consider that the edge, in MST separates all vertices into two parts, left sub-tree and right sub-tree. This assumption is based on the definition of the tree structure. No cycles exist in tree structures, and all edges connect two sub-parts of the tree graph. Image is shown as FIGURE 1.

FIGURE 1. MST with its largest edge,. Suppose we have a bottleneck spanning tree for graph, which doesn t take edge,. Instead, based on our assumption, we believe in this bottleneck spanning tree, the largest weight edge, occurs somewhere else and it s smaller than,,. If we delete, in the picture above, based on the definition of tree graph, there should be another edge added to connect and. We assume, was included in the bottleneck spanning tree in order to stitch and together. Image is shown as FIGURE 2. FIGURE 2. Bottleneck spanning tree. The largest edge, is not shown on this image. Sub-tree and are not necessarily the same as the corresponding MST. According to the bottleneck spanning tree, the relationship of, and, should be. At the same time, according to the MST definition, the relationship of, and, should be. Therefore because and. It indicates the length of, is smaller than the length of,. This is a conflict with the assumption of this case: The

largest edge, in the bottleneck spanning tree is smaller than edge,,. Therefore we proved that, is also in the bottleneck spanning tree and is the largest edge of it. Therefore MST is also a bottleneck spanning tree. b. Part (a) shows that finding a bottleneck spanning tree is no harder than finding a minimum spanning tree. In the remaining parts, we will show that one can be found in linear time. Give a linear-time algorithm that given a graph and an integer, determines whether the value of the bottleneck spanning tree is at most. Answer: Consider we have a connect graph shown as FIGURE 3. In order to decide if the return value of a bottleneck spanning tree is no larger than a given value, we simply need to decide whether the edges that are larger than this given value are all necessary for the graph to maintain a tree structure. FIGURE 3. Connect graph. There are two cases based on the input value of. If the left over graph is a connected graph, the deleted edges are not necessary for maintaining the tree structure of this graph. If the left over graph is no longer a connect graph, at lest one of the deleted edges is essential for maintaining the tree structure. Here is an example of case 1. The connected graph is shown as FIGURE 3, and the given value is 18. By deleting the edges that are larger than, we would get a graph shown as FIGURE 4.

FIGURE 4. Derived graph of after deleting all edges larger than 18. Here is an example of case 2. The connected graph is shown as FIGURE 3, and the given value is 14. By deleting the edges that are larger than, we would get a graph shown as FIGURE 5. FIGURE 5. Derived graph of after deleting all edges larger than 14. From the images, we can easily decide that the return value of a bottleneck spanning tree of this graph has to be larger than 14 and smaller than 18, since we observed the fact that deleting all edges larger than 18 didn t change the feature of a connected graph but deleting all edges larger than 14 failed to maintain this feature. To decide which edges to delete takes at most time because we go through all edges once. To decide if the left over graph is still a connect graph takes time because we can use either DFS or BFS. These algorithms provide the tree traversal in a linear time. Therefore the combined run-time of this method would be 2, linear time. c. Use your algorithm for Part (b) as subroutine in a linear-time algorithm of the bottleneck spanning tree problem. Answer: To solve the bottleneck spanning tree problem is the same problem as finding the largest edge needed for the graph to maintain as a connect graph. We can repeatedly check for different values of as shown in the two examples above.

The problem will come down to something like: the solution is larger than a and smaller than, while 1. Then the solution becomes obvious. The fastest way to get to the right value is using a binary search. If we have the largest edge in the graph as n, we repeatedly look of /2, /4, /8... until we find the solution. If the graph is more close to a complete graph, it has lots of edges, then the runtime of the method in Part (b) would be determined by. Its run-time would be. If this is the case, repeatedly looking for about half of the edges make the problem as a whole holds a linear run-time: /2 1 2 If the graph is more close to a collection of vertices, then the run-time of the method in Part (b) would be determined by. Its run-time would be. But this is clearly not the case for this problem. Therefore the run-time of solving the bottleneck spanning tree problem would be linear.