Morteza Has $100$ sets. at each step Mahdi can choose two distinct sets of them and Morteza tells him the intersection and union of those two sets. Find the least steps that Mahdi can find all of the sets.

Proposed by Morteza Saghafian
1. **Lemma: If we know all pairwise intersections and unions among three sets \( A_1, A_2, A_3 \), then we can find \( A_1, A_2, A_3 \).**

   **Proof:**
   - Fix an element \( x \).
   - Define \( a_i = 0 \) if \( x \not\in A_i \), and \( a_i = 1 \) otherwise.
   - For each pair \( (i, j) \) with \( i \ne j \), we learn:
     - \( \{a_i, a_j\} = \{0\} \) if both the union and intersection do not contain \( x \).
     - \( \{a_i, a_j\} = \{1\} \) if both the union and intersection contain \( x \).
     - \( \{a_i, a_j\} = \{0, 1\} \) if the union contains \( x \) but the intersection does not.
   - We will not learn \( \{a_i, a_j\} = \{0, 1\} \) for all \( (i, j) \), since that would imply all \( a_i \)'s are distinct, which is impossible.
   - Suppose we learn \( \{a_1, a_2\} = \{0\} \). Then, based on what we learn from \( (1, 3) \), we can determine \( a_3 \), so we now know all of \( a_1, a_2, a_3 \).
   - Repeating this procedure for all \( x \in A_1 \cup A_2 \cup A_3 \) recovers \( A_1, A_2, A_3 \).

   \(\blacksquare\)

2. **Strategy for Mahdi:**
   - Let the sets be \( A_1, \ldots, A_{100} \).
   - Mahdi should ask for the pairs \( (k, k+1) \), \( (k+1, k+2) \), \( (k, k+2) \) for all \( k \equiv 1 \pmod{3} \), and should further ask for \( (1, 100) \). This totals exactly 100 pairs.
   - By the lemma, Mahdi will learn the values of \( A_i \) for all \( 1 \le i \le 99 \).
   - Since Mahdi knows \( A_1, A_1 \cap A_{100}, A_1 \cup A_{100} \), he can learn \( A_{100} = (A_1 \cup A_{100}) \setminus (A_1 \setminus (A_1 \cap A_{100})) \).
   - This shows that Mahdi can learn all the sets in 100 steps.

3. **Proof that 99 steps are insufficient:**
   - Suppose Mahdi only uses 99 steps.
   - View the questions asked as a graph on the vertex set \( V = [100] \).
   - Suppose a new question comes in the form of an edge \( e = (i, j) \).
   - Let \( C \) be the connected component containing \( e \).
   - If \( C \) is a tree, Morteza should reply that \( A_i \cap A_j = \{\} \) and \( A_i \cup A_j = \{0\} \).
   - If \( C \) contains a cycle (potentially created by adding \( e \)), Morteza should reveal the exact values of all the sets in \( C \) according to some valid configuration and answer \( e \) truthfully.
   - There is always at least one valid configuration after placing \( e \), since we can just two-color the trees with \( \{\} \) and \( \{0\} \).
   - At the end of this process, the number of valid configurations is at least \( 2^n \), where \( n \) is the number of connected components that are trees.
   - This is because all connected components that are not trees have their sets fully revealed, and for connected components that are trees, both two-colorings with \( \{\} \) and \( \{0\} \) are valid configurations.
   - Every graph on 100 vertices with 99 edges has a connected component that is a tree. If this were not the case, then a connected component with \( v \) vertices would necessarily have at least \( v \) edges, so the total number of edges would be at least 100, which is a contradiction.

   This completes the proof.

The final answer is \( \boxed{100} \).