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's planning to play his randRange(2,30) favorite songs. He also|. He} wants to get some hot dogs for the party. When he goes to the store, he finds that hot dogs come in packages of A and buns come in packages of B.

{Next week|On Saturday}, person(1) is having a party{ and she's planning to play her randRange(2,30) favorite songs. She also|. She} wants to get some hot dogs for the party. When she goes to the store, she 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 will have to buy?

If person(1) wants to have the same number of hot dogs and buns, what is the minimum number of hot dogs she 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. To do this, LCM/A package of hot dogs should be purchased.To do this, LCM/A packages of hot dogs should be purchased. Also, LCM/B package of buns should be purchased.Also, LCM/B packages of buns should be purchased.

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 needs to purchase jerseys and visors for the players. Jerseys come in sets of A, and visors come in sets of B.

person(1) is organizing a {baseball|softball} league, and she 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 will have to purchase?

If person(1) wants to buy the same number of jerseys and visors, what is the minimum number of jerseys or visors she 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 LCM / A set of jerseys.Or LCM / A sets of jerseys. And LCM / B set of visors.And LCM / B sets 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_form(exam(1)) with A questions on them while person(2)'s teacher gives more frequent plural_form(exam(1)) with only B questions. person(2)'s teacher always gives plural_form(exam(1)) with B questions on them while person(1)'s teacher gives more frequent plural_form(exam(1)) with only A questions. {person(1) has randRange(15,40) other students in his class. |person(2)'s teacher also assigns randRange(3,10) projects per year.}

person(1) and person(2) are in different course(1) classes at school(1). person(1)'s teacher always gives plural_form(exam(1)) with A questions on them while person(2)'s teacher gives more frequent plural_form(exam(1)) with only B questions. person(2)'s teacher always gives plural_form(exam(1)) with B questions on them while person(1)'s teacher gives more frequent plural_form(exam(1)) with only A questions. {person(1) has randRange(15,40) other students in her 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_form(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_form(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_form(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 LCM / A exam(1) in person(1)'s class.Or LCM / A plural_form(exam(1), LCM / A) in person(1)'s class. And LCM / B exam(1) in person(2)'s class.And LCM / B plural_form(exam(1), LCM / B) 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 wants to make sure all of the teams have the same number of sprinters and the same number of long-distance runners.

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. She 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:

F team with A / F sprinter F team with A / F sprinters F teams with A / F sprinter each F teams with A / F sprinters each

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:

F team with B / F long distance runner F team with B / F long distance runners F teams with B / F long distance runner each F teams with B / F long distance runners each

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:

(N + 1) team with A / (N + 1) sprinter (N + 1) team with A / (N + 1) sprinters (N + 1) teams with A / (N + 1) sprinter each (N + 1) teams with A / (N + 1) sprinters each (N + 1) team with B / (N + 1) long distance runner (N + 1) team with B / (N + 1) long distance runners (N + 1) teams with B / (N + 1) long distance runner each (N + 1) teams with B / (N + 1) long distance runners each

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:

F team with A / F sprinter and B / F long-distance runner F team with A / F sprinter and B / F long-distance runners F team with A / F sprinters and B / F long-distance runner F team with A / F sprinters and B / F long-distance runners F teams with A / F sprinter and B / F long-distance runner each F teams with A / F sprinter and B / F long-distance runners each F teams with A / F sprinters and B / F long-distance runner each F teams with A / F sprinters and B / F long-distance runners each

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. Each team will have A / GCD sprinter.Each team will have A / GCD sprinters. Each team will also have B / GCD long-distance runner.Each team will also have B / GCD long-distance runners.

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 cookies the same day in gift baskets.

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 her cookies the same day in gift baskets.

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

{Because her 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:

F basket with A / F chocolate chip cookie F basket with A / F chocolate chip cookies F baskets with A / F chocolate chip cookie each F baskets with A / F chocolate chip cookies each

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:

F basket with B / F oatmeal cookie F basket with B / F oatmeal cookies F baskets with B / F oatmeal cookie each F baskets with B / F oatmeal cookies each

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:

(N + 1) basket with A / (N + 1) chocolate chip cookie (N + 1) basket with A / (N + 1) chocolate chip cookies (N + 1) baskets with A / (N + 1) chocolate chip cookie each (N + 1) baskets with A / (N + 1) chocolate chip cookies each (N + 1) basket with B / (N + 1) oatmeal cookie (N + 1) basket with B / (N + 1) oatmeal cookies (N + 1) baskets with B / (N + 1) oatmeal cookie each (N + 1) baskets with B / (N + 1) oatmeal cookies each

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:

F basket with A / F chocolate chip cookie and B / F oatmeal cookie F basket with A / F chocolate chip cookie and B / F oatmeal cookies F basket with A / F chocolate chip cookies and B / F oatmeal cookie F basket with A / F chocolate chip cookies and B / F oatmeal cookies F baskets with A / F chocolate chip cookie and B / F oatmeal cookie each F baskets with A / F chocolate chip cookie and B / F oatmeal cookies each F baskets with A / F chocolate chip cookies and B / F oatmeal cookie each F baskets with A / F chocolate chip cookies and B / F oatmeal cookies each

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. Each basket has A / GCD chocolate chip cookie.Each basket has A / GCD chocolate chip cookies. Each basket also has B / GCD oatmeal cookie.Each basket also has B / GCD oatmeal cookies.

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 A deskItem(1).person(1) just bought 1 package of A plural_form(deskItem(1), A). He also bought 1 package of B deskItem(2).He also bought 1 package of B plural_form(deskItem(2), B). He wants to use all of the plural_form(deskItem(1)) and plural_form(deskItem(2)) to create identical sets of office supplies for his {coworkers|friends|classmates}.

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

What is the greatest number of identical sets person(1) can make using all the supplies?

GCD

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

Let's start by just thinking about the plural_form(deskItem(1)). We can think about all the ways to equally divide the A plural_form(deskItem(1), A) 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_form(deskItem(1)) into sets in any of the following ways:

F set with A / F deskItem(1) F set with A / F plural_form(deskItem(1), A / F) F sets with A / F deskItem(1) each F sets with A / F plural_form(deskItem(1), A / F) each

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

Now lets think about the plural_form(deskItem(2)). We can also list all the ways to equally divide the B plural_form(deskItem(2), B) 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_form(deskItem(2)) into sets in any of the following ways:

F set with B / F deskItem(2) F set with B / F plural_form(deskItem(2), B / F) F sets with B / F deskItem(2) each F sets with B / F plural_form(deskItem(2), B / F) each

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

(N + 1) set with A / (N + 1) deskItem(1) (N + 1) set with A / (N + 1) plural_form(deskItem(1), A / (N + 1)) (N + 1) sets with A / (N + 1) deskItem(1) each (N + 1) sets with A / (N + 1) plural_form(deskItem(1), A / (N + 1)) each (N + 1) set with B / (N + 1) deskItem(2) (N + 1) set with B / (N + 1) plural_form(deskItem(2), B / (N + 1)) (N + 1) sets with B / (N + 1) deskItem(2) each (N + 1) sets with B / (N + 1) plural_form(deskItem(2), B / (N + 1)) each

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

F set with A / F deskItem(1) and B / F deskItem(2) F set with A / F deskItem(1) and B / F plural_form(deskItem(2), B / F) F set with A / F plural_form(deskItem(1), A / F) and B / F deskItem(2) F set with A / F plural_form(deskItem(1), A / F) and B / F plural_form(deskItem(2), B / F) F sets with A / F deskItem(1) and B / F deskItem(2) each F sets with A / F deskItem(1) and B / F plural_form(deskItem(2), B / F) each F sets with A / F plural_form(deskItem(1), A / F) and B / F deskItem(2) each F sets with A / F plural_form(deskItem(1), A / F) and B / F plural_form(deskItem(2), B / F) each

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. Each set has A / GCD deskItem(1).Each set has A / GCD plural_form(deskItem(1), A / GCD). Each set also has B / GCD deskItem(2).Each set also has B / GCD plural_form(deskItem(2), B / GCD).