Why this randomize solution is correct (1176E — Cover it!) ?

Revision en5, by PouyaNavid, 2020-03-16 18:40:55

Hi,

Can anyone tell me why this randomize solution is correct ?

Problem : 1176E - Cover it!
Problem statement : You are given an undirected unweighted connected graph consisting of n vertices and m edges. It is guaranteed that there are no self-loops or multiple edges in the given graph. Your task is to choose at most \lfloor\frac{n}{2}\rfloor vertices in this graph so each unchosen vertex is adjacent (in other words, connected by an edge) to at least one of chosen vertices.
Solution : 62626593

Tags #randomisation, nondeterministic, #dfs and similar, tree, #graph

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en7 English PouyaNavid 2020-03-18 08:34:25 2 Tiny change: 'i,\n\n\n\nCa' -> 'i,\n\n\n\n\nCa'
en6 English PouyaNavid 2020-03-17 16:27:21 2 Tiny change: '26593]\n\n' -> '26593]\n\n\n'
en5 English PouyaNavid 2020-03-16 18:40:55 2 Tiny change: 'Hi,\n\n\nCan ' -> 'Hi,\n\n\n\nCan ' (published)
en4 English PouyaNavid 2020-03-16 14:10:47 30 Tiny change: 'e at most **n / 2** vertices ' -> 'e at most \lfloor\frac{n}{2}\rfloor vertices ' (saved to drafts)
en3 English PouyaNavid 2020-03-16 14:09:49 2 Tiny change: 'Hi,\n\nCan an' -> 'Hi,\n\n\nCan an'
en2 English PouyaNavid 2020-03-15 12:07:37 0 (published)
en1 English PouyaNavid 2020-03-15 12:07:20 596 Initial revision (saved to drafts)