Explanations

advertisement
Mod Tables
Modulo
When you reduce one number A by a modulus (commonly abbreviated mod) of a second number B, you
calculate the remainder of dividing A by B.
10 mod 3 = 1 (10/3 = 3 with a remainder of 1)
10 mod 4 = 2 (10/4 = 2 with a remainder of 2)
10 mod 5 = 0 (10/5 = 0 with no remainder)
Multiplication Mod Table
You multiply the row number (shown in red) by the column number (shown in blue) and reduce it
modulo n (shown in green).
mod n
1
2
3
…
n-1
1
1*1 mod n
1*2 mod n
1*3 mod n
…
1*(n-1) mod n
2
2*1 mod n
2*2 mod n
2*3 mod n
…
2*(n-1) mod n
3
3*1 mod n
3*2 mod n
3*3 mod n
…
3*(n-1) mod n
…
…
…
…
…
…
n-1
(n-1)*1 mod n
(n-1)*2 mod n
(n-1)*3 mod n
…
(n-1)*(n-1) mod n
Exponentiation Mod Table
Exponentiation tables are similar, except you take the column (shown in blue), raise it to the power of
the row (shown in red), and reduce it modulo n (shown in green).
mod n
2
3
4
…
n
1
12 mod n
13 mod n
14 mod n
…
1n mod n
2
22 mod n
23 mod n
24 mod n
…
2n mod n
3
32 mod n
33 mod n
34 mod n
…
3n mod n
…
…
…
…
…
…
n-1
(n-1)2 mod n
(n-1)3 mod n
(n-1)4 mod n
…
(n-1)n mod n
Large Exponentiation Mods
You may have trouble evaluating large exponentiation tables simply because you have to deal with large
number, but you can use the following method to simplify the calculations. It can proven that
AB+Cmod n = (ABmod n)*(ACmod n)
If you take all of your exponents and convert them to binary, you will have your exponents as the sum of
powers of 2 which:
1
2
3
4
5
…
1
10
11
100
101
…
1*(2^0)
1*(2^1)+0*(2^0)
1*(2^1)+1*(2^0)
1*(2^2)+0*(2^1)+0*(2^0)
1*(2^2)+0*(2^1)+1*(2^0)
…
Then evaluate the bases to the powers of 2 reduced mod n, which can be done by squaring the previous
one.
1^(2^0) mod n
1^(2^1) mod n
1^(2^2) mod n
1^(2^3) mod n
…
2^(2^0) mod n
2^(2^1) mod n
2^(2^2) mod n
2^(2^3) mod n
…
3^(2^0) mod n
3^(2^1) mod n
3^(2^2) mod n
3^(2^3) mod n
…
4^(2^0) mod n
4^(2^1) mod n
4^(2^2) mod n
4^(2^3) mod n
…
…
…
…
…
…
Since you now have the exponents broken down into a sum of powers of two and you know what all of
the bases to the powers of two are reduced mod n, you just have to multiply together the correct
combinations of numbers and reduce mod n. For an example, lets evaluate 3^5 mod 10. 5 converted to
binary is 101. Also 3 to the powers of 2 are:
3^2^n
3
9
81
6561
…
Mod 10
3
9
1
1
…
The first 1 in the binary number corresponds to 3^2^2 mod 10, which we can see from the table is 1. The
0 is ignored. The second 1 in the binary number is 3^2^0 mod 10, which is 3. We multiply these two
together and get our answer of 3.
Files:
Mod Tables.xlsx – view my 100 and 200 mod tables, both multiplication and exponentiation (larger
numbers are shaded green and smaller numbers are shaded red)
Mod n Tables.xlsx - type the desired n into cell A1 and the corresponding mod n table will be generated
(again with larger numbers shaded green and smaller numbers shaded red)
Triangle Problem
Count the number of unique triangles that can be drawn such that all of their vertices are on an n x n
grid of lattice points.
For example a 4 x 4 grid of lattice points:
Two of the 29 possible unique triangles on the grid:
These two triangles are congruent and will only count as one of the unique triangles:
Files:
Triangles.docx – drawings of all of the triangles for the 3x3 through 6x6 grids, the vertices are
represented by the “O”s
Triangles.xlsx – collection of all of the data I’ve calculated on the problem
Also check out java application
3D Graphs
Simply enter in the data into the blue box, and the entire sheet will recalculate automatically. Then
switch to the “Graph” tab to view the graph.
Input desired function
Be sure to start with “=”
and simply use “x” and “y”
as variables.
Input values for viewing
window size.
Increments will
automatically update to
make 200 divisions, but
you can change if wanted.
Files:
3D Graph.xlsx – Creates 3D graphs using a data table
Java Applications
Graph
Input Function
Hide/Show Function
Input its Derivative
Input its Integral
Hide/Show Derivative
Hide/Show Integral
Function in Blue
Tangent in Red
Derivative in Red
Positive Area in
Darker Green and
Negative Area in
Lighter Green
Integral in Green
Drag Mouse or Type
in to Change Point A
Move Mouse or Type
in to Change Point B
Hit Enter Key or Click
to Refresh Graph
Input Values to
Change the
Viewing Window
Value of the
Function at B
Hide/Show
Tracing Circles
Hide/Show Tangent
Slope of the
Tangent at B
Area on the
Interval A to B
Hide/Show Area
Slope Field
Input Differential Equation
Hit Enter Key or Click
to Refresh Graph
Particular solution from
starting point in red
Draws arrows at many of
the points of the graph
to show the slope field
Click to add current
solution to graph
permanently in green
Move Mouse or Type in values for x
and y to change starting point to
Change Point B
Input Values to
Change the
Viewing Window
Slope at the
starting point
3D Graph
Input function
Click Redraw or hit
enter to refresh
Click to toggle resolution
Low – 30 divisions with
translucent fill
High – 80 divisions with
opaque blue to black shading
from closest to furthest
Move the mouse to
change the rotation
while in low resolution
Enter values to change viewing window
Cross Sections
Input Lower
Function
Move Mouse to
change rotation
Input Upper
Function
Input Height
Function
Click Button or type
Enter to refresh graph
Select shape to use as
cross section
Height it bounded by z=0 and height
function, unless square or circle,
then bounded by negative height
function and height function
Width of cross sections is
bound by Lower Function (f(x))
and Upper Function (g(x))
Use sliders to change
x bounds
Input values to change view window
Triangles
Input the size of the nxn
grid of lattice points
Current triangle displayed out of the
number of possible unique triangles
Go to next or
previous triangle
Y coordinates
1
2
3
X coordinates
1
2
3
Coordinates of vertices
of current triangle
Colors of numbers correspond to
colors of vertices and sides on graph
Lengths of sides of
current triangle
Download