{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\"drawing\"\n", "

Experimental Mathematics Using SageMath — AIMS-ZA-2024-25

\n", "\n", "\n", "## Instructors: \n", "\n", "* **Evans Ocansey**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Homework Assignment (due Saturday 9th November 2024, 21:00 GMT+2) \n", "\n", "\n", "Instructions for homework assignments: \n", "- Make sure to rename this notebook by replacing the word `username` with your AIMS username. For example, if my name is `Evans`, then I will rename this notebook to be `ems_2024_25_assignment_01_evans`.\n", "- You must write, type, use Jupyter notebook, or use $\\LaTeX$ to submit homework. **ALL CODE MUST BE EXPLAINED**. That means you should have at least one English sentence to explain each line of code that you write. This may be in a form of a comments or in a paragraph after each computation in your upyter notebook.\n", "- Similarly, do not simply write your explorations as lists of numbers, but write explanations of what you tried, and what didn’t work.\n", "- Do **NOT** use internet resources, or GPT-like models for the exploration; for help with _SageMath_ or _Python_ you may search the internet, of course. You are also welcome to ask me or any of the tutors.\n", "- The starred (*) exercises are more important; you should be working on them early and often. To pass the course you should try to do all the starred exercises.\n", "\n", "The outline of this notebook is as follows:\n", "\n", "## Table of Contents: \n", "* [Exercise 01](#exercise-01)\n", "* [Exercise 02](#exercise-02)\n", "* [Exercise 03](#exercise-03)\n", "* [Exercise 04](#exercise-04)\n", "* [Exercise 05](#exercise-05)\n", "* [Exercise 06](#exercise-06)\n", "* [Exercise 07](#exercise-07)\n", "* [Exercise 08](#exercise-08)\n", "* [Exercise 09](#exercise-09)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 01 \n", "\n", "Plot the $\\sin(x)$ sine-function of $x$ ranging from $0$ to $\\pi$ along with its third derivative on the same set of axes, in a different color. Make the vertical axes range from $-3$ to $+3$." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 02 \n", "\n", "Create a nontrivial $7 \\times 7$ diagonal matrix in _SageMath_ using a special command for it, and verify that the diagonal entries are the same as the eigenvalues of the matrix. Confirm that the eigenvectors are just the elementary basis vectors.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 03 \n", "\n", "For each of the numbers $n=10, 100, 1000, 10000, 100000, 1000000, 10000000$ and $100000000$ compare the number of primes less than $n$ to the value of $\\frac{n}{\\log(n)}$. You just need to make a table or write some sentences or something. (Here, $\\log$ is the natural logarithm.)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 04 \n", "Solve any differential equation using _SageMath_. It can be a really easy one." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 05 \n", "(*) Compute the conductor and Frobenius number of the following pairs: $\\{4,7\\}$, $\\{4,6\\}$, and $\\{7,9\\}$, if they exist. How many numbers are not writable in each case?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 06 \n", "(*) Prove that your computation of the conductor for $\\{4, 7\\}$ is correct. Use your own words!" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 07 \n", "(*) Write a Python function (a function using **def**) in _SageMath_ to list enough numbers for a general pair $\\{a, b\\}$ where $a$ and $b$ are natural numbers to guess the conductor of $a$ and $b$. (And explain it!)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 08 \n", "\n", "(*) Make a conjecture for a formula for the conductor and the Frobenius number, given the pair $\\{a,\\, b\\}$. Also conjecture how many are not writable for the pair $\\{a,\\,b\\}$ in general. Be sure to write down whatever evidence you have for these conjectures (no code needed). Just stating a possible formula will not receive full credit, you must actually write about or show your experiments. You do NOT need a proof." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercise 09 \n", "(*) Write a formal proof as I illustrated in class for the following statements:\n", " 1. Suppose $A \\subseteq C$, and $B$ and $C$ are disjoint. Prove that if $x \\in A$ then $x \\notin B$.\n", " 2. Suppose that $A \\setminus B$ is disjoint from $C$ and $x \\in A$. Prove that if $x \\in C$ then $x \\in B$.\n", " 3. Use the method of proof by contradiction to prove the following statements:\n", " - Suppose $A \\cap C \\subseteq B$ and $a \\in C$. Prove that $a \\notin A \\setminus B$.\n", " - Suppose that $A \\subseteq B$, $a\\in A$, and $a \\notin B \\setminus C$. Prove that $a \\in C$." ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Formal proof of Statement 1:\n", "\n", "Suppose $A \\subseteq C$, and $B$ and $C$ are disjoint. Prove that if $x \\in A$ then $x \\notin B$." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Formal proof of statement 2: \n", "\n", "Suppose that $A \\setminus B$ is disjoint from $C$ and $x \\in A$. Prove that if $x \\in C$ then $x \\in B$." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Formal proof of statement 3a:\n", "Suppose $A \\cap C \\subseteq B$ and $a \\in C$. Prove that $a \\notin A \\setminus B$." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Formal proof of statement 3b:\n", "Suppose that $A \\subseteq B$, $a\\in A$, and $a \\notin B \\setminus C$. Prove that $a \\in C$." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SageMath 10.4", "language": "sage", "name": "sagemath" }, "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.11.2" } }, "nbformat": 4, "nbformat_minor": 4 }