From charlesreid1

(Task List)
m (Replacing with
Line 24: Line 24:
==Git Code Repository==
==Git Code Repository==

Latest revision as of 03:59, 9 October 2019


The Tripos Bot posts really, really difficult math problems. The source of these problems is the Cambridge Mathematics Tripos, principally drawn from those presented by G. H. Hardy in his work A Course of Pure Mathematics, available on Gutenberg:



Tripos bot:

  • Tweets one problem per week
  • One image per problem
  • Images come from Latex, rendered with "index card" class, converted to image (one-time, offline)
  • Depending on number of Tripos problems: can definitely find 52, but not sure if I can find 365
  • If we can find 365, then one per day...

Source Material

Hardy's Course of Pure Mathematics:

  • Around 210 Tripos problems - still need another 150 or so.

This should round it out:

Git Code Repository



Gutenberg offers a Latex version of Hardy's Course of Pure Mathematics:

This means the problems appear like this:

If $a$, $b$, $x$, $y$ are rational numbers such that
(ay - bx)^{2} + 4(a - x)(b - y) = 0,
then either (i)~$x = a$, $y = b$ or (ii)~$1 - ab$ and~$1 - xy$ are squares of rational
numbers. \MathTrip{1903.}

There are a few macros from the Latex version that need to be included when the problems are compiled with Latex.

Sample Latex Problem

Each problem is relatively minimal as far as Latex code. Here is an example problem:

Sum the series
\frac{x}{2! \DPchg{n - 2!}{(n - 2)!}}
  + \frac{x^{2}}{5! \DPchg{n - 5!}{(n - 5)!}}
  + \frac{x^{3}}{8! \DPchg{n - 8!}{(n - 8)!}} + \dots
  + \frac{x^{n/3}}{\DPchg{n - 1!}{(n - 1)!}},
$n$~being a multiple of~$3$. \MathTrip{1899.}

This uses a macro \DPchng that must be defined. This and other macros drawn from the Gutenberg version of the book are included in the main Latex template, which is used as a wrapper around each problem's minimal Latex code.

Here is the template:

\usepackage[active, tightpage]{preview}


%% Named operators






%%% % Handle degree symbols and centered dots as Latin-1 characters
%%% \DeclareInputText{176}{\ifmmode{{}^\circ}\else\textdegree\fi}
%%% \DeclareInputText{183}{\ifmmode\cdot\else\textperiodcentered\fi}

% Local spacing coercion
\newcommand{\Loosen}{\spaceskip 0.375em plus 0.75em minus 0.25em}
% Used only once, to coax a wide display into the text block

% Allow \quad to compress a bit
\renewcommand{\quad}{\oldquad\hspace{0pt minus 3pt}}

\newcommand{\Medskip}{\vspace{0pt plus 0.5\baselineskip}}

%% Parametrized vertical space %%

%%%% Corrections and in-line transcriber's notes %%%%
% In-line notes
% Errors

%%%% Notational modernizations %%%%
% ** If \epsilon -> \varepsilon, figures p117 and p176 must be recompiled

% Modernize TRUE
% Stylistic changes made for clarity or consistency

% Modernize notation

% ** Incarnations of \sqrt; see below for significance
  \newcommand{\sqrtp}[2][\ ]{\sqrt[#1]{#2}}
  \newcommand{\sqrtb}[2][\ ]{\sqrt[#1]{#2}}
  \newcommand{\sqrtbr}[2][\ ]{\sqrt[#1]{#2}}
  \newcommand{\bigsqrt}[2][\ ]{\sqrt[#1]{#2}}
  \newcommand{\bigsqrtb}[2][\ ]{\sqrt[#1]{#2}}
  \newcommand{\bigsqrtp}[2][\ ]{\sqrt[#1]{#2}}

% Exchange delta, epsilon in the definition of limits

% Add visual delimiters to large integers/long decimals
  \newcommand{\MC}{,}%  "Math comma"
  \newcommand{\MS}{\,}% "Math space"

%%% % Modernize FALSE
%%%   \newcommand{\DPchg}[2]{#1}
%%%   \newcommand{\Add}[1]{}
%%%   \newcommand{\DPmod}[2]{#1}
%%%   % Use surd sign...
%%%   \let\oldsqrt=\sqrt%
%%%   \renewcommand*{\sqrt}[2][\ ]{\oldsqrt[#1]{\vphantom{|}}#2}
%%%   % ... with parentheses or curly braces around radicand
%%%   \newcommand{\sqrtp}[2][\ ]{\sqrt[#1]{(#2)}}
%%%   \newcommand{\sqrtb}[2][\ ]{\sqrt[#1]{\{#2\}}}
%%%   \newcommand{\sqrtbr}[2][\ ]{\sqrt[#1]{\,[#2]}}
%%%   \newcommand{\bigsqrt}[2][\ ]{\oldsqrt[#1]{\vphantom{#2}}#2}
%%%   \newcommand{\bigsqrtb}[2][\ ]{\oldsqrt[#1]{\vphantom{\bigg|}}\left\{#2\right\}}
%%%   \newcommand{\bigsqrtp}[2][\ ]{\oldsqrt[#1]{\vphantom{#2}}\!\!\left(#2\right)}
%%%   \newcommand{\DELTA}{\delta}
%%%   \newcommand{\EPSILON}{\epsilon}
%%% % Don't add visual delimiters to large integers/long decimals
%%%   \newcommand{\MC}{}
%%%   \newcommand{\MS}{}

  \hfil\allowbreak\null\nobreak\hfill\nobreak\mbox{(\textit{Math.\ Trip.}\ #1)}%



January 2018

Task List

Task list:

    • Work out small page latex
    • Get questions into latex format
    • Script to compile latex to pdf, Imagemagick latex to jpg
    • Create Rainbow Mind Machine bot
    • Fix up rainbow mind machine image tweets
    • Write custom Sheep for daily tweet schedule from image directory
    • Create Twitter account
    • Authenticate
    • Set up and run on Rojo


Task 1: Extracting all tripos problems into Latex. 25 minutes

Task 3A: Compile Latex to pdf, ImageMagick pdf to jpg. Set up templating system for Latex. Use sed and \input{FILENAME}. 25 minutes

Task 3B: Fix Latex errors, broken macros, etc. 60 minutes

Task 2: Keep it simple, define bot items as a single image, same text different images each time (TBA)

Task 4: Will take some experimenting, but pretty sure Rainbow Mind Machine has multimedia tweeting already (TBA)