https://artofproblemsolving.com/wiki/api.php?action=feedcontributions&user=Elephantmaster&feedformat=atomAoPS Wiki - User contributions [en]2024-03-28T23:34:26ZUser contributionsMediaWiki 1.31.1https://artofproblemsolving.com/wiki/index.php?title=2000_AIME_II_Problems/Problem_2&diff=237732000 AIME II Problems/Problem 22008-03-02T18:55:15Z<p>Elephantmaster: Fix wrong solution</p>
<hr />
<div>== Problem ==<br />
A point whose coordinates are both integers is called a lattice point. How many lattice points lie on the hyperbola <math>x^2 - y^2 = 2000^2</math>?<br />
<br />
== Solution ==<br />
<math>(x-y)(x+y)=2000^2=2^8*5^6</math><br />
<br />
We must have <math>(x-y)</math> and <math>(x+y)</math> as both even or else x,y would not be an integer. We first give a factor of two to both <math>(x-y)</math> and <math>(x+y)</math>. We have <math>2^6*5^6</math> left. Since there are <math>7*7=49</math> factors of <math>2^6*5^6</math>, and since both x and y can be negative, this gives us <math>49\cdot2=98</math> lattice points.<br />
<br />
== See also ==<br />
{{AIME box|year=2000|n=II|num-b=1|num-a=3}}</div>Elephantmasterhttps://artofproblemsolving.com/wiki/index.php?title=2006_AIME_I_Problems&diff=235722006 AIME I Problems2008-02-23T23:23:44Z<p>Elephantmaster: /* Problem 10 */</p>
<hr />
<div>== Problem 1 ==<br />
In quadrilateral <math> ABCD , \angle B </math> is a right angle, diagonal <math> \overline{AC} </math> is perpendicular to <math> \overline{CD}, AB=18, BC=21, </math> and <math> CD=14. </math> Find the perimeter of <math> ABCD. </math><br />
<br />
[[2006 AIME I Problems/Problem 1|Solution]]<br />
<br />
== Problem 2 ==<br />
Let set <math> \mathcal{A} </math> be a 90-element subset of <math> \{1,2,3,\ldots,100\}, </math> and let <math> S </math> be the sum of the elements of <math> \mathcal{A}. </math> Find the number of possible values of <math> S. </math><br />
<br />
[[2006 AIME I Problems/Problem 2|Solution]]<br />
<br />
== Problem 3 ==<br />
Find the least positive integer such that when its leftmost digit is deleted, the resulting integer is 1/29 of the original integer.<br />
<br />
[[2006 AIME I Problems/Problem 3|Solution]]<br />
<br />
== Problem 4 ==<br />
Let <math> N </math> be the number of consecutive 0's at the right end of the decimal representation of the product <math> 1!2!3!4!\cdots99!100!. </math> Find the remainder when <math> N </math> is divided by 1000.<br />
<br />
[[2006 AIME I Problems/Problem 4|Solution]]<br />
<br />
== Problem 5 ==<br />
The number <math> \sqrt{104\sqrt{6}+468\sqrt{10}+144\sqrt{15}+2006}</math> can be written as <math> a\sqrt{2}+b\sqrt{3}+c\sqrt{5}, </math> where <math> a, b, </math> and <math> c </math> are positive integers. Find <math> a\cdot b\cdot c. </math><br />
<br />
[[2006 AIME I Problems/Problem 5|Solution]]<br />
<br />
== Problem 6 ==<br />
Let <math> \mathcal{S} </math> be the set of real numbers that can be represented as repeating decimals of the form <math> 0.\overline{abc} </math> where <math> a, b, c </math> are distinct digits. Find the sum of the elements of <math> \mathcal{S}. </math><br />
<br />
[[2006 AIME I Problems/Problem 6|Solution]]<br />
<br />
== Problem 7 ==<br />
An angle is drawn on a set of equally spaced parallel lines as shown. The ratio of the area of shaded region <math> \mathcal{C} </math> to the area of shaded region <math> \mathcal{B} </math> is 11/5. Find the ratio of shaded region <math> \mathcal{D} </math> to the area of shaded region <math> \mathcal{A}. </math><br />
<br />
[[Image:2006AimeA7.PNG]]<br />
<br />
[[2006 AIME I Problems/Problem 7|Solution]]<br />
<br />
== Problem 8 ==<br />
Hexagon <math> ABCDEF </math> is divided into five rhombuses, <math> \mathcal{P, Q, R, S,} </math> and <math> \mathcal{T,} </math> as shown. Rhombuses <math> \mathcal{P, Q, R,} </math> and <math> \mathcal{S} </math> are congruent, and each has area <math> \sqrt{2006}. </math> Let <math> K </math> be the area of rhombus <math> \mathcal{T}. </math> Given that <math> K </math> is a positive integer, find the number of possible values for <math> K. </math> <br />
<br />
[[Image:2006AimeA8.PNG]]<br />
<br />
[[2006 AIME I Problems/Problem 8|Solution]]<br />
<br />
== Problem 9 ==<br />
The sequence <math> a_1, a_2, \ldots </math> is geometric with <math> a_1=a </math> and common ratio <math> r, </math> where <math> a </math> and <math> r </math> are positive integers. Given that <math> \log_8 a_1+\log_8 a_2+\cdots+\log_8 a_{12} = 2006, </math> find the number of possible ordered pairs <math> (a,r). </math><br />
<br />
[[2006 AIME I Problems/Problem 9|Solution]]<br />
<br />
== Problem 10 ==<br />
Eight circles of diameter 1 are packed in the first quadrant of the coordinte plane as shown. Let region <math> \mathcal{R} </math> be the union of the eight circular regions. Line <math> l, </math> with slope 3, divides <math> \mathcal{R} </math> into two regions of equal area. Line <math> l </math>'s equation can be expressed in the form <math> ax=by+c, </math> where <math> a, b, </math> and <math> c </math> are positive integers whose greatest common divisor is 1. Find <math> a^2+b^2+c^2. </math> <br />
<br />
<asy><br />
unitsize(0.50cm);<br />
draw((0,-1)--(0,6));<br />
draw((-1,0)--(6,0));<br />
draw(shift(1,1)*unitcircle);<br />
draw(shift(1,3)*unitcircle);<br />
draw(shift(1,5)*unitcircle);<br />
draw(shift(3,1)*unitcircle);<br />
draw(shift(3,3)*unitcircle);<br />
draw(shift(3,5)*unitcircle);<br />
draw(shift(5,1)*unitcircle);<br />
draw(shift(5,3)*unitcircle);<br />
</asy><br />
<br />
[[2006 AIME I Problems/Problem 10|Solution]]<br />
<br />
== Problem 11 ==<br />
A collection of 8 cubes consists of one cube with edge-length <math> k </math> for each integer <math> k, 1 \le k \le 8. </math> A tower is to be built using all 8 cubes according to the rules: <br />
<br />
* Any cube may be the bottom cube in the tower.<br />
* The cube immediately on top of a cube with edge-length <math> k </math> must have edge-length at most <math> k+2. </math> <br />
<br />
Let <math> T </math> be the number of different towers than can be constructed. What is the remainder when <math> T </math> is divided by 1000?<br />
<br />
[[2006 AIME I Problems/Problem 11|Solution]]<br />
<br />
== Problem 12 ==<br />
Find the sum of the values of <math> x </math> such that <math> \cos^3 3x+ \cos^3 5x = 8 \cos^3 4x \cos^3 x, </math> where <math> x </math> is measured in degrees and <math> 100< x< 200. </math><br />
<br />
[[2006 AIME I Problems/Problem 12|Solution]]<br />
<br />
== Problem 13 ==<br />
For each even positive integer <math> x, </math> let <math> g(x) </math> denote the greatest power of 2 that divides <math> x. </math> For example, <math> g(20)=4 </math> and <math> g(16)=16. </math> For each positive integer <math> n, </math> let <math> S_n=\sum_{k=1}^{2^{n-1}}g(2k). </math> Find the greatest integer <math> n </math> less than 1000 such that <math> S_n </math> is a perfect square.<br />
<br />
[[2006 AIME I Problems/Problem 13|Solution]]<br />
<br />
== Problem 14 ==<br />
A tripod has three legs each of length 5 feet. When the tripod is set up, the angle between any pair of legs is equal to the angle between any other pair, and the top of the tripod is 4 feet from the ground In setting up the tripod, the lower 1 foot of one leg breaks off. Let <math> h </math> be the height in feet of the top of the tripod from the ground when the broken tripod is set up. Then <math> h </math> can be written in the form <math> \frac m{\sqrt{n}}, </math> where <math> m </math> and <math> n </math> are positive integers and <math> n </math> is not divisible by the square of any prime. Find <math> \lfloor m+\sqrt{n}\rfloor. </math> (The notation <math> \lfloor x\rfloor </math> denotes the greatest integer that is less than or equal to <math> x. </math>)<br />
<br />
[[2006 AIME I Problems/Problem 14|Solution]]<br />
<br />
== Problem 15 ==<br />
Given that a sequence satisfies <math> x_0=0 </math> and <math> |x_k|=|x_{k-1}+3| </math> for all integers <math> k\ge 1, </math> find the minimum possible value of <math> |x_1+x_2+\cdots+x_{2006}|. </math><br />
<br />
[[2006 AIME I Problems/Problem 15|Solution]]<br />
<br />
== See also ==<br />
* [[American Invitational Mathematics Examination]]<br />
* [[AIME Problems and Solutions]]<br />
* [http://www.artofproblemsolving.com/Community/AoPS_Y_MJ_Transcripts.php?mj_id=144 2006 AIME I Math Jam Transcript]<br />
* [[Mathematics competition resources]]</div>Elephantmasterhttps://artofproblemsolving.com/wiki/index.php?title=2006_AIME_I_Problems&diff=235712006 AIME I Problems2008-02-23T23:23:33Z<p>Elephantmaster: /* Problem 10 */</p>
<hr />
<div>== Problem 1 ==<br />
In quadrilateral <math> ABCD , \angle B </math> is a right angle, diagonal <math> \overline{AC} </math> is perpendicular to <math> \overline{CD}, AB=18, BC=21, </math> and <math> CD=14. </math> Find the perimeter of <math> ABCD. </math><br />
<br />
[[2006 AIME I Problems/Problem 1|Solution]]<br />
<br />
== Problem 2 ==<br />
Let set <math> \mathcal{A} </math> be a 90-element subset of <math> \{1,2,3,\ldots,100\}, </math> and let <math> S </math> be the sum of the elements of <math> \mathcal{A}. </math> Find the number of possible values of <math> S. </math><br />
<br />
[[2006 AIME I Problems/Problem 2|Solution]]<br />
<br />
== Problem 3 ==<br />
Find the least positive integer such that when its leftmost digit is deleted, the resulting integer is 1/29 of the original integer.<br />
<br />
[[2006 AIME I Problems/Problem 3|Solution]]<br />
<br />
== Problem 4 ==<br />
Let <math> N </math> be the number of consecutive 0's at the right end of the decimal representation of the product <math> 1!2!3!4!\cdots99!100!. </math> Find the remainder when <math> N </math> is divided by 1000.<br />
<br />
[[2006 AIME I Problems/Problem 4|Solution]]<br />
<br />
== Problem 5 ==<br />
The number <math> \sqrt{104\sqrt{6}+468\sqrt{10}+144\sqrt{15}+2006}</math> can be written as <math> a\sqrt{2}+b\sqrt{3}+c\sqrt{5}, </math> where <math> a, b, </math> and <math> c </math> are positive integers. Find <math> a\cdot b\cdot c. </math><br />
<br />
[[2006 AIME I Problems/Problem 5|Solution]]<br />
<br />
== Problem 6 ==<br />
Let <math> \mathcal{S} </math> be the set of real numbers that can be represented as repeating decimals of the form <math> 0.\overline{abc} </math> where <math> a, b, c </math> are distinct digits. Find the sum of the elements of <math> \mathcal{S}. </math><br />
<br />
[[2006 AIME I Problems/Problem 6|Solution]]<br />
<br />
== Problem 7 ==<br />
An angle is drawn on a set of equally spaced parallel lines as shown. The ratio of the area of shaded region <math> \mathcal{C} </math> to the area of shaded region <math> \mathcal{B} </math> is 11/5. Find the ratio of shaded region <math> \mathcal{D} </math> to the area of shaded region <math> \mathcal{A}. </math><br />
<br />
[[Image:2006AimeA7.PNG]]<br />
<br />
[[2006 AIME I Problems/Problem 7|Solution]]<br />
<br />
== Problem 8 ==<br />
Hexagon <math> ABCDEF </math> is divided into five rhombuses, <math> \mathcal{P, Q, R, S,} </math> and <math> \mathcal{T,} </math> as shown. Rhombuses <math> \mathcal{P, Q, R,} </math> and <math> \mathcal{S} </math> are congruent, and each has area <math> \sqrt{2006}. </math> Let <math> K </math> be the area of rhombus <math> \mathcal{T}. </math> Given that <math> K </math> is a positive integer, find the number of possible values for <math> K. </math> <br />
<br />
[[Image:2006AimeA8.PNG]]<br />
<br />
[[2006 AIME I Problems/Problem 8|Solution]]<br />
<br />
== Problem 9 ==<br />
The sequence <math> a_1, a_2, \ldots </math> is geometric with <math> a_1=a </math> and common ratio <math> r, </math> where <math> a </math> and <math> r </math> are positive integers. Given that <math> \log_8 a_1+\log_8 a_2+\cdots+\log_8 a_{12} = 2006, </math> find the number of possible ordered pairs <math> (a,r). </math><br />
<br />
[[2006 AIME I Problems/Problem 9|Solution]]<br />
<br />
== Problem 10 ==<br />
Eight circles of diameter 1 are packed in the first quadrant of the coordinte plane as shown. Let region <math> \mathcal{R} </math> be the union of the eight circular regions. Line <math> l, </math> with slope 3, divides <math> \mathcal{R} </math> into two regions of equal area. Line <math> l </math>'s equation can be expressed in the form <math> ax=by+c, </math> where <math> a, b, </math> and <math> c </math> are positive integers whose greatest common divisor is 1. Find <math> a^2+b^2+c^2. </math> <br />
<br />
<asy><br />
unitsize(0.66cm);<br />
draw((0,-1)--(0,6));<br />
draw((-1,0)--(6,0));<br />
draw(shift(1,1)*unitcircle);<br />
draw(shift(1,3)*unitcircle);<br />
draw(shift(1,5)*unitcircle);<br />
draw(shift(3,1)*unitcircle);<br />
draw(shift(3,3)*unitcircle);<br />
draw(shift(3,5)*unitcircle);<br />
draw(shift(5,1)*unitcircle);<br />
draw(shift(5,3)*unitcircle);<br />
</asy><br />
<br />
[[2006 AIME I Problems/Problem 10|Solution]]<br />
<br />
== Problem 11 ==<br />
A collection of 8 cubes consists of one cube with edge-length <math> k </math> for each integer <math> k, 1 \le k \le 8. </math> A tower is to be built using all 8 cubes according to the rules: <br />
<br />
* Any cube may be the bottom cube in the tower.<br />
* The cube immediately on top of a cube with edge-length <math> k </math> must have edge-length at most <math> k+2. </math> <br />
<br />
Let <math> T </math> be the number of different towers than can be constructed. What is the remainder when <math> T </math> is divided by 1000?<br />
<br />
[[2006 AIME I Problems/Problem 11|Solution]]<br />
<br />
== Problem 12 ==<br />
Find the sum of the values of <math> x </math> such that <math> \cos^3 3x+ \cos^3 5x = 8 \cos^3 4x \cos^3 x, </math> where <math> x </math> is measured in degrees and <math> 100< x< 200. </math><br />
<br />
[[2006 AIME I Problems/Problem 12|Solution]]<br />
<br />
== Problem 13 ==<br />
For each even positive integer <math> x, </math> let <math> g(x) </math> denote the greatest power of 2 that divides <math> x. </math> For example, <math> g(20)=4 </math> and <math> g(16)=16. </math> For each positive integer <math> n, </math> let <math> S_n=\sum_{k=1}^{2^{n-1}}g(2k). </math> Find the greatest integer <math> n </math> less than 1000 such that <math> S_n </math> is a perfect square.<br />
<br />
[[2006 AIME I Problems/Problem 13|Solution]]<br />
<br />
== Problem 14 ==<br />
A tripod has three legs each of length 5 feet. When the tripod is set up, the angle between any pair of legs is equal to the angle between any other pair, and the top of the tripod is 4 feet from the ground In setting up the tripod, the lower 1 foot of one leg breaks off. Let <math> h </math> be the height in feet of the top of the tripod from the ground when the broken tripod is set up. Then <math> h </math> can be written in the form <math> \frac m{\sqrt{n}}, </math> where <math> m </math> and <math> n </math> are positive integers and <math> n </math> is not divisible by the square of any prime. Find <math> \lfloor m+\sqrt{n}\rfloor. </math> (The notation <math> \lfloor x\rfloor </math> denotes the greatest integer that is less than or equal to <math> x. </math>)<br />
<br />
[[2006 AIME I Problems/Problem 14|Solution]]<br />
<br />
== Problem 15 ==<br />
Given that a sequence satisfies <math> x_0=0 </math> and <math> |x_k|=|x_{k-1}+3| </math> for all integers <math> k\ge 1, </math> find the minimum possible value of <math> |x_1+x_2+\cdots+x_{2006}|. </math><br />
<br />
[[2006 AIME I Problems/Problem 15|Solution]]<br />
<br />
== See also ==<br />
* [[American Invitational Mathematics Examination]]<br />
* [[AIME Problems and Solutions]]<br />
* [http://www.artofproblemsolving.com/Community/AoPS_Y_MJ_Transcripts.php?mj_id=144 2006 AIME I Math Jam Transcript]<br />
* [[Mathematics competition resources]]</div>Elephantmasterhttps://artofproblemsolving.com/wiki/index.php?title=2006_AIME_I_Problems&diff=235702006 AIME I Problems2008-02-23T22:55:31Z<p>Elephantmaster: /* Problem 10 */ Replace image by Asymptote drawing</p>
<hr />
<div>== Problem 1 ==<br />
In quadrilateral <math> ABCD , \angle B </math> is a right angle, diagonal <math> \overline{AC} </math> is perpendicular to <math> \overline{CD}, AB=18, BC=21, </math> and <math> CD=14. </math> Find the perimeter of <math> ABCD. </math><br />
<br />
[[2006 AIME I Problems/Problem 1|Solution]]<br />
<br />
== Problem 2 ==<br />
Let set <math> \mathcal{A} </math> be a 90-element subset of <math> \{1,2,3,\ldots,100\}, </math> and let <math> S </math> be the sum of the elements of <math> \mathcal{A}. </math> Find the number of possible values of <math> S. </math><br />
<br />
[[2006 AIME I Problems/Problem 2|Solution]]<br />
<br />
== Problem 3 ==<br />
Find the least positive integer such that when its leftmost digit is deleted, the resulting integer is 1/29 of the original integer.<br />
<br />
[[2006 AIME I Problems/Problem 3|Solution]]<br />
<br />
== Problem 4 ==<br />
Let <math> N </math> be the number of consecutive 0's at the right end of the decimal representation of the product <math> 1!2!3!4!\cdots99!100!. </math> Find the remainder when <math> N </math> is divided by 1000.<br />
<br />
[[2006 AIME I Problems/Problem 4|Solution]]<br />
<br />
== Problem 5 ==<br />
The number <math> \sqrt{104\sqrt{6}+468\sqrt{10}+144\sqrt{15}+2006}</math> can be written as <math> a\sqrt{2}+b\sqrt{3}+c\sqrt{5}, </math> where <math> a, b, </math> and <math> c </math> are positive integers. Find <math> a\cdot b\cdot c. </math><br />
<br />
[[2006 AIME I Problems/Problem 5|Solution]]<br />
<br />
== Problem 6 ==<br />
Let <math> \mathcal{S} </math> be the set of real numbers that can be represented as repeating decimals of the form <math> 0.\overline{abc} </math> where <math> a, b, c </math> are distinct digits. Find the sum of the elements of <math> \mathcal{S}. </math><br />
<br />
[[2006 AIME I Problems/Problem 6|Solution]]<br />
<br />
== Problem 7 ==<br />
An angle is drawn on a set of equally spaced parallel lines as shown. The ratio of the area of shaded region <math> \mathcal{C} </math> to the area of shaded region <math> \mathcal{B} </math> is 11/5. Find the ratio of shaded region <math> \mathcal{D} </math> to the area of shaded region <math> \mathcal{A}. </math><br />
<br />
[[Image:2006AimeA7.PNG]]<br />
<br />
[[2006 AIME I Problems/Problem 7|Solution]]<br />
<br />
== Problem 8 ==<br />
Hexagon <math> ABCDEF </math> is divided into five rhombuses, <math> \mathcal{P, Q, R, S,} </math> and <math> \mathcal{T,} </math> as shown. Rhombuses <math> \mathcal{P, Q, R,} </math> and <math> \mathcal{S} </math> are congruent, and each has area <math> \sqrt{2006}. </math> Let <math> K </math> be the area of rhombus <math> \mathcal{T}. </math> Given that <math> K </math> is a positive integer, find the number of possible values for <math> K. </math> <br />
<br />
[[Image:2006AimeA8.PNG]]<br />
<br />
[[2006 AIME I Problems/Problem 8|Solution]]<br />
<br />
== Problem 9 ==<br />
The sequence <math> a_1, a_2, \ldots </math> is geometric with <math> a_1=a </math> and common ratio <math> r, </math> where <math> a </math> and <math> r </math> are positive integers. Given that <math> \log_8 a_1+\log_8 a_2+\cdots+\log_8 a_{12} = 2006, </math> find the number of possible ordered pairs <math> (a,r). </math><br />
<br />
[[2006 AIME I Problems/Problem 9|Solution]]<br />
<br />
== Problem 10 ==<br />
Eight circles of diameter 1 are packed in the first quadrant of the coordinte plane as shown. Let region <math> \mathcal{R} </math> be the union of the eight circular regions. Line <math> l, </math> with slope 3, divides <math> \mathcal{R} </math> into two regions of equal area. Line <math> l </math>'s equation can be expressed in the form <math> ax=by+c, </math> where <math> a, b, </math> and <math> c </math> are positive integers whose greatest common divisor is 1. Find <math> a^2+b^2+c^2. </math> <br />
<br />
<asy><br />
unitsize(0.33cm);<br />
draw((0,-1)--(0,6));<br />
draw((-1,0)--(6,0));<br />
draw(shift(1,1)*unitcircle);<br />
draw(shift(1,3)*unitcircle);<br />
draw(shift(1,5)*unitcircle);<br />
draw(shift(3,1)*unitcircle);<br />
draw(shift(3,3)*unitcircle);<br />
draw(shift(3,5)*unitcircle);<br />
draw(shift(5,1)*unitcircle);<br />
draw(shift(5,3)*unitcircle);<br />
</asy><br />
<br />
[[2006 AIME I Problems/Problem 10|Solution]]<br />
<br />
== Problem 11 ==<br />
A collection of 8 cubes consists of one cube with edge-length <math> k </math> for each integer <math> k, 1 \le k \le 8. </math> A tower is to be built using all 8 cubes according to the rules: <br />
<br />
* Any cube may be the bottom cube in the tower.<br />
* The cube immediately on top of a cube with edge-length <math> k </math> must have edge-length at most <math> k+2. </math> <br />
<br />
Let <math> T </math> be the number of different towers than can be constructed. What is the remainder when <math> T </math> is divided by 1000?<br />
<br />
[[2006 AIME I Problems/Problem 11|Solution]]<br />
<br />
== Problem 12 ==<br />
Find the sum of the values of <math> x </math> such that <math> \cos^3 3x+ \cos^3 5x = 8 \cos^3 4x \cos^3 x, </math> where <math> x </math> is measured in degrees and <math> 100< x< 200. </math><br />
<br />
[[2006 AIME I Problems/Problem 12|Solution]]<br />
<br />
== Problem 13 ==<br />
For each even positive integer <math> x, </math> let <math> g(x) </math> denote the greatest power of 2 that divides <math> x. </math> For example, <math> g(20)=4 </math> and <math> g(16)=16. </math> For each positive integer <math> n, </math> let <math> S_n=\sum_{k=1}^{2^{n-1}}g(2k). </math> Find the greatest integer <math> n </math> less than 1000 such that <math> S_n </math> is a perfect square.<br />
<br />
[[2006 AIME I Problems/Problem 13|Solution]]<br />
<br />
== Problem 14 ==<br />
A tripod has three legs each of length 5 feet. When the tripod is set up, the angle between any pair of legs is equal to the angle between any other pair, and the top of the tripod is 4 feet from the ground In setting up the tripod, the lower 1 foot of one leg breaks off. Let <math> h </math> be the height in feet of the top of the tripod from the ground when the broken tripod is set up. Then <math> h </math> can be written in the form <math> \frac m{\sqrt{n}}, </math> where <math> m </math> and <math> n </math> are positive integers and <math> n </math> is not divisible by the square of any prime. Find <math> \lfloor m+\sqrt{n}\rfloor. </math> (The notation <math> \lfloor x\rfloor </math> denotes the greatest integer that is less than or equal to <math> x. </math>)<br />
<br />
[[2006 AIME I Problems/Problem 14|Solution]]<br />
<br />
== Problem 15 ==<br />
Given that a sequence satisfies <math> x_0=0 </math> and <math> |x_k|=|x_{k-1}+3| </math> for all integers <math> k\ge 1, </math> find the minimum possible value of <math> |x_1+x_2+\cdots+x_{2006}|. </math><br />
<br />
[[2006 AIME I Problems/Problem 15|Solution]]<br />
<br />
== See also ==<br />
* [[American Invitational Mathematics Examination]]<br />
* [[AIME Problems and Solutions]]<br />
* [http://www.artofproblemsolving.com/Community/AoPS_Y_MJ_Transcripts.php?mj_id=144 2006 AIME I Math Jam Transcript]<br />
* [[Mathematics competition resources]]</div>Elephantmasterhttps://artofproblemsolving.com/wiki/index.php?title=Asymptote:_Useful_commands_and_their_Output&diff=20437Asymptote: Useful commands and their Output2007-12-01T16:54:06Z<p>Elephantmaster: Add end arrow example</p>
<hr />
<div>{{Asymptote}}<br />
<br />
For each of the following, we have put a blue dot at the origin in order to indicate relative location of the output on the coordinate plane. In other words, assume that before each of the examples below is the command <br />
<tt>dot((0,0),blue);</tt><br />
In addition, a comment after a line such as <tt>//math - extension</tt> indicates that the command (in this case <tt>extension</tt>) used in that line is defined in the <tt>math</tt> package, thus motivating the <tt>import math;</tt> (or other appropriate package) line at the top of the example.<br />
<br />
----<br />
<br />
'''Example 1:'''<br />
dot((20,0));<br />
'''Output 1:'''<br />
<asy>dot((20,0));</asy><br />
<br />
----<br />
<br />
'''Example 2:'''<br />
draw((0,0)--(50,0),BeginArrow);<br />
draw((0,-10)--(50,-10),MidArrow);<br />
draw((0,-20)--(50,-20),EndArrow);<br />
draw((0,-30)--(50,-30),Arrows);<br />
'''Output 2:'''<br />
<asy> size(75);draw((0,0)--(50,0),BeginArrow);<br />
draw((0,-10)--(50,-10),MidArrow);<br />
draw((0,-20)--(50,-20),EndArrow);<br />
draw((0,-30)--(50,-30),Arrows);</asy><br />
<br />
----<br />
<br />
'''Example 3:'''<br />
draw((0,0)--(50,0));<br />
arrow((30,0),dir(180),green);<br />
'''Output 3:'''<br />
[[Image:Figure4.gif]]<br />
<br />
----<br />
<br />
'''Example 4:'''<br />
import math;<br />
pair A,B,C,D,E;<br />
A=(0,0); C=(50,0); B=(10,10); D=(40,20);<br />
E=extension(A,B,C,D); // math - extension<br />
// extension(A,B,C,D) returns the intersection of lines AB and CD<br />
draw(A--B); draw(C--D);<br />
draw(B--E--D,orange);<br />
<br />
'''Output 4:'''<br />
[[Image:Figure5.gif]]<br />
<br />
----<br />
<br />
'''Example 5:'''<br />
import graph;<br />
draw(Circle((0,0),20)); // graph - Circle<br />
'''Output 5:'''<br />
[[Image:Figure6.gif]]<br />
<br />
----<br />
<br />
'''Example 6:'''<br />
path p=(0,0)..(20,15)..(40,-5)..(50,0);<br />
draw(p);<br />
draw(rotate(90)*p,green);<br />
draw(rotate(180,(-5,0))*p,orange);<br />
draw(shift((5,20))*p,magenta);<br />
draw(shift((0,-25))*yscale(1.4)*p,red);<br />
<br />
'''Output 6:'''<br />
[[Image:Figure7.gif]]<br />
<br />
----<br />
<br />
'''Example 7:'''<br />
import olympiad;<br />
unitsize(50);<br />
pair A,B,C,O,I;<br />
A=origin; B=2*right; C=1.5*dir(70);<br />
O=circumcenter(A,B,C); // olympiad - circumcenter<br />
I=incenter(A,B,C); // olympiad - incenter<br />
draw(A--B--C--cycle);<br />
dot(O);<br />
dot(I);<br />
draw(circumcircle(A,B,C)); // olympiad - circumcircle<br />
draw(incircle(A,B,C)); // olympiad - incircle<br />
label("<math>I</math>",I,W);<br />
label("<math>O</math>",O,S);<br />
<br />
'''Output 7:'''<br />
<asy>size(75);<br />
pair A,B,C,O,I;<br />
A=origin; B=2*right; C=1.5*dir(70);<br />
O=circumcenter(A,B,C); // olympiad - circumcenter<br />
I=incenter(A,B,C); // olympiad - incenter<br />
draw(A--B--C--cycle);<br />
dot(O);<br />
dot(I);<br />
draw(circumcircle(A,B,C)); // olympiad - circumcircle<br />
draw(incircle(A,B,C)); // olympiad - incircle<br />
label("<math>I</math>",I,W);<br />
label("<math>O</math>",O,S);</asy><br />
<br />
----<br />
<br />
'''Example 8:'''<br />
import three;<br />
unitsize(1cm);<br />
size(50);<br />
currentprojection=orthographic(1/2,-1,1/2); // three - currentprojection, orthographic<br />
draw((0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--cycle3,red); //three - cycle3<br />
draw((0,0,0)--(0,0,1));<br />
draw((0,1,0)--(0,1,1));<br />
draw((1,1,0)--(1,1,1));<br />
draw((1,0,0)--(1,0,1));<br />
draw((0,0,1)--(1,0,1)--(1,1,1)--(0,1,1)--cycle3,green);<br />
<br />
'''Output 8:'''<br />
<asy> import three;<br />
unitsize(1cm);<br />
size(50);<br />
currentprojection=orthographic(1/2,-1,1/2); // three - currentprojection, orthographic<br />
draw((0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--cycle3,red); //three - cycle3<br />
draw((0,0,0)--(0,0,1));<br />
draw((0,1,0)--(0,1,1));<br />
draw((1,1,0)--(1,1,1));<br />
draw((1,0,0)--(1,0,1));<br />
draw((0,0,1)--(1,0,1)--(1,1,1)--(0,1,1)--cycle3,green);</asy><br />
<br />
== See Also ==<br />
[http://piprim.tuxfamily.org/asymptote/ Many more Asymptote examples]<br />
<br />
[[Asymptote: Macros and Packages|Next: Macros and Packages]]</div>Elephantmasterhttps://artofproblemsolving.com/wiki/index.php?title=2006_AIME_I_Problems/Problem_7&diff=161182006 AIME I Problems/Problem 72007-09-14T20:36:32Z<p>Elephantmaster: /* Solution */ Fix math mode text.</p>
<hr />
<div>== Problem ==<br />
An [[angle]] is drawn on a set of equally spaced [[parallel]] [[line]]s as shown. The [[ratio]] of the [[area]] of shaded [[region]] <math> \mathcal{C} </math> to the area of shaded region <math> \mathcal{B} </math> is 11/5. Find the ratio of shaded region <math> \mathcal{D} </math> to the area of shaded region <math> \mathcal{A}. </math><br />
<br />
[[Image:2006AimeA7.PNG]]<br />
<br />
== Solution ==<br />
Note that the apex of the angle is not on the parallel lines. Set up a [[coordinate proof]].<br />
<br />
Let the set of parallel lines be [[perpendicular]] to the [[x-axis]], such that they cross it at <math>0, 1, 2 \ldots</math>. The base of region <math>\mathcal{A}</math> is on the line <math>x = 1</math>. The bigger base of region <math>\mathcal{D}</math> is on the line <math>x = 7</math>. <br />
Let the top side of the angle be <math>y = x - s</math> and the bottom side be x-axis, as halve the angle by folding doesn't change the problem.<br />
<br />
Since the area of the triangle is equal to <math>\frac{1}{2}bh</math>,<br />
<br />
:<math><br />
\frac{\textrm{Region\ }\mathcal{C}}{\textrm{Region\ }\mathcal{B}} = \frac{11}{5}<br />
= \frac{\frac 12(5-s)^2 - \frac 12(4-s)^2}{\frac 12(3-s)^2 - \frac12(2-s)^2}<br />
</math><br />
<br />
Solve this to find that <math>s = \frac{5}{6}</math>.<br />
<br />
By a similar method, <math>\frac{\textrm{Region\ }\mathcal{D}}{\textrm{Region\ }\mathcal{A}} = \frac{\frac 12(7-s)^2 - \frac 12(6-s)^2}{\frac 12(1-s)^2}</math> is <math>408</math>.<br />
<br />
== See also ==<br />
{{AIME box|year=2006|n=I|num-b=6|num-a=8}}<br />
<br />
[[Category:Intermediate Geometry Problems]]</div>Elephantmasterhttps://artofproblemsolving.com/wiki/index.php?title=Asymptote:_Getting_Started/Windows/Downloads_and_Installation&diff=15258Asymptote: Getting Started/Windows/Downloads and Installation2007-06-29T02:49:02Z<p>Elephantmaster: /* Asymptote */ update latest version number</p>
<hr />
<div>{{Asymptote}}<br />
<br />
:'''''NOTE''': The following instructions assume that you are using a Windows machine. Instructions for MAC and Unix users can be found under Documentation <math>\rightarrow</math> Installation [http://asymptote.sourceforge.net/ here].''<br />
<br />
To begin using Asymptote, you must first download and install it. To view the eps-format images you produce, you will also need to download an eps viewer such as GSview. (GSview is convenient because it can display both eps and pdf files, and with GhostScript installed, Asymptote can easily output the images in pdf format as well.)<br />
<br />
== Asymptote ==<br />
To download and install Asymptote on your Windows machine:<br />
<br />
#Go to [http://asymptote.sourceforge.net SourceForge] and click on the Download link on the left. This will bring you to a page that has the latest file release in a box, with a green button marked "Download" on the right side of this box. Follow this link.<br />
# You will now see a box with four files, only one of which ends in <tt>.exe</tt> (it should look something like <tt>asymptote-1.31-setup.exe</tt>, depending on the number of the latest release.) Click on this link, and a download window will pop up in your browser. Choose to save the file, and take note of where on your hard drive you saved it to. Let's say you saved it to the folder <tt>D:\downloads\Asymptote</tt>.<br />
#When the download is complete, browse to <tt>D:\downloads\Asymptote</tt>, or wherever you saved the file, and double-click on the <tt>.exe</tt> file (<tt>asymptote-1.31-setup.exe</tt>). This will open an installer window, where you can choose the folder that Asymptote will be installed to (or simply use the default <tt>C:\Program Files\Asymptote</tt>), and choose whether you wish to have shortcuts added to the desktop and start menu. When you have finished, click Install.<br />
<br />
Asymptote is ready to start producing images, but you still need a way to view these images. (NOTE: if you already have a previewer capable of viewing .eps and .pdf files, you do not need to download the file below.)<br />
<br />
== GSview ==<br />
GSview is a standard viewer for .eps files, which is the standard output format for Asymptote images. To download and install GSview,<br />
# Go to [http://www.cs.wisc.edu/~ghost/gsview/get48.htm this download site], and click on <tt>gsv48w32.exe</tt>. A download window will pop up in your browser. Choose to save the file, and take note of where on your hard drive you saved it to. Let's say you saved it to the folder <tt>D:\downloads\Ghostscript</tt>. (If you are unable to get the file <tt>gsv48w32.exe</tt> from this site, try [ftp://ftp.mirror.ac.uk/sites/mirror.cs.wisc.edu/pub/mirrors/ghost/ghostgum/ this site] instead.)<br />
# When the download is complete, browse to <tt>D:\downloads\Ghostscript</tt> in your files and double-click on the .exe file gsv48w32.exe. This will bring you to an installation window. Click Setup.<br />
# After it extracts the necessary files, there will be a new installation window. Click Next twice, and there will be two checkboxes, which can set GSview to be the default eps or pdf previewer. If you wish to use the more common Acrobat Reader, or some other pdf reader, to view pdf files, only leave the first box checked. However, you can check both if desired.<br />
# Click Next, and choose the directory in which you want GSview installed (or leave the default setting, <tt>C:\Program Files\Ghostgum</tt>). <br />
# Click Next twice, and choose the Start Menu folder to which a shortcut will be added. (The default is Ghostgum.)<br />
# Click Finish, and GSview will be installed.<br />
<br />
== Ghostscript ==<br />
Ghostscript may also need to be installed on your system. You may download it [http://pages.cs.wisc.edu/~ghost/doc/AFPL/index.htm here]. You may then need to set the version of Ghostscript in GSview. Do this by choosing the <tt>Easy Configure</tt> option in the <tt>Options</tt> menu in GSview.<br />
<br />
You now have installed everything you need to use Asymptote on the most basic level, as described in the next section.<br />
<br />
:[[Asymptote: Getting Started/Windows/Interactive Mode| Next: Interactive Mode]]</div>Elephantmasterhttps://artofproblemsolving.com/wiki/index.php?title=Modular_arithmetic/Intermediate&diff=15247Modular arithmetic/Intermediate2007-06-26T00:32:09Z<p>Elephantmaster: /* The binary operation "mod" */</p>
<hr />
<div>Given integers <math>a</math>, <math>b</math>, and <math>n</math>, with <math>n > 0</math>, we say that <math>a</math> is ''congruent to'' <math>b</math> ''modulo'' <math>n</math>, or <math>a \equiv b</math> (mod <math>n</math>), if the difference <math>{a - b}</math> is divisible by <math>n</math>.<br />
<br />
For a given positive integer <math>n</math>, the relation <math>a \equiv b</math> (mod <math>n</math>) is an [[equivalence relation]] on the set of integers. This relation gives rise to an algebraic structure called '''the integers modulo <math>n</math>''' (usually known as "the integers mod <math>n</math>," or <math>\mathbb{Z}_n</math> for short). This structure gives us a useful tool for solving a wide range of number-theoretic problems, including finding solutions to [[Diophantine equation|Diophantine equations]], testing whether certain large numbers are prime, and even some problems in cryptology.<br />
<br />
<br />
<br />
== Arithmetic Modulo n ==<br />
<br />
=== Useful Facts ===<br />
<br />
Consider four integers <math>{a},{b},{c},{d}</math> and a positive integer <math>{m}</math> such that <math>a\equiv b\pmod {m}</math> and <math>c\equiv d\pmod {m}</math>. In modular arithmetic, the following [[identity | identities]] hold:<br />
<br />
* Addition: <math>a+c\equiv b+d\pmod {m}</math>.<br />
* Subtraction: <math>a-c\equiv b-d\pmod {m}</math>.<br />
* Multiplication: <math>ac\equiv bd\pmod {m}</math>.<br />
* Division: <math>\frac{a}{e}\equiv \frac{b}{e}\pmod {\frac{m}{\gcd(m,e)}}</math>, where <math>e</math> is a positive integer that divides <math>{a}</math> and <math>b</math>.<br />
* Exponentiation: <math>a^e\equiv b^e\pmod {m}</math> where <math>e</math> is a positive integer.<br />
<br />
For examples, see [[Introduction to modular arithmetic]].<br />
<br />
<br />
=== The Integers Modulo n ===<br />
<br />
The relation <math>a \equiv b</math> (mod <math>n</math>) allows us to divide the set of integers into sets of equivalent elements. For example, if <math>n = 3</math>, then the integers are divided into the following sets:<br />
<br />
<math>\{ \ldots, -6, -3, 0, 3, 6, \ldots \}</math><br />
<br />
<math>\{ \ldots, -5, -2, 1, 4, 7, \ldots \}</math><br />
<br />
<math>\{ \ldots, -4, -1, 2, 5, 8, \ldots \}</math><br />
<br />
Notice that if we pick two numbers <math>a</math> and <math>b</math> from the same set, then <math>a</math> and <math>b</math> differ by a multiple of <math>3</math>, and therefore <math>a \equiv b</math> (mod <math>3</math>).<br />
<br />
We sometimes refer to one of the sets above by choosing an element from the set, and putting a bar over it. For example, the symbol <math>\overline{0}</math> refers to the set containing <math>0</math>; that is, the set of all integer multiples of <math>3</math>. The symbol <math>\overline{1}</math> refers to the second set listed above, and <math>\overline{2}</math> the third. The symbol <math>\overline{3}</math> refers to the same set as <math>\overline{0}</math>, and so on.<br />
<br />
Instead of thinking of the objects <math>\overline{0}</math>, <math>\overline{1}</math>, and <math>\overline{2}</math> as sets, we can treat them as algebraic objects -- like numbers -- with their own operations of addition and multiplication. Together, these objects form '''the integers modulo <math>3</math>,''' or <math>\mathbb{Z}_3</math>. More generally, if <math>n</math> is a positive integer, then we can define<br />
<br />
<math>\mathbb{Z}_n = \{\overline{0}, \overline{1}, \overline{2}, \ldots, \overline{n-1} \}</math>,<br />
<br />
where for each <math>k</math>, <math>\overline{k}</math> is defined by<br />
<br />
<math>\overline{k} = \{ m \in \mathbb{Z} \mbox{ such that } m \equiv k \pmod{n} \}.</math><br />
<br />
=== Addition, Subtraction, and Multiplication Mod n ===<br />
<br />
We define addition, subtraction, and multiplication in <math>\mathbb{Z}_n</math> according to the following rules:<br />
<br />
<math>\overline{a} + \overline{b} = \overline{a+b}</math> for all <math>a, b \in \mathbb{Z}</math>. (Addition)<br />
<br />
<math>\overline{a} - \overline{b} = \overline{a-b}</math> for all <math>a, b \in \mathbb{Z}</math>. (Subtraction)<br />
<br />
<math>\overline{a} \cdot \overline{b} = \overline{ab}</math> for all <math>a, b \in \mathbb{Z}</math>. (Multiplication)<br />
<br />
So for example, if <math>n = 7</math>, then we have<br />
<br />
<math>\overline{3} + \overline{2} = \overline{3+2} = \overline{5}</math><br />
<br />
<math>\overline{4} + \overline{4} = \overline{4+4} = \overline{8} = \overline{1}</math><br />
<br />
<math>\overline{4} \cdot \overline{3} = \overline{4 \cdot 3} = \overline{12} = \overline{5}</math><br />
<br />
<math>\overline{6} \cdot \overline{6} = \overline{6 \cdot 6} = \overline{36} = \overline{1}</math><br />
<br />
Notice that, in each case, we reduce to an answer of the form <math>\overline{k}</math>, where <math>0 \leq k < 7</math>. We do this for two reasons: to keep possible future calculations as manageable as possible, and to emphasize the point that each expression takes one of only seven (or in general, <math>n</math>) possible values. (Some people find it useful to reduce an answer such as <math>\overline{5}</math> to <math>\overline{-2}</math>, which is negative but has a smaller absolute value.)<br />
<br />
==== A Word of Caution ====<br />
<br />
Because of the way we define operations in <math>\mathbb{Z}_n</math>, it is important to check that these operations are well-defined. This is because each of the sets that make up <math>\mathbb{Z}_n</math> contains many different numbers, and therefore has many different names. For example, observe that in <math>\mathbb{Z}_7</math>, we have <math>\overline{1} = \overline{8}</math> and <math>\overline{2} = \overline{9}</math>. It is reasonable to expect that if we perform the addition <math>\overline{8} + \overline{9}</math>, we should get the same answer as if we compute <math>\overline{1} + \overline{2}</math>, since we are simply using different names for the same objects. Indeed, the first addition yields the sum <math>\overline{17} = \overline{3}</math>, which is the same as the result of the second addition.<br />
<br />
The "Useful Facts" above are the key to understanding why our operations yield the same results even when we use different names for the same sets. The task of checking that an operation or function is well-defined, is one of the most important basic techniques in [[abstract algebra]].<br />
<br />
== Algebraic Properties of the Integers Mod n ==<br />
<br />
The integers modulo <math>n</math> form an algebraic structure called a [[ring]] -- a structure in which we can add, subtract, and multiply elements.<br />
<br />
Anyone who has taken a high school algebra class is familiar with several examples of rings, including the ring of integers, the ring of rational numbers, and the ring of real numbers. The ring <math>\mathbb{Z}_n</math> has some algebraic features that make it quite different from the more familiar rings listed above.<br />
<br />
First of all, notice that if we choose a nonzero element <math>\overline{a}</math> of <math>\mathbb{Z}_n</math>, and add <math>n</math> copies of this element, we get<br />
<br />
<math>\overline{a} + \overline{a} + \cdots + \overline{a} = n \cdot \overline{a} = \overline{na} = \overline{0}</math>,<br />
<br />
since <math>na</math> is a multiple of <math>n</math>. So it is possible to add several copies of a nonzero element of <math>\mathbb{Z}_n</math> and get zero. This phenomenon, which is called '''torsion''', does not occur in the reals, the rationals, or the integers.<br />
<br />
Another curious feature of <math>\mathbb{Z}_n</math> is that a polynomial over <math>\mathbb{Z}_n</math> can have a number of roots greater than its degree. Consider, for example, the polynomial congruence<br />
<br />
<math>x^2 - 2x - 15 \equiv 0 \pmod{21}</math>.<br />
<br />
We might be tempted to solve this congruence by factoring the expression on the left:<br />
<br />
<math>(x - 5)(x + 3) \equiv 0 \pmod{21}</math>.<br />
<br />
Indeed, this factorization yields two solutions to the congruence: <math>x \equiv 5 \pmod{21}</math>, and <math>x \equiv -3 \equiv 18 \pmod{21}</math>. (Note that two values of <math>x</math> that are congruent modulo <math>21</math> are considered the same solution.)<br />
<br />
However, since <math>15 \equiv 99 \pmod{21}</math>, the original congruence is equivalent to<br />
<br />
<math>x^2 - 2x - 99 \equiv 0 \pmod{21}</math>.<br />
<br />
This time, factoring the expression on the left yields<br />
<br />
<math>(x - 11)(x + 9) \equiv 0 \pmod{21}</math>.<br />
<br />
And we find that there are two more solutions! The values <math>x \equiv 11 \pmod{21}</math> and <math>x \equiv -9 \equiv 12 \pmod{21}</math> both solve the congruence. So our congruence has at least four solutions -- two more than we might expect based on the degree of the polynomial.<br />
<br />
Why do the "rules" of algebra that work so well for the real numbers seem to fail in <math>\mathbb{Z}_{21}</math>? To understand this, let's take a closer look at the congruence<br />
<br />
<math>(x - 5)(x + 3) \equiv 0 \pmod{21}</math>.<br />
<br />
If we were solving this as an equation over the reals, we would immediately conclude that either <math>x - 5</math> must be zero, or <math>x + 3</math> must be zero in order for the product to equal zero. However, this is not the case in <math>\mathbb{Z}_{21}</math>! It is possible to multiply two nonzero elements of <math>\mathbb{Z}_{21}</math> and get zero. For example, we have<br />
<br />
<math>\overline{3} \cdot \overline{7} = \overline{0}</math><br />
<br />
<math>\overline{9} \cdot \overline{7} = \overline{0}</math><br />
<br />
<math>\overline{6} \cdot \overline{14} = \overline{0}</math><br />
<br />
But wait! Suppose we take a close look at this last product, and we set <math>x - 5 \equiv 6 \pmod{21}</math> and <math>x + 3 \equiv 14 \pmod{21}</math>. Then we have <math>x \equiv 11 \pmod{21}</math> -- another of the solutions of our congruence! (One can check that the other two factorizations don't lead to any valid solutions; however, there are many other factorizations of zero that need to be checked.)<br />
<br />
In the ring of real numbers, it is a well-known fact that if <math>ab = 0</math>, then <math>a = 0</math> or <math>b = 0</math>. For this reason, we call the ring of real numbers a '''domain'''. However, a similar fact does ''not'' apply in general in <math>\mathbb{Z}_n</math>; therefore, <math>\mathbb{Z}_n</math> is not in general a domain.<br />
<br />
<br />
<br />
== Topics ==<br />
The following topics expand on the flexible nature of modular arithmetic as a problem solving tool:<br />
* [[Fermat's Little Theorem]]<br />
* [[Euler's Totient Theorem]]<br />
* [[Phi function]]<br />
<br />
<br />
<br />
== Miscellany ==<br />
<br />
=== The binary operation "mod" ===<br />
<br />
Related to the concept of congruence, mod <math>n</math> is the binary operation '''<math>a</math> mod <math>n</math>''', which is used often in computer programming.<br />
<br />
Recall that, by the [[Division Algorithm]], given any two integers <math>a</math> and <math>n</math>, with <math>n > 0</math>, we can find integers <math>q</math> and <math>r</math>, with <math>0 \leq r < n </math>, such that <math>a = nq + r</math>. The number <math>q</math> is called the ''quotient'', and the number <math>r</math> is called the ''remainder''. The operation ''<math>a</math> mod <math>n</math>'' returns the value of the remainder <math>r</math>. For example:<br />
<br />
<math>15</math> mod <math>6 = 3</math>, since <math>15 = 6 \cdot 2 + 3</math>.<br />
<br />
<math>35</math> mod <math>7 = 0</math>, since <math>35 = 7 \cdot 5 + 0</math>.<br />
<br />
<math>-10</math> mod <math>8 = 6</math>, since <math>-10 = 8 \cdot -2 + 6</math>.<br />
<br />
Observe that if <math>a</math> mod <math>n = r</math>, then we also have <math>a \equiv r</math> (mod <math>n</math>).<br />
<br />
<br />
An example exercise with modular arithmetic:<br />
<br />
'''Problem:'''<br />
<br />
Let <br />
<br />
<math>D=d_1d_2d_3d_4d_5d_6d_7d_8d_9</math> <br />
<br />
be a nine-digit positive integer (each digit not necessarily distinct). Consider <br />
<br />
<math>E=e_1e_2e_3e_4e_5e_6e_7e_8e_9</math>,<br />
<br />
another nine-digit positive integer with the property that each digit <math>e_i</math> when substituted for <math>d_i</math> makes the<br />
modified D divisible by 7. Let <br />
<br />
<math>F=f_1f_2f_3f_4f_5f_6f_7f_8f_9</math> be a third nine-digit positive integer with the same relation to E as E has to D.<br />
<br />
Prove that every <math>d_i - f_i</math> is divisible by 7. <br />
<br />
<br />
<br />
'''Solution:'''<br />
<br />
Any positive integer <math>D=d_1d_2d_3d_4d_5d_6d_7d_8d_9</math> can be expressed <math>(10^8)d_1+(10^7)d_2+...(10^0)d_9</math>.<br />
<br />
Since '''10=3 mod 7''', and since it holds that if '''a=b mod c''' then <math>a^n=b^n</math> '''mod c''', then D can be expressed much more simply mod 7; that is,<br />
<math>D= 2d_1 +3d_2 +1d_3 -2d_4 -3d_5 -d_6 +2d_7 +3d_8 +d_9 </math>= '''x mod 7'''.<br />
<br />
Each number in E must make the modified D equal 0 mod 7, so for each <math>d_i</math>, <math>e_i = \frac{x+7k}{c}-d_i</math>, where c is the coefficient of <math>d_i</math> <br />
and k is an element of {-2,-1,0,1,2}. The patient reader should feel free to verify that this makes '''D = 0 mod 7'''.<br />
<br />
In terms of <math>d_i</math> terms, then, we find each <math>c_ie_i = x - c_id_i + 7k</math>.<br />
<br />
Then <math>E= 2e_1 +3e_2 +1e_3 -2e_4 -3e_5 -e_6 +2e_7 +3e_8 +e_9</math> '''mod 7''' can be expressed<br />
<math>E= (x-2d_1)+(x-3d_2)+(x-d_3)+...+(x-d_9) = (9x)-D</math> '''mod 7 = (9x)- x = 8x = x mod 7'''.<br />
(Note that the 7s, which do not change the mod value, have been eliminated.)<br />
<br />
Each number in F must make the modified E equal '''0 mod 7''', so for each <math>e_i</math>, <math>f_i = \frac{x+7k_2}{c_i} -e_i = \frac{x+7k_2}{c_i} - (\frac{x+7k_1}{c_i} -d_i)</math>.<br />
<br />
By design and selection of k, all <math>(f_i)</math> are integers, and <math>d_i - f_i</math> is always an integer because it is the difference of two integers.<br />
<br />
<math>d_i - f_i = \frac{7k_2-7k_1}{c_i}</math><br />
<br />
<math>c_i</math> is a member of the set {1, 2, 3}. Since no <math>c_i</math> divides 7, 7 may be factored and <math>7\frac{k_2-k_1}{c_i} = d_i - f_i</math> is the product of two integers.<br />
<br />
Let <math>A=\frac{k_2-k_1}{c_i}</math> then <math>d_i - f_i =</math> '''7A mod 7 = 0 mod 7''' for all <math>(d_i,f_i)</math>, QED.<br />
<br />
== Resources ==<br />
* [http://www.artofproblemsolving.com/Resources/Papers/SatoNT.pdf Number Theory Problems and Notes] by [[Naoki Sato]].<br />
<br />
<br />
<br />
<br />
== See also ==<br />
* [[Introduction to modular arithmetic]]<br />
* [[Olympiad modular arithmetic]]<br />
<br />
<br />
<br />
<br />
[[Category:Intermediate Mathematics Topics]]</div>Elephantmasterhttps://artofproblemsolving.com/wiki/index.php?title=Modular_arithmetic/Intermediate&diff=15246Modular arithmetic/Intermediate2007-06-26T00:30:40Z<p>Elephantmaster: /* The binary operation "mod" */</p>
<hr />
<div>Given integers <math>a</math>, <math>b</math>, and <math>n</math>, with <math>n > 0</math>, we say that <math>a</math> is ''congruent to'' <math>b</math> ''modulo'' <math>n</math>, or <math>a \equiv b</math> (mod <math>n</math>), if the difference <math>{a - b}</math> is divisible by <math>n</math>.<br />
<br />
For a given positive integer <math>n</math>, the relation <math>a \equiv b</math> (mod <math>n</math>) is an [[equivalence relation]] on the set of integers. This relation gives rise to an algebraic structure called '''the integers modulo <math>n</math>''' (usually known as "the integers mod <math>n</math>," or <math>\mathbb{Z}_n</math> for short). This structure gives us a useful tool for solving a wide range of number-theoretic problems, including finding solutions to [[Diophantine equation|Diophantine equations]], testing whether certain large numbers are prime, and even some problems in cryptology.<br />
<br />
<br />
<br />
== Arithmetic Modulo n ==<br />
<br />
=== Useful Facts ===<br />
<br />
Consider four integers <math>{a},{b},{c},{d}</math> and a positive integer <math>{m}</math> such that <math>a\equiv b\pmod {m}</math> and <math>c\equiv d\pmod {m}</math>. In modular arithmetic, the following [[identity | identities]] hold:<br />
<br />
* Addition: <math>a+c\equiv b+d\pmod {m}</math>.<br />
* Subtraction: <math>a-c\equiv b-d\pmod {m}</math>.<br />
* Multiplication: <math>ac\equiv bd\pmod {m}</math>.<br />
* Division: <math>\frac{a}{e}\equiv \frac{b}{e}\pmod {\frac{m}{\gcd(m,e)}}</math>, where <math>e</math> is a positive integer that divides <math>{a}</math> and <math>b</math>.<br />
* Exponentiation: <math>a^e\equiv b^e\pmod {m}</math> where <math>e</math> is a positive integer.<br />
<br />
For examples, see [[Introduction to modular arithmetic]].<br />
<br />
<br />
=== The Integers Modulo n ===<br />
<br />
The relation <math>a \equiv b</math> (mod <math>n</math>) allows us to divide the set of integers into sets of equivalent elements. For example, if <math>n = 3</math>, then the integers are divided into the following sets:<br />
<br />
<math>\{ \ldots, -6, -3, 0, 3, 6, \ldots \}</math><br />
<br />
<math>\{ \ldots, -5, -2, 1, 4, 7, \ldots \}</math><br />
<br />
<math>\{ \ldots, -4, -1, 2, 5, 8, \ldots \}</math><br />
<br />
Notice that if we pick two numbers <math>a</math> and <math>b</math> from the same set, then <math>a</math> and <math>b</math> differ by a multiple of <math>3</math>, and therefore <math>a \equiv b</math> (mod <math>3</math>).<br />
<br />
We sometimes refer to one of the sets above by choosing an element from the set, and putting a bar over it. For example, the symbol <math>\overline{0}</math> refers to the set containing <math>0</math>; that is, the set of all integer multiples of <math>3</math>. The symbol <math>\overline{1}</math> refers to the second set listed above, and <math>\overline{2}</math> the third. The symbol <math>\overline{3}</math> refers to the same set as <math>\overline{0}</math>, and so on.<br />
<br />
Instead of thinking of the objects <math>\overline{0}</math>, <math>\overline{1}</math>, and <math>\overline{2}</math> as sets, we can treat them as algebraic objects -- like numbers -- with their own operations of addition and multiplication. Together, these objects form '''the integers modulo <math>3</math>,''' or <math>\mathbb{Z}_3</math>. More generally, if <math>n</math> is a positive integer, then we can define<br />
<br />
<math>\mathbb{Z}_n = \{\overline{0}, \overline{1}, \overline{2}, \ldots, \overline{n-1} \}</math>,<br />
<br />
where for each <math>k</math>, <math>\overline{k}</math> is defined by<br />
<br />
<math>\overline{k} = \{ m \in \mathbb{Z} \mbox{ such that } m \equiv k \pmod{n} \}.</math><br />
<br />
=== Addition, Subtraction, and Multiplication Mod n ===<br />
<br />
We define addition, subtraction, and multiplication in <math>\mathbb{Z}_n</math> according to the following rules:<br />
<br />
<math>\overline{a} + \overline{b} = \overline{a+b}</math> for all <math>a, b \in \mathbb{Z}</math>. (Addition)<br />
<br />
<math>\overline{a} - \overline{b} = \overline{a-b}</math> for all <math>a, b \in \mathbb{Z}</math>. (Subtraction)<br />
<br />
<math>\overline{a} \cdot \overline{b} = \overline{ab}</math> for all <math>a, b \in \mathbb{Z}</math>. (Multiplication)<br />
<br />
So for example, if <math>n = 7</math>, then we have<br />
<br />
<math>\overline{3} + \overline{2} = \overline{3+2} = \overline{5}</math><br />
<br />
<math>\overline{4} + \overline{4} = \overline{4+4} = \overline{8} = \overline{1}</math><br />
<br />
<math>\overline{4} \cdot \overline{3} = \overline{4 \cdot 3} = \overline{12} = \overline{5}</math><br />
<br />
<math>\overline{6} \cdot \overline{6} = \overline{6 \cdot 6} = \overline{36} = \overline{1}</math><br />
<br />
Notice that, in each case, we reduce to an answer of the form <math>\overline{k}</math>, where <math>0 \leq k < 7</math>. We do this for two reasons: to keep possible future calculations as manageable as possible, and to emphasize the point that each expression takes one of only seven (or in general, <math>n</math>) possible values. (Some people find it useful to reduce an answer such as <math>\overline{5}</math> to <math>\overline{-2}</math>, which is negative but has a smaller absolute value.)<br />
<br />
==== A Word of Caution ====<br />
<br />
Because of the way we define operations in <math>\mathbb{Z}_n</math>, it is important to check that these operations are well-defined. This is because each of the sets that make up <math>\mathbb{Z}_n</math> contains many different numbers, and therefore has many different names. For example, observe that in <math>\mathbb{Z}_7</math>, we have <math>\overline{1} = \overline{8}</math> and <math>\overline{2} = \overline{9}</math>. It is reasonable to expect that if we perform the addition <math>\overline{8} + \overline{9}</math>, we should get the same answer as if we compute <math>\overline{1} + \overline{2}</math>, since we are simply using different names for the same objects. Indeed, the first addition yields the sum <math>\overline{17} = \overline{3}</math>, which is the same as the result of the second addition.<br />
<br />
The "Useful Facts" above are the key to understanding why our operations yield the same results even when we use different names for the same sets. The task of checking that an operation or function is well-defined, is one of the most important basic techniques in [[abstract algebra]].<br />
<br />
== Algebraic Properties of the Integers Mod n ==<br />
<br />
The integers modulo <math>n</math> form an algebraic structure called a [[ring]] -- a structure in which we can add, subtract, and multiply elements.<br />
<br />
Anyone who has taken a high school algebra class is familiar with several examples of rings, including the ring of integers, the ring of rational numbers, and the ring of real numbers. The ring <math>\mathbb{Z}_n</math> has some algebraic features that make it quite different from the more familiar rings listed above.<br />
<br />
First of all, notice that if we choose a nonzero element <math>\overline{a}</math> of <math>\mathbb{Z}_n</math>, and add <math>n</math> copies of this element, we get<br />
<br />
<math>\overline{a} + \overline{a} + \cdots + \overline{a} = n \cdot \overline{a} = \overline{na} = \overline{0}</math>,<br />
<br />
since <math>na</math> is a multiple of <math>n</math>. So it is possible to add several copies of a nonzero element of <math>\mathbb{Z}_n</math> and get zero. This phenomenon, which is called '''torsion''', does not occur in the reals, the rationals, or the integers.<br />
<br />
Another curious feature of <math>\mathbb{Z}_n</math> is that a polynomial over <math>\mathbb{Z}_n</math> can have a number of roots greater than its degree. Consider, for example, the polynomial congruence<br />
<br />
<math>x^2 - 2x - 15 \equiv 0 \pmod{21}</math>.<br />
<br />
We might be tempted to solve this congruence by factoring the expression on the left:<br />
<br />
<math>(x - 5)(x + 3) \equiv 0 \pmod{21}</math>.<br />
<br />
Indeed, this factorization yields two solutions to the congruence: <math>x \equiv 5 \pmod{21}</math>, and <math>x \equiv -3 \equiv 18 \pmod{21}</math>. (Note that two values of <math>x</math> that are congruent modulo <math>21</math> are considered the same solution.)<br />
<br />
However, since <math>15 \equiv 99 \pmod{21}</math>, the original congruence is equivalent to<br />
<br />
<math>x^2 - 2x - 99 \equiv 0 \pmod{21}</math>.<br />
<br />
This time, factoring the expression on the left yields<br />
<br />
<math>(x - 11)(x + 9) \equiv 0 \pmod{21}</math>.<br />
<br />
And we find that there are two more solutions! The values <math>x \equiv 11 \pmod{21}</math> and <math>x \equiv -9 \equiv 12 \pmod{21}</math> both solve the congruence. So our congruence has at least four solutions -- two more than we might expect based on the degree of the polynomial.<br />
<br />
Why do the "rules" of algebra that work so well for the real numbers seem to fail in <math>\mathbb{Z}_{21}</math>? To understand this, let's take a closer look at the congruence<br />
<br />
<math>(x - 5)(x + 3) \equiv 0 \pmod{21}</math>.<br />
<br />
If we were solving this as an equation over the reals, we would immediately conclude that either <math>x - 5</math> must be zero, or <math>x + 3</math> must be zero in order for the product to equal zero. However, this is not the case in <math>\mathbb{Z}_{21}</math>! It is possible to multiply two nonzero elements of <math>\mathbb{Z}_{21}</math> and get zero. For example, we have<br />
<br />
<math>\overline{3} \cdot \overline{7} = \overline{0}</math><br />
<br />
<math>\overline{9} \cdot \overline{7} = \overline{0}</math><br />
<br />
<math>\overline{6} \cdot \overline{14} = \overline{0}</math><br />
<br />
But wait! Suppose we take a close look at this last product, and we set <math>x - 5 \equiv 6 \pmod{21}</math> and <math>x + 3 \equiv 14 \pmod{21}</math>. Then we have <math>x \equiv 11 \pmod{21}</math> -- another of the solutions of our congruence! (One can check that the other two factorizations don't lead to any valid solutions; however, there are many other factorizations of zero that need to be checked.)<br />
<br />
In the ring of real numbers, it is a well-known fact that if <math>ab = 0</math>, then <math>a = 0</math> or <math>b = 0</math>. For this reason, we call the ring of real numbers a '''domain'''. However, a similar fact does ''not'' apply in general in <math>\mathbb{Z}_n</math>; therefore, <math>\mathbb{Z}_n</math> is not in general a domain.<br />
<br />
<br />
<br />
== Topics ==<br />
The following topics expand on the flexible nature of modular arithmetic as a problem solving tool:<br />
* [[Fermat's Little Theorem]]<br />
* [[Euler's Totient Theorem]]<br />
* [[Phi function]]<br />
<br />
<br />
<br />
== Miscellany ==<br />
<br />
=== The binary operation "mod" ===<br />
<br />
Related to the concept of congruence, mod <math>n</math> is the binary operation '''<math>a</math> mod <math>n</math>''', which is used often in computer programming.<br />
<br />
Recall that, by the [[Division Algorithm]], given any two integers <math>a</math> and <math>n</math>, with <math>n > 0</math>, we can find integers <math>q</math> and <math>r</math>, with <math>0 \leq r < n </math>, such that <math>a = nq + r</math>. The number <math>q</math> is called the ''quotient'', and the number <math>r</math> is called the ''remainder''. The operation ''<math>a</math> mod <math>n</math>'' returns the value of the remainder <math>r</math>. For example:<br />
<br />
<math>15</math> mod <math>6 = 3</math>, since <math>15 = 6 \cdot 2 + 3</math>.<br />
<br />
<math>35</math> mod <math>7 = 0</math>, since <math>35 = 7 \cdot 5 + 0</math>.<br />
<br />
<math>-10</math> mod <math>8 = 6</math>, since <math>-10 = 8 \cdot -2 + 6</math>.<br />
<br />
Observe that if <math>a</math> mod <math>n = r</math>, then we also have <math>a \equiv r</math> (mod <math>n</math>).<br />
<br />
<br />
An example exercise with modular arithmetic:<br />
<br />
'''Problem:'''<br />
<br />
Let <br />
<br />
<math>D=d_1d_2d_3d_4d_5d_6d_7d_8d_9</math> <br />
<br />
be a nine-digit positive integer (each digit not necessarily distinct). Consider <br />
<br />
<math>E=e_1e_2e_3e_4e_5e_6e_7e_8e_9</math>,<br />
<br />
another nine-digit positive integer with the property that each digit <math>e_i</math> when substituted for <math>d_i</math> makes the<br />
modified D divisible by 7. Let <br />
<br />
<math>F=f_1f_2f_3f_4f_5f_6f_7f_8f_9</math> be a third nine-digit positive integer with the same relation to E as E has to D.<br />
<br />
Prove that every <math>d_i - f_i</math> is divisible by 7. <br />
<br />
<br />
<br />
'''Solution:'''<br />
<br />
Any positive integer <math>D=d_1d_2d_3d_4d_5d_6d_7d_8d_9</math> can be expressed <math>(10^8)d_1+(10^7)d_2+...(10^0)d_9</math>.<br />
<br />
Since '''10=3 mod 7''', and since it holds that if '''a=b mod c''' then <math>a^n=b^n</math> '''mod c''', then D can be expressed much more simply mod 7; that is,<br />
<math>D= 2d1 +3d2 +1d3 -2d4 -3d5 -d6 +2d7 +3d8 +d9 </math>= '''x mod 7'''.<br />
<br />
Each number in E must make the modified D equal 0 mod 7, so for each <math>d_i</math>, <math>e_i = \frac{x+7k}{c}-d_i</math>, where c is the coefficient of <math>d_i</math> <br />
and k is an element of {-2,-1,0,1,2}. The patient reader should feel free to verify that this makes '''D = 0 mod 7'''.<br />
<br />
In terms of <math>d_i</math> terms, then, we find each <math>c_ie_i = x - c_id_i + 7k</math>.<br />
<br />
Then <math>E= 2e_1 +3e_2 +1e_3 -2e_4 -3e_5 -e_6 +2e_7 +3e_8 +e_9</math> '''mod 7''' can be expressed<br />
<math>E= (x-2d_1)+(x-3d_2)+(x-d_3)+...+(x-d_9) = (9x)-D</math> '''mod 7 = (9x)- x = 8x = x mod 7'''.<br />
(Note that the 7s, which do not change the mod value, have been eliminated.)<br />
<br />
Each number in F must make the modified E equal '''0 mod 7''', so for each <math>e_i</math>, <math>f_i = \frac{x+7k_2}{c_i} -e_i = \frac{x+7k_2}{c_i} - (\frac{x+7k_1}{c_i} -d_i)</math>.<br />
<br />
By design and selection of k, all <math>(f_i)</math> are integers, and <math>d_i - f_i</math> is always an integer because it is the difference of two integers.<br />
<br />
<math>d_i - f_i = \frac{7k_2-7k_1}{c_i}</math><br />
<br />
<math>c_i</math> is a member of the set {1, 2, 3}. Since no <math>c_i</math> divides 7, 7 may be factored and <math>7\frac{k_2-k_1}{c_i} = d_i - f_i</math> is the product of two integers.<br />
<br />
Let <math>A=\frac{k_2-k_1}{c_i}</math> then <math>d_i - f_i =</math> '''7A mod 7 = 0 mod 7''' for all <math>(d_i,f_i)</math>, QED.<br />
<br />
== Resources ==<br />
* [http://www.artofproblemsolving.com/Resources/Papers/SatoNT.pdf Number Theory Problems and Notes] by [[Naoki Sato]].<br />
<br />
<br />
<br />
<br />
== See also ==<br />
* [[Introduction to modular arithmetic]]<br />
* [[Olympiad modular arithmetic]]<br />
<br />
<br />
<br />
<br />
[[Category:Intermediate Mathematics Topics]]</div>Elephantmaster