Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Let G = (V, E) be an undirected non weighted graph. Say that a vertex v can see an edge if v is an endpoint

Let G = (V, E) be an undirected non weighted graph. Say that a vertex v can see an edge if v is an endpoint of that edge. Say that a set S V is all-seeing if every edge e E is seen by at least one vertex in S. In this problem, we will try to greedily construct the smallest all-seeing set possible. Consider the following greedy algorithm to find an all-seeing subset:

image text in transcribed

(a) Prove that findAllSeeingSubset(G) always returns an all-seeing subset. [We are expecting: A rigorous proof.]

(b) Give an example of a graph on which findAllSeeingSubset(G) does not return a smallest all-seeing subset, for at least one way of choosing edges.

findAllSeeingSubset (G): s={} while G contains edges: choose an edge e = (u,v) in G S.add (u) S.add (v remove u and all of its adjacent edges from G remove v and all of its adjacent edges from G return S

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

d. Who are important leaders and heroes of the group?

Answered: 1 week ago