for diagonal elements we have 2 ^(n) choices now for other elements that are left n^(2) - n becoz relation is symmetric u have to divide (n^(2) - n) elements by 2 nw other choices left are 2^(n^(2) - n) therfore total no of choices are 2^(n) * 2^(n^(2) - n) it comes out to be 2^((n*(n+1)) / 2)