{
"metadata": {
"name": "",
"signature": "sha256:74b6438947f049e10e34b827393cc06ea98a28fd298f7aef5097912ce9be36a5"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"23.1-2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"Consider the above example from the lecture note. If we partition the orginal graph into
\n",
" for each edge
\n",
" if
\n",
" discard
\n",
" if
\n",
" return True
\n",
" else:
\n",
" return False
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"####c.\n",
"####Design:\n",
"BOTTLENECK-SPANNING-TREE(
\n",
" $M :=$ largest weight in
\n",
" $m :=$ smallest weight in
\n",
" $b := \lfloor \frac{M + m}{2} \rfloor$
\n",
" $T := \phi$
\n",
"\n",
" while
\n",
" if CHECK-BST(
\n",
" $M := b$
\n",
" $b := \lfloor \frac{M + m}{2} \rfloor$
\n",
" else:
\n",
" $m := b$
\n",
" $b := \lfloor \frac{M + m}{2} \rfloor$
\n",
"\n",
" $G, T := $MST-REDUCE(
\n",
"\n",
" if CHECK-BST(
\n",
" return
\n",
" else:
\n",
" return
\n",
"\n",
"####Analysis:\n",
"1. Expect the while-loop, all operations takes
Last active
August 29, 2015 14:02
-
-
Save elsdrium/deb1b3a95b26e2062bf9 to your computer and use it in GitHub Desktop.
Algo HW11 I
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment