• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

a guest Apr 18th, 2019 191 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
414.36 KB
1. {
2.  "cells": [
3.   {
4.    "cell_type": "markdown",
6.    "source": [
7.     "# **ALGORITHM ANALYSIS 101 - INTRODUCTION**"
8.    ]
9.   },
10.   {
11.    "cell_type": "code",
12.    "execution_count": 1,
14.    "outputs": [],
15.    "source": [
16.     "import matplotlib.pyplot as plt\n",
17.     "import matplotlib.image as mpimg\n",
18.     "import numpy as np"
19.    ]
20.   },
21.   {
22.    "cell_type": "markdown",
24.    "source": [
25.     "## 1. *Mathematics Review*"
26.    ]
27.   },
28.   {
29.    "cell_type": "markdown",
31.    "source": [
32.     "This section lists some of the basic formulas you need to memorize or\n",
33.     "be able to derive and reviews basic proof techniques."
34.    ]
35.   },
36.   {
37.    "cell_type": "markdown",
39.    "source": [
40.     "#### 1.1 *Exponents*"
41.    ]
42.   },
43.   {
44.    "cell_type": "code",
45.    "execution_count": 2,
47.    "outputs": [
48.     {
49.      "data": {
51.       "text/plain": [
52.        "<Figure size 1080x720 with 1 Axes>"
53.       ]
54.      },
56.      "output_type": "display_data"
57.     }
58.    ],
59.    "source": [
61.     "plt.figure(1,figsize=(15,10))\n",
62.     "plt.xticks([]),plt.yticks([])\n",
63.     "plt.imshow(img)\n",
64.     "plt.show()"
65.    ]
66.   },
67.   {
68.    "cell_type": "markdown",
70.    "source": [
71.     "#### 1.2 *Logarithms*"
72.    ]
73.   },
74.   {
75.    "cell_type": "markdown",
77.    "source": [
78.     "In computer science, all logarithms are to base 2 unless specified otherwise."
79.    ]
80.   },
81.   {
82.    "cell_type": "code",
83.    "execution_count": 3,
85.    "outputs": [
86.     {
87.      "data": {
89.       "text/plain": [
90.        "<Figure size 1080x720 with 1 Axes>"
91.       ]
92.      },
94.      "output_type": "display_data"
95.     }
96.    ],
97.    "source": [
99.     "plt.figure(2,figsize=(15,10))\n",
100.     "plt.xticks([]),plt.yticks([])\n",
101.     "plt.imshow(img)\n",
102.     "plt.show()"
103.    ]
104.   },
105.   {
106.    "cell_type": "code",
107.    "execution_count": 4,
109.    "outputs": [
110.     {
111.      "data": {
113.       "text/plain": [
114.        "<Figure size 1080x720 with 1 Axes>"
115.       ]
116.      },
118.      "output_type": "display_data"
119.     }
120.    ],
121.    "source": [
123.     "plt.figure(3,figsize=(15,10))\n",
124.     "plt.xticks([]),plt.yticks([])\n",
125.     "plt.imshow(img)\n",
126.     "plt.show()"
127.    ]
128.   },
129.   {
130.    "cell_type": "markdown",
132.    "source": [
133.     "#### 1.3 *Series*"
134.    ]
135.   },
136.   {
137.    "cell_type": "code",
138.    "execution_count": 5,
140.    "outputs": [
141.     {
142.      "data": {
144.       "text/plain": [
145.        "<Figure size 1080x720 with 1 Axes>"
146.       ]
147.      },
149.      "output_type": "display_data"
150.     }
151.    ],
152.    "source": [
154.     "plt.figure(4,figsize=(15,10))\n",
155.     "plt.xticks([]),plt.yticks([])\n",
156.     "plt.imshow(img)\n",
157.     "plt.show()"
158.    ]
159.   },
160.   {
161.    "cell_type": "code",
162.    "execution_count": 6,
164.    "outputs": [
165.     {
166.      "data": {
168.       "text/plain": [
169.        "<Figure size 1080x720 with 1 Axes>"
170.       ]
171.      },
173.      "output_type": "display_data"
174.     }
175.    ],
176.    "source": [
178.     "plt.figure(5,figsize=(15,10))\n",
179.     "plt.xticks([]),plt.yticks([])\n",
180.     "plt.imshow(img)\n",
181.     "plt.show()"
182.    ]
183.   },
184.   {
185.    "cell_type": "code",
186.    "execution_count": 7,
188.    "outputs": [
189.     {
190.      "data": {
192.       "text/plain": [
193.        "<Figure size 1080x720 with 1 Axes>"
194.       ]
195.      },
197.      "output_type": "display_data"
198.     }
199.    ],
200.    "source": [
202.     "plt.figure(6,figsize=(15,10))\n",
203.     "plt.xticks([]),plt.yticks([])\n",
204.     "plt.imshow(img)\n",
205.     "plt.show()"
206.    ]
207.   },
208.   {
209.    "cell_type": "code",
210.    "execution_count": 8,
212.    "outputs": [
213.     {
214.      "data": {
216.       "text/plain": [
217.        "<Figure size 1080x720 with 1 Axes>"
218.       ]
219.      },
221.      "output_type": "display_data"
222.     }
223.    ],
224.    "source": [
226.     "plt.figure(7,figsize=(15,10))\n",
227.     "plt.xticks([]),plt.yticks([])\n",
228.     "plt.imshow(img)\n",
229.     "plt.show()"
230.    ]
231.   },
232.   {
233.    "cell_type": "code",
234.    "execution_count": 9,
236.    "outputs": [
237.     {
238.      "data": {
240.       "text/plain": [
241.        "<Figure size 1080x720 with 1 Axes>"
242.       ]
243.      },
245.      "output_type": "display_data"
246.     }
247.    ],
248.    "source": [
250.     "plt.figure(8,figsize=(15,10))\n",
251.     "plt.xticks([]),plt.yticks([])\n",
252.     "plt.imshow(img)\n",
253.     "plt.show()"
254.    ]
255.   },
256.   {
257.    "cell_type": "code",
258.    "execution_count": 10,
260.    "outputs": [
261.     {
262.      "data": {
264.       "text/plain": [
265.        "<Figure size 1080x720 with 1 Axes>"
266.       ]
267.      },
269.      "output_type": "display_data"
270.     }
271.    ],
272.    "source": [
274.     "plt.figure(8,figsize=(15,10))\n",
275.     "plt.xticks([]),plt.yticks([])\n",
276.     "plt.imshow(img)\n",
277.     "plt.show()"
278.    ]
279.   },
280.   {
281.    "cell_type": "markdown",
283.    "source": [
284.     "#### 1.4 *Modular Arithmetic*"
285.    ]
286.   },
287.   {
288.    "cell_type": "code",
289.    "execution_count": 11,
291.    "outputs": [
292.     {
293.      "data": {
295.       "text/plain": [
296.        "<Figure size 1080x720 with 1 Axes>"
297.       ]
298.      },
300.      "output_type": "display_data"
301.     }
302.    ],
303.    "source": [
305.     "plt.figure(9,figsize=(15,10))\n",
306.     "plt.xticks([]),plt.yticks([])\n",
307.     "plt.imshow(img)\n",
308.     "plt.show()"
309.    ]
310.   }
311.  ],
313.   "kernelspec": {
314.    "display_name": "Python 3",
315.    "language": "python",
316.    "name": "python3"
317.   },
318.   "language_info": {
319.    "codemirror_mode": {
320.     "name": "ipython",
321.     "version": 3
322.    },
323.    "file_extension": ".py",
324.    "mimetype": "text/x-python",
325.    "name": "python",
326.    "nbconvert_exporter": "python",
327.    "pygments_lexer": "ipython3",
328.    "version": "3.6.7"
329.   }
330.  },
331.  "nbformat": 4,
332.  "nbformat_minor": 2
333. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top