Each of the beams connects the top of two non-adjacent pillars, hence we have to find in how many ways we can select the required two pillars which are non-adjacent out of the given 20 pillars.
As, C220 is the number of beams connecting any two pillars whereas 20 is the number of adjacent beams.
Thus, the total number of beams =C220−20
Using Crn=r!(n−r)!n!,
=2!×18!20!−20
=2!×18!20×19×18!−20
=190−20
=170.