📝 Peer to peer architecture introduction (9 MCQs)
Peers as Both Service Requesters and Providers
Peer-to-peer architecture distributes communication and resource sharing across participating computers called peers. A peer can request data from another system while also supplying files, storage, processing, or network services to others. Unlike a strictly client-server arrangement, core functions need not depend on one permanent central server. Peers communicate over an underlying IP network through an application-level overlay. The overlay handles logical participation while IP networks carry the actual packets.
Decentralized Roles and Overlay Organization
Each peer runs software that manages local resources, discovers other participants, and exchanges application messages. Some designs are unstructured and rely on neighbor searches; structured systems use identifiers and routing rules. Hybrid designs may retain centralized login, indexing, or coordination while leaving actual content transfer between peers. These layers describe logical links, not physical network paths between hosts.
Joining, Discovery, Exchange, and Departure
A new peer contacts known participants or a bootstrap service, learns addresses or overlay neighbors, and announces its available resources. A requester discovers a suitable provider, establishes a direct or relayed connection, and exchanges data. When a peer leaves, neighboring systems may update routing state or seek another copy. This keeps resource discovery separate from the later data exchange.
A File Shared Between Two Home Computers
Suppose computer A offers a document and computer B searches for it. After discovery, B opens a connection to A and requests the file; A sends the data blocks while continuing to use other network services. Both computers act as clients and servers at different moments, illustrating the peer role. The connection illustrates how peers exchange payloads after provider discovery.
Scaling, Resource Sharing, and Network Dependencies
Peer-to-peer designs support file distribution, collaborative applications, distributed storage, and communication systems. They can spread traffic and storage across participants, but depend on peer availability, upload capacity, address reachability, and suitable discovery. Transport protocols and security mechanisms still operate beneath or alongside the overlay. Their operation still depends on transport reachability and stable membership.
Decentralization Does Not Remove Every Server
'Every P2P network has no central component' is false because hybrid systems may use trackers or bootstrap servers. 'Peers only download' ignores their provider role. 'P2P bypasses IP networking' is also incorrect: peers still exchange packets through ordinary network interfaces and transport protocols. The physical network still transports packets between overlay participants through IP.
Architecture Diagrams and Peer-Role Questions
Be able to distinguish a pure decentralized design from a hybrid design, identify which machines provide and consume resources, and trace discovery separately from payload transfer. In diagrams, mark the physical IP connections and the logical overlay links; they are related but are not necessarily identical. State explicitly which machine provides data at each stage shown.
Peer Roles and Overlay Architecture Terms
- Peer - A participant that requests and provides resources..
- Overlay - Logical network built over another network..
- Bootstrap - Initial contact for joining an overlay..
- Discovery - Finding available peers or resources..
- Hybrid P2P - P2P design with centralized coordination..
- Direct transfer - Payload exchanged between participating peers..
📝 All Peer to peer architecture introduction MCQs
Q1. Which researchers introduced arithmetic coding in 1981?
📖 Explanation: The technique was first described by Jorma Rissanen and Thomas Langdon in 1981. Their work laid the foundation for arithmetic coding, distinguishing it from earlier methods such as Huffman coding. Recognizing the original authors is a factual recall that anchors the historical context of the method.
Q2. When the probability of a symbol increases, how does its sub‑interval change within the [low,high) range?
📖 Explanation: A higher probability allocates a larger portion of the total interval to that symbol, because the sub‑interval length is proportional to the symbol’s probability. Thus, increasing the probability expands the sub‑interval, making it larger within the overall coding range.
Q3. Which statement best contrasts arithmetic coding with Huffman coding regarding handling of symbol probabilities?
📖 Explanation: Arithmetic coding maps the whole message to a real‑valued interval, allowing it to exploit arbitrary probability values and produce fractional‑bit efficiencies. Huffman coding, by contrast, assigns integer‑length codewords based on a binary tree, limiting its ability to match non‑power‑of‑two probabilities exactly.
Q4. Given a binary alphabet {0,1} with and , what is the shortest binary representation of the interval after encoding the sequence '01'?
📖 Explanation: First, encoding '0' yields the interval [0,0.7). Then encoding '1' narrows it to [0.49,0.7) because the cumulative probability before '1' is 0.7 and the interval length after the first symbol is 0.7. The binary fraction 0.1 (which equals 0.5) lies inside this interval and is the shortest binary string that uniquely identifies it.
Q5. During decoding, which logical condition ensures the decoder stops at the correct point?
📖 Explanation: The decoder reads bits until the current interval becomes narrower than the resolution provided by the bits read. If the interval width is smaller than , any additional bits would not change the interval’s containment of the pattern, indicating that the message has been uniquely identified.
Q6. How does an error in estimated symbol probabilities affect the compression efficiency of arithmetic coding compared to Huffman coding?
📖 Explanation: Arithmetic coding relies on precise probability estimates to partition the interval accurately. Misestimated probabilities cause the interval to be allocated incorrectly, which can increase the number of bits needed to represent the message. Huffman coding, using integer‑length codewords, is less sensitive to small probability errors, so arithmetic coding typically suffers a greater efficiency loss.
Q7. Why does arithmetic coding keep the interval as a half‑open interval rather than a closed interval?
📖 Explanation: Using a half‑open interval guarantees that each possible binary pattern maps to a unique sub‑interval. If the interval were closed at both ends, a pattern that exactly equals the high bound could belong to two adjacent intervals, causing decoding ambiguity. The half‑open convention eliminates this overlap.
Q8. What happens to the length of the interval after each additional symbol is encoded?
📖 Explanation: Each symbol narrows the interval because the current interval is subdivided according to the symbol’s probability. Multiplying the interval length by a probability less than one always yields a smaller length, so the interval continuously shrinks as more symbols are processed.
Q9. If the final interval after encoding a message is , which binary string is the shortest valid representation of the message?
📖 Explanation: The lower bound 0.8125 equals the binary fraction 0.1101. Any binary string that falls within the interval must be at least as large as this bound but less than 0.875 (0.111). The shortest such string is the exact lower bound itself, 0.1101, which uniquely identifies the interval without exceeding the upper limit.