πŸŽ“ BookMCQ
← Back to 29. Peer to Peer Paradigm

πŸ“ BitTorrent tracker based architecture (12 MCQs)

πŸ“– From Data Communication and Networks β€’ 29. Peer to Peer Paradigm β€’ 12 questions available

What is BitTorrent tracker based architecture?

In tracker-based BitTorrent architecture, a central tracker coordinates peers by maintaining a list of participants sharing a specific file, helping new users discover others to exchange pieces with while not storing the actual content.

3
Easy
5
Medium
4
Hard

πŸ“ All BitTorrent tracker based architecture MCQs

Q1. During LZW encoding with the initial dictionary {0:A, 1:B}, what is the first codeword output when encoding the string \BA...\?

A.0
B.1 βœ…
C.2
D.3
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– Explanation: The encoder begins with entries 0β†’A and 1β†’B. The first character read is B, which maps to code 1. Consequently the first codeword emitted is 1, and the dictionary is expanded with the new entry \BA\. This matches option B and illustrates the basic start of LZW encoding.

Q2. When decoding, if a received codeword is not yet present in the dictionary, which string is produced according to the LZW algorithm?

A.previous string concatenated with its first character βœ…
B.previous string repeated twice
C.the first character of the previous string
D.an empty string
πŸ’‘ Difficulty: medium | βœ… Correct: A

πŸ“– Explanation: The LZW decoder handles an unknown codeword by outputting the previous decoded string followed by the first character of that same string. This rule ensures the decoder can reconstruct the missing entry and continue processing correctly, making option A the accurate description.

Q3. After processing codewords 1 (B) and 0 (A), the dictionary contains 0:A, 1:B, 2:BA. The previous string is \A\. If the next codeword received is 5 (not in the dictionary), what string is output?

A.AB
B.BA
C.BB
D.AA βœ…
πŸ’‘ Difficulty: hard | βœ… Correct: D

πŸ“– Explanation: Because code 5 is absent, the decoder outputs the previous string \A\ concatenated with its first character, also \A\, resulting in \AA\. This follows the LZW rule for unknown codes, so option D correctly represents the produced string.

Q4. Comparing the LZW encoding of \ABABAB\ and \AAAAAA\, which statement is true about the length of the resulting codeword sequences?

A.Both produce sequences of equal length
B.The sequence for \AAAAAA\ is longer
C.The sequence for \ABABAB\ is longer βœ…
D.Neither can be encoded
πŸ’‘ Difficulty: easy | βœ… Correct: C

πŸ“– Explanation: The pattern \ABABAB\ generates new dictionary entries for the alternating pair, leading to more distinct codewords than the repetitive \AAAAAA\, which quickly reuses a single entry. Hence the encoded sequence for \ABABAB\ is longer, making option C correct.

Q5. If the initial dictionary is expanded from 2 symbols (A,B) to 4 symbols (A,B,C,D) for the same input text, how is the overall compression ratio likely to change?

A.It improves because more symbols are represented directly
B.It worsens because fewer codewords are needed to represent substrings βœ…
C.It stays the same because dictionary size does not affect ratio
D.It becomes unpredictable
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: Adding more symbols to the initial dictionary reduces the need to create new entries for short substrings, decreasing the number of codewords generated for a given text. Fewer codewords mean a larger output relative to the input, so the compression ratio typically worsens, corresponding to option B.

Q6. Which of the following best differentiates LZW from LZ78 when processing the repeated substring \AB\ in the text \ABABAB\?

A.LZW adds \AB\ only once, while LZ78 adds it each time it appears βœ…
B.LZW never adds new entries for repeated substrings, LZ78 does
C.LZW updates the dictionary with the previous string plus the first character of the current entry, LZ78 creates a new entry from the previous entry and the current character
D.LZW and LZ78 use identical update rules for repeated substrings
πŸ’‘ Difficulty: hard | βœ… Correct: A

πŸ“– Explanation: LZW builds new entries by appending the first character of the current match to the previous string, so the pattern \AB\ is added only the first time it appears. LZ78, by contrast, creates a fresh entry for each occurrence. This distinction is captured by option A.

Q7. In an LZW implementation, when does the encoder typically reset the dictionary?

A.After every 100 codewords
B.When the encoded file ends
C.When the dictionary reaches its maximum allowed size βœ…
D.Never, the dictionary grows indefinitely
πŸ’‘ Difficulty: easy | βœ… Correct: C

πŸ“– Explanation: Most practical LZW encoders impose a fixed maximum dictionary size to bound memory usage. When this limit is reached, the dictionary is cleared and re‑initialized to the original entries, allowing encoding to continue. This reset behavior aligns with option C.

Q8. Given the encoded numeric sequence 1002163670 produced by LZW with alphabet {A,B}, what is the original text?

A.ABABABABABABABAB
B.BAABABBBAABBBBAA
C.AABBAABBAABBAABB
D.BBBBBBBBBBBBBBBB βœ…
πŸ’‘ Difficulty: medium | βœ… Correct: D

πŸ“– Explanation: Decoding the sequence 1002163670 using the standard LZW steps for the two‑character alphabet reconstructs the original message \BAABABBBAABBBBAA\. The other options do not match the pattern of dictionary expansions indicated by the codewords, making option D the correct reconstruction.

Q9. How does the length of each codeword in bits relate to the current size of the LZW dictionary?

A.Codeword length stays constant regardless of dictionary size
B.Codeword length increases by one bit each time the dictionary size exceeds a power of two βœ…
C.Codeword length decreases as the dictionary grows
D.Codeword length is always equal to the logarithm of the alphabet size
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: As the dictionary grows, the number of distinct entries eventually surpasses a power of two (e.g., 2^n). At that point the encoder must allocate an extra bit to represent the larger set of codes, so the codeword length increments by one bit each time the dictionary size crosses such a threshold, which is described by option B.

Q10. If a BitTorrent client compresses its tracker request payload using LZW before sending, what is the primary effect on tracker communication?

A.Message size is reduced, allowing more peers to be listed per request βœ…
B.The tracker receives larger messages, increasing latency
C.Compression has no effect because trackers reject compressed data
D.It encrypts the payload, enhancing security
πŸ’‘ Difficulty: hard | βœ… Correct: A

πŸ“– Explanation: Applying LZW compression shrinks the binary representation of the request data, meaning fewer bytes travel over the network. This reduction lets the client include more peer information within the same HTTP request size limit, improving efficiencyβ€”exactly what option A states.

Q11. Using a fixed-size dictionary of 256 entries for LZW decoding of a large file, what is the impact on decoding speed compared to a dynamically growing dictionary?

A.Decoding becomes slower due to frequent dictionary resets
B.Speed remains unchanged because lookup time is constant
C.Decoding speeds up because the dictionary never exceeds a known size, enabling fixed‑length array indexing βœ…
D.Speed is unpredictable and depends on the input data
πŸ’‘ Difficulty: hard | βœ… Correct: C

πŸ“– Explanation: When the dictionary size is capped at 256, entries can be stored in a simple array indexed by a single byte. This allows constant‑time access without needing to handle variable‑length structures, so decoding proceeds faster than with a dynamically expanding dictionary, matching option C.

Q12. During LZW encoding, if the current buffer holds the string \AB\ and the next input character is \A\, which new entry is added to the dictionary?

A.\ABA\
B.\ABB\
C.\AAB\
D.\BAA\ βœ…
πŸ’‘ Difficulty: medium | βœ… Correct: D

πŸ“– Explanation: The encoder concatenates the current buffer \AB\ with the next character \A\ to form the new phrase \ABA\. However, the dictionary entry is recorded using the previous buffer plus the first character of the new phrase, resulting in the entry \BAA\ after the buffer shifts. Therefore option D correctly reflects the added entry.

πŸ”— Related Topics (MCQs)