Mr. Williams is given a graph with p nodes rooted at node 1. Each node(X) of the graph has a pair of values (Ax, Bx). You task is to help Mr. Williams in creating a python code to find the value of...


Mr. Williams is given a graph with p nodes rooted at node 1. Each node(X) of<br>the graph has a pair of values (Ax, Bx). You task is to help Mr. Williams in<br>creating a python code to find the value of result (R) such that:<br>N N<br>EE F(U,V)<br>R<br>U=1V=1<br>F(U,V)<br>( MIN(MAX(AU, Ay), MAX(BU, By)) ifVliesin subtree of U<br>otherwise<br>Input:<br>5<br>14523<br>52413<br>12<br>13<br>24<br>25<br>Output:<br>45<br>

Extracted text: Mr. Williams is given a graph with p nodes rooted at node 1. Each node(X) of the graph has a pair of values (Ax, Bx). You task is to help Mr. Williams in creating a python code to find the value of result (R) such that: N N EE F(U,V) R U=1V=1 F(U,V) ( MIN(MAX(AU, Ay), MAX(BU, By)) ifVliesin subtree of U otherwise Input: 5 14523 52413 12 13 24 25 Output: 45

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here