randRange( 2, 6 ) randRange( 1, 10 ) randRangeExclude( 1, 10, [ START_A ] ) START_A * C START_B * C A * B getGCD( A, B ) PRODUCT / GCD

{Next week|On Saturday}, person(1) is having a party{ and he(1)'s planning to play his(1) randRange(2,30) favorite songs. He(1) also|. He(1)} wants to get some hot dogs for the party. When he(1) goes to the store, he(1) finds that hot dogs come in packages of A and buns come in packages of B.

If person(1) wants to have the same number of hot dogs and buns, what is the minimum number of hot dogs he(1) will have to buy?

LCM

We know that hot dogs come in packages of A. Write out the first few multiples of A to see the possible numbers of hot dogs person(1) can buy:

\qquad dogs:  M, ...

We know that buns come in packages of B. Write out the first few multiples of B to see the possible numbers of buns person(1) can buy:

\qquad buns:  M, ...

Since person(1) wants to have the same number of hot dogs and buns, look for common multiples where it's possible to buy the same number of hot dogs and buns:

\qquad dogs:  \color{PINK}{M}, \color{BLUE}{M}, \color{GREEN}{M}, M, ...

\qquad buns:  \color{PINK}{M}, \color{BLUE}{M}, \color{GREEN}{M}, M, ...

The least common multiple is the minimum number of hot dogs person(1) will have to buy to get the same number of hot dogs and buns.

LCM is the least common multiple of A and B.

To get the same number of each, the smallest amount of food person(1) can buy is LCM hot dogs and buns, or plural(LCM/A,"package") of hot dogs and plural(LCM/B,"package") of buns.

randRange( 2, 6 ) randRange( 1, 10 ) randRangeExclude( 1, 10, [ START_A ] ) START_A * C START_B * C A * B getGCD( A, B ) PRODUCT / GCD

person(1) is organizing a {baseball|softball} league, and he(1) needs to purchase jerseys and visors for the players. Jerseys come in sets of A, and visors come in sets of B.

If person(1) wants to buy the same number of jerseys and visors, what is the minimum number of jerseys or visors he(1) will have to purchase?

LCM

We know that jerseys come in packages of A. Write out the first few multiples of A to see the possible numbers of jerseys person(1) can buy:

\qquad jerseys:  M, ...

We know that visors come in packages of B. Write out the first few multiples of B to see the possible numbers of visors person(1) can buy:

\qquad visors:  M, ...

Since person(1) wants to have the same number of jerseys and visors, look for common multiples where it's possible to buy the same number of jerseys and visors:

\qquad jerseys:  \color{PINK}{M}, \color{BLUE}{M}, \color{GREEN}{M}, M, ...

\qquad visors:  \color{PINK}{M}, \color{BLUE}{M}, \color{GREEN}{M}, M, ...

The least common multiple is the minimum number of jerseys person(1) will have to buy to get the same number of jerseys and visors.

LCM is the least common multiple of A and B.

To get the same number of each, the smallest number person(1) can buy is LCM jerseys and visors, or plural( LCM / A, "set" ) of jerseys and plural( LCM / B, "set" ) of visors.

randRange( 2, 6 ) randRange( 1, 10 ) randRangeExclude( 1, 10, [ START_A ] ) START_A * C START_B * C A * B getGCD( A, B ) PRODUCT / GCD

person(1) and person(2) are in different course(1) classes at school(1). person(1)'s teacher always gives plural( exam(1) ) with A questions on them while person(2)'s teacher gives more frequent plural( exam(1) ) with only B questions. person(2)'s teacher always gives plural( exam(1) ) with B questions on them while person(1)'s teacher gives more frequent plural( exam(1) ) with only A questions. {person(1) has randRange(15,40) other students in his(1) class. |person(2)'s teacher also assigns randRange(3,10) projects per year.}

Even though the two classes have to take a different number of plural( exam(1) ), their teachers have told them that both classes will get the same total number of exam(1) questions each year.

What is the minimum number of exam(1) questions person(1)'s or person(2)'s class can expect to get in a year?

LCM

We know that in person(1)'s class, all the plural( exam(1) ) have A questions. Write out the first few multiples of A to see the possible numbers of questions person(1) might have to answer over the whole year:

\qquad M, ...

We know that in person(2)'s class, all the plural( exam(1) ) have B questions. Write out the first few multiples of B to see the possible numbers of questions person(2) might have to answer over the whole year:

\qquad M, ...

Since person(1)'s and person(2)'s teachers have told them that both classes will have the same total number of exam(1) questions over the whole year, look for the common multiples to find the possible numbers of exam(1) questions they will have to answer.

\qquad \color{PINK}{M}, \color{BLUE}{M}, \color{GREEN}{M}, M, ...

\qquad \color{PINK}{M}, \color{BLUE}{M}, \color{GREEN}{M}, M, ...

The least common multiple is the minimum number questions person(1) and person(2) might have to answer over the year.

LCM is the least common multiple of A and B.

If person(1)'s and person(2)'s classes get the same total number of questions, the minimum number of exam(1) questions they can expect to get in a year is LCM questions, or plural( LCM / A, exam(1) ) in person(1)'s class and plural( LCM / B, exam(1) ) in person(2)'s class.

randRange( 1, 10 ) randRange( 1, 10 ) randRange( 2, 5 ) A_START * FACTOR B_START * FACTOR getGCD( A, B ) getFactors( A ) getFactors( B )

At a track and field competition, there are A sprinters and B long-distance runners{ and randRange(5,100) fans|}. person(1) has to assign all of the athletes to teams. He(1) wants to make sure all of the teams have the same number of sprinters and the same number of long-distance runners.

What is the greatest number of teams person(1) can form?

GCD

Let's start by just thinking about the sprinters. We can think about all the ways to divide the A sprinters into equally sized teams by finding the factors of A.

The factors of A are toSentence( getFactors( A ) ) since those are all the numbers that divide evenly into A. That means we can divide the sprinters into equally sized teams in any of the following ways:

plural( F, "team" ) with plural( A / F, "sprinter" ) plural( "", "each", F )

Now lets think about the long-distance runners. We can also list all the ways to divide the B long-distance runners into equally sized teams by finding the factors of B.

The factors of B are toSentence( getFactors( B ) ) since those are all the numbers that divide evenly into B. That means we can divide the long-distance runners into equally sized teams in any of the following ways:

plural( F, "team" ) with plural( B / F, "long-distance runner" ) plural( "", "each", F )

Since each team will have sprinters and long-distance runners, compare the numbers of teams the sprinters can be divided into and the numbers of teams the runners can be divided into to find the common divisors:

plural( N + 1, "team" ) with plural( A / ( N + 1 ), "sprinter" )

plural( N + 1, "team" ) with plural( B / ( N + 1 ), "long-distance runner" )

The common divisors of A and B are toSentence( _.intersection( A_FACTORS, B_FACTORS ) ). In other words, with A sprinters and B long-distance runners, person(1) can make the following equal teams:

plural( F, "team" ) with plural( A / F, "sprinter" ) and plural( B / F, "long-distance runner" )

We want to know the greatest number of equal teams person(1) can make, so from the common divisors above, we want the greatest common divisor.

The greatest number of teams that person(1) can form is GCD teams, with plural( A / GCD, "sprinter" ) and plural( B / GCD, "long-distance runner" ) per team.

randRange( 1, 10 ) randRange( 1, 10 ) randRange( 2, 5 ) A_START * FACTOR B_START * FACTOR getGCD( A, B ) getFactors( A ) getFactors( B )

At person(1)'s bakery, person(1) bakes one batch of A chocolate chip cookies and one batch of B oatmeal cookies each day. person(1) sells all his(1) cookies the same day in gift baskets.

{Because his(1) customers expect consistency|To keep the price the same}, person(1) wants to make sure each gift basket is identical.

What is the greatest number of gift baskets person(1) can sell each day?

GCD

Let's start by just thinking about the chocolate chip cookies. We can think about all the ways to equally divide the A chocolate chip cookies into gift baskets by finding the factors of A.

The factors of A are toSentence( getFactors( A ) ) since those are all the numbers that divide evenly into A. That means we can equally divide the chocolate chip cookies into gift baskets in any of the following ways:

plural( F, "basket" ) with plural( A / F, "chocolate chip cookie" ) plural( "", "each", F )

Now lets think about the oatmeal cookies. We can also list all the ways to equally divide the B oatmeal cookies into gift baskets by finding the factors of B.

The factors of B are toSentence( getFactors( B ) ) since those are all the numbers that divide evenly into B. That means we can equally divide the oatmeal cookies into gift baskets in any of the following ways:

plural( F, "basket" ) with plural( B / F, "oatmeal cookie" ) plural( "", "each", F )

Since each gift basket will have chocolate chip and oatmeal cookies, compare the ways of dividing the chocolate chip cookies and the ways of dividing the oatmeal cookies to find the common divisors:

plural( N + 1, "basket" ) with plural( A / ( N + 1 ), "chocolate chip cookie" )

plural( N + 1, "basket" ) with plural( B / ( N + 1 ), "oatmeal cookie" )

The common divisors of A and B are toSentence( _.intersection( A_FACTORS, B_FACTORS ) ). In other words, with A chocolate chip and B oatmeal cookies, person(1) can make any of the following gift baskets:

plural( F, "basket" ) with plural( A / F, "chocolate chip cookie" ) and plural( B / F, "oatmeal cookie" )

We want to know the greatest number of identical gift baskets person(1) can make, so from the common divisors above, we want the greatest common divisor.

The greatest number of gift baskets that person(1) can make each day is GCD baskets, with plural( A / GCD, "chocolate chip cookie" ) and plural( B / GCD, "oatmeal cookie" ) per basket.

randRange( 1, 10 ) randRange( 1, 10 ) randRange( 2, 5 ) A_START * FACTOR B_START * FACTOR getGCD( A, B ) getFactors( A ) getFactors( B )

person(1) just bought 1 package of plural( A, deskItem(1) ) and 1 package of plural( B, deskItem(2) ). He(1) wants to use all of the plural( deskItem(1) ) and plural( deskItem(2) ) to create identical sets of office supplies for his(1) {coworkers|friends|classmates}.

What is the greatest number of sets of office supplies person(1) can make?

GCD

Let's start by just thinking about the plural( deskItem(1) ). We can think about all the ways to equally divide the plural( A, deskItem(1) ) into sets by finding the factors of A.

The factors of A are toSentence( getFactors( A ) ) since those are all the numbers that divide evenly into A. That means we can equally divide the plural( deskItem(1) ) into sets in any of the following ways:

plural( F, "set" ) with plural( A / F, deskItem(1) ) plural( "", "each", F )

Now lets think about the plural( deskItem(2) ). We can also list all the ways to equally divide the plural( B, deskItem(2) ) into sets by finding the factors of B.

The factors of B are toSentence( getFactors( B ) ) since those are all the numbers that divide evenly into B. That means we can equally divide the plural( deskItem(2) ) into sets in any of the following ways:

plural( F, "set" ) with plural( B / F, deskItem(2) ) plural( "", "each", F )

Since each set will have plural( deskItem(1) ) and plural( deskItem(2) ), compare the ways of dividing the plural( deskItem(1) ) and the ways of dividing the plural( deskItem(2) ) to find the common divisors:

plural( N + 1, "set" ) with plural( A / ( N + 1 ), deskItem(1) )

plural( N + 1, "set" ) with plural( B / ( N + 1 ), deskItem(2) )

The common divisors of A and B are toSentence( _.intersection( A_FACTORS, B_FACTORS ) ). In other words, with plural( A, deskItem(1) ) and plural( B, deskItem(2) ), person(1) can make any of the following sets:

plural( F, "set" ) with plural( A / F, deskItem(1) ) and plural( B / F, deskItem(2) )

We want to know the greatest number of identical sets person(1) can make, so from the common divisors above, we want the greatest common divisor.

The greatest number of sets of office supplies that person(1) can make is GCD sets, with plural( A / GCD, deskItem(1) ) and plural( B / GCD, deskItem(2) ) each.