You are not logged in. Please login at www.codechef.com to post your questions!

×

# How to find maximum spanning tree in BEERUS?Please help

 1 asked 13 Jun, 13:24 2★babu1998 11●1 accept rate: 0%

One Answer:
 0 Observe that ($node_i$ OR $node_j$) $+$ ($node_i$ AND $node_j$) = $node_i$ $+$ $node_j$. We can use this information to calculate $node_i$ for all $i$. (Hint: $goten[i] + trunks[i] = n * node_i + \displaystyle\sum_{i}^{} node_i$ $\forall i$.) Now, the edges in the required graph have weights equal to the sum of adjacent nodes. This means that the maximum spanning tree would be a star graph with the node of maximum weight at the center. answered 13 Jun, 22:21 76●4 accept rate: 20%
 toggle preview community wiki:
Preview

### Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• link:[text](http://url.com/ "title")
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×107
×35

question asked: 13 Jun, 13:24

question was seen: 153 times

last updated: 14 Jun, 14:01