Given N positive integers, not necessarily distinct, how many ways you can take 4 integers from the N numbers such that their GCD is 1. One of my friend told me that he can determine the number of ways with inclusion-exclusion principle and found the result 195 for given N=10 and the positive integers are 12,46,100,131,5,6,7,8,9.(adsbygoogle = window.adsbygoogle || []).push({});

I can not still catch how he used inclusion-exclusion principle to find out the number of ways.Hence I need an expert's help.

If the value of N varies how can I find out the number of ways using inclusion-exclusion principle? I'm a novice in learning inclusion-exclusion principle.So I need better explanation

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Solving a inclusion-exclusion problem

Tags:

**Physics Forums | Science Articles, Homework Help, Discussion**