Python/algorithms/Graph.ipynb

947 lines
388 KiB
Plaintext
Raw Normal View History

2024-11-21 04:43:43 +00:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "c9531bac",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<style>.container{width:100%}</style>\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%HTML\n",
"<style>.container{width:100%}</style>"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "25138dfd",
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import networkx as nx"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "1a17a18b",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABdyUlEQVR4nO3dd1xV9f8H8Ncd7CVDVBRw4QzT1FAUDGS4E3OPykzLsnLP3ImZpqYlmmUmUm5LzYniCkVNLSMHaoKKguwl4957vn8YfDMFLnAv547X8/H4Pfp6zz3nvPkp97zuZ0oEQRBARERERksqdgFEREQkLoYBIiIiI8cwQEREZOQYBoiIiIwcwwAREZGRYxggIiIycgwDRERERo5hgIiIyMgxDBARERk5hgEiIiIjxzBApCc2btwIiURS8n/m5uZwcXFBcHAwVq1ahezsbLFLJCI9JRe7ACKqmAULFqBBgwYoKirCw4cPcfz4cYwfPx7Lly/Hnj170KpVK7FLJCI9I+FGRUT6YePGjRg5ciTOnz+Pdu3aPXXs2LFj6NWrF5ydnXH16lVYWFiIVCUR6SN2ExAZAH9/f8yePRvx8fHYvHlzyevXrl1D//794eDgAHNzc7Rr1w579ux56tzi7ofTp0/jww8/RM2aNVGjRg288847KCwsREZGBl5//XXY29vD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/fv1w5coVnDx5EkOGDIGZmRlCQzwhL2M8V2XIpRKEhnhq9JrawDBQzdSZWiKzftL39Mwa2FZPvumr8nM0ch8iIkOWmpqKZcuWoUmTJggODsb
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABZQ0lEQVR4nO3deVxU9f4/8NeZGYYdFBCUTVSQlKzMDFMTUNwRQ80FXCozveUtvWbXqK7VLVu0a17tV3m/mV2FzFxx38AlTbRdjVUTFBAElH2bmfP7w+CKwjDgDGeW1/Px8HEvc875nDeGzGs+57MIoiiKICIiIoslk7oAIiIikhbDABERkYVjGCAiIrJwDANEREQWjmGAiIjIwjEMEBERWTiGASIiIgvHMEBERGThGAaIiIgsHMMAERGRhWMYIGql9evXQxCEhj82Njbw9PTEyJEj8e9//xtlZWVSl9hm8fHx+Pjjj6UuQycpKSkYNWoUHBwc4OLighkzZuD69etSl0VkkgTuTUDUOuvXr8fTTz+Nt99+G926dUNdXR2uXbuGo0eP4tChQ/D19UVCQgIeeOABqUtttYiICJw/fx6XL1+WuhStrl69ir59+8LZ2RkvvvgiysvLsWLFCvj6+uLMmTNQKpVSl0hkUhRSF0BkqkaPHo1HHnmk4etXX30ViYmJiIiIQGRkJFJSUmBraythhYZVXV0NpVIJmaz9OxiXLVuGiooK/Pjjj/D19QUAPProoxg+fDjWr1+P5557rt1rIjJlfExApEdDhw7FG2+8gaysLGzcuLHRsdTUVEyaNAkuLi6wsbHBI488goSEhEbn1D+C+O677/Diiy+iU6dO6NChA+bOnYva2lrcvHkTM2fORMeOHdGxY0e88soruLNzr6KiAosWLYKPjw+sra0RGBiIFStW3HXenUJ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t2FSdPniweOXKk0Xn5+fniCy+8IPr4+IhWVlZi586dxWHDholr165tsbY7nT9/XhwxYoRoZ2cndujQQYyJiRGvXbvW6naISBS5NwEREZGF45gBIiIiC8cxA0RkNK5fvw61Wt3scaVSCRcXl3asiMgy8DEBERkNPz8/rQsjhYSE4OjRo+1XEJGFYM8AERmNuLg4rUsJd+zYsR2rIbIc7BkgIiKycDr1DGg0GuTm5sLR0bHVK5QRERGRNERRRFlZGTw9PSGTNT9nQKcwkJube9cGKURERGQarly5Am9v72aP6xQG6tc4v3LlCpycnPRTGRERERlUaWkpfHx87trJ9E46hYH6RwNOTk4MA0RERCampUf8XHSIiIjIwjEMEBERWTiGASIiIgvHMEBERGThGAaIiIgsHMMAERGRhWMYICIisnAMA0RERBaOYYCIiMjCMQwQERFZOIYBIiIiC8cwQEREZOEYBoiIiCwcwwAREZGFYxggIiKycAwDREREFk4hdQFERESmoqJGhctFFahVaaBUyODnag97a9N/KzX974CIiMiAMvLLEJecjaS0AmQXV0K87ZgAwNfFDmGB7ogJ9kWAh6NUZd4TQRRFsaWTSktL4ezsjJKSEjg5ObVHXURERJK6UlyJ2O3ncCKzEHKZALWm+bfL+uOP+7thWVQf+LjYtWOlzdP1/ZtjBoiIiO6w6Ww2wlcew6lLRQCgNQjcfvzUpSKErzyGTWezDV6jPvExARER0W3WJGVgxcH0Nl2r1ohQa0Qs2XYOheU1mB8WoOfqDIM9A0RERH/adDa7zUHgTisOpuMbE+khYM8AERERbo0RWJpwAZraKpQmb0NNbhpq89KhqS6H65gFcHgg/K5r6gqvoPjIf1Bz9XcIcgVse/RHx2HPQm7nDAD4R8IFDOzhZjRjCJrDngEiIiIAsdv
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwg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OMbYeVyL5Ui6UhaUQ71snAPBzd0BYN29Ehfgh0MfZXGWSBRJEURTr20ilUsHV1RVFRUVwcXFpibqIiMhI2YWlWJpwHqlZ+ZBKBGh1+r/Wq9YPCfDEqshg+Lo7tGCl1NKMvX6zzQARkRWLS1NixLoUHLtcAAAGg8D9649dLsCIdSmIS1M2e41k+fiagIjISm1IzsTa/RmN2lerE6HViVgSfx75JeWYGxZo4urImvDJABGRFYpLUzY6CPzR2v0Z2M4nBDaNTwaIiKxMdmEplu9Kr3Nd/rfroP7lgN59O8z5HDJnz1rLX9uVjkFdPNmGwEYxDBARWZmlCeeh0dM2wLnPaNh36v2HpSIKv38fMlefOoMAAGh0IpYmnEfsrBDTFktWgWGAiMiKZOYUIzUrX+96RYceUHToUWNZWXY6xMpyOD40VO9+Wp2I1Kx8ZOUWI8Cb3Q5tDdsMEBFZka3HlZBKhAbto76QAkCA40OhBreTSgRs+YltB2wRwwARkRVJvpRbb/fB+4laDUovHoHiwR6QtfUxuK1WJyI5I7epJZIVYhggIrISJeUaKAtLG7TP3d9OQXdXZfAVwf2UBaVQl2saUR1ZM4YBIiIrcbVADeOfCdyjvpACSGRw6DHYqO1FAFcK1A2ujawbwwARkZWo0OgatL2u4i7uZv6ENp37QNrG+KH
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABMn0lEQVR4nO3de1zT9f4H8Nd3GwO531EUJAW10LKjhmmKeElLpbRM815mWXpSM8vsopnHNC07ppVWJ0stLS+Fvy4qioo3tCwjTAEJZqggG8LYZLDt+/uDIBE2Bgy2sdfz8eBxjt/re2h8X3xuX0EURRFERETktCS2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W4g37BADh/u6I6xyMCTHhiArxslWZZAFBFEWxroOKi4vh4+ODoqIieHt7N0ddRERkpy6qtFi4KxXJmQWQSgQYjKYfI5X7+0UGYtmobgjzd2/GSsnS5zfHDBARkcW2nlJg8OpDOJalBACzQeDG/ceylBi8+hC2nlI0eY1Uf+wmICIii6xNysCqvekNOtdgFGEwiliwMxUFJTrMiouycnXUGGwZICKiOm09pWhwELjZqr3p2MYWArvClgEiIjLrokqLRQlpte4r+L/V0Py+3+S5bWduhMwrsMb21xLS0KdjIMcQ2AmGASIiMmvhrlToTYwN8LpzGNwiut+0VYRqzzrIfEJqDQIAoDeKWLgrFZumxVi3WGoQhgEiIjIpI0+N5MwCk/td294K17a3VttWejENYrk
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABRq0lEQVR4nO3deVhU9f4H8PeZGRZZZRFUZEQFURHLXDDLlDRXwtRMTa3USDOzrLx1rTSpq1b+spIytEWvS5SmRpq5JJpLoZYm0lUghSFUkEEYmMGBmTm/PwwS2QYYmO39ep6eHs/6GZc5b77nuwiiKIogIiIiuyUxdwFERERkXgwDREREdo5hgIiIyM4xDBAREdk5hgEiIiI7xzBARERk5xgGiIiI7BzDABERkZ1jGCAiIrJzDANERER2jmGAqIHWr18PQRAq/3N2dkb79u0xYsQIfPjhhyguLjZ3iY22ZcsWvP/+++Yuo17r1q3D4MGD4e/vDycnJ3Tq1AkzZsxAZmamuUsjskoC1yYgapj169djxowZiI2NRadOnVBeXo6rV6/i0KFD2L9/P+RyORITE9GrVy9zl9pgUVFROHfunMU/VOfOnQuNRoPw8HB4eXnh0qVLWLduHfR6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qLsAg2WJKYCAAxlpVAlb4f28gWUXUmD4UYJfEY/D7dew6qdV56fjYIf10H71x8QpDK06tIPXkOfhNTFE4sTUzGwiy/7EBBRi2DLAFETLdqRAt3f7/4NGhWKjn2JcmU2HPw61XqOTpW
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABP/0lEQVR4nO3deVhU9f4H8PeZGRhgWGRVUcYNRCVME0QRM9Q0KymXylK7pXaztH5ZWqamVy3Sq6WVZdqi5pItamI3y0wyV7RcwB0yHBQFAWUZYGBmzu8PgkRg2AbOLO/X8/D0cLb5DBLzPt/zXQRRFEUQERGR3ZJJXQARERFJi2GAiIjIzjEMEBER2TmGASIiIjvHMEBERGTnGAaIiIjsHMMAERGRnWMYICIisnMMA0RERHaOYYCIiMjOMQwQ1dPatWshCELFl5OTE/z9/TF06FC8//77yM/Pl7rEBtu0aROWL18udRn1Ulpaim7dukEQBCxdulTqcoisEsMAUQMtWLAA69evx8qVK/HCCy8AAF566SWEhoYiMTFR4uoaxhrDwAcffACNRiN1GURWjWGAqIGGDRuGcePG4emnn8brr7+On376Cbt370ZmZiZiYmJQVFQkdYlNqri4GEajUdIaMjMzsWDBArz22muS1kFk7RgGiMxo4MCBeOONN3Dp0iVs2LCh0r5z585h9OjR8PLygpOTE8LCwhAXF1fpmPJHEPv378eLL74IX19ftGjRAs8++yxKSkpw8+ZNPPnkk/D09ISnpydeffVV3L7wqFarxSuvvIKAgAAolUoEBwdj6dKlVY673T333IP//e9/uHTpUsUjkPbt2wMAfv31VwiCgM2bN2POnDlo06YNXFxckJeXBwBISEjAfffdBw8PD7i4uGDAgAE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olDho0SFy9enWttZnCoYVEjSOIYjP2PiIiIiKLwz4DREREdo59BojIYly/fh0Gg6HG/Y6OjvDy8mrGiojsAx8TEJHFaN++vcmJkQYMGIBff/21+QoishNsGSAii7Fx40aTSz97eno2YzVE9oMtA0RERHauTi0DRqMR6enpcHNz41KhREREVkIUReTn58Pf3x8yWc1jBuoUBtLT07kgCBERkZVKS0tD27Zta9xfpzBQPsd5Wloa3N3dzVMZERERNam8vDwEBARUWcn0dnUKA+WPBtzd3RkGiIiIrExtj/g56RAREZGdYxggIiKycwwDREREdo5hgIiIyM4xDBAREdk5hgEiIiI7xzBARERk5xgGiIiI7BzDABERkZ1jGCAiIrJzDANERER2jmGAiIjIzjEMEBER2TmGASIiIjvHMEBERGTnGAaIiIjsnELqAoikpNXpkZqtRYneCEeFDO29VVAp+b8FEdkX/tUju5OckY+NCRrEn8+EJqcQ4i37BABqLxdEB/thbIQaQS3dpCqTiKjZCKIoirUdlJeXBw8PD+Tm5sLd3b056iIyu7ScQszaloR9KVmQywQYjDX/6pfv7x/og9gRoQjwcmnGSomIzKOun9/sM0B2YfNRDQYv24uDF7MBwGQQuHX/wYvZGLxsLzYf1TR5jUREUuFjArJ5K+KTsXTXhQadazCKMBhFzNyahKwCHaZGB5m5OiIi6bFlgGza5qOaBgeB2y3ddQFfsYWAiGwQWwbIZqXlFGJe3GmTx+iupSB3/yboLp+BqC+FokVLuPa4D+5hMdUePzfuNCI7+bAPARHZFLYMkM2atS0JehN9A4r+OoZr66fDUJgLj8gx8Bz8DJwDe8OQn1XjOXqjiFnbkpqiXCIiybBlgGxSckY+9qXU/KFu1BUi6/t34dwpHL4jXocg1C0XG4wi9qVkISUzH4F+HHZIRLaBLQNkkzYmaCCXCTXu1575FUbtTXje/SQ
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb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MiIiIrKpyspKREREtHiT6bUsCgONjwZ8fX0ZBoiIiJxMW4/4WXSIiIjIzTEMEBERuTmGASIiIjfHMEBEROTmGAaIiIjcHMMAERGRm2MYICIicnMMA0RERG6OYYCIiMjNMQwQERG5OYYBIiIiN8cwQERE5OYYBoiIiNwcwwAREZGbYxggIiJycwwDREREbk5h7wYQOQJdnQGFWh3qDSKUChmigjTQqPjrQUTugVc7clt5JVVYk1WMjBOlKC7XQ7pqnQAgMlCN5PgQTE2MRFyoj72aSURkc4IkSVJbG1VWVsLPzw8VFRXw9fXtinYR2czpcj3mrc/BnvwyyGUCjKLpX4HG9UNjg7FoQl9EBKq7sKVERJ1j6fc3xwyQW1mbXYyU9F3ILNACgNkgcPX6zAItUtJ3YW12sc3bSETU1fiYgNzGsow8LNl6skP7GkUJRlHCc1/loKy6DrOS46zcOiIi+2HPALmFtdnFHQ4C11qy9SQ+Zw8BEbkQ9gyQyztdrseCjbkm19ddyMflXZ+g7uwvAABV+PUISP4jlKExJvd5cWMuknoFcwwBEbkE9gyQy5u3PgcGE2MD6i7ko2T1szBcvgD/wffBb/AUNFw6hwufPocG7RmTxzSIEuatz7FVk4mIuhTDALm0vJIq7MkvMzlQsGLPaggKJcIeWALfxIn
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABO50lEQVR4nO3de1xUdf4/8NdcmOGOMAjITSXRjCz9qWGWGl7zRmrmJS+lbOu3b+Zql60sV1Pz28XN2qzd2jILWam80nXRxEuZaJmllgq5goByGQSGGRiYmfP7w4YVgWEGZubM5fV8PPaxOef2RoF5zed8zvsjEQRBABEREXktqdgFEBERkbgYBoiIiLwcwwAREZGXYxggIiLycgwDREREXo5hgIiIyMsxDBAREXk5hgEiIiIvxzBARETk5RgGiIiIvBzDAJGNNm/eDIlE0vQ/X19fREdHY9y4cfjb3/4GjUYjdokd9q9//Quvvfaa2GVYxWQy4e9//zv69+8PPz8/qFQqjBw5Ej/99JPYpRG5HbnYBRC5q9WrV6Nnz55obGzE5cuXsX//fixduhSvvvoqsrKycMstt4hdos3+9a9/4dSpU1i6dKnYpbRr4cKFyMjIwPz587F48WJotVr8+OOPKCsrE7s0IrfDMEDUQePHj8egQYOa/vzMM89g3759mDRpElJTU/Hrr7/Cz89PxAodq76+HgqFAlKp8wcYP/74Y3zwwQfYsWMHpk6d6vTrE3ka3iYgsqORI0dixYoVKCgowJYtW5ptO3PmDKZPn46wsDD4+vpi0KBByMrKaraP+RbEN998gyVLlqBr167o0qULFi1ahIaGBlRVVWH+/PkIDQ1FaGgo/vznP+P6hUe1Wi0ef/xxxMXFQalUok+fPli/fn2L/a5311134fPPP0dBQUHTLZAePXoAAPbv3w+JRILMzEw899xziImJgb+/P2pqagAAubm5uPvuuxESEgJ/f3+MGDEC3377bYtrFBcXY+HChYiMjIRSqURSUhI2bdpk618zXn31Vdx2222YOnUqTCYTtFqtzecgov9iGCCys3nz5gEAsrOzm147ffo0hgwZgl9//RVPP/00/vrXvyIgIABTpkzBzp07W5zj0UcfRV5eHp5//nmkpqbinXfewYoVKzB58mQYjUasW7cOd955J1555RWkp6c3HScIAlJTU7FhwwbcfffdePXVV9GnTx88+eSTeOyxxyzW/eyzz6J///4IDw9Heno60tPTW8wfWLNmDT7//HM88cQTWLduHRQKBfbt24fhw4ejpqYGK1euxLp161BVVYWRI0fi6NGjTceWlpZiyJAh2Lt3LxYvXozXX38dvXr1Qlpamk3zFGpqanD06FEMHjwYy5cvR0hICAIDA5GQkICPP/7Y6vMQ0TUEIrLJ+++/LwAQjh071uY+ISEhwoABA5r+PGrUKKFfv35CfX1902smk0kYOnSokJiY2OLc48aNE0w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eihyoAAUr+eiJyFv60EZEo8ko1yMgtRM7ZMhRW6iBcs00CID7MHyl9IjAnOR6JkUFilUnkFSSCIAjt7VRTU4OQkBBUV1cjODjYGXURkYe6WKnD8p0ncSi/AjKpBEZT27+CzNuH9QrHuqn9EBfm78RKidyfte/fnDNARE6TeawQozccwOHzagCwGASu3X74vBqjNxxA5rFCh9dI5I14m4CInGJjTh7WZ5/r0LFGkwCjScDTO06iolaPxSmJdq6OyLsxDBCRw2UeK+xwELje+uxz6BqoxMzB8XY5n9g4eZJcAb/jiMihLlbqsDLrdKvb9JfOQXvya9QXnoShuhRSv2Aoo/ugy/B58AmLafOcf8k6jaE3hLvtHAJOniRXwwm
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABMl0lEQVR4nO3deVzUdf4H8Nd3ZmCUUzkN5fDAC1HzzvJAEcUDxS7No8O1YzPTrM0sNbXcNd1VW6tdzbXWLK0UpbyJCfEislSkVNAfDF4goBwzMjAz398fBisCwwBzMq/n49Hj93O+13tc+X5ffL6fQxBFUQQRERE5LIm1CyAiIiLrYhggIiJycAwDREREDo5hgIiIyMExDBARETk4hgEiIiIHxzBARETk4BgGiIiIHBzDABERkYNjGCAiInJwDANEDfTZZ59BEISq/1q0aIGAgACMHj0aH374IUpKSqxdYqN9+eWXWLdunbXLqNe9f//3/zdq1Chrl0dkd2TWLoDIXi1fvhzt27dHRUUFbty4gR9//BHz5s3DP/7xD8THx6Nnz57WLrHBvvzyS5w7dw7z5s2zdikGbd26tcZnP//8M9avX4+oqCgrVERk3xgGiBopOjoa/fr1q/rzW2+9hcTERIwfPx4xMTH4/f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VEU8fbbb2PhwoUO01Jg7PObowmIiMjkbt++jeeeew5jx45F165dcfbsWfzwww+YOHGiRd/lh4eHY9OmTbhy5Qpee+01LFu2DAMGDMDp06c
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABU60lEQVR4nO3deVxU9f4/8NeZGfZ9EQ0EQVlS1DQlzVRCcSulbFF/ua/d+1VcurbpTbOse296rymaAZorbpmalpqauGUi5ZobkMIgKAgoyyADM3N+fxgksQ0wMNvr+Xj0uNezvgdmOK/5nM/5fARRFEUQERGR2ZLouwAiIiLSL4YBIiIiM8cwQEREZOYYBoiIiMwcwwAREZGZYxggIiIycwwDREREZo5hgIiIyMwxDBAREZk5hgEiIiIzxzBAVE/r16+HIAgV/1lbW8PT0xODBg3CihUrUFhYqO8SG2zLli34/PPP9V2GVnbs2IGePXvC2dkZbm5uCA0Nxffff6/vsoiMEsMAUQN99NFH2LRpE1avXo3IyEgAwOzZs9GpUydcunRJz9U1jLGEgaioKIwcORLu7u7497//jQ8++AD5+fkYOnQodu3ape/yiIyOwImKiOpn/fr1mDhxIhITE9G9e/dK644ePYqhQ4fCw8MD165dg42NjZ6qbJihQ4fit99+Q2pqap3blpSUwNLSEhJJ83+nCAwMhLOzMxISEiAIAgCgoKAAXl5e6NevH7799ttmr4nImLFlgEiH+vXrhw8++ABpaWnYvHlzpXXXr1/Ha6+9BldXV1hbW6N79+7Yu3dvpW3Kb0GcOnUKM2fORIsWLeDs7Iw333wTpaWlePDgAcaNGwcXFxe4uLjgnXfewV/zvEKhwD/+8Q94e3vDysoKQUFBWLp0aZXt/ur555/H999/j7S0tIpbIL6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xDfeeEN0dnYWAVQ8Zlj+aOHXX39d7X7nz58XX3nlFdHNzU20srIS27RpI44YMUL88ccfK22XlZUlTp8+XfT29hYtLCzEVq1aif379xdjYmLqrO1xZWVlYlRUlNilSxfR3t5etLe3F8PCwsSjR4/W6zhE9AiHIyYiIjJz7DNARERk5thngIgMxr1796p9SqCcpaUlXF1dm7EiIvPA2wREZDB8fX1rHRgpNDQUx44da76CiMwEWwaIyGDExcXh4cOHNa53cXFpxmqIzAdbBoiIiMycVi0DGo0GmZmZcHBwqPcIZURERKQfoiiisLAQnp6ekEhqfmZAqzCQmZlZZYIUIiIiMg7p6elo3bp1jeu1CgPlY5ynp6fD0dFRN5URERFRkyooKIC3t3eVmUz/SqswUH5rwNHRkWGAiIjIyNR1i5+DDhEREZk5hgEiIiIzxzBARERk5hgGiIiIzBzDABERkZljGCAiIjJzDANERERmjmGAiIjIzDEMEBERmTmGASIiIjPHMEBERGTmGAaIiIjMHMMAERGRmWMYICIiMnMMA0RERGaOYYCIiMjMyfRdABERUXNTKFVIzVWgVKWBpUwCXzc72FmZ7yXRfF85ERGZleSsQsQlyBF/IxvyvGKIj60TAPi42iIsyAOje/ggoKWDvsrUC0EURbGujQoKCuDk5IT8/Hw4Ojo2R11EREQ6kZ5XjHm7L+NkSg6kEgFqTc2XvfL1ffzd8enwTvB2tW3GSnVP2+s3+wwQEZHJ2pYoR/iy4zh9MxcAag0Cj68/fTMX4cuOY1uivMlrNAS8TUBERCZpZXwylh5KatC+ao0ItUbEe7suI6dIiRlhATquzrCwZYCIiEzOtkR5g4PAXy09lITtJt5CwJYBIiIyKel5xVi49wo0pQ9RkLALyswbKL2TBE1JEdxemA37zuFV9inLSUfej7F
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb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M2hkQKfTITU1Fa6urtXuUEZERESmIYoi8vPz4e/vD4mk8jUDBoWB1NTUhx6QQkRERJYhJSUFjRo1qnS7QWGgtMd5SkoK3NzcjFMZERER1aq8vDw0btz4oSeZ/pNBYaD01oCbmxvDABERkYWp6hY/mw4RERHZOIYBIiIiG8cwQEREZOMYBoiIiGwcwwAREZGNYxggIiKycQwDRERENo5hgIiIyMYxDBAREdk4hgEiIiIbxzBARERk4xgGiIiIbBzDABERkY1jGCAiIrJxDANEREQ2jmGAiIjIxslMXQAREZmOSq1BklKFYo0O9jIJgryd4ezAS4Ot4b84EZGNScjIx/pTCsRdy4QipxDiA9sEAIFeTohs4YsxEYEI9XM1VZlUhwRRFMWqdsrLy4O7uztyc3Ph5uZWF3UREZGRpeQUYs72CziWmA2pRIBWV/mP/9Lt3UN8sHBIOBp7OdVhpWQshl6/OWeAiMgGbDqtQO/oIzh5QwkAeoPAg9tP3lCid/QRbDqtqPUayXR4m4CIyMotjUvAov3XH+m9Wp0IrU7EO9suILtAjemRoUaujswBRwaIiKzYptOKRw4C/7Ro/3Vs5giBVeLIABGRlUrJKcS8nZcq3FaclYzc4xtQnJ4IreouBDsH2Hk3hlvEUDiFRlR6zLk
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABOrUlEQVR4nO3de3yT5f0//tedpEmbns/Q0jT0QIKlggMsoA6rKDCVjzinTEA/jun8CR6nji9ORVQ+HnCMzcPEExvimFNwzClDpCJaBTxXFNqm9EALLU3oKWnTJrl/f2AqtW3SlrT3fSev5+PhYyP3ndzvQpu8et3X9b4EURRFEBERUchSSV0AERERSYthgIiIK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nh4iIiEIcwwAREVGIYxggIiIKcQwDREREIY5hgIiIKMQxDBAREYU4hgEiIqIQxzBAREQU4hgGiIiIQhzDABERUYhjGCAiIgpxDANEREQhjmGAiIgoxDEMEBERhTiGASIiohDHMEBERBTiNFIXQETBw+50odJqR6fLA61GBWNiJCJ1fJshkjv+lBLRaSmrb8WmvdUoOtSAapsD4inHBACGBD0KTSlYWGBAbmq0VGUSkQ+CKIqiv5NaWloQGxuL5uZmxMTEjERdRCRzNTYHVmwtwZ7yRqhVAtye/t9KvMfPy0nC6vn5yEjQj2ClRKFroJ/fnDNARIO2eX81Zq3djeIKKwD4DAKnHi+usGLW2t3YvL962GskooHjbQI
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"class Graph:\n",
" def __init__(self, adj_list: dict = {}, name=\"Graph\", directed=False):\n",
" self.plt = plt\n",
"\n",
" self.nx = nx\n",
" # validation\n",
"\n",
" tmp = []\n",
" for i in adj_list:\n",
" tmp.extend(adj_list[i])\n",
"\n",
" if not directed and set(tmp) == set(adj_list.keys()):\n",
" self.adj_list = adj_list\n",
" self.directed = directed\n",
" self.name = name\n",
" else:\n",
" print(\"Error : It is not a valid graph\")\n",
"\n",
" def __str__(self):\n",
" string = \" \" + self.name + \"\\n\"\n",
" for i in self.adj_list.keys():\n",
" string += (\n",
" str(i) + \" : [\" + \",\".join([str(j) for j in self.adj_list[i]]) + \"]\\n\"\n",
" )\n",
" return string\n",
"\n",
" def add_node(self, node):\n",
" if node not in self.adj_list.keys():\n",
" self.adj_list[node] = []\n",
" else:\n",
" print(f\"Warning : the node'{node}' already exists\")\n",
"\n",
" def add_edge(self, node1, node2):\n",
" graph = self.adj_list\n",
" if node1 in graph and node2 in graph:\n",
" graph[node1].append(node2)\n",
" if not self.directed:\n",
" graph[node2].append(node1)\n",
<<<<<<< HEAD
" def get_node_set(self):\n",
" return list(self.adj_list.keys())\n",
" def get_edg_set(self):\n",
=======
"\n",
" def get_nodeSet(self):\n",
" return list(self.adj_list.keys())\n",
"\n",
" def get_edgSet(self):\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
" edgSet = []\n",
" for i in self.adj_list.keys():\n",
" for j in self.adj_list[i]:\n",
" edgSet.append(tuple([i, j]))\n",
" return edgSet\n",
"\n",
" def dfs(self, node):\n",
" if node in self.adj_list.keys():\n",
" traverse = []\n",
" visited = set()\n",
" stack = [node]\n",
" while stack:\n",
" current = stack.pop()\n",
" if current not in visited:\n",
" visited.add(current)\n",
" traverse.append(current)\n",
" stack.extend(self.adj_list[current])\n",
"\n",
" return traverse\n",
" else:\n",
" print(f\"Error : node'{node}' does not exist in graph\")\n",
"\n",
" def bfs(self, node):\n",
" if node in self.adj_list.keys():\n",
" traverse = []\n",
" visited = set()\n",
" queue = [node]\n",
" while queue:\n",
" current = queue.pop(0)\n",
" if current not in visited:\n",
" visited.add(current)\n",
" traverse.append(current)\n",
" queue.extend(self.adj_list[current])\n",
" return traverse\n",
"\n",
" else:\n",
" print(f\"Error : node'{node}' does not exist in graph\")\n",
"\n",
<<<<<<< HEAD
" def get_path(self, n1,n2, path=[]):\n",
" g= self.adj_list\n",
" path +=[n1]\n",
" if n2 not in g[n1]:\n",
" for i in g[n1]:\n",
" if(i not in path):\n",
" path1 = self.get_path(i, n2, path.copy())\n",
" if(path1):\n",
" return path1 \n",
=======
" def getPath(self, n1, n2, path=[]):\n",
" g = self.adj_list\n",
" path += [n1]\n",
" if n2 not in g[n1]:\n",
" for i in g[n1]:\n",
" if i not in path:\n",
" path1 = self.getPath(i, n2, path.copy())\n",
" if path1:\n",
" return path1\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
" else:\n",
" return path + [n2]\n",
"\n",
" def opt_path(self, path):\n",
" g = self.adj_list\n",
" l = len(path)\n",
" path1 = path.copy()\n",
" t = 2\n",
" for i in range(l):\n",
" for j in range(i + 2, l):\n",
" if abs(j - i) > t:\n",
" n1 = path[i]\n",
" n2 = path[j]\n",
<<<<<<< HEAD
" if(n2 in g[n1]):\n",
" path1 = path[:i+1]+path[j:]\n",
" t = abs(j-i)\n",
" return path1 \n",
" def sortest_path(self,n1,n2):\n",
" path = self.get_path(n1,n2)\n",
" spath =self.opt_path(path)\n",
=======
" if n2 in g[n1]:\n",
" path1 = path[: i + 1] + path[j:]\n",
" t = abs(j - i)\n",
" return path1\n",
"\n",
" def sortestPath(self, n1, n2):\n",
" path = self.getPath(n1, n2)\n",
" spath = self.opt_path(path)\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
" return spath\n",
"\n",
" def display(self):\n",
" G = self.nx.Graph()\n",
" G.add_nodes_from(self.get_node_set())\n",
" G.add_edges_from(self.get_edg_set())\n",
" self.nx.draw_networkx(G)\n",
" self.plt.title(self.name)\n",
" self.plt.show()\n",
<<<<<<< HEAD
" def make_tree(self, Root=None):\n",
=======
"\n",
" def makeTree(self, Root=None):\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
" temp_ls = dict()\n",
" if (Root == None) or (Root not in self.adj_list.keys()):\n",
" root = list(self.adj_list.keys())[0]\n",
" else:\n",
" root = Root\n",
" temp_ls[root] = [root]\n",
" stack = [root]\n",
"\n",
" def visite(root):\n",
" for i in self.adj_list[root]:\n",
" if root not in temp_ls:\n",
" temp_ls[root] = list()\n",
" if i not in stack:\n",
" stack.append(i)\n",
" temp_ls[root].append(i)\n",
" visite(i)\n",
"\n",
" visite(root)\n",
"\n",
" return temp_ls\n",
"\n",
"\n",
"adj_list = {\n",
" 0: [3, 5, 9, 10, 1],\n",
" 1: [6, 7, 4, 0, 10],\n",
" 2: [10, 5],\n",
" 3: [0],\n",
" 4: [1, 5, 8],\n",
" 5: [2, 0, 4],\n",
" 6: [1],\n",
" 7: [1],\n",
" 8: [4],\n",
" 9: [0],\n",
" 10: [2, 0],\n",
"}\n",
"g = Graph(adj_list, name=\"Demo\")\n",
"g.display()\n",
"for i in adj_list:\n",
<<<<<<< HEAD
" \n",
" g1 = Graph(g.make_tree(Root=i),name=\"Demo tree_\"+str(i))\n",
" g1.display()\n"
=======
" g1 = Graph(g.makeTree(Root=i), name=\"Demo tree_\" + str(i))\n",
" g1.display()"
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "29d9be84",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "03f1967f",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "8db9672a",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 4,
"id": "457ca038",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Demo\n",
"0 : [3,5,9,10,1]\n",
"1 : [6,7,4,0,10]\n",
"2 : [10,5]\n",
"3 : [0]\n",
"4 : [1,5,8]\n",
"5 : [2,0,4]\n",
"6 : [1]\n",
"7 : [1]\n",
"8 : [4]\n",
"9 : [0]\n",
"10 : [2,0]\n",
"\n",
" Demo\n",
"0 : [3,5,9,10,1]\n",
"1 : [6,7,4,0,10]\n",
"2 : [10,5]\n",
"3 : [0]\n",
"4 : [1,5,8]\n",
"5 : [2,0,4]\n",
"6 : [1]\n",
"7 : [1]\n",
"8 : [4,10]\n",
"9 : [0]\n",
"10 : [2,0,8]\n",
"\n",
"[8, 10]\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGbCAYAAABZBpPkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABlNklEQVR4nO3dd1yV5fsH8M8Z7KWAqCi4AAfiyMFQUFJxU2qppdgwyxxpWmY21b72NWdWauX84sxypXbEgYqCSDlCHICm4AAElCnjnPP8/jD4RWw8h+eMz/v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VAmLZDgyYJCgR5OGO/jylkDRCJgMkCiyytU4lZGHoqUapjKpWjpYMWV5gxMa0dLxO/4D6ZPn445817m3zeRjuG/QBJFQmoOtkYnIfx6GpIy88u/KdpbIrCtE8Z5u8K9Md8U9V1MTAwePnyIQYMGwcpMzm2IiXQMkwGqV8mZ+Zi3JxYRiemQSSUVFpYJAG5n5iM0+jY2Rd2Cv5sjFo3w4vQyPaZQKNCwYUP06NFD7FCIqAIsIKR6syMmCf1XnETkzQwAqLbCvOR45M0M9F9xEjtikrQeI2mHQqHAgAEDIJfz/YNIFzEZoHrxbXgC5u6ORaFSXatpZsCTpKBQqcbc3bH4NjxBSxGStmRkZODcuXMYNGiQ2KEQUSWYDJDW7YhJwtKweI3ca2lYPHayh0CvHDlyBIIgYODAgWKHQkSVYJ8daVVyZj4+2x9X6fHClEQ8Ovk/FN69CgAwc26HhoGvwbRx60qv+XR/HPzaOLKGQE8oFAp4eXnB2dlZ7FCIqBL
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"print(g)\n",
"g.add_edge(8, 10)\n",
"print(g)\n",
<<<<<<< HEAD
"print(g.sortest_path(8,10))\n",
=======
"print(g.sortestPath(8, 10))\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
"g.display()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "affba892",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 5,
"id": "9862c226",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[1, 2, 2, 3, 4, 5, 1, 7, 9, 90, 23, 41]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"class Tree:\n",
" def __init__(self, data, parent=None):\n",
" self.data = data\n",
" self.childs = []\n",
"\n",
" def addChild(self, *nodes):\n",
" childs = [Tree(i, parent=self) for i in nodes]\n",
" self.childs.extend(childs)\n",
" if len(childs) == 1:\n",
" return childs[0]\n",
" return childs\n",
<<<<<<< HEAD
" \n",
" def get_childs(self):\n",
" return [i.data for i in self.childs]\n",
=======
"\n",
" def getChilds(self):\n",
" return [i.data for i in self.childs]\n",
"\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
" def getElements(self):\n",
" elements = [self.data]\n",
" for i in self.childs:\n",
" elements.extend(i.getElements())\n",
" return elements\n",
"\n",
" def traverse(self, order=\"pre\"):\n",
" ls = []\n",
" if order == \"pre\":\n",
" ls.append(self.data)\n",
" for i in self.childs:\n",
" ls.extend(i.traverse(order=order))\n",
" return ls\n",
" elif order == \"post\":\n",
" for i in self.childs:\n",
" ls.extend(i.traverse(order=order))\n",
" ls.append(self.data)\n",
" return ls\n",
"\n",
"\n",
"tree = Tree(1)\n",
"t2 = tree.addChild(2)\n",
"t2t3 = t2.addChild(2, 3, 4, 5, 1, 7, 9)\n",
"tree.addChild(90, 23, 41)\n",
"tree.getElements()\n",
"# tree.traverse()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "102b3cb1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[2, 3, 4, 5, 1, 7, 9, 2, 90, 23, 41, 1]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tree.traverse(\"post\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "69202f88",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 7,
"id": "99b975a8",
"metadata": {},
"outputs": [],
"source": [
"class BTree:\n",
" def __init__(self, data, parent=None):\n",
" self.data = data\n",
" self.left = None\n",
" self.right = None\n",
" self.parent = parent\n",
"\n",
" def getElement(self, idx):\n",
" path = []\n",
" while idx > 0:\n",
" if idx % 2 == 1:\n",
" path.append((idx % 2))\n",
" idx //= 2\n",
" else:\n",
" path.append((idx % 2) + 2)\n",
" idx = idx // 2 - 1\n",
" temp = self\n",
" while path and temp:\n",
" dr = path.pop()\n",
" if dr == 1:\n",
" temp = temp.left\n",
" else:\n",
" temp = temp.right\n",
" if temp:\n",
" return temp\n",
" else:\n",
" print(\"id does not exists\")\n",
<<<<<<< HEAD
" \n",
" def get_depth(self):\n",
" ld = self.left.get_depth() if self.left else -1\n",
" rd = self.right.get_depth() if self.right else -1\n",
" return max(ld,rd)+1\n",
" def is_balanced(self):\n",
" ld = self.left.get_depth() if self.left else -1\n",
" rd= self.right.get_depth() if self.right else -1\n",
" if(abs(ld-rd) in [0,1]):\n",
" lb = self.left.is_balanced() if self.left else True\n",
" rb = self.right.is_balanced() if self.right else True\n",
" return bool(lb*rb)\n",
" \n",
" def get_parent(self):\n",
" return self.parent\n",
" \n",
" def get_childs(self):\n",
" return [self.left, self.right]\n",
" \n",
" def get_id(self):\n",
" if(self.parent != None):\n",
" if(self == self.parent.left):\n",
" return self.parent.get_id()*2 + 1\n",
" else:\n",
" return self.parent.get_id()*2 + 2\n",
=======
"\n",
" def getDepth(self):\n",
" ld = self.left.getDepth() if self.left else -1\n",
" rd = self.right.getDepth() if self.right else -1\n",
" return max(ld, rd) + 1\n",
"\n",
" def isBalanced(self):\n",
" ld = self.left.getDepth() if self.left else -1\n",
" rd = self.right.getDepth() if self.right else -1\n",
" if abs(ld - rd) in [0, 1]:\n",
" lb = self.left.isBalanced() if self.left else True\n",
" rb = self.right.isBalanced() if self.right else True\n",
" return bool(lb * rb)\n",
"\n",
" def getParent(self):\n",
" return self.parent\n",
"\n",
" def getChilds(self):\n",
" return [self.left, self.right]\n",
"\n",
" def getId(self):\n",
" if self.parent != None:\n",
" if self == self.parent.left:\n",
" return self.parent.getId() * 2 + 1\n",
" else:\n",
" return self.parent.getId() * 2 + 2\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
" else:\n",
" return 0\n",
"\n",
" def __setattr__(self, key, value):\n",
" self.__dict__[key] = value\n",
" if value:\n",
" if key in [\"left\", \"right\"]:\n",
" value.parent = self\n",
<<<<<<< HEAD
" \n",
" \n",
" def get_size(self):\n",
" lsize = self.left.get_size() if self.left else 0\n",
" rsize = self.right.get_size() if self.right else 0\n",
" return lsize+1+rsize\n",
" \n",
" def add_data(self, data, idx=-1):\n",
" if(idx==-1):\n",
" q = [] \n",
" q.append(self) \n",
" while (len(q)): \n",
" temp = q[0] \n",
" q.pop(0) \n",
" if (not temp.left):\n",
" temp.left = BTree(data, parent=temp) \n",
=======
"\n",
" def getSize(self):\n",
" lsize = self.left.getSize() if self.left else 0\n",
" rsize = self.right.getSize() if self.right else 0\n",
" return lsize + 1 + rsize\n",
"\n",
" def addData(self, data, idx=-1):\n",
" if idx == -1:\n",
" q = []\n",
" q.append(self)\n",
" while len(q):\n",
" temp = q[0]\n",
" q.pop(0)\n",
" if not temp.left:\n",
" temp.left = BTree(data, parent=temp)\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
" break\n",
" else:\n",
" q.append(temp.left)\n",
" if not temp.right:\n",
" temp.right = BTree(data, parent=temp)\n",
" break\n",
" else:\n",
" q.append(temp.right)\n",
" else:\n",
" dr = idx % 2\n",
" if dr == 1:\n",
" ele = self.getElement(idx // 2)\n",
" ele.left = BTree(data, parent=ele)\n",
" else:\n",
" ele = self.getElement(idx // 2 - 1)\n",
" ele.right = BTree(data, parent=ele)\n",
<<<<<<< HEAD
" def add_node(self, node, idx=-1):\n",
" if(idx==-1):\n",
" q = [] \n",
" q.append(self) \n",
" while (len(q)): \n",
" temp = q[0] \n",
" q.pop(0) \n",
" if (not temp.left):\n",
" temp.left = node \n",
=======
"\n",
" def addNode(self, node, idx=-1):\n",
" if idx == -1:\n",
" q = []\n",
" q.append(self)\n",
" while len(q):\n",
" temp = q[0]\n",
" q.pop(0)\n",
" if not temp.left:\n",
" temp.left = node\n",
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
" break\n",
" else:\n",
" q.append(temp.left)\n",
" if not temp.right:\n",
" temp.right = node\n",
" break\n",
" else:\n",
" q.append(temp.right)\n",
"\n",
" def traverse(self, order=\"pre\"):\n",
" ls = []\n",
" if order == \"pre\":\n",
" ls.append(self.data)\n",
" if self.left:\n",
" ls.extend(self.left.traverse(order))\n",
" if self.right:\n",
" ls.extend(self.right.traverse(order))\n",
" return ls\n",
" elif order == \"post\":\n",
" if self.left:\n",
" ls.extend(self.left.traverse(order))\n",
" if self.right:\n",
" ls.extend(self.right.traverse(order))\n",
" ls.append(self.data)\n",
" return ls\n",
" elif order == \"in\":\n",
" if self.left:\n",
" ls.extend(self.left.traverse(order))\n",
" ls.append(self.data)\n",
" if self.right:\n",
" ls.extend(self.right.traverse(order))\n",
" return ls"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "9a28bb90",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[3, 4, 1, 5, 2, 0]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bt = BTree(0)\n",
"bt.left = BTree(1)\n",
"bt.right = BTree(2)\n",
"bt.left.left = BTree(3)\n",
"bt.left.right = BTree(4)\n",
"bt.right.left = BTree(5)\n",
"\n",
"\n",
"# bt.getElement(5)\n",
"bt.traverse(\"post\")"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "af6dc0c6",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[9, 8, 17, 5, 11, 3, 4, 6, 14]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"btr = BTree(3)\n",
"ls = [5, 6, 8, 11, 4, 14, 9, 17]\n",
"for i in ls:\n",
" btr.add_data(i)\n",
"btr.traverse(order=\"in\")\n",
"# btr.getElement(5).get_id()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "d77046ab",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[3, 50, 6, 4, 14]"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"btr.add_data(50, idx=1)\n",
"btr.traverse()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "aa1c5c64",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"btr.data"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "26662a5c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(6, 5)"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"btr.getElement(1).get_id()\n",
"\n",
"\n",
<<<<<<< HEAD
"bt.get_size(),btr.get_size()"
=======
"bt.getSize(), btr.getSize()"
>>>>>>> ffbe3bbd8623bff453d16b942b7cf035c20d808c
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "83acc37e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[3, 50, 6, 4, 14]"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"btr.traverse()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "563a1e0c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "3d20a2c3-fbfb-454e-83fc-95f70d674426",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}