98.3k views
4 votes
You are watching a pitcher who throws two types of pitches, a fastball (F) and a curveball (C). The order of the pitches thrown so far is F, C, F, F, C, F, F, F, C. Assuming that the pattern continues, predict the next five pitches. (Enter your answers as a comma-separated list.)

1 Answer

3 votes

Answer:

F,F,F,F,C.

Explanation:

From the pattern, we can understand that the pitcher will never throw consecutive curveballs.

Now, for the fastball counter, we use two values to help us estabilish the pattern.

v1 is the number of curveballs the pitcher has thrown. v1 starts at zero, and for each curveball, it is incremented.

v2 is the number of consecutive fastballs the pitcher has thrown. For each fastball throw, this value is incremented. Each time v2 = v1+1, the pitcher will throw a curveball and v2 will be set to zero.

So, from the start of the pattern.

v1 = 0, v2 = 0

F -> v2 = 1

v2 = v1+1, so he will throw a curve

C -> v1 = 1, v2 = 0

F -> v1 = 1, v2 = 1

F -> v1 = 1, v2 = 2

v2 = v1+1, a curve is coming

C -> v1 = 2, v2 = 0

F -> v1 = 2, v2 = 1

F -> v1 = 2, v2 = 2

F -> v1 = 2, v2 = 3

v2 = v1+1, curve

C -> v1 = 3, v2 = 0

So the next five pitches are

F -> v1 = 3, v2 = 1

F -> v1 = 3, v2 = 2

F -> v1 = 3, v2 = 3

F -> v1 = 3, v2 = 4

v2 = v1+1, the next pitch is a curve

C

User Smashedtoatoms
by
5.9k points