Question: Please write a function in Haskell which does the following, without using any prelude functions or importing any libraries. Make relevant helper functions where needed.
Please write a function in Haskell which does the following, without using any prelude functions or importing any libraries. Make relevant helper functions where needed.

Question 17 - Edges in the Intersection Graph: Given a set A of length n, assume P(A) to be it's Power set. Power set is defined as : Power set of any set S is the set of all subsets of S, including the empty set () and S itself. It is denoted by P(S). Let A be any set, say A={1,2,3}, the P(A)={,{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}} Now let G represent P(A) 's intersection graph. Intersection graph is defined as : An intersection graph is a graph that represents the pattern of intersections of a family of sets. Then f(n) will be the number of edges in the intersection graph (G). We know, that the vertices of G will be elements of the power set of A and the edges of G(E) will be in form {x,y} and x and y are elements of P(A). They follow the rule that x and y are both intersecting (and xy ). You must find the number of pairs of E given a set of length n. Note: No imports are allowed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
