A minimum of three walls is needed to create a sukka.
The Sages taught in the Tosefta: In order to construct a fit sukka, two of the walls must be walls in the standard sense, sealing the entire length and height of the sukka, and the third wall may be even one handbreadth long. Rabbi Shimon says: Three of the walls must be walls in the standard sense, and the fourth wall may be even one handbreadth long.
Rava in our Gemara argues that on Sukkot such a wall will allow the creation of a reshut ha-yahid – a “private domain” for Shabbat purposes, permitting one to carry from a house to the sukka. Even though on an ordinary Shabbat such a structure would not suffice to create a reshut ha-yahid, since the wall is considered sufficient to act as a wall of the sukka, we recognize it as a significant wall for Shabbat, as well.
There are obvious parallels that exist between the laws of sukka and the laws of Shabbat, since the need for defining partitions is an important part of each of these halakhot. It is clear, however, that the rules and regulations governing the definitions in each of these areas are not identical. One suggestion explaining the differences between these laws is based on an examination of the purposes served by the walls in each case. When dealing with the laws of Shabbat the purpose of the walls is to separate – to create a partition between one area and another. On Sukkot, however, the point of the walls is to create a structure that will be sufficient to serve as a sukka in which a person will live for the duration of the holiday.
These differences will sometimes lead to stringencies in defining the terms in one case, but to leniencies in another. In our case, where the two definitions coincide, Rava teaches that defining a wall as having legal standing in one case will extend to the other, as well, even if it would not ordinarily be sufficient in that case.