John is building a fence that is 6 feet high and 18 feet wide to put around his garden. He has two sizes of boards that he can use. One is 2 feet by 6 feet and the other is 4 feet by 6 feet. John can put the boards either horizontally or vertically and he has lots of boards of each size. How many different ways can he build the fence?

To determine the number of different ways John can build the fence, let's analyze the possible arrangements.

John can arrange the boards either horizontally or vertically. Since the width of the fence is given as 18 feet, we need to find combinations of boards that will add up to 18 feet.

Case 1: Horizontal Arrangement
In this case, John will be using the boards vertically, with their height of 6 feet.

Option A: Using only 2-ft wide boards
Since the width of the fence is 18 feet and each 2-ft wide board adds 2 feet of width, John will need 9 boards to cover the entire width (18 ÷ 2 = 9). There is only one way to arrange the 2-ft wide boards, as they are all of the same size.

Option B: Using only 4-ft wide boards
Similarly, using the 4-ft wide boards, John will need 4 boards to cover the entire width (18 ÷ 4 = 4). Again, there is only one way to arrange the 4-ft wide boards, as they are all of the same size.

Option C: Using a combination of 2-ft and 4-ft wide boards
John can also combine both sizes of boards. In this case, the possibilities will depend on the number of 2-ft wide boards used. Since 9 boards are needed in total for the 18-ft width, John can use any number of 2-ft wide boards from 0 to 9. Therefore, there are 10 different combinations using a combination of both board sizes.

Case 2: Vertical Arrangement
In this case, John will be using the boards horizontally, with their width of 6 feet.

Option A: Using only 2-ft high boards
Since the height of the fence is 6 feet and each 2-ft high board adds 2 feet of height, John will need 3 boards to cover the entire height (6 ÷ 2 = 3). Again, there is only one way to arrange the 2-ft high boards.

Option B: Using only 4-ft high boards
Using the 4-ft high boards, John will need 1 board to cover the entire height (6 ÷ 4 = 1). There is only one way to arrange the 4-ft high boards.

Option C: Using a combination of 2-ft and 4-ft high boards
Similarly to the previous case, John can combine both sizes of boards. Since 3 boards are needed in total for the 6-ft height, John can use any number of 2-ft high boards from 0 to 3. Therefore, there are 4 different combinations using a combination of both board sizes.

To calculate the total number of different ways John can build the fence, we need to add up the possibilities for each arrangement:
In Case 1, there are 1 + 1 + 10 = 12 different ways.
In Case 2, there are 1 + 1 + 4 = 6 different ways.

Therefore, the total number of different ways John can build the fence is 12 + 6 = 18 different ways.