The files in this repository provide various solutions and visualizations to the triangle-counting problem from the Eugene Math Circle, Elementary I and II, Fall 2019. Everything is written in LaTeX, using the Tikz graphics package. Fun fact: LaTeX is Turing-complete, meaning you can use it to do basically whatever you want (but for purposes other than typesetting, other languages are probably preferable).
Here's a summary of the contents of this repository:
- To count all triangles in a 3 by 3 triangle by size, see the By Size directory. Currently the triangle dimensions cannot be changed for this method because everything is hard-coded. I hope to update this in the future so this method can be used for arbitrary n by m triangles.
- To count all triangles in an arbitrary n by m triangle using the inclusion-exclusion principle, see the Inclusion-Exclusion directory. This directory also contains some example videos and gifs for example values of n and m.
- To count all triangles in an arbitrary n by m triangle by assigning triangles to mutually exclusive categories, see the Sean's Version directory. This method was adapted from my inclusion-exclusion code by my friend Sean Ericson.
- For blank triangle outlines that do not actually count the triangles, see the Triangle Templates directory. These can be used as emergency challenge problems for students at all ages. Middle schoolers may be able to figure out the general solution.
Stay tuned for possibly even more methods for counting triangles, or possibly other shapes, in the future!