Answer:
Please see below
Explanation:
Suppose N = 10. And you have these dots equidistant from each other, and probability = 0.3. According to the data provided in the question statement, we will then have forty-five pairs of points. The task is to draw lines amongst these pairs, all 45 of them, with a 30% probability. Keep in mind that every one of the 45 lines are independent.
A few lines of simple code (just some for loops) needed to run this is attached in the image herewith, .